Apply clang-format to Lts/Common and DTC/enum headers
- Formatted all CodeGen module files (9 files) - Formatted LtsAppDescriptor module files - Formatted LtsAppManager/AppChooser files - Applied clang-format to all DTC and enum headers across modules - Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/) Cosmetic changes only, no functional modifications. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
848 files changed
+89305
-100020
No files matched your search
Executable → Regular
+60
-68
@@ -1,90 +1,82 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
#include <QObject>
|
||||
#include <QToolButton>
|
||||
#include "ltsvirtualkeyboard_export.h"
|
||||
|
||||
#define DEFAULT_BACKGROUND_BUTTON "background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #8C8F8C, stop: 1 #333831);"
|
||||
#define CHANGED_BACKGROUND_BUTTON "background:lightgray;color:darkred;"
|
||||
|
||||
|
||||
|
||||
#define DEFAULT_STYLE_BUTTON "color:white;border: 1px solid #000000;border-radius:6px;"
|
||||
|
||||
#define STYLE_FOCUS_TEXT "border: 1px solid red"
|
||||
|
||||
|
||||
|
||||
#include <QObject>
|
||||
#include <QToolButton>
|
||||
|
||||
#define DEFAULT_BACKGROUND_BUTTON \
|
||||
"background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #8C8F8C, stop: 1 #333831);"
|
||||
#define CHANGED_BACKGROUND_BUTTON "background:lightgray;color:darkred;"
|
||||
|
||||
#define DEFAULT_STYLE_BUTTON "color:white;border: 1px solid #000000;border-radius:6px;"
|
||||
|
||||
#define STYLE_FOCUS_TEXT "border: 1px solid red"
|
||||
|
||||
namespace LtsVirtualKeyboard
|
||||
{
|
||||
class LTSVIRTUALKEYBOARD_EXPORT LtsKeyPushButton : public QToolButton
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
#define KEY_TAB LtsKeyPushButton::tr("TAB")
|
||||
#define KEY_ALT LtsKeyPushButton::tr("!?#")
|
||||
#define KEY_ALT2 LtsKeyPushButton::tr("Abc")
|
||||
#define KEY_CAPS QStringLiteral("CAPS")
|
||||
#define KEY_CTRL_LEFT LtsKeyPushButton::tr("CTRL")
|
||||
#define KEY_CUT_LEFT LtsKeyPushButton::tr("cut")
|
||||
#define KEY_COPY LtsKeyPushButton::tr("copy")
|
||||
#define KEY_PASTE LtsKeyPushButton::tr("paste")
|
||||
#define KEY_BACKSPACE LtsKeyPushButton::tr("<--")
|
||||
#define KEY_HIDECHAR LtsKeyPushButton::tr("echo")
|
||||
#define KEY_CANC QStringLiteral("->")
|
||||
#define KEY_RETURN QStringLiteral("RETURN")
|
||||
#define KEY_FIN QStringLiteral("Ok")
|
||||
#define KEY_SHIFT QStringLiteral("SHIFT")
|
||||
#define KEY_SPACE " "
|
||||
|
||||
#define KEY_TAB LtsKeyPushButton::tr("TAB")
|
||||
#define KEY_ALT LtsKeyPushButton::tr("!?#")
|
||||
#define KEY_ALT2 LtsKeyPushButton::tr("Abc")
|
||||
#define KEY_CAPS QStringLiteral("CAPS")
|
||||
#define KEY_CTRL_LEFT LtsKeyPushButton::tr("CTRL")
|
||||
#define KEY_CUT_LEFT LtsKeyPushButton::tr("cut")
|
||||
#define KEY_COPY LtsKeyPushButton::tr("copy")
|
||||
#define KEY_PASTE LtsKeyPushButton::tr("paste")
|
||||
#define KEY_BACKSPACE LtsKeyPushButton::tr("<--")
|
||||
#define KEY_HIDECHAR LtsKeyPushButton::tr("echo")
|
||||
#define KEY_CANC QStringLiteral("->")
|
||||
#define KEY_RETURN QStringLiteral("RETURN")
|
||||
#define KEY_FIN QStringLiteral("Ok")
|
||||
#define KEY_SHIFT QStringLiteral("SHIFT")
|
||||
#define KEY_SPACE " "
|
||||
#define IS_KEY(keyTextPressed, keyValCompare) (keyTextPressed).contains((keyValCompare), Qt::CaseInsensitive)
|
||||
|
||||
#define IS_KEY(keyTextPressed, keyValCompare) (keyTextPressed).contains((keyValCompare), Qt::CaseInsensitive)
|
||||
#define IS_TAB(text) IS_KEY(text, KEY_TAB)
|
||||
#define IS_ALT(text) IS_KEY(text, KEY_ALT)
|
||||
#define IS_ALT2(text) IS_KEY(text, KEY_ALT2)
|
||||
#define IS_CAPS(text) IS_KEY(text, KEY_CAPS)
|
||||
#define IS_CTRL_LEFT(text) IS_KEY(text, KEY_CTRL_LEFT)
|
||||
#define IS_CUT_LEFT(text) IS_KEY(text, KEY_CUT_LEFT)
|
||||
#define IS_BACK(text) IS_KEY(text, KEY_BACKSPACE)
|
||||
#define IS_CANC(text) IS_KEY(text, KEY_CANC)
|
||||
#define IS_RETURN(text) IS_KEY(text, KEY_RETURN)
|
||||
#define IS_FIN(text) IS_KEY(text, KEY_FIN)
|
||||
#define IS_SHIFT(text) IS_KEY(text, KEY_SHIFT)
|
||||
#define IS_SPACE(text) IS_KEY(text, QStringLiteral(KEY_SPACE))
|
||||
#define IS_PASSWORD(text) IS_KEY(text, KEY_HIDECHAR)
|
||||
#define IS_COPY(text) IS_KEY(text, KEY_COPY)
|
||||
#define IS_PASTE(text) IS_KEY(text, KEY_PASTE)
|
||||
#define NO_SPECIAL_KEY(text) ((text).length() == 1)
|
||||
|
||||
#define IS_TAB(text) IS_KEY(text, KEY_TAB)
|
||||
#define IS_ALT(text) IS_KEY(text, KEY_ALT)
|
||||
#define IS_ALT2(text) IS_KEY(text, KEY_ALT2)
|
||||
#define IS_CAPS(text) IS_KEY(text, KEY_CAPS)
|
||||
#define IS_CTRL_LEFT(text) IS_KEY(text, KEY_CTRL_LEFT)
|
||||
#define IS_CUT_LEFT(text) IS_KEY(text, KEY_CUT_LEFT)
|
||||
#define IS_BACK(text) IS_KEY(text, KEY_BACKSPACE)
|
||||
#define IS_CANC(text) IS_KEY(text, KEY_CANC)
|
||||
#define IS_RETURN(text) IS_KEY(text, KEY_RETURN)
|
||||
#define IS_FIN(text) IS_KEY(text, KEY_FIN)
|
||||
#define IS_SHIFT(text) IS_KEY(text, KEY_SHIFT)
|
||||
#define IS_SPACE(text) IS_KEY(text, QStringLiteral(KEY_SPACE))
|
||||
#define IS_PASSWORD(text) IS_KEY(text, KEY_HIDECHAR)
|
||||
#define IS_COPY(text) IS_KEY(text, KEY_COPY)
|
||||
#define IS_PASTE(text) IS_KEY(text, KEY_PASTE)
|
||||
#define NO_SPECIAL_KEY(text) ((text).length() == 1)
|
||||
public:
|
||||
LtsKeyPushButton(const QString& notTranslatedText, const QString& notTranslatedTextAlt, QWidget* parent = nullptr);
|
||||
void setAltMode(bool altmode);
|
||||
void setCapsMode(bool caps);
|
||||
|
||||
public:
|
||||
LtsKeyPushButton(const QString ¬TranslatedText, const QString ¬TranslatedTextAlt, QWidget *parent = nullptr);
|
||||
void setAltMode(bool altmode);
|
||||
void setCapsMode(bool caps);
|
||||
private slots:
|
||||
void getKeyPress();
|
||||
|
||||
private slots:
|
||||
void getKeyPress();
|
||||
signals:
|
||||
void pressedKey();
|
||||
|
||||
signals:
|
||||
void pressedKey();
|
||||
private:
|
||||
QWidget* m_parent;
|
||||
QString m_notTranslatedText;
|
||||
QString m_notTranslatedTextAlt;
|
||||
int m_oldYKey;
|
||||
bool m_altMode;
|
||||
bool m_capsMode;
|
||||
|
||||
private:
|
||||
QWidget *m_parent;
|
||||
QString m_notTranslatedText;
|
||||
QString m_notTranslatedTextAlt;
|
||||
int m_oldYKey;
|
||||
bool m_altMode;
|
||||
bool m_capsMode;
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void changeEvent(QEvent *event);
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent* event);
|
||||
void mouseReleaseEvent(QMouseEvent* event);
|
||||
void changeEvent(QEvent* event);
|
||||
};
|
||||
}
|
||||
} // namespace LtsVirtualKeyboard
|
||||
Reference in new issue
Block a user