diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bc9c90a --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +* +!3rd/ +!3rd/** +!python_bindings/ +!python_bindings/** +!src/ +!src/** +!*.bat +!*.rc +!*.prp +!*.cpp +!*.qrc +!.gitignore \ No newline at end of file diff --git a/3rd/ElaWidgetTools/bin/ElaWidgetTools.dll b/3rd/ElaWidgetTools/bin/ElaWidgetTools.dll new file mode 100644 index 0000000..9074229 Binary files /dev/null and b/3rd/ElaWidgetTools/bin/ElaWidgetTools.dll differ diff --git a/3rd/ElaWidgetTools/include/ElaAcrylicUrlCard.h b/3rd/ElaWidgetTools/include/ElaAcrylicUrlCard.h new file mode 100644 index 0000000..09bab8b --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaAcrylicUrlCard.h @@ -0,0 +1,39 @@ +#ifndef ELAACRYLICURLCARD_H +#define ELAACRYLICURLCARD_H + +#include +#include + +#include "ElaDef.h" +#include "ElaProperty.h" +class ElaAcrylicUrlCardPrivate; +class ELA_EXPORT ElaAcrylicUrlCard : public QPushButton +{ + Q_OBJECT + Q_Q_CREATE(ElaAcrylicUrlCard); + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(qreal, MainOpacity) + Q_PROPERTY_CREATE_Q_H(qreal, NoiseOpacity) + Q_PROPERTY_CREATE_Q_H(int, BrushAlpha) + Q_PROPERTY_CREATE_Q_H(QString, Title); + Q_PROPERTY_CREATE_Q_H(QString, SubTitle); + Q_PROPERTY_CREATE_Q_H(int, TitlePixelSize); + Q_PROPERTY_CREATE_Q_H(int, SubTitlePixelSize); + Q_PROPERTY_CREATE_Q_H(int, TitleSpacing); + Q_PROPERTY_CREATE_Q_H(int, SubTitleSpacing); + Q_PROPERTY_CREATE_Q_H(QPixmap, CardPixmap); + Q_PROPERTY_CREATE_Q_H(QSize, CardPixmapSize); + Q_PROPERTY_CREATE_Q_H(int, CardPixmapBorderRadius) + Q_PROPERTY_CREATE_Q_H(ElaCardPixType::PixMode, CardPixMode); + Q_PROPERTY_CREATE_Q_H(QString, Url); + +public: + explicit ElaAcrylicUrlCard(QWidget* parent = nullptr); + ~ElaAcrylicUrlCard() override; + void setCardPixmapSize(int width, int height); + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAACRYLICURLCARD_H diff --git a/3rd/ElaWidgetTools/include/ElaActionCommander.h b/3rd/ElaWidgetTools/include/ElaActionCommander.h new file mode 100644 index 0000000..91e7367 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaActionCommander.h @@ -0,0 +1,45 @@ +#ifndef ELAACTIONCOMMANDER_H +#define ELAACTIONCOMMANDER_H + +#include +#include + +#include "ElaDef.h" +#include "ElaSingleton.h" + +class ELA_EXPORT ElaActionCommand : public QObject +{ + Q_OBJECT +public: + explicit ElaActionCommand(QObject* parent = nullptr); + ~ElaActionCommand() override; + + virtual void undo() = 0; + virtual void redo() = 0; +}; + +class ElaActionCommanderPrivate; +class ELA_EXPORT ElaActionCommander : public QObject +{ + Q_OBJECT + Q_Q_CREATE(ElaActionCommander) + Q_SINGLETON_CREATE_H(ElaActionCommander) + Q_PROPERTY_CREATE_Q_H(int, MaxRouteCount) +private: + explicit ElaActionCommander(QObject* parent = nullptr); + ~ElaActionCommander() override; + +Q_SIGNALS: + Q_SIGNAL void commanderStateChanged(const QString& domainName, ElaActionCommanderType::CommanderState state); + +public: + void recordCommand(const QString& domainName, ElaActionCommand* command, bool isRedo = true); + void clearCommand(const QString& domainName); + void undoCommand(const QString& domainName); + void redoCommand(const QString& domainName); + + ElaActionCommanderType::CommanderState getCommanderUndoState(const QString& domainName) const; + ElaActionCommanderType::CommanderState getCommanderRedoState(const QString& domainName) const; +}; + +#endif // ELAACTIONCOMMANDER_H diff --git a/3rd/ElaWidgetTools/include/ElaAppBar.h b/3rd/ElaWidgetTools/include/ElaAppBar.h new file mode 100644 index 0000000..eb963d8 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaAppBar.h @@ -0,0 +1,101 @@ +#ifndef ELAAPPBAR_H +#define ELAAPPBAR_H + +#include + +#include "ElaDef.h" + +#ifdef Q_OS_WIN +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#define Q_TAKEOVER_NATIVEEVENT_H virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override; +#else +#define Q_TAKEOVER_NATIVEEVENT_H virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override; +#endif +#else +#define Q_TAKEOVER_NATIVEEVENT_H +#endif + +#ifdef Q_OS_WIN +#define ELAAPPBAR_HANDLE(ElaAppBar) \ + if (ElaAppBar) \ + { \ + int ret = ElaAppBar->takeOverNativeEvent(eventType, message, result); \ + if (ret == -1) \ + { \ + return QWidget::nativeEvent(eventType, message, result); \ + } \ + return (bool)ret; \ + } \ + return QWidget::nativeEvent(eventType, message, result); +#endif + +#ifdef Q_OS_WIN +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#define Q_TAKEOVER_NATIVEEVENT_CPP(CLASS, ElaAppBar) \ + bool CLASS::nativeEvent(const QByteArray& eventType, void* message, qintptr* result) \ + { \ + ELAAPPBAR_HANDLE(ElaAppBar) \ + } +#else +#define Q_TAKEOVER_NATIVEEVENT_CPP(CLASS, ElaAppBar) \ + bool CLASS::nativeEvent(const QByteArray& eventType, void* message, long* result) \ + { \ + ELAAPPBAR_HANDLE(ElaAppBar) \ + } +#endif +#else +#define Q_TAKEOVER_NATIVEEVENT_CPP(CLASS, ElaAppBar) +#endif + +class QMenu; +class ElaAppBarPrivate; +class ELA_EXPORT ElaAppBar : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaAppBar) + Q_PROPERTY_CREATE_Q_H(bool, IsStayTop) + Q_PROPERTY_CREATE_Q_H(bool, IsFixedSize) + Q_PROPERTY_CREATE_Q_H(bool, IsDefaultClosed) + Q_PROPERTY_CREATE_Q_H(bool, IsOnlyAllowMinAndClose) + Q_PROPERTY_CREATE_Q_H(int, AppBarHeight) +public: + explicit ElaAppBar(QWidget* parent = nullptr); + ~ElaAppBar() override; + + void setCustomWidget(ElaAppBarType::CustomArea customArea, QWidget* customWidget, QObject* hitTestObject = nullptr, const QString& hitTestFunctionName = ""); + QWidget* getCustomWidget(ElaAppBarType::CustomArea customArea) const; + + void setCustomMenu(QMenu* customMenu); + QMenu* getCustomMenu() const; + + void setWindowButtonFlag(ElaAppBarType::ButtonType buttonFlag, bool isEnable = true); + void setWindowButtonFlags(ElaAppBarType::ButtonFlags buttonFlags); + ElaAppBarType::ButtonFlags getWindowButtonFlags() const; + + void setRouteBackButtonEnable(bool isEnable); + void setRouteForwardButtonEnable(bool isEnable); + +#ifdef Q_OS_WIN +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + int takeOverNativeEvent(const QByteArray& eventType, void* message, qintptr* result); +#else + int takeOverNativeEvent(const QByteArray& eventType, void* message, long* result); +#endif +#endif +Q_SIGNALS: + Q_SIGNAL void routeBackButtonClicked(); + Q_SIGNAL void routeForwardButtonClicked(); + Q_SIGNAL void navigationButtonClicked(); + Q_SIGNAL void themeChangeButtonClicked(); + Q_SIGNAL void closeButtonClicked(); + Q_SIGNAL void customWidgetChanged(); + Q_SIGNAL void customMenuChanged(); + +protected: + virtual bool eventFilter(QObject* obj, QEvent* event) override; +#ifdef Q_OS_WIN + virtual void paintEvent(QPaintEvent* event) override; +#endif +}; + +#endif // ELAAPPBAR_H diff --git a/3rd/ElaWidgetTools/include/ElaApplication.h b/3rd/ElaWidgetTools/include/ElaApplication.h new file mode 100644 index 0000000..57ba60a --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaApplication.h @@ -0,0 +1,28 @@ +#ifndef ELAAPPLICATION_H +#define ELAAPPLICATION_H + +#include +#include + +#include "ElaDef.h" +#include "ElaSingleton.h" +#define eApp ElaApplication::getInstance() +class ElaApplicationPrivate; +class ELA_EXPORT ElaApplication : public QObject +{ + Q_OBJECT + Q_Q_CREATE(ElaApplication) + Q_SINGLETON_CREATE_H(ElaApplication) + Q_PROPERTY_CREATE_Q_H(ElaApplicationType::WindowDisplayMode, WindowDisplayMode) + Q_PROPERTY_CREATE_Q_H(QString, ElaMicaImagePath) +private: + explicit ElaApplication(QObject* parent = nullptr); + ~ElaApplication() override; + +public: + void init(); + void syncWindowDisplayMode(QWidget* widget, bool isSync = true); + static bool containsCursorToItem(QWidget* item); +}; + +#endif // ELAAPPLICATION_H diff --git a/3rd/ElaWidgetTools/include/ElaBreadcrumbBar.h b/3rd/ElaWidgetTools/include/ElaBreadcrumbBar.h new file mode 100644 index 0000000..d382b36 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaBreadcrumbBar.h @@ -0,0 +1,28 @@ +#ifndef ELABREADCRUMBBAR_H +#define ELABREADCRUMBBAR_H +#include + +#include "ElaProperty.h" + +class ElaBreadcrumbBarPrivate; +class ELA_EXPORT ElaBreadcrumbBar : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaBreadcrumbBar) + Q_PROPERTY_CREATE_Q_H(int, TextPixelSize) + Q_PROPERTY_CREATE_Q_H(bool, IsAutoRemove) +public: + explicit ElaBreadcrumbBar(QWidget* parent = nullptr); + ~ElaBreadcrumbBar() override; + void setBreadcrumbList(QStringList breadcrumbList); + QStringList appendBreadcrumb(QString breadcrumb); + QStringList removeBreadcrumb(QString breadcrumb); + + int getBreadcrumbListCount() const; + QStringList getBreadcrumbList() const; + +Q_SIGNALS: + Q_SIGNAL void breadcrumbClicked(QString breadcrumb, QStringList lastBreadcrumbList); +}; + +#endif // ELABREADCRUMBBAR_H diff --git a/3rd/ElaWidgetTools/include/ElaCalendar.h b/3rd/ElaWidgetTools/include/ElaCalendar.h new file mode 100644 index 0000000..698a207 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaCalendar.h @@ -0,0 +1,26 @@ +#ifndef ELACALENDAR_H +#define ELACALENDAR_H + +#include "ElaProperty.h" +#include +#include +class ElaCalendarPrivate; +class ELA_EXPORT ElaCalendar : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaCalendar) + Q_PROPERTY_CREATE_Q_H(int, BorderRaiuds) + Q_PROPERTY_CREATE_Q_H(QDate, SelectedDate) + Q_PROPERTY_CREATE_Q_H(QDate, MinimumDate) + Q_PROPERTY_CREATE_Q_H(QDate, MaximumDate) +public: + explicit ElaCalendar(QWidget* parent = nullptr); + ~ElaCalendar() override; +Q_SIGNALS: + Q_SIGNAL void clicked(QDate date); + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELACALENDAR_H diff --git a/3rd/ElaWidgetTools/include/ElaCalendarPicker.h b/3rd/ElaWidgetTools/include/ElaCalendarPicker.h new file mode 100644 index 0000000..ea20e5e --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaCalendarPicker.h @@ -0,0 +1,25 @@ +#ifndef ELACALENDARPICKER_H +#define ELACALENDARPICKER_H + +#include "ElaProperty.h" +#include +#include +class ElaCalendarPickerPrivate; +class ELA_EXPORT ElaCalendarPicker : public QPushButton +{ + Q_OBJECT + Q_Q_CREATE(ElaCalendarPicker) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PRIVATE_CREATE_Q_H(QDate, SelectedDate) +public: + explicit ElaCalendarPicker(QWidget* parent = nullptr); + ~ElaCalendarPicker() override; + +Q_SIGNALS: + Q_SIGNAL void selectedDateChanged(QDate date); + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELACALENDARPICKER_H diff --git a/3rd/ElaWidgetTools/include/ElaCheckBox.h b/3rd/ElaWidgetTools/include/ElaCheckBox.h new file mode 100644 index 0000000..18f2fe7 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaCheckBox.h @@ -0,0 +1,17 @@ +#ifndef ELACHECKBOX_H +#define ELACHECKBOX_H + +#include + +#include "ElaProperty.h" +class ELA_EXPORT ElaCheckBox : public QCheckBox +{ + Q_OBJECT + Q_PROPERTY_CREATE(int, BorderRadius) +public: + explicit ElaCheckBox(QWidget* parent = nullptr); + explicit ElaCheckBox(const QString& text, QWidget* parent = nullptr); + ~ElaCheckBox() override; +}; + +#endif // ELACHECKBOX_H diff --git a/3rd/ElaWidgetTools/include/ElaColorDialog.h b/3rd/ElaWidgetTools/include/ElaColorDialog.h new file mode 100644 index 0000000..3e6c4d0 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaColorDialog.h @@ -0,0 +1,29 @@ +#ifndef ELACOLORDIALOG_H +#define ELACOLORDIALOG_H + +#include + +#include "ElaAppBar.h" +#include "ElaProperty.h" +class ElaColorDialogPrivate; +class ELA_EXPORT ElaColorDialog : public QDialog +{ + Q_OBJECT + Q_Q_CREATE(ElaColorDialog) + Q_PROPERTY_CREATE_Q_H(QColor, CurrentColor) + Q_TAKEOVER_NATIVEEVENT_H +public: + explicit ElaColorDialog(QWidget* parent = nullptr); + ~ElaColorDialog() override; + + QList getCustomColorList() const; + QColor getCustomColor(int index) const; + QString getCurrentColorRGB() const; +Q_SIGNALS: + Q_SIGNAL void colorSelected(const QColor& color); + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELACOLORDIALOG_H diff --git a/3rd/ElaWidgetTools/include/ElaComboBox.h b/3rd/ElaWidgetTools/include/ElaComboBox.h new file mode 100644 index 0000000..cb08083 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaComboBox.h @@ -0,0 +1,26 @@ +#ifndef ELACOMBOBOX_H +#define ELACOMBOBOX_H + +#include + +#include "ElaProperty.h" + +class ElaComboBoxPrivate; +class ELA_EXPORT ElaComboBox : public QComboBox +{ + Q_OBJECT + Q_Q_CREATE(ElaComboBox); + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) +public: + explicit ElaComboBox(QWidget* parent = nullptr); + ~ElaComboBox() override; + + void setEditable(bool editable); + +protected: + virtual void showPopup() override; + virtual void hidePopup() override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELACOMBOBOX_H diff --git a/3rd/ElaWidgetTools/include/ElaContentDialog.h b/3rd/ElaWidgetTools/include/ElaContentDialog.h new file mode 100644 index 0000000..d9a112f --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaContentDialog.h @@ -0,0 +1,38 @@ +#ifndef ELACONTENTDIALOG_H +#define ELACONTENTDIALOG_H +#include +#include + +#include "ElaAppBar.h" +#include "ElaProperty.h" +class ElaContentDialogPrivate; +class ELA_EXPORT ElaContentDialog : public QDialog +{ + Q_OBJECT + Q_Q_CREATE(ElaContentDialog) + Q_TAKEOVER_NATIVEEVENT_H +public: + explicit ElaContentDialog(QWidget* parent); + ~ElaContentDialog() override; + Q_SLOT virtual void onLeftButtonClicked(); + Q_SLOT virtual void onMiddleButtonClicked(); + Q_SLOT virtual void onRightButtonClicked(); + void setCentralWidget(QWidget* centralWidget); + + void setLeftButtonText(QString text); + void setMiddleButtonText(QString text); + void setRightButtonText(QString text); + + void close(); +Q_SIGNALS: + Q_SIGNAL void leftButtonClicked(); + Q_SIGNAL void middleButtonClicked(); + Q_SIGNAL void rightButtonClicked(); + +protected: + virtual void showEvent(QShowEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; + virtual void keyPressEvent(QKeyEvent* event) override; +}; + +#endif // ELACONTENTDIALOG_H diff --git a/3rd/ElaWidgetTools/include/ElaDef.h b/3rd/ElaWidgetTools/include/ElaDef.h new file mode 100644 index 0000000..532a507 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaDef.h @@ -0,0 +1,3581 @@ +#ifndef ELADEF_H +#define ELADEF_H +#include + +#include "ElaProperty.h" +#define ElaDefVersion "2.0.3" + +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) +#define Q_BEGIN_ENUM_CREATE(CLASS) \ + namespace CLASS \ + { \ + Q_NAMESPACE_EXPORT(ELA_EXPORT) + +#define Q_END_ENUM_CREATE(CLASS) } + +#define Q_ENUM_CREATE(CLASS) Q_ENUM_NS(CLASS) +#else +#define Q_BEGIN_ENUM_CREATE(CLASS) \ + class ELA_EXPORT CLASS : public QObject \ + { \ + Q_OBJECT \ + public: + +#define Q_END_ENUM_CREATE(CLASS) \ +private: \ + Q_DISABLE_COPY(CLASS) \ + } \ + ; + +#define Q_ENUM_CREATE(CLASS) Q_ENUM(CLASS) +#endif + +Q_BEGIN_ENUM_CREATE(ElaApplicationType) +enum WindowDisplayMode +{ + Normal = 0x0000, + ElaMica = 0x0001, +#if defined(Q_OS_WIN) + Mica = 0x0002, + MicaAlt = 0x0003, + Acrylic = 0x0004, + DWMBlur = 0x0005, +#endif +}; +Q_ENUM_CREATE(WindowDisplayMode) +Q_END_ENUM_CREATE(ElaApplicationType) + +Q_BEGIN_ENUM_CREATE(ElaThemeType) +enum ThemeMode +{ + Light = 0x0000, + Dark = 0x0001, +}; +Q_ENUM_CREATE(ThemeMode) + +enum ThemeColor +{ + ScrollBarHandle, + ToggleSwitchNoToggledCenter, + WindowBase, + WindowCentralStackBase, + PrimaryNormal, + PrimaryHover, + PrimaryPress, + PopupBorder, + PopupBorderHover, + PopupBase, + PopupHover, + DialogBase, + DialogLayoutArea, + BasicText, + BasicTextInvert, + BasicDetailsText, + BasicTextNoFocus, + BasicTextDisable, + BasicTextPress, + BasicTextCategory, + BasicBorder, + BasicBorderDeep, + BasicBorderHover, + BasicBase, + BasicBaseDeep, + BasicDisable, + BasicHover, + BasicPress, + BasicSelectedHover, + BasicBaseLine, + BasicHemline, + BasicIndicator, + BasicChute, + BasicAlternating, + BasicBaseAlpha, + BasicBaseDeepAlpha, + BasicHoverAlpha, + BasicPressAlpha, + BasicSelectedAlpha, + BasicSelectedHoverAlpha, + StatusDanger, + Win10BorderActive, + Win10BorderInactive +}; +Q_ENUM_CREATE(ThemeColor) +Q_END_ENUM_CREATE(ElaThemeType) + +Q_BEGIN_ENUM_CREATE(ElaAppBarType) +enum ButtonType +{ + NoneButtonHint = 0x0000, + RouteBackButtonHint = 0x0001, + RouteForwardButtonHint = 0x0002, + NavigationButtonHint = 0x0004, + StayTopButtonHint = 0x0008, + ThemeChangeButtonHint = 0x0010, + MinimizeButtonHint = 0x00020, + MaximizeButtonHint = 0x0040, + CloseButtonHint = 0x0080, +}; +Q_ENUM_CREATE(ButtonType) +Q_DECLARE_FLAGS(ButtonFlags, ButtonType) + +enum CustomArea +{ + LeftArea = 0x0001, + MiddleArea = 0x0002, + RightArea = 0x0003, +}; +Q_ENUM_CREATE(CustomArea) + +enum WMMouseActionType +{ + WMLBUTTONDOWN = 0x0001, + WMLBUTTONUP = 0x0002, + WMLBUTTONDBLCLK = 0x0004, + WMNCLBUTTONDOWN = 0x0008, +}; +Q_ENUM_CREATE(WMMouseActionType) +Q_DECLARE_FLAGS(WMMouseActionTypes, WMMouseActionType) +Q_END_ENUM_CREATE(ElaAppBarType) +Q_DECLARE_OPERATORS_FOR_FLAGS(ElaAppBarType::ButtonFlags) +Q_DECLARE_OPERATORS_FOR_FLAGS(ElaAppBarType::WMMouseActionTypes) + +Q_BEGIN_ENUM_CREATE(ElaTextType) +enum TextStyle +{ + NoStyle = 0x0000, + Caption = 0x0001, + Body = 0x0002, + BodyStrong = 0x0003, + Subtitle = 0x0004, + Title = 0x0005, + TitleLarge = 0x0006, + Display = 0x0007, +}; +Q_ENUM_CREATE(TextStyle) +Q_END_ENUM_CREATE(ElaTextType) + +Q_BEGIN_ENUM_CREATE(ElaNavigationType) +enum NodeResult +{ + Success = 0x0000, + TargetNodeInvalid = 0x0001, + TargetNodeTypeError = 0x0002, + TargetNodeDepthLimit = 0x0003, + PageInvalid = 0x0004, + FooterUpperLimit = 0x0005, +}; +Q_ENUM_CREATE(NodeResult) + +enum NavigationDisplayMode +{ + Auto = 0x0000, + Minimal = 0x0001, + Compact = 0x0002, + Maximal = 0x0003, +}; +Q_ENUM_CREATE(NavigationDisplayMode) + +enum NavigationNodeType +{ + PageNode = 0x0000, + FooterNode = 0x0001, + CategoryNode = 0x0002 +}; +Q_ENUM_CREATE(NavigationNodeType) +Q_END_ENUM_CREATE(ElaNavigationType) + +Q_BEGIN_ENUM_CREATE(ElaActionCommanderType) +enum CommanderState +{ + UndoValid = 0x0000, + UndoInvalid = 0x0001, + RedoValid = 0x0002, + RedoInvalid = 0x0003, +}; +Q_ENUM_CREATE(CommanderState) +Q_END_ENUM_CREATE(ElaActionCommanderType) + +Q_BEGIN_ENUM_CREATE(ElaEventBusType) +enum EventBusReturnType +{ + Success = 0x0000, + EventInvalid = 0x0001, + EventNameInvalid = 0x0002, + +}; +Q_ENUM_CREATE(EventBusReturnType) +Q_END_ENUM_CREATE(ElaEventBusType) + +Q_BEGIN_ENUM_CREATE(ElaCardPixType) +enum PixMode +{ + Default = 0x0000, + RoundedRect = 0x0001, + Ellipse = 0x0002, +}; +Q_ENUM_CREATE(PixMode) +Q_END_ENUM_CREATE(ElaCardPixType) + +Q_BEGIN_ENUM_CREATE(ElaGraphicsSceneType) +enum SceneMode +{ + Default = 0x0000, + DragMove = 0x0001, + MultiSelect = 0x0002, + ItemLink = 0x0003, +}; +Q_ENUM_CREATE(SceneMode) +Q_END_ENUM_CREATE(ElaGraphicsSceneType) + +Q_BEGIN_ENUM_CREATE(ElaMessageBarType) +enum PositionPolicy +{ + Top = 0x0000, + Left = 0x0001, + Bottom = 0x0002, + Right = 0x0003, + TopRight = 0x0004, + TopLeft = 0x0005, + BottomRight = 0x0006, + BottomLeft = 0x0007, +}; +Q_ENUM_CREATE(PositionPolicy) + +enum MessageMode +{ + Success = 0x0000, + Warning = 0x0001, + Information = 0x0002, + Error = 0x0003, +}; +Q_ENUM_CREATE(MessageMode) +Q_END_ENUM_CREATE(ElaMessageBarType) + +Q_BEGIN_ENUM_CREATE(ElaProgressRingType) +enum ValueDisplayMode +{ + Actual = 0x0000, + Percent = 0x0001, +}; +Q_ENUM_CREATE(ValueDisplayMode) +Q_END_ENUM_CREATE(ElaProgressRingType) + +Q_BEGIN_ENUM_CREATE(ElaWindowType) +enum StackSwitchMode +{ + None = 0x0000, + Popup = 0x0001, + Scale = 0x0002, + Flip = 0x0003, + Blur = 0x0004, +}; +Q_ENUM_CREATE(StackSwitchMode) + +enum PaintMode +{ + Normal = 0x0000, + Pixmap = 0x0001, + Movie = 0x0002, +}; +Q_ENUM_CREATE(PaintMode) +Q_END_ENUM_CREATE(ElaWindowType) + +Q_BEGIN_ENUM_CREATE(ElaSpinBoxType) +enum ButtonMode +{ + Inline = 0x0000, + Compact = 0x0001, + Side = 0x0002, + PMSide = 0x0003, +}; +Q_ENUM_CREATE(ButtonMode) +Q_END_ENUM_CREATE(ElaSpinBoxType) + +Q_BEGIN_ENUM_CREATE(ElaIconType) +enum IconName +{ + None = 0x0, + Broom = 0xe800, + Number00 = 0xe801, + Numbe0 = 0xe802, + Numbe1 = 0xe803, + Numbe2 = 0xe804, + Numbe3 = 0xe805, + Numbe4 = 0xe806, + Numbe5 = 0xe807, + Numbe6 = 0xe809, + Numbe7 = 0xe808, + Numbe8 = 0xe80b, + Numbe9 = 0xe80a, + Degrees360 = 0xe80c, + A = 0xe80d, + Abacus = 0xe80e, + AccentGrave = 0xe80f, + Acorn = 0xe810, + AddressBook = 0xe811, + AddressCard = 0xe812, + AirConditioner = 0xe813, + Airplay = 0xe814, + AlarmClock = 0xe815, + AlarmExclamation = 0xe816, + AlarmPlus = 0xe817, + Album = 0xe818, + AlbumCirclePlus = 0xe819, + AlbumCircleUser = 0xe81a, + AlbumCollection = 0xe81b, + AlbumCollectionCirclePlus = 0xe81c, + AlarmSnooze = 0xe81d, + AlbumCollectionCircleUser = 0xe81e, + Alicorn = 0xe81f, + Alien8bit = 0xe820, + AlignCenter = 0xe821, + AlignLeft = 0xe822, + AlignRight = 0xe823, + Ampersand = 0xe824, + Alt = 0xe825, + AnchorCircleExclamation = 0xe826, + AlignSlash = 0xe827, + Apartment = 0xe83b, + Ankh = 0xe83a, + AngleUp = 0xe839, + AnglesUpDown = 0xe838, + AnglesRight = 0xe837, + AnglesUp = 0xe836, + AnglesDown = 0xe835, + AnglesLeft = 0xe834, + AngleRight = 0xe833, + AngleDown = 0xe832, + AnchorCircleCheck = 0xe831, + Alien = 0xe830, + Angle90 = 0xe82f, + Angel = 0xe82e, + Angle = 0xe82c, + AnchorCircleXmark = 0xe82d, + AnchorLock = 0xe82b, + Anchor = 0xe82a, + AlignJustify = 0xe829, + AmpGuitar = 0xe828, + Aperture = 0xe83c, + Apostrophe = 0xe83d, + AppleCore = 0xe83e, + AngleLeft = 0xe83f, + AppleWhole = 0xe840, + Archway = 0xe841, + ArrowDown = 0xe842, + ArrowDown19 = 0xe843, + ArrowDownUpAcrossLine = 0xe857, + ArrowDown91 = 0xe844, + ArrowDownArrowUp = 0xe845, + ArrowDownAZ = 0xe846, + ArrowDownBigSmall = 0xe847, + ArrowDownFromArc = 0xe848, + ArrowDownFromDottedLine = 0xe849, + ArrowDownFromLine = 0xe84a, + ArrowDownLeft = 0xe84b, + ArrowDownLeftAndArrowUpRightToCenter = 0xe84c, + ArrowDownLong = 0xe84d, + ArrowDownRight = 0xe84e, + ArrowDownShortWide = 0xe84f, + ArrowDownUpLock = 0xe858, + ArrowDownWideShort = 0xe859, + ArrowDownZA = 0xe85a, + ArrowLeft = 0xe85b, + ArrowLeftFromArc = 0xe85c, + ArrowLeftFromLine = 0xe85d, + ArrowLeftLong = 0xe85e, + ArrowLeftLongToLine = 0xe85f, + ArrowLeftToArc = 0xe860, + ArrowPointer = 0xe861, + ArrowDownToSquare = 0xe862, + ArrowLeftToLine = 0xe863, + ArrowRightToArc = 0xe86c, + ArrowRightToBracket = 0xe86d, + ArrowRightToCity = 0xe86e, + ArrowRightToLine = 0xe86f, + ArrowRotateLeft = 0xe870, + ArrowRotateRight = 0xe871, + ArrowsCross = 0xe872, + ArrowsDownToLine = 0xe873, + ArrowsDownToPeople = 0xe874, + ArrowsFromDottedLine = 0xe875, + ArrowsFromLine = 0xe876, + ArrowsLeftRight = 0xe877, + ArrowsSpin = 0xe880, + ArrowsSplitUpAndLeft = 0xe881, + ArrowsToCircle = 0xe882, + ArrowsToDot = 0xe883, + ArrowsToDottedLine = 0xe884, + ArrowsToEye = 0xe885, + ArrowsToLine = 0xe886, + ArrowsTurnRight = 0xe887, + ArrowsTurnToDots = 0xe888, + ArrowsUpDown = 0xe889, + ArrowsUpDownLeftRight = 0xe88a, + ArrowsUpToLine = 0xe88b, + ArrowTurnRight = 0xe894, + ArrowTurnUp = 0xe895, + ArrowUp = 0xe896, + ArrowUp19 = 0xe897, + ArrowUp91 = 0xe898, + ArrowUpArrowDown = 0xe899, + ArrowUpAZ = 0xe89a, + ArrowUpBigSmall = 0xe89b, + ArrowUpFromArc = 0xe89c, + ArrowUpFromBracket = 0xe89d, + ArrowUpFromDottedLine = 0xe89e, + ArrowUpFromGroundWater = 0xe89f, + ArrowUpRightDots = 0xe8a8, + ArrowUpRightFromSquare = 0xe8a9, + ArrowUpShortWide = 0xe8aa, + ArrowUpSmallBig = 0xe8ab, + ArrowUpSquareTriangle = 0xe8ac, + ArrowUpToArc = 0xe8ad, + ArrowUpToDottedLine = 0xe8ae, + ArrowUpToLine = 0xe8af, + ArrowUpTriangleSquare = 0xe8b0, + ArrowUpWideShort = 0xe8b1, + ArrowUpZA = 0xe8b2, + Asterisk = 0xe8b3, + AwardSimple = 0xe8bc, + Axe = 0xe8bd, + AxeBattle = 0xe8be, + B = 0xe8bf, + Baby = 0xe8c0, + BabyCarriage = 0xe8c1, + Backpack = 0xe8c2, + Backward = 0xe8c3, + BackwardFast = 0xe8c4, + BackwardStep = 0xe8c5, + Bacon = 0xe8c6, + Bacteria = 0xe8c7, + Bagel = 0xe8d0, + BagSeedling = 0xe8d1, + BagShopping = 0xe8d2, + BagShoppingMinus = 0xe8d3, + BagShoppingPlus = 0xe8d4, + BagsShopping = 0xe8d5, + Baguette = 0xe8d6, + Bahai = 0xe8d7, + BahtSign = 0xe8d8, + Balloon = 0xe8d9, + Balloons = 0xe8da, + Ballot = 0xe8db, + ArrowDownSquareTriangle = 0xe850, + ArrowDownSmallBig = 0xe851, + ArrowDownToArc = 0xe852, + ArrowDownToBracket = 0xe853, + ArrowDownToDottedLine = 0xe854, + ArrowDownToLine = 0xe855, + ArrowDownTriangleSquare = 0xe856, + ArrowProgress = 0xe864, + ArrowRight = 0xe865, + ArrowRightArrowLeft = 0xe866, + ArrowRightFromArc = 0xe867, + ArrowRightFromBracket = 0xe868, + ArrowRightFromLine = 0xe869, + ArrowRightLong = 0xe86a, + ArrowRightLongToLine = 0xe86b, + ArrowsLeftRightToLine = 0xe878, + ArrowsMaximize = 0xe879, + ArrowsMinimize = 0xe87a, + ArrowsRepeat = 0xe87b, + ArrowsRepeat1 = 0xe87c, + ArrowsRetweet = 0xe87d, + ArrowsRotate = 0xe87e, + ArrowsRotateReverse = 0xe87f, + ArrowTrendDown = 0xe88c, + ArrowTrendUp = 0xe88d, + ArrowTurnDown = 0xe88e, + ArrowTurnDownLeft = 0xe88f, + ArrowTurnDownRight = 0xe890, + ArrowTurnLeft = 0xe891, + ArrowTurnLeftDown = 0xe892, + ArrowTurnLeftUp = 0xe893, + ArrowUpFromLine = 0xe8a0, + ArrowUpFromSquare = 0xe8a1, + ArrowUpFromWaterPump = 0xe8a2, + ArrowUpLeft = 0xe8a3, + ArrowUpLeftFromCircle = 0xe8a4, + ArrowUpLong = 0xe8a5, + ArrowUpRight = 0xe8a6, + ArrowUpRightAndArrowDownLeftFromCenter = 0xe8a7, + At = 0xe8b4, + Atom = 0xe8b5, + AtomSimple = 0xe8b6, + AudioDescription = 0xe8b7, + AudioDescriptionSlash = 0xe8b8, + AustralSign = 0xe8b9, + Avocado = 0xe8ba, + Award = 0xe8bb, + Badge = 0xe8c8, + Bacterium = 0xe8c9, + BadgeCheck = 0xe8ca, + BadgeDollar = 0xe8cb, + BadgePercent = 0xe8cc, + BadgerHoney = 0xe8cd, + BadgeSheriff = 0xe8ce, + Badminton = 0xe8cf, + BallotCheck = 0xe8dc, + BallPile = 0xe8dd, + Ban = 0xe8de, + Banana = 0xe8df, + BanBug = 0xe8e0, + Bandage = 0xe8e1, + BangladeshiTakaSign = 0xe8e2, + Banjo = 0xe8e3, + BanParking = 0xe8e4, + BanSmoking = 0xe8e5, + Barcode = 0xe8e6, + BarcodeRead = 0xe8e7, + BarcodeScan = 0xe8e8, + Bars = 0xe8e9, + BarsFilter = 0xe8ea, + BarsProgress = 0xe8eb, + BarsSort = 0xe8ec, + BarsStaggered = 0xe8ed, + Baseball = 0xe8ee, + BaseballBatBall = 0xe8ef, + Basketball = 0xe8f0, + BasketballHoop = 0xe8f1, + BasketShopping = 0xe8f2, + BasketShoppingMinus = 0xe8f3, + BasketShoppingPlus = 0xe8f4, + BasketShoppingSimple = 0xe8f5, + Bat = 0xe8f6, + Bath = 0xe8f7, + BatteryBolt = 0xe8f8, + BatteryEmpty = 0xe8f9, + BatteryExclamation = 0xe8fa, + BatteryFull = 0xe8fb, + BatteryHalf = 0xe8fc, + BatteryLow = 0xe8fd, + BatteryQuarter = 0xe8fe, + BatterySlash = 0xe8ff, + BatteryThreeQuarters = 0xe900, + Bed = 0xe901, + BedBunk = 0xe902, + BedEmpty = 0xe903, + BedFront = 0xe904, + BedPulse = 0xe905, + Bee = 0xe906, + BeerMug = 0xe907, + BeerMugEmpty = 0xe908, + Bell = 0xe909, + BellConcierge = 0xe90a, + BellExclamation = 0xe90b, + BellOn = 0xe90c, + BellPlus = 0xe90d, + BellRing = 0xe90e, + Bells = 0xe90f, + BellSchool = 0xe910, + BellSchoolSlash = 0xe911, + BellSlash = 0xe912, + BenchTree = 0xe913, + BezierCurve = 0xe914, + Bicycle = 0xe915, + Billboard = 0xe916, + Binary = 0xe917, + BinaryCircleCheck = 0xe918, + BinaryLock = 0xe919, + BinarySlash = 0xe91a, + BinBottles = 0xe91b, + BinBottlesRecycle = 0xe91c, + Binoculars = 0xe91d, + BinRecycle = 0xe91e, + Biohazard = 0xe91f, + Bird = 0xe920, + BitcoinSign = 0xe921, + Blanket = 0xe922, + BlanketFire = 0xe923, + Blender = 0xe924, + BlenderPhone = 0xe925, + Blinds = 0xe926, + BlindsOpen = 0xe927, + BlindsRaised = 0xe928, + Block = 0xe929, + BlockBrick = 0xe92a, + BlockBrickFire = 0xe92b, + BlockQuestion = 0xe92c, + BlockQuote = 0xe92d, + Blog = 0xe92e, + Blueberries = 0xe92f, + Bluetooth = 0xe930, + Bold = 0xe931, + Bolt = 0xe932, + BoltAuto = 0xe933, + BoltLightning = 0xe934, + BoltSlash = 0xe935, + Bomb = 0xe936, + Bone = 0xe937, + BoneBreak = 0xe938, + Bong = 0xe939, + Book = 0xe93a, + BookArrowRight = 0xe93b, + BookArrowUp = 0xe93c, + BookAtlas = 0xe93d, + BookBible = 0xe93e, + BookBlank = 0xe93f, + BookBookmark = 0xe940, + BookCircleArrowRight = 0xe941, + BookCircleArrowUp = 0xe942, + BookCopy = 0xe943, + BookFont = 0xe944, + BookHeart = 0xe945, + BookJournalWhills = 0xe946, + Bookmark = 0xe947, + BookmarkSlash = 0xe948, + BookMedical = 0xe949, + BookOpen = 0xe94a, + BookOpenCover = 0xe94b, + BookOpenReader = 0xe94c, + BookQuran = 0xe94d, + Books = 0xe94e, + BookSection = 0xe94f, + BookSkull = 0xe950, + BooksMedical = 0xe951, + BookSparkles = 0xe952, + BookTanakh = 0xe953, + BookUser = 0xe954, + Boombox = 0xe955, + Boot = 0xe956, + BoothCurtain = 0xe957, + BootHeeled = 0xe958, + BorderAll = 0xe959, + BorderBottom = 0xe95a, + BorderBottomRight = 0xe95b, + BorderCenterH = 0xe95c, + BorderCenterV = 0xe95d, + BorderInner = 0xe95e, + BorderLeft = 0xe95f, + BorderNone = 0xe960, + BorderOuter = 0xe961, + BorderRight = 0xe962, + BorderTop = 0xe963, + BorderTopLeft = 0xe964, + BoreHole = 0xe965, + BottleDroplet = 0xe966, + BottleWater = 0xe967, + BowArrow = 0xe968, + BowlChopsticks = 0xe969, + BowlChopsticksNoodles = 0xe96a, + BowlFood = 0xe96b, + BowlHot = 0xe96c, + BowlingBall = 0xe96d, + BowlingBallPin = 0xe96e, + BowlingPins = 0xe96f, + BowlRice = 0xe970, + BowlScoop = 0xe971, + BowlScoops = 0xe972, + BowlSoftServe = 0xe973, + BowlSpoon = 0xe974, + Box = 0xe975, + BoxArchive = 0xe976, + BoxBallot = 0xe977, + BoxCheck = 0xe978, + BoxCircleCheck = 0xe979, + BoxDollar = 0xe97a, + BoxesPacking = 0xe97b, + BoxesStacked = 0xe97c, + BoxHeart = 0xe97d, + BoxingGlove = 0xe97e, + BoxOpen = 0xe97f, + BoxOpenFull = 0xe980, + BoxTaped = 0xe981, + BoxTissue = 0xe982, + BracketCurly = 0xe983, + BracketCurlyRight = 0xe984, + BracketRound = 0xe985, + BracketRoundRight = 0xe986, + BracketsCurly = 0xe987, + BracketSquare = 0xe988, + BracketSquareRight = 0xe989, + BracketsRound = 0xe98a, + BracketsSquare = 0xe98b, + Braille = 0xe98c, + Brain = 0xe98d, + BrainArrowCurvedRight = 0xe98e, + BrainCircuit = 0xe98f, + BrakeWarning = 0xe990, + BrazilianRealSign = 0xe991, + BreadLoaf = 0xe992, + BreadSlice = 0xe993, + BreadSliceButter = 0xe994, + Bridge = 0xe995, + BridgeCircleCheck = 0xe996, + BridgeCircleExclamation = 0xe997, + BridgeCircleXmark = 0xe998, + BridgeLock = 0xe999, + BridgeSuspension = 0xe99a, + BridgeWater = 0xe99b, + Briefcase = 0xe99c, + BriefcaseArrowRight = 0xe99d, + BriefcaseBlank = 0xe99e, + BriefcaseMedical = 0xe99f, + Brightness = 0xe9a0, + BrightnessLow = 0xe9a1, + BringForward = 0xe9a2, + BringFront = 0xe9a3, + Broccoli = 0xe9a4, + Clover = 0xe9a5, + BroomBall = 0xe9a6, + BroomWide = 0xe9a7, + Browser = 0xe9a8, + Browsers = 0xe9a9, + Brush = 0xe9aa, + Bucket = 0xe9ab, + Bug = 0xe9ac, + Bugs = 0xe9ad, + BugSlash = 0xe9ae, + Building = 0xe9af, + BuildingCircleArrowRight = 0xe9b0, + BuildingCircleCheck = 0xe9b1, + BuildingCircleExclamation = 0xe9b2, + BuildingCircleXmark = 0xe9b3, + BuildingColumns = 0xe9b4, + BuildingFlag = 0xe9b5, + BuildingLock = 0xe9b6, + BuildingMagnifyingGlass = 0xe9b7, + BuildingMemo = 0xe9b8, + BuildingNgo = 0xe9b9, + Buildings = 0xe9ba, + BuildingShield = 0xe9bb, + BuildingUn = 0xe9bc, + BuildingUser = 0xe9bd, + BuildingWheat = 0xe9be, + Bulldozer = 0xe9bf, + Bullhorn = 0xe9c0, + Bullseye = 0xe9c1, + BullseyeArrow = 0xe9c2, + BullseyePointer = 0xe9c3, + Buoy = 0xe9c4, + BuoyMooring = 0xe9c5, + Burger = 0xe9c6, + BurgerCheese = 0xe9c7, + BurgerFries = 0xe9c8, + BurgerGlass = 0xe9c9, + BurgerLettuce = 0xe9ca, + BurgerSoda = 0xe9cb, + Burrito = 0xe9cc, + Burst = 0xe9cd, + Bus = 0xe9ce, + BusinessTime = 0xe9cf, + BusSchool = 0xe9d0, + BusSimple = 0xe9d1, + Butter = 0xe9d2, + C = 0xe9d3, + Cabin = 0xe9d4, + CabinetFiling = 0xe9d5, + CableCar = 0xe9d6, + Cactus = 0xe9d7, + CakeCandles = 0xe9d8, + CakeSlice = 0xe9d9, + Calculator = 0xe9da, + CalculatorSimple = 0xe9db, + Calendar = 0xe9dc, + CalendarArrowDown = 0xe9dd, + CalendarArrowUp = 0xe9de, + CalendarCheck = 0xe9df, + CalendarCircleExclamation = 0xe9e0, + CalendarCircleMinus = 0xe9e1, + CalendarCirclePlus = 0xe9e2, + CalendarCircleUser = 0xe9e3, + CalendarClock = 0xe9e4, + CalendarDay = 0xe9e5, + CalendarDays = 0xe9e6, + CalendarExclamation = 0xe9e7, + CalendarImage = 0xe9e8, + CalendarLines = 0xe9e9, + CalendarMinus = 0xe9ea, + CalendarHeart = 0xe9eb, + CalendarLinesPen = 0xe9ec, + CalendarPlus = 0xe9ed, + Calendars = 0xe9ee, + CalendarPen = 0xe9ef, + CalendarStar = 0xe9f0, + CalendarWeek = 0xe9f1, + CalendarXmark = 0xe9f2, + CameraCctv = 0xe9f3, + CalendarUsers = 0xe9f4, + CameraMovie = 0xe9f5, + Camcorder = 0xe9f6, + CameraRetro = 0xe9f7, + CameraRotate = 0xe9f8, + CameraSecurity = 0xe9f9, + CameraPolaroid = 0xe9fa, + CameraSlash = 0xe9fb, + CalendarRange = 0xe9fc, + CameraViewfinder = 0xe9fd, + Camera = 0xe9fe, + CameraWeb = 0xe9ff, + Campground = 0xea00, + CandleHolder = 0xea01, + CameraWebSlash = 0xea02, + Campfire = 0xea03, + Candy = 0xea04, + CandyCane = 0xea05, + CandyBar = 0xea06, + CanFood = 0xea07, + CandyCorn = 0xea08, + Cannabis = 0xea09, + Cannon = 0xea0a, + Capsules = 0xea0b, + Car = 0xea0c, + Caravan = 0xea0d, + CaravanSimple = 0xea0e, + CarBattery = 0xea0f, + CarBolt = 0xea10, + CarBuilding = 0xea11, + CarBump = 0xea12, + CarBurst = 0xea13, + CarBus = 0xea14, + CarCircleBolt = 0xea15, + CardClub = 0xea16, + CardDiamond = 0xea17, + CardHeart = 0xea18, + Cards = 0xea19, + CardsBlank = 0xea1a, + CardSpade = 0xea1b, + CaretDown = 0xea1c, + CaretLeft = 0xea1d, + CaretRight = 0xea1e, + CaretUp = 0xea1f, + CarGarage = 0xea20, + CarMirrors = 0xea21, + CarOn = 0xea22, + CarRear = 0xea23, + Carrot = 0xea24, + Cars = 0xea25, + CarSide = 0xea26, + CarSideBolt = 0xea27, + CartArrowDown = 0xea28, + CartArrowUp = 0xea29, + CartCircleArrowDown = 0xea2a, + CartCircleArrowUp = 0xea2b, + CartCircleCheck = 0xea2c, + CartCircleExclamation = 0xea2d, + CartCirclePlus = 0xea2e, + CartCircleXmark = 0xea2f, + CartFlatbed = 0xea30, + CartFlatbedBoxes = 0xea31, + CartFlatbedEmpty = 0xea32, + CartFlatbedSuitcase = 0xea33, + CarTilt = 0xea34, + CartMinus = 0xea35, + CartShopping = 0xea36, + CartPlus = 0xea37, + CartShoppingFast = 0xea38, + CarTunnel = 0xea39, + CartXmark = 0xea3a, + CarWash = 0xea3b, + CarWrench = 0xea3c, + CashRegister = 0xea3d, + CassetteBetamax = 0xea3e, + CassetteTape = 0xea3f, + CassetteVhs = 0xea40, + Castle = 0xea41, + Cat = 0xea42, + CatSpace = 0xea43, + Cauldron = 0xea44, + CediSign = 0xea45, + CentSign = 0xea46, + Certificate = 0xea47, + Chair = 0xea48, + ChairOffice = 0xea49, + Chalkboard = 0xea4a, + ChalkboardUser = 0xea4b, + ChampagneGlass = 0xea4c, + ChampagneGlasses = 0xea4d, + ChargingStation = 0xea4e, + ChartArea = 0xea4f, + ChartBar = 0xea50, + ChartBullet = 0xea51, + ChartCandlestick = 0xea52, + ChartColumn = 0xea53, + ChartGantt = 0xea54, + ChartKanban = 0xea55, + ChartLine = 0xea56, + ChartLineDown = 0xea57, + ChartLineUp = 0xea58, + ChartLineUpDown = 0xea59, + ChartMixed = 0xea5a, + ChartMixedUpCircleCurrency = 0xea5b, + ChartMixedUpCircleDollar = 0xea5c, + ChartNetwork = 0xea5d, + ChartPie = 0xea5e, + ChartPieSimple = 0xea5f, + ChartPieSimpleCircleCurrency = 0xea60, + ChartPieSimpleCircleDollar = 0xea61, + ChartPyramid = 0xea62, + ChartRadar = 0xea63, + ChartScatter = 0xea64, + ChartScatter3d = 0xea65, + ChartScatterBubble = 0xea66, + ChartSimple = 0xea67, + ChartSimpleHorizontal = 0xea68, + ChartTreeMap = 0xea69, + ChartUser = 0xea6a, + ChartWaterfall = 0xea6b, + Check = 0xea6c, + CheckDouble = 0xea6d, + CheckToSlot = 0xea6e, + Cheese = 0xea6f, + CheeseSwiss = 0xea70, + Cherries = 0xea71, + Chess = 0xea72, + ChessBishop = 0xea73, + ChessBishopPiece = 0xea74, + ChessBoard = 0xea75, + ChessClock = 0xea76, + ChessClockFlip = 0xea77, + ChessKing = 0xea78, + ChessKingPiece = 0xea79, + ChessKnight = 0xea7a, + ChessKnightPiece = 0xea7b, + ChessPawn = 0xea7c, + ChessPawnPiece = 0xea7d, + ChessQueen = 0xea7e, + ChessQueenPiece = 0xea7f, + ChessRook = 0xea80, + ChessRookPiece = 0xea81, + Chestnut = 0xea82, + ChevronDown = 0xea83, + ChevronLeft = 0xea84, + ChevronRight = 0xea85, + ChevronsDown = 0xea86, + ChevronsLeft = 0xea87, + ChevronsRight = 0xea88, + ChevronsUp = 0xea89, + ChevronUp = 0xea8a, + ChfSign = 0xea8b, + Child = 0xea8c, + ChildCombatant = 0xea8d, + ChildDress = 0xea8e, + ChildReaching = 0xea8f, + Children = 0xea90, + Chimney = 0xea91, + Chopsticks = 0xea92, + Church = 0xea93, + Circle = 0xea94, + Circle0 = 0xea95, + Circle1 = 0xea96, + Circle2 = 0xea97, + Circle3 = 0xea98, + Circle4 = 0xea99, + Circle5 = 0xea9a, + Circle6 = 0xea9b, + Circle7 = 0xea9c, + Circle8 = 0xea9d, + Circle9 = 0xea9e, + CircleA = 0xea9f, + CircleAmpersand = 0xeaa0, + CircleArrowDown = 0xeaa1, + CircleArrowDownLeft = 0xeaa2, + CircleArrowDownRight = 0xeaa3, + CircleArrowLeft = 0xeaa4, + CircleArrowRight = 0xeaa5, + CircleArrowUp = 0xeaa6, + CircleArrowUpLeft = 0xeaa7, + CircleArrowUpRight = 0xeaa8, + CircleB = 0xeaa9, + CircleBolt = 0xeaaa, + CircleBookmark = 0xeaab, + CircleBookOpen = 0xeaac, + CircleC = 0xeaad, + CircleCalendar = 0xeaae, + CircleCamera = 0xeaaf, + CircleCaretDown = 0xeab0, + CircleCaretLeft = 0xeab1, + CircleCaretRight = 0xeab2, + CircleCaretUp = 0xeab3, + CircleCheck = 0xeab4, + CircleChevronDown = 0xeab5, + CircleChevronLeft = 0xeab6, + CircleChevronRight = 0xeab7, + CircleChevronUp = 0xeab8, + CircleD = 0xeab9, + CircleDashed = 0xeaba, + CircleDivide = 0xeabb, + CircleDollar = 0xeabc, + CircleDollarToSlot = 0xeabd, + CircleDot = 0xeabe, + CircleDown = 0xeabf, + CircleDownLeft = 0xeac0, + CircleDownRight = 0xeac1, + CircleE = 0xeac2, + CircleEllipsis = 0xeac3, + CircleEllipsisVertical = 0xeac4, + CircleEnvelope = 0xeac5, + CircleEuro = 0xeac6, + CircleExclamation = 0xeac7, + CircleExclamationCheck = 0xeac8, + CircleF = 0xeac9, + CircleG = 0xeaca, + CircleH = 0xeacb, + CircleHalf = 0xeacc, + CircleHalfStroke = 0xeacd, + CircleHeart = 0xeace, + CircleI = 0xeacf, + CircleInfo = 0xead0, + CircleJ = 0xead1, + CircleK = 0xead2, + CircleL = 0xead3, + CircleLeft = 0xead4, + CircleLocationArrow = 0xead5, + CircleM = 0xead6, + CircleMicrophone = 0xead7, + CircleMicrophoneLines = 0xead8, + CircleMinus = 0xead9, + CircleN = 0xeada, + CircleNodes = 0xeadb, + CircleNotch = 0xeadc, + CircleO = 0xeadd, + CircleP = 0xeade, + CircleParking = 0xeadf, + CirclePause = 0xeae0, + CirclePhone = 0xeae1, + CirclePhoneFlip = 0xeae2, + CirclePhoneHangup = 0xeae3, + CirclePlay = 0xeae4, + CirclePlus = 0xeae5, + CircleQ = 0xeae6, + CircleQuarter = 0xeae7, + CircleQuarters = 0xeae8, + CircleQuarterStroke = 0xeae9, + CircleQuestion = 0xeaea, + CircleR = 0xeaeb, + CircleRadiation = 0xeaec, + CircleRight = 0xeaed, + CircleS = 0xeaee, + CircleSmall = 0xeaef, + CircleSort = 0xeaf0, + CircleSortDown = 0xeaf1, + CircleSortUp = 0xeaf2, + CirclesOverlap = 0xeaf3, + CircleStar = 0xeaf4, + CircleSterling = 0xeaf5, + CircleStop = 0xeaf6, + CircleT = 0xeaf7, + CircleThreeQuarters = 0xeaf8, + CircleThreeQuartersStroke = 0xeaf9, + CircleTrash = 0xeafa, + CircleU = 0xeafb, + CircleUp = 0xeafc, + CircleUpLeft = 0xeafd, + CircleUpRight = 0xeafe, + CircleUser = 0xeaff, + CircleV = 0xeb00, + CircleVideo = 0xeb01, + CircleW = 0xeb02, + CircleWaveformLines = 0xeb03, + CircleX = 0xeb04, + CircleXmark = 0xeb05, + CircleY = 0xeb06, + CircleYen = 0xeb07, + CircleZ = 0xeb08, + Citrus = 0xeb09, + CitrusSlice = 0xeb0a, + City = 0xeb0b, + Clapperboard = 0xeb0c, + ClapperboardPlay = 0xeb0d, + Clarinet = 0xeb0e, + ClawMarks = 0xeb0f, + Clipboard = 0xeb10, + ClipboardCheck = 0xeb11, + ClipboardList = 0xeb12, + ClipboardListCheck = 0xeb13, + ClipboardMedical = 0xeb14, + ClipboardPrescription = 0xeb15, + ClipboardQuestion = 0xeb16, + ClipboardUser = 0xeb17, + Clock = 0xeb18, + ClockDesk = 0xeb19, + ClockEight = 0xeb1a, + ClockEightThirty = 0xeb1b, + ClockEleven = 0xeb1c, + ClockElevenThirty = 0xeb1d, + ClockFive = 0xeb1e, + ClockFiveThirty = 0xeb1f, + ClockFourThirty = 0xeb20, + ClockNine = 0xeb21, + ClockNineThirty = 0xeb22, + ClockOne = 0xeb23, + ClockOneThirty = 0xeb24, + ClockRotateLeft = 0xeb25, + ClockSeven = 0xeb26, + ClockSevenThirty = 0xeb27, + ClockSix = 0xeb28, + ClockSixThirty = 0xeb29, + ClockTen = 0xeb2a, + ClockTenThirty = 0xeb2b, + ClockThree = 0xeb2c, + ClockThreeThirty = 0xeb2d, + ClockTwelve = 0xeb2e, + ClockTwelveThirty = 0xeb2f, + ClockTwo = 0xeb30, + ClockTwoThirty = 0xeb31, + Clone = 0xeb32, + ClosedCaptioning = 0xeb33, + ClosedCaptioningSlash = 0xeb34, + ClothesHanger = 0xeb35, + Cloud = 0xeb36, + CloudArrowDown = 0xeb37, + CloudArrowUp = 0xeb38, + CloudBinary = 0xeb39, + CloudBolt = 0xeb3a, + CloudBoltMoon = 0xeb3b, + CloudBoltSun = 0xeb3c, + CloudCheck = 0xeb3d, + CloudDrizzle = 0xeb3e, + CloudExclamation = 0xeb3f, + CloudFog = 0xeb40, + CloudHail = 0xeb41, + CloudHailMixed = 0xeb42, + CloudMeatball = 0xeb43, + CloudMinus = 0xeb44, + CloudMoon = 0xeb45, + CloudMoonRain = 0xeb46, + CloudMusic = 0xeb47, + CloudPlus = 0xeb48, + CloudQuestion = 0xeb49, + CloudRain = 0xeb4a, + CloudRainbow = 0xeb4b, + Clouds = 0xeb4c, + CloudShowers = 0xeb4d, + CloudShowersHeavy = 0xeb4e, + CloudShowersWater = 0xeb4f, + CloudSlash = 0xeb50, + CloudSleet = 0xeb51, + CloudsMoon = 0xeb52, + CloudSnow = 0xeb53, + CloudsSun = 0xeb54, + CloudSun = 0xeb55, + CloudSunRain = 0xeb56, + CloudWord = 0xeb57, + CloudXmark = 0xeb58, + FaceSaluting = 0xeb59, + Club = 0xeb5a, + Coconut = 0xeb5b, + Code = 0xeb5c, + CodeBranch = 0xeb5d, + CodeCommit = 0xeb5e, + CodeCompare = 0xeb5f, + CodeFork = 0xeb60, + CodePullRequest = 0xeb61, + CodePullRequestClosed = 0xeb62, + CodeMerge = 0xeb63, + CodePullRequestDraft = 0xeb64, + CodeSimple = 0xeb65, + CoffeeBean = 0xeb66, + CoffeeBeans = 0xeb67, + CoffeePot = 0xeb68, + CoffinCross = 0xeb69, + Coffin = 0xeb6a, + Coin = 0xeb6b, + CoinBlank = 0xeb6c, + CoinVertical = 0xeb6d, + CoinFront = 0xeb6e, + Colon = 0xeb6f, + Coins = 0xeb70, + ColonSign = 0xeb71, + Columns3 = 0xeb72, + Comet = 0xeb73, + Comma = 0xeb74, + Comment = 0xeb75, + CommentArrowDown = 0xeb76, + CommentArrowUp = 0xeb77, + CommentArrowUpRight = 0xeb78, + CommentCaptions = 0xeb79, + CommentCheck = 0xeb7a, + CommentDollar = 0xeb7b, + CommentDots = 0xeb7c, + CommentCode = 0xeb7d, + Command = 0xeb7e, + CommentImage = 0xeb7f, + CommentHeart = 0xeb80, + CommentExclamation = 0xeb81, + CommentLines = 0xeb82, + CommentMedical = 0xeb83, + CommentMiddle = 0xeb84, + CommentMiddleTop = 0xeb85, + CommentMinus = 0xeb86, + CommentMusic = 0xeb87, + CommentPen = 0xeb88, + CommentPlus = 0xeb89, + CommentQuestion = 0xeb8a, + CommentQuote = 0xeb8b, + Comments = 0xeb8c, + CommentsDollar = 0xeb8d, + CommentSlash = 0xeb8e, + CommentSmile = 0xeb8f, + CommentSms = 0xeb90, + CommentsQuestion = 0xeb91, + CommentsQuestionCheck = 0xeb92, + CommentText = 0xeb93, + CommentXmark = 0xeb94, + CompactDisc = 0xeb95, + Compass = 0xeb96, + CompassDrafting = 0xeb97, + CompassSlash = 0xeb98, + Compress = 0xeb99, + CompressWide = 0xeb9a, + ComputerClassic = 0xeb9b, + ComputerMouse = 0xeb9c, + ComputerMouseScrollwheel = 0xeb9d, + ComputerSpeaker = 0xeb9e, + ContainerStorage = 0xeb9f, + ConveyorBelt = 0xeba0, + ConveyorBeltBoxes = 0xeba1, + ConveyorBeltArm = 0xeba2, + CookieBite = 0xeba3, + Computer = 0xeba4, + Copyright = 0xeba5, + Cookie = 0xeba6, + Corn = 0xeba7, + Corner = 0xeba8, + Copy = 0xeba9, + CourtSport = 0xebaa, + Cow = 0xebab, + Couch = 0xebac, + CowbellCirclePlus = 0xebad, + Cowbell = 0xebae, + CrateEmpty = 0xebaf, + CreditCardFront = 0xebb0, + Crab = 0xebb1, + CreditCardBlank = 0xebb2, + CreditCard = 0xebb3, + CrateApple = 0xebb4, + ConveyorBeltEmpty = 0xebb5, + Crop = 0xebb6, + Crosshairs = 0xebb7, + CropSimple = 0xebb8, + Cross = 0xebb9, + Croissant = 0xebba, + CricketBatBall = 0xebbb, + CrosshairsSimple = 0xebbc, + Crow = 0xebbd, + Crown = 0xebbe, + Crutch = 0xebbf, + Crutches = 0xebc0, + CruzeiroSign = 0xebc1, + CrystalBall = 0xebc2, + Cube = 0xebc3, + Cubes = 0xebc4, + CubesStacked = 0xebc5, + Cucumber = 0xebc6, + Cupcake = 0xebc7, + CupStraw = 0xebc8, + CupStrawSwoosh = 0xebc9, + CupTogo = 0xebca, + CurlingStone = 0xebcb, + Custard = 0xebcc, + D = 0xebcd, + Dagger = 0xebce, + Dash = 0xebcf, + Database = 0xebd0, + Deer = 0xebd1, + DeerRudolph = 0xebd2, + DeleteLeft = 0xebd3, + DeleteRight = 0xebd4, + Desktop = 0xebd5, + Democrat = 0xebd6, + DesktopArrowDown = 0xebd7, + Dharmachakra = 0xebd8, + DiagramCells = 0xebd9, + DiagramLeanCanvas = 0xebda, + DiagramNested = 0xebdb, + DiagramNext = 0xebdc, + DiagramPredecessor = 0xebdd, + DiagramPrevious = 0xebde, + DiagramProject = 0xebdf, + DiagramSankey = 0xebe0, + DiagramSubtask = 0xebe1, + DiagramSuccessor = 0xebe2, + DiagramVenn = 0xebe3, + Dial = 0xebe4, + DialHigh = 0xebe5, + DialLow = 0xebe6, + DialMax = 0xebe7, + DialMed = 0xebe8, + DialMedLow = 0xebe9, + DialMin = 0xebea, + DialOff = 0xebeb, + Diamond = 0xebec, + DiamondExclamation = 0xebed, + DiamondHalf = 0xebee, + DiamondHalfStroke = 0xebef, + DiamondTurnRight = 0xebf0, + Dice = 0xebf1, + DiceD4 = 0xebf2, + DiceD6 = 0xebf3, + DiceD8 = 0xebf4, + DiceD10 = 0xebf5, + DiceD12 = 0xebf6, + DiceD20 = 0xebf7, + DiceFive = 0xebf8, + DiceFour = 0xebf9, + DiceOne = 0xebfa, + DiceSix = 0xebfb, + DiceThree = 0xebfc, + DiceTwo = 0xebfd, + Dinosaur = 0xebfe, + Diploma = 0xebff, + DiscDrive = 0xec00, + Disease = 0xec01, + Display = 0xec02, + DisplayArrowDown = 0xec03, + DisplayChartUp = 0xec04, + DisplayChartUpCircleCurrency = 0xec05, + DisplayChartUpCircleDollar = 0xec06, + DisplayCode = 0xec07, + DisplayMedical = 0xec08, + DisplaySlash = 0xec09, + DistributeSpacingHorizontal = 0xec0a, + DistributeSpacingVertical = 0xec0b, + Ditto = 0xec0c, + Divide = 0xec0d, + Dna = 0xec0e, + Dog = 0xec0f, + DogLeashed = 0xec10, + DollarSign = 0xec11, + Dolly = 0xec12, + DollyEmpty = 0xec13, + Dolphin = 0xec14, + DongSign = 0xec15, + DoNotEnter = 0xec16, + Donut = 0xec17, + DoorClosed = 0xec18, + DoorOpen = 0xec19, + Dove = 0xec1a, + Down = 0xec1b, + DownFromDottedLine = 0xec1c, + DownFromLine = 0xec1d, + DownLeft = 0xec1e, + DownLeftAndUpRightToCenter = 0xec1f, + Download = 0xec20, + DownLong = 0xec21, + DownRight = 0xec22, + DownToBracket = 0xec23, + DownToDottedLine = 0xec24, + DownToLine = 0xec25, + Dragon = 0xec26, + DrawCircle = 0xec27, + DrawPolygon = 0xec28, + DrawSquare = 0xec29, + Dreidel = 0xec2a, + Drone = 0xec2b, + DroneFront = 0xec2c, + Droplet = 0xec2d, + DropletDegree = 0xec2e, + DropletPercent = 0xec2f, + DropletSlash = 0xec30, + Drum = 0xec31, + DrumSteelpan = 0xec32, + Drumstick = 0xec33, + DrumstickBite = 0xec34, + Dryer = 0xec35, + DryerHeat = 0xec36, + Duck = 0xec37, + Dumbbell = 0xec38, + Dumpster = 0xec39, + DumpsterFire = 0xec3a, + Dungeon = 0xec3b, + E = 0xec3c, + Ear = 0xec3d, + EarDeaf = 0xec3e, + EarListen = 0xec3f, + EarMuffs = 0xec40, + EarthAfrica = 0xec41, + EarthAmericas = 0xec42, + EarthAsia = 0xec43, + EarthEurope = 0xec44, + EarthOceania = 0xec45, + Eclipse = 0xec46, + Egg = 0xec47, + EggFried = 0xec48, + Eggplant = 0xec49, + Eject = 0xec4a, + Elephant = 0xec4b, + Elevator = 0xec4c, + Ellipsis = 0xec4d, + EllipsisStroke = 0xec4e, + EllipsisStrokeVertical = 0xec4f, + EllipsisVertical = 0xec50, + EmptySet = 0xec51, + Engine = 0xec52, + EngineWarning = 0xec53, + Envelope = 0xec54, + EnvelopeCircleCheck = 0xec55, + EnvelopeDot = 0xec56, + EnvelopeOpen = 0xec57, + EnvelopeOpenDollar = 0xec58, + EnvelopeOpenText = 0xec59, + Envelopes = 0xec5a, + EnvelopesBulk = 0xec5b, + Equals = 0xec5c, + Eraser = 0xec5d, + Escalator = 0xec5e, + Ethernet = 0xec5f, + EuroSign = 0xec60, + Excavator = 0xec61, + Exclamation = 0xec62, + Expand = 0xec63, + ExpandWide = 0xec64, + Explosion = 0xec65, + Eye = 0xec66, + EyeDropper = 0xec67, + EyeDropperFull = 0xec68, + EyeDropperHalf = 0xec69, + EyeEvil = 0xec6a, + EyeLowVision = 0xec6b, + Eyes = 0xec6c, + EyeSlash = 0xec6d, + F = 0xec6e, + FaceAngry = 0xec6f, + FaceAngryHorns = 0xec70, + FaceAnguished = 0xec71, + FaceAnxiousSweat = 0xec72, + FaceAstonished = 0xec73, + FaceAwesome = 0xec74, + FaceBeamHandOverMouth = 0xec75, + FaceClouds = 0xec76, + FaceConfounded = 0xec77, + FaceConfused = 0xec78, + FaceCowboyHat = 0xec79, + FaceDiagonalMouth = 0xec7a, + FaceDisappointed = 0xec7b, + FaceDisguise = 0xec7c, + FaceDizzy = 0xec7d, + FaceDotted = 0xec7e, + FaceDowncastSweat = 0xec7f, + FaceDrooling = 0xec80, + FaceExhaling = 0xec81, + FaceExplode = 0xec82, + FaceExpressionless = 0xec83, + FaceEyesXmarks = 0xec84, + FaceFearful = 0xec85, + FaceFlushed = 0xec86, + FaceFrown = 0xec87, + FaceFrownOpen = 0xec88, + FaceFrownSlight = 0xec89, + FaceGlasses = 0xec8a, + FaceGrimace = 0xec8b, + FaceGrin = 0xec8c, + FaceGrinBeam = 0xec8d, + FaceGrinBeamSweat = 0xec8e, + FaceGrinHearts = 0xec8f, + FaceGrinSquint = 0xec90, + FaceGrinSquintTears = 0xec91, + FaceGrinStars = 0xec92, + FaceGrinTears = 0xec93, + FaceGrinTongue = 0xec94, + FaceGrinTongueSquint = 0xec95, + FaceGrinTongueWink = 0xec96, + FaceGrinWide = 0xec97, + FaceGrinWink = 0xec98, + FaceHandOverMouth = 0xec99, + FaceHandPeeking = 0xec9a, + FaceHandYawn = 0xec9b, + FaceHeadBandage = 0xec9c, + FaceHoldingBackTears = 0xec9d, + FaceHushed = 0xec9e, + FaceIcicles = 0xec9f, + FaceKiss = 0xeca0, + FaceKissBeam = 0xeca1, + FaceKissClosedEyes = 0xeca2, + FaceKissWinkHeart = 0xeca3, + FaceLaugh = 0xeca4, + FaceLaughBeam = 0xeca5, + FaceLaughSquint = 0xeca6, + FaceLaughWink = 0xeca7, + FaceLying = 0xeca8, + FaceMask = 0xeca9, + FaceMeh = 0xecaa, + FaceMehBlank = 0xecab, + FaceMelting = 0xecac, + FaceMonocle = 0xecad, + FaceNauseated = 0xecae, + FaceNoseSteam = 0xecaf, + FaceParty = 0xecb0, + FacePensive = 0xecb1, + FacePersevering = 0xecb2, + FacePleading = 0xecb3, + FacePouting = 0xecb4, + FaceRaisedEyebrow = 0xecb5, + FaceRelieved = 0xecb6, + FaceRollingEyes = 0xecb7, + FaceSadCry = 0xecb8, + FaceSadSweat = 0xecb9, + FaceSadTear = 0xecba, + Hotdog = 0xecbb, + FaceScream = 0xecbc, + FaceShush = 0xecbd, + FaceSleeping = 0xecbe, + FaceSleepy = 0xecbf, + FaceSmileBeam = 0xecc0, + FaceSmile = 0xecc1, + FaceSmileHalo = 0xecc2, + FaceSmileHearts = 0xecc3, + FaceSmileHorns = 0xecc4, + FaceSmilePlus = 0xecc5, + FaceSmileRelaxed = 0xecc6, + FaceSmileTear = 0xecc7, + FaceSmileTongue = 0xecc8, + FaceSmileUpsideDown = 0xecc9, + FaceSmileWink = 0xecca, + FaceSmilingHands = 0xeccb, + FaceSpiralEyes = 0xeccc, + FaceSmirking = 0xeccd, + FaceSunglasses = 0xecce, + FaceSurprise = 0xeccf, + FaceSwear = 0xecd0, + FaceThermometer = 0xecd1, + FaceThinking = 0xecd2, + FaceTired = 0xecd3, + FaceTissue = 0xecd4, + FaceTongueMoney = 0xecd5, + FaceTongueSweat = 0xecd6, + FaceUnamused = 0xecd7, + FaceViewfinder = 0xecd8, + FaceVomit = 0xecd9, + FaceWeary = 0xecda, + FaceWoozy = 0xecdb, + FaceWorried = 0xecdc, + FaceZany = 0xecdd, + FaceZipper = 0xecde, + Falafel = 0xecdf, + Family = 0xece0, + FamilyDress = 0xece1, + FamilyPants = 0xece2, + Fan = 0xece3, + FanTable = 0xece4, + Farm = 0xece5, + Faucet = 0xece6, + FaucetDrip = 0xece7, + Fax = 0xece8, + Feather = 0xece9, + FeatherPointed = 0xecea, + Fence = 0xeceb, + FerrisWheel = 0xecec, + Ferry = 0xeced, + FieldHockeyStickBall = 0xecee, + File = 0xecef, + FileArrowDown = 0xecf0, + FileArrowUp = 0xecf1, + FileAudio = 0xecf2, + FileBinary = 0xecf3, + FileCertificate = 0xecf4, + FileChartColumn = 0xecf5, + FileChartPie = 0xecf6, + FileCheck = 0xecf7, + FileCircleCheck = 0xecf8, + FileCircleExclamation = 0xecf9, + FileCircleInfo = 0xecfa, + FileCircleMinus = 0xecfb, + FileCirclePlus = 0xecfc, + FileCircleQuestion = 0xecfd, + FileCircleXmark = 0xecfe, + FileCode = 0xecff, + FileContract = 0xed00, + FileCsv = 0xed01, + FileDashedLine = 0xed02, + FileDoc = 0xed03, + FileEps = 0xed04, + FileExclamation = 0xed05, + FileGif = 0xed06, + FileExport = 0xed07, + FileImport = 0xed08, + FileExcel = 0xed09, + FileHeart = 0xed0a, + FileInvoiceDollar = 0xed0b, + FileImage = 0xed0c, + FileInvoice = 0xed0d, + FileJpg = 0xed0e, + FileLines = 0xed0f, + FileMagnifyingGlass = 0xed10, + FileLock = 0xed11, + FileMedical = 0xed12, + FileMinus = 0xed13, + FileMov = 0xed14, + FileMp4 = 0xed15, + FileMp3 = 0xed16, + FilePdf = 0xed17, + FileMusic = 0xed18, + FilePen = 0xed19, + FilePlusMinus = 0xed1a, + FilePrescription = 0xed1b, + FilePlus = 0xed1c, + FilePowerpoint = 0xed1d, + FilePpt = 0xed1e, + Files = 0xed1f, + FileShield = 0xed20, + FileSignature = 0xed21, + FileSlash = 0xed22, + FilesMedical = 0xed23, + FileSpreadsheet = 0xed24, + FileSvg = 0xed25, + FileUser = 0xed26, + FileVector = 0xed27, + FileVideo = 0xed28, + FileWaveform = 0xed29, + FileWord = 0xed2a, + FileXls = 0xed2b, + FileXmark = 0xed2c, + FileXml = 0xed2d, + FileZip = 0xed2e, + FileZipper = 0xed2f, + Fill = 0xed30, + FillDrip = 0xed31, + Film = 0xed32, + FilmCanister = 0xed33, + Films = 0xed34, + FilmSimple = 0xed35, + FilmSlash = 0xed36, + Filter = 0xed37, + FilterCircleDollar = 0xed38, + FilterCircleXmark = 0xed39, + FilterList = 0xed3a, + Filters = 0xed3b, + FilterSlash = 0xed3c, + Fingerprint = 0xed3d, + Fire = 0xed3e, + FireBurner = 0xed3f, + FireExtinguisher = 0xed40, + FireFlame = 0xed41, + FireFlameCurved = 0xed42, + FireFlameSimple = 0xed43, + FireHydrant = 0xed44, + Fireplace = 0xed45, + FireSmoke = 0xed46, + Fish = 0xed47, + FishBones = 0xed48, + FishCooked = 0xed49, + FishFins = 0xed4a, + FishingRod = 0xed4b, + Flag = 0xed4c, + FlagCheckered = 0xed4d, + FlagPennant = 0xed4e, + FlagSwallowtail = 0xed4f, + FlagUsa = 0xed50, + Flashlight = 0xed51, + Flask = 0xed52, + FlaskGear = 0xed53, + FlaskRoundPoison = 0xed54, + FlaskRoundPotion = 0xed55, + FlaskVial = 0xed56, + Flatbread = 0xed57, + FlatbreadStuffed = 0xed58, + FloppyDisk = 0xed59, + FloppyDiskCircleArrowRight = 0xed5a, + FloppyDiskCircleXmark = 0xed5b, + FloppyDiskPen = 0xed5c, + FloppyDisks = 0xed5d, + FlorinSign = 0xed5e, + Flower = 0xed5f, + FlowerDaffodil = 0xed60, + FlowerTulip = 0xed61, + Flute = 0xed62, + FluxCapacitor = 0xed63, + FlyingDisc = 0xed64, + Folder = 0xed65, + FolderArrowDown = 0xed66, + FolderArrowUp = 0xed67, + FolderBookmark = 0xed68, + FolderCheck = 0xed69, + FolderClosed = 0xed6a, + FolderGear = 0xed6b, + FolderGrid = 0xed6c, + FolderHeart = 0xed6d, + FolderImage = 0xed6e, + FolderMagnifyingGlass = 0xed6f, + FolderMedical = 0xed70, + FolderMinus = 0xed71, + FolderMusic = 0xed72, + FolderOpen = 0xed73, + FolderPlus = 0xed74, + Folders = 0xed75, + FolderTree = 0xed76, + FolderUser = 0xed77, + FolderXmark = 0xed78, + FonduePot = 0xed79, + Font = 0xed7a, + FontAwesome = 0xed7b, + FontCase = 0xed7c, + Football = 0xed7d, + FootballHelmet = 0xed7e, + Fork = 0xed7f, + ForkKnife = 0xed80, + Forklift = 0xed81, + Fort = 0xed82, + Forward = 0xed83, + ForwardFast = 0xed84, + ForwardStep = 0xed85, + Frame = 0xed86, + FrancSign = 0xed87, + FrenchFries = 0xed88, + Frog = 0xed89, + Function = 0xed8a, + Futbol = 0xed8b, + G = 0xed8c, + Galaxy = 0xed8d, + GalleryThumbnails = 0xed8e, + GameBoard = 0xed8f, + GameBoardSimple = 0xed90, + GameConsoleHandheld = 0xed91, + GameConsoleHandheldCrank = 0xed92, + Gamepad = 0xed93, + GamepadModern = 0xed94, + Garage = 0xed95, + GarageCar = 0xed96, + GarageOpen = 0xed97, + Garlic = 0xed98, + GasPump = 0xed99, + GasPumpSlash = 0xed9a, + Gauge = 0xed9b, + GaugeCircleBolt = 0xed9c, + GaugeCircleMinus = 0xed9d, + GaugeCirclePlus = 0xed9e, + GaugeHigh = 0xed9f, + GaugeLow = 0xeda0, + GaugeMax = 0xeda1, + GaugeMin = 0xeda2, + GaugeSimple = 0xeda3, + GaugeSimpleHigh = 0xeda4, + GaugeSimpleLow = 0xeda5, + GaugeSimpleMax = 0xeda6, + GaugeSimpleMin = 0xeda7, + Gavel = 0xeda8, + Gear = 0xeda9, + GearCode = 0xedaa, + GearComplex = 0xedab, + GearComplexCode = 0xedac, + Gears = 0xedad, + Gem = 0xedae, + Genderless = 0xedaf, + Ghost = 0xedb0, + Gif = 0xedb1, + Gift = 0xedb2, + GiftCard = 0xedb3, + Gifts = 0xedb4, + GingerbreadMan = 0xedb5, + Glass = 0xedb6, + GlassCitrus = 0xedb7, + GlassEmpty = 0xedb8, + Glasses = 0xedb9, + GlassesRound = 0xedba, + GlassHalf = 0xedbb, + GlassWater = 0xedbc, + GlassWaterDroplet = 0xedbd, + Globe = 0xedbe, + GlobePointer = 0xedbf, + GlobeSnow = 0xedc0, + GlobeStand = 0xedc1, + GoalNet = 0xedc2, + GolfBallTee = 0xedc3, + GolfClub = 0xedc4, + GolfFlagHole = 0xedc5, + Gopuram = 0xedc6, + GraduationCap = 0xedc7, + Gramophone = 0xedc8, + Grapes = 0xedc9, + Grate = 0xedca, + GrateDroplet = 0xedcb, + GreaterThan = 0xedcc, + GreaterThanEqual = 0xedcd, + Grid = 0xedce, + Grid2 = 0xedcf, + Grid2Plus = 0xedd0, + Grid4 = 0xedd1, + Grid5 = 0xedd2, + GridDividers = 0xedd3, + GridHorizontal = 0xedd4, + GridRound = 0xedd5, + GridRound2 = 0xedd6, + GridRound2Plus = 0xedd7, + GridRound4 = 0xedd8, + GridRound5 = 0xedd9, + Grill = 0xedda, + GrillFire = 0xeddb, + GrillHot = 0xeddc, + Grip = 0xeddd, + GripDots = 0xedde, + GripDotsVertical = 0xeddf, + GripLines = 0xede0, + GripVertical = 0xede1, + GripLinesVertical = 0xede2, + GroupArrowsRotate = 0xede3, + Gun = 0xede4, + GuitarElectric = 0xede5, + Guitars = 0xede6, + Guitar = 0xede7, + GuaraniSign = 0xede8, + GunSlash = 0xede9, + GunSquirt = 0xedea, + H = 0xedeb, + H1 = 0xedec, + H2 = 0xeded, + H3 = 0xedee, + H4 = 0xedef, + H5 = 0xedf0, + H6 = 0xedf1, + Hammer = 0xedf2, + HammerBrush = 0xedf3, + HammerCrash = 0xedf4, + HammerWar = 0xedf5, + Hamsa = 0xedf6, + Hand = 0xedf7, + HandBackFist = 0xedf8, + HandBackPointDown = 0xedf9, + HandBackPointLeft = 0xedfa, + HandBackPointRibbon = 0xedfb, + HandBackPointRight = 0xedfc, + HandBackPointUp = 0xedfd, + Handcuffs = 0xedfe, + HandDots = 0xedff, + HandFingersCrossed = 0xee00, + HandFist = 0xee01, + HandHeart = 0xee02, + HandHolding = 0xee03, + HandHoldingBox = 0xee04, + HandHoldingCircleDollar = 0xee05, + HandHoldingDollar = 0xee06, + HandHoldingDroplet = 0xee07, + HandHoldingHand = 0xee08, + HandHoldingHeart = 0xee09, + HandHoldingMagic = 0xee0a, + HandHoldingMedical = 0xee0b, + HandHoldingSeedling = 0xee0c, + HandHoldingSkull = 0xee0d, + HandHorns = 0xee0e, + HandLizard = 0xee0f, + HandLove = 0xee10, + HandMiddleFinger = 0xee11, + HandPeace = 0xee12, + HandPointDown = 0xee13, + HandPointer = 0xee14, + HandPointLeft = 0xee15, + HandPointRibbon = 0xee16, + HandPointRight = 0xee17, + HandPointUp = 0xee18, + Hands = 0xee19, + HandsAslInterpreting = 0xee1a, + HandsBound = 0xee1b, + HandsBubbles = 0xee1c, + HandScissors = 0xee1d, + HandsClapping = 0xee1e, + Handshake = 0xee1f, + HandshakeAngle = 0xee20, + HandshakeSimple = 0xee21, + HandshakeSimpleSlash = 0xee22, + HandshakeSlash = 0xee23, + HandsHolding = 0xee24, + HandsHoldingChild = 0xee25, + HandsHoldingCircle = 0xee26, + HandsHoldingDiamond = 0xee27, + HandsHoldingDollar = 0xee28, + HandsHoldingHeart = 0xee29, + HandSparkles = 0xee2a, + HandSpock = 0xee2b, + HandsPraying = 0xee2c, + HandWave = 0xee2d, + Hanukiah = 0xee2e, + HardDrive = 0xee2f, + Hashtag = 0xee30, + HashtagLock = 0xee31, + HatBeach = 0xee32, + HatChef = 0xee33, + HatCowboy = 0xee34, + HatCowboySide = 0xee35, + HatSanta = 0xee36, + HatWinter = 0xee37, + HatWitch = 0xee38, + HatWizard = 0xee39, + Heading = 0xee3a, + Headphones = 0xee3b, + HeadphonesSimple = 0xee3c, + Headset = 0xee3d, + HeadSide = 0xee3e, + HeadSideBrain = 0xee3f, + HeadSideCough = 0xee40, + HeadSideCoughSlash = 0xee41, + HeadSideGear = 0xee42, + HeadSideGoggles = 0xee43, + HeadSideHeadphones = 0xee44, + HeadSideHeart = 0xee45, + HeadSideMask = 0xee46, + HeadSideMedical = 0xee47, + HeadSideVirus = 0xee48, + Heart = 0xee49, + HeartCircleBolt = 0xee4a, + HeartCircleCheck = 0xee4b, + HeartCircleExclamation = 0xee4c, + HeartCircleMinus = 0xee4d, + HeartCirclePlus = 0xee4e, + HeartCircleXmark = 0xee4f, + HeartCrack = 0xee50, + HeartHalf = 0xee51, + HeartHalfStroke = 0xee52, + HeartPulse = 0xee53, + Heat = 0xee54, + Helicopter = 0xee55, + HelicopterSymbol = 0xee56, + HelmetBattle = 0xee57, + HelmetSafety = 0xee58, + HelmetUn = 0xee59, + Hexagon = 0xee5a, + HexagonCheck = 0xee5b, + HexagonDivide = 0xee5c, + HexagonExclamation = 0xee5d, + HexagonImage = 0xee5e, + HexagonMinus = 0xee5f, + HexagonPlus = 0xee60, + HexagonVerticalNft = 0xee61, + HexagonVerticalNftSlanted = 0xee62, + HexagonXmark = 0xee63, + HighDefinition = 0xee64, + Highlighter = 0xee65, + HighlighterLine = 0xee66, + HillAvalanche = 0xee67, + HillRockslide = 0xee68, + Hippo = 0xee69, + HockeyMask = 0xee6a, + HockeyPuck = 0xee6b, + HockeyStickPuck = 0xee6c, + HockeySticks = 0xee6d, + HollyBerry = 0xee6e, + HoneyPot = 0xee6f, + HoodCloak = 0xee70, + HorizontalRule = 0xee71, + Horse = 0xee72, + HorseHead = 0xee73, + HorseSaddle = 0xee74, + Hose = 0xee75, + HoseReel = 0xee76, + Hospital = 0xee77, + Hospitals = 0xee78, + HospitalUser = 0xee79, + P = 0xee7a, + Hotel = 0xee7b, + HotTubPerson = 0xee7c, + Hourglass = 0xee7d, + HourglassClock = 0xee7e, + HourglassEnd = 0xee7f, + HourglassHalf = 0xee80, + HourglassStart = 0xee81, + House = 0xee82, + HouseBlank = 0xee83, + HouseBuilding = 0xee84, + HouseChimney = 0xee85, + HouseChimneyBlank = 0xee86, + HouseChimneyCrack = 0xee87, + HouseChimneyHeart = 0xee88, + HouseChimneyUser = 0xee89, + HouseChimneyWindow = 0xee8a, + HouseChimneyMedical = 0xee8b, + HouseCircleCheck = 0xee8c, + HouseCircleExclamation = 0xee8d, + HouseCircleXmark = 0xee8e, + HouseDay = 0xee8f, + HouseCrack = 0xee90, + HouseFire = 0xee91, + HouseFlag = 0xee92, + HouseFloodWater = 0xee93, + HouseFloodWaterCircleArrowRight = 0xee94, + HouseHeart = 0xee95, + HouseLaptop = 0xee96, + HouseLock = 0xee97, + HouseMedical = 0xee98, + HouseMedicalCircleCheck = 0xee99, + HouseMedicalCircleExclamation = 0xee9a, + HouseMedicalCircleXmark = 0xee9b, + HouseMedicalFlag = 0xee9c, + HouseNight = 0xee9d, + HousePersonLeave = 0xee9e, + HousePersonReturn = 0xee9f, + HouseSignal = 0xeea0, + HouseTree = 0xeea1, + HouseTsunami = 0xeea2, + HouseTurret = 0xeea3, + HouseUser = 0xeea4, + HouseWater = 0xeea5, + HouseWindow = 0xeea6, + HryvniaSign = 0xeea7, + HundredPoints = 0xeea8, + Hurricane = 0xeea9, + Hyphen = 0xeeaa, + I = 0xeeab, + IceCream = 0xeeac, + IceSkate = 0xeead, + Icicles = 0xeeae, + Icons = 0xeeaf, + ICursor = 0xeeb0, + IdBadge = 0xeeb1, + IdCard = 0xeeb2, + IdCardClip = 0xeeb3, + Igloo = 0xeeb4, + Image = 0xeeb5, + ImageLandscape = 0xeeb6, + ImagePolaroid = 0xeeb7, + ImagePolaroidUser = 0xeeb8, + ImagePortrait = 0xeeb9, + Images = 0xeeba, + ImageSlash = 0xeebb, + ImagesUser = 0xeebc, + ImageUser = 0xeebd, + Inboxes = 0xeebe, + InboxFull = 0xeebf, + InboxIn = 0xeec0, + Inbox = 0xeec1, + IndianRupeeSign = 0xeec2, + Industry = 0xeec3, + InboxOut = 0xeec4, + IndustryWindows = 0xeec5, + Infinity = 0xeec6, + Indent = 0xeec7, + Info = 0xeec8, + Inhaler = 0xeec9, + InputNumeric = 0xeeca, + InputPipe = 0xeecb, + InputText = 0xeecc, + Integral = 0xeecd, + Interrobang = 0xeece, + Intersection = 0xeecf, + J = 0xeed0, + JackOLantern = 0xeed1, + Jar = 0xeed2, + Italic = 0xeed3, + IslandTropical = 0xeed4, + JarWheat = 0xeed5, + Jedi = 0xeed6, + JetFighter = 0xeed7, + Joystick = 0xeed8, + Jug = 0xeed9, + JetFighterUp = 0xeeda, + Joint = 0xeedb, + JugDetergent = 0xeedc, + JugBottle = 0xeedd, + K = 0xeede, + Kaaba = 0xeedf, + Kazoo = 0xeee0, + Kerning = 0xeee1, + Key = 0xeee2, + Keyboard = 0xeee3, + KeyboardBrightness = 0xeee4, + KeyboardBrightnessLow = 0xeee5, + KeyboardDown = 0xeee6, + KeyboardLeft = 0xeee7, + Keynote = 0xeee8, + KeySkeleton = 0xeee9, + KeySkeletonLeftRight = 0xeeea, + Khanda = 0xeeeb, + Kidneys = 0xeeec, + KipSign = 0xeeed, + KitchenSet = 0xeeee, + Kite = 0xeeef, + KitMedical = 0xeef0, + KiwiBird = 0xeef1, + KiwiFruit = 0xeef2, + Knife = 0xeef3, + KnifeKitchen = 0xeef4, + L = 0xeef5, + LacrosseStick = 0xeef6, + LacrosseStickBall = 0xeef7, + Lambda = 0xeef8, + Lamp = 0xeef9, + LampDesk = 0xeefa, + LampFloor = 0xeefb, + LampStreet = 0xeefc, + Landmark = 0xeefd, + LandmarkDome = 0xeefe, + LandmarkFlag = 0xeeff, + LandmarkMagnifyingGlass = 0xef00, + LandMineOn = 0xef01, + Language = 0xef02, + Laptop = 0xef03, + LaptopArrowDown = 0xef04, + LaptopBinary = 0xef05, + LaptopCode = 0xef06, + LaptopFile = 0xef07, + LaptopMedical = 0xef08, + LaptopMobile = 0xef09, + LaptopSlash = 0xef0a, + LariSign = 0xef0b, + Lasso = 0xef0c, + LassoSparkles = 0xef0d, + LayerGroup = 0xef0e, + LayerMinus = 0xef0f, + LayerPlus = 0xef10, + Leaf = 0xef11, + LeafHeart = 0xef12, + LeafMaple = 0xef13, + LeafOak = 0xef14, + LeafyGreen = 0xef15, + Left = 0xef16, + LeftFromLine = 0xef17, + LeftLong = 0xef18, + LeftLongToLine = 0xef19, + LeftRight = 0xef1a, + LeftToLine = 0xef1b, + Lemon = 0xef1c, + LessThan = 0xef1d, + LessThanEqual = 0xef1e, + LifeRing = 0xef1f, + Lightbulb = 0xef20, + LightbulbCfl = 0xef21, + LightbulbCflOn = 0xef22, + LightbulbDollar = 0xef23, + LightbulbExclamation = 0xef24, + LightbulbExclamationOn = 0xef25, + LightbulbGear = 0xef26, + LightbulbOn = 0xef27, + LightbulbSlash = 0xef28, + LightCeiling = 0xef29, + LightEmergency = 0xef2a, + LightEmergencyOn = 0xef2b, + Lighthouse = 0xef2c, + LightsHoliday = 0xef2d, + LightSwitch = 0xef2e, + LightSwitchOff = 0xef2f, + LightSwitchOn = 0xef30, + LineColumns = 0xef31, + LineHeight = 0xef32, + LinesLeaning = 0xef33, + Link = 0xef34, + LinkHorizontal = 0xef35, + LinkHorizontalSlash = 0xef36, + LinkSimple = 0xef37, + LinkSimpleSlash = 0xef38, + LinkSlash = 0xef39, + Lips = 0xef3a, + LiraSign = 0xef3b, + List = 0xef3c, + ListCheck = 0xef3d, + ListDropdown = 0xef3e, + ListMusic = 0xef3f, + ListOl = 0xef40, + ListRadio = 0xef41, + ListTimeline = 0xef42, + ListTree = 0xef43, + ListUl = 0xef44, + LitecoinSign = 0xef45, + Loader = 0xef46, + Lobster = 0xef47, + LocationArrow = 0xef48, + LocationArrowUp = 0xef49, + LocationCheck = 0xef4a, + LocationCrosshairs = 0xef4b, + LocationCrosshairsSlash = 0xef4c, + LocationDot = 0xef4d, + LocationDotSlash = 0xef4e, + LocationExclamation = 0xef4f, + LocationMinus = 0xef50, + LocationPen = 0xef51, + LocationPin = 0xef52, + LocationPinLock = 0xef53, + LocationPinSlash = 0xef54, + LocationPlus = 0xef55, + LocationQuestion = 0xef56, + LocationSmile = 0xef57, + LocationXmark = 0xef58, + Lock = 0xef59, + LockA = 0xef5a, + LockHashtag = 0xef5b, + LockKeyhole = 0xef5c, + LockKeyholeOpen = 0xef5d, + LockOpen = 0xef5e, + Locust = 0xef5f, + Lollipop = 0xef60, + Loveseat = 0xef61, + LuchadorMask = 0xef62, + Lungs = 0xef63, + LungsVirus = 0xef64, + M = 0xef65, + Mace = 0xef66, + Magnet = 0xef67, + MagnifyingGlass = 0xef68, + MagnifyingGlassArrowRight = 0xef69, + MagnifyingGlassArrowsRotate = 0xef6a, + MagnifyingGlassChart = 0xef6b, + MagnifyingGlassDollar = 0xef6c, + MagnifyingGlassLocation = 0xef6d, + MagnifyingGlassMinus = 0xef6e, + MagnifyingGlassMusic = 0xef6f, + MagnifyingGlassPlay = 0xef70, + MagnifyingGlassPlus = 0xef71, + MagnifyingGlassWaveform = 0xef72, + Mailbox = 0xef73, + MailboxFlagUp = 0xef74, + ManatSign = 0xef75, + Mandolin = 0xef76, + Mango = 0xef77, + Manhole = 0xef78, + Map = 0xef79, + MapLocation = 0xef7a, + MapLocationDot = 0xef7b, + MapPin = 0xef7c, + Marker = 0xef7d, + Mars = 0xef7e, + MarsAndVenus = 0xef7f, + MarsAndVenusBurst = 0xef80, + MarsDouble = 0xef81, + MarsStroke = 0xef82, + MarsStrokeRight = 0xef83, + MarsStrokeUp = 0xef84, + MartiniGlass = 0xef85, + MartiniGlassCitrus = 0xef86, + MartiniGlassEmpty = 0xef87, + Mask = 0xef88, + MaskFace = 0xef89, + MaskSnorkel = 0xef8a, + MasksTheater = 0xef8b, + MaskVentilator = 0xef8c, + MattressPillow = 0xef8d, + Maximize = 0xef8e, + Meat = 0xef8f, + Medal = 0xef90, + Megaphone = 0xef91, + Melon = 0xef92, + MelonSlice = 0xef93, + Memo = 0xef94, + MemoCircleCheck = 0xef95, + MemoCircleInfo = 0xef96, + MemoPad = 0xef97, + Memory = 0xef98, + Menorah = 0xef99, + Mercury = 0xef9a, + Merge = 0xef9b, + Message = 0xef9c, + MessageArrowDown = 0xef9d, + MessageArrowUp = 0xef9e, + MessageArrowUpRight = 0xef9f, + MessageBot = 0xefa0, + MessageCaptions = 0xefa1, + MessageCheck = 0xefa2, + MessageCode = 0xefa3, + MessageDollar = 0xefa4, + MessageDots = 0xefa5, + MessageExclamation = 0xefa6, + MessageHeart = 0xefa7, + MessageImage = 0xefa8, + MessageLines = 0xefa9, + MessageMedical = 0xefaa, + MessageMiddle = 0xefab, + MessageMiddleTop = 0xefac, + MessageMinus = 0xefad, + MessageMusic = 0xefae, + MessagePen = 0xefaf, + MessagePlus = 0xefb0, + MessageQuestion = 0xefb1, + MessageQuote = 0xefb2, + Messages = 0xefb3, + MessagesDollar = 0xefb4, + MessageSlash = 0xefb5, + MessageSmile = 0xefb6, + MessageSms = 0xefb7, + MessagesQuestion = 0xefb8, + MessageText = 0xefb9, + MessageXmark = 0xefba, + Meteor = 0xefbb, + Meter = 0xefbc, + MeterBolt = 0xefbd, + MeterDroplet = 0xefbe, + MeterFire = 0xefbf, + Microchip = 0xefc0, + MicrochipAi = 0xefc1, + Microphone = 0xefc2, + MicrophoneLines = 0xefc3, + MicrophoneLinesSlash = 0xefc4, + MicrophoneSlash = 0xefc5, + MicrophoneStand = 0xefc6, + Microscope = 0xefc7, + Microwave = 0xefc8, + MillSign = 0xefc9, + Minimize = 0xefca, + Minus = 0xefcb, + Mistletoe = 0xefcc, + Mitten = 0xefcd, + Mobile = 0xefce, + MobileButton = 0xefcf, + MobileNotch = 0xefd0, + MobileRetro = 0xefd1, + MobileScreen = 0xefd2, + MobileScreenButton = 0xefd3, + MobileSignal = 0xefd4, + MobileSignalOut = 0xefd5, + MoneyBill = 0xefd6, + MoneyBill1 = 0xefd7, + MoneyBill1Wave = 0xefd8, + MoneyBills = 0xefd9, + MoneyBillSimple = 0xefda, + MoneyBillSimpleWave = 0xefdb, + MoneyBillsSimple = 0xefdc, + MoneyBillTransfer = 0xefdd, + MoneyBillTrendUp = 0xefde, + MoneyBillWave = 0xefdf, + MoneyBillWheat = 0xefe0, + MoneyCheck = 0xefe1, + MoneyCheckDollar = 0xefe2, + MoneyCheckDollarPen = 0xefe3, + MoneyCheckPen = 0xefe4, + MoneyFromBracket = 0xefe5, + MoneySimpleFromBracket = 0xefe6, + MonitorWaveform = 0xefe7, + Monkey = 0xefe8, + Monument = 0xefe9, + Moon = 0xefea, + MoonCloud = 0xefeb, + MoonOverSun = 0xefec, + MoonStars = 0xefed, + Moped = 0xefee, + MortarPestle = 0xefef, + Mosque = 0xeff0, + Mosquito = 0xeff1, + MosquitoNet = 0xeff2, + Motorcycle = 0xeff3, + Mound = 0xeff4, + Mountain = 0xeff5, + MountainCity = 0xeff6, + Mountains = 0xeff7, + MountainSun = 0xeff8, + MouseField = 0xeff9, + Mp3Player = 0xeffa, + Mug = 0xeffb, + MugHot = 0xeffc, + MugMarshmallows = 0xeffd, + MugSaucer = 0xeffe, + MugTea = 0xefff, + MugTeaSaucer = 0xf000, + Mushroom = 0xf001, + Music = 0xf002, + MusicMagnifyingGlass = 0xf003, + MusicNote = 0xf004, + MusicNoteSlash = 0xf005, + MusicSlash = 0xf006, + Mustache = 0xf007, + N = 0xf008, + NairaSign = 0xf009, + Narwhal = 0xf00a, + NestingDolls = 0xf00b, + NetworkWired = 0xf00c, + Neuter = 0xf00d, + Newspaper = 0xf00e, + Nfc = 0xf00f, + NfcLock = 0xf010, + NfcMagnifyingGlass = 0xf011, + NfcPen = 0xf012, + NfcSignal = 0xf013, + NfcSlash = 0xf014, + NfcSymbol = 0xf015, + NfcTrash = 0xf016, + Nose = 0xf017, + Notdef = 0xf018, + Note = 0xf019, + Notebook = 0xf01a, + NoteMedical = 0xf01b, + NotEqual = 0xf01c, + Notes = 0xf01d, + NotesMedical = 0xf01e, + NoteSticky = 0xf01f, + O = 0xf020, + ObjectExclude = 0xf021, + ObjectGroup = 0xf022, + ObjectIntersect = 0xf023, + ObjectsAlignBottom = 0xf024, + ObjectsAlignCenterHorizontal = 0xf025, + ObjectsAlignCenterVertical = 0xf026, + ObjectsAlignLeft = 0xf027, + ObjectsAlignRight = 0xf028, + ObjectsAlignTop = 0xf029, + ObjectsColumn = 0xf02a, + ObjectSubtract = 0xf02b, + ObjectUngroup = 0xf02c, + ObjectUnion = 0xf02d, + Octagon = 0xf02e, + OctagonCheck = 0xf02f, + OctagonDivide = 0xf030, + OctagonExclamation = 0xf031, + OctagonMinus = 0xf032, + OctagonPlus = 0xf033, + OctagonXmark = 0xf034, + OilCan = 0xf035, + OilCanDrip = 0xf036, + OilTemperature = 0xf037, + OilWell = 0xf038, + Olive = 0xf039, + OliveBranch = 0xf03a, + Om = 0xf03b, + Omega = 0xf03c, + Onion = 0xf03d, + Option = 0xf03e, + Ornament = 0xf03f, + Otter = 0xf040, + Outdent = 0xf041, + Outlet = 0xf042, + Oven = 0xf043, + Overline = 0xf044, + SignalSlash = 0xf045, + PageCaretDown = 0xf046, + Page = 0xf047, + PageCaretUp = 0xf048, + Pager = 0xf049, + Paintbrush = 0xf04a, + PaintbrushFine = 0xf04b, + PaintbrushPencil = 0xf04c, + PaintRoller = 0xf04d, + Pallet = 0xf04e, + Palette = 0xf04f, + PalletBox = 0xf050, + PalletBoxes = 0xf051, + Pancakes = 0xf052, + PanelEws = 0xf053, + PanelFire = 0xf054, + PanFood = 0xf055, + PanFrying = 0xf056, + Panorama = 0xf057, + Paperclip = 0xf058, + PaperclipVertical = 0xf059, + PaperPlane = 0xf05a, + PaperPlaneTop = 0xf05b, + ParachuteBox = 0xf05c, + Paragraph = 0xf05d, + PartyBell = 0xf05e, + ParagraphLeft = 0xf05f, + PartyHorn = 0xf060, + Passport = 0xf061, + Paste = 0xf062, + Pause = 0xf063, + Paw = 0xf064, + PawClaws = 0xf065, + PawSimple = 0xf066, + Peace = 0xf067, + Peach = 0xf068, + Peanut = 0xf069, + Peanuts = 0xf06a, + Peapod = 0xf06b, + Pear = 0xf06c, + Pedestal = 0xf06d, + Pegasus = 0xf06e, + Pen = 0xf06f, + Pencil = 0xf070, + PencilMechanical = 0xf071, + PencilSlash = 0xf072, + PenCircle = 0xf073, + PenClip = 0xf074, + PenClipSlash = 0xf075, + PenFancy = 0xf076, + PenFancySlash = 0xf077, + PenField = 0xf078, + PenNib = 0xf079, + PenLine = 0xf07a, + PenNibSlash = 0xf07b, + PenPaintbrush = 0xf07c, + PenRuler = 0xf07d, + PenSlash = 0xf07e, + PenSwirl = 0xf07f, + PenToSquare = 0xf080, + People = 0xf081, + PeopleArrows = 0xf082, + PeopleCarryBox = 0xf083, + PeopleDress = 0xf084, + PeopleDressSimple = 0xf085, + PeopleGroup = 0xf086, + PeopleLine = 0xf087, + PeoplePants = 0xf088, + PeoplePantsSimple = 0xf089, + PeoplePulling = 0xf08a, + PeopleRobbery = 0xf08b, + PeopleRoof = 0xf08c, + PeopleSimple = 0xf08d, + Pepper = 0xf08e, + PepperHot = 0xf08f, + Person = 0xf090, + Percent = 0xf091, + Period = 0xf092, + PersonArrowDownToLine = 0xf093, + PersonBiking = 0xf094, + PersonArrowUpFromLine = 0xf095, + PersonBikingMountain = 0xf096, + PersonBooth = 0xf097, + PersonBreastfeeding = 0xf098, + PersonBurst = 0xf099, + PersonCane = 0xf09a, + PersonCarryBox = 0xf09b, + PersonChalkboard = 0xf09c, + PersonCircleCheck = 0xf09d, + PersonCircleExclamation = 0xf09e, + PersonCircleMinus = 0xf09f, + PersonCirclePlus = 0xf0a0, + PersonCircleQuestion = 0xf0a1, + PersonCircleXmark = 0xf0a2, + PersonDigging = 0xf0a3, + PersonDollyEmpty = 0xf0a4, + PersonDotsFromLine = 0xf0a5, + PersonDressBurst = 0xf0a6, + PersonDress = 0xf0a7, + PersonDolly = 0xf0a8, + PersonDressFairy = 0xf0a9, + PersonDressSimple = 0xf0aa, + PersonDrowning = 0xf0ab, + PersonFairy = 0xf0ac, + PersonFalling = 0xf0ad, + PersonFallingBurst = 0xf0ae, + PersonFromPortal = 0xf0af, + PersonHalfDress = 0xf0b0, + PersonHarassing = 0xf0b1, + PersonHiking = 0xf0b2, + PersonMilitaryPointing = 0xf0b3, + PersonMilitaryRifle = 0xf0b4, + PersonMilitaryToPerson = 0xf0b5, + PersonPinball = 0xf0b6, + PersonPraying = 0xf0b7, + PersonPregnant = 0xf0b8, + PersonRays = 0xf0b9, + PersonRifle = 0xf0ba, + PersonRunning = 0xf0bb, + PersonRunningFast = 0xf0bc, + PersonSeat = 0xf0bd, + PersonSeatReclined = 0xf0be, + PersonShelter = 0xf0bf, + PersonSign = 0xf0c0, + PersonSimple = 0xf0c1, + PersonSkating = 0xf0c2, + PersonSkiing = 0xf0c3, + PersonSkiingNordic = 0xf0c4, + PersonSkiJumping = 0xf0c5, + PersonSkiLift = 0xf0c6, + PersonSledding = 0xf0c7, + PersonSnowboarding = 0xf0c8, + PersonSnowmobiling = 0xf0c9, + PersonSwimming = 0xf0ca, + PersonThroughWindow = 0xf0cb, + PersonToDoor = 0xf0cc, + PersonToPortal = 0xf0cd, + PersonWalking = 0xf0ce, + PersonWalkingArrowLoopLeft = 0xf0cf, + PersonWalkingArrowRight = 0xf0d0, + PersonWalkingDashedLineArrowRight = 0xf0d1, + PersonWalkingLuggage = 0xf0d2, + PersonWalkingWithCane = 0xf0d3, + PesetaSign = 0xf0d4, + PesoSign = 0xf0d5, + Phone = 0xf0d6, + PhoneArrowDownLeft = 0xf0d7, + PhoneArrowRight = 0xf0d8, + PhoneArrowUpRight = 0xf0d9, + PhoneFlip = 0xf0da, + PhoneHangup = 0xf0db, + PhoneIntercom = 0xf0dc, + PhoneMissed = 0xf0dd, + PhoneOffice = 0xf0de, + PhonePlus = 0xf0df, + PhoneRotary = 0xf0e0, + PhoneSlash = 0xf0e1, + PhoneVolume = 0xf0e2, + PhoneXmark = 0xf0e3, + PhotoFilm = 0xf0e4, + PhotoFilmMusic = 0xf0e5, + Pi = 0xf0e6, + Piano = 0xf0e7, + PiggyBank = 0xf0e8, + Pig = 0xf0e9, + PianoKeyboard = 0xf0ea, + Pickaxe = 0xf0eb, + Pinata = 0xf0ec, + Pinball = 0xf0ed, + Pie = 0xf0ee, + Pills = 0xf0ef, + Pickleball = 0xf0f0, + Pineapple = 0xf0f1, + Pipe = 0xf0f2, + PipeCircleCheck = 0xf0f3, + PipeCollar = 0xf0f4, + PipeSection = 0xf0f5, + PipeSmoking = 0xf0f6, + PipeValve = 0xf0f7, + Pizza = 0xf0f8, + PizzaSlice = 0xf0f9, + PlaceOfWorship = 0xf0fa, + Plane = 0xf0fb, + PlaneArrival = 0xf0fc, + PlaneCircleCheck = 0xf0fd, + PlaneCircleExclamation = 0xf0fe, + PlaneCircleXmark = 0xf0ff, + PlaneDeparture = 0xf100, + PlaneEngines = 0xf101, + PlaneLock = 0xf102, + PlaneProp = 0xf103, + PlaneSlash = 0xf104, + PlaneTail = 0xf105, + PlanetMoon = 0xf106, + PlanetRinged = 0xf107, + PlaneUp = 0xf108, + PlaneUpSlash = 0xf109, + PlantWilt = 0xf10a, + PlateUtensils = 0xf10b, + PlateWheat = 0xf10c, + Play = 0xf10d, + PlayPause = 0xf10e, + Plug = 0xf10f, + PlugCircleBolt = 0xf110, + PlugCircleCheck = 0xf111, + PlugCircleExclamation = 0xf112, + PlugCircleMinus = 0xf113, + PlugCirclePlus = 0xf114, + PlugCircleXmark = 0xf115, + Plus = 0xf116, + PlusLarge = 0xf117, + PlusMinus = 0xf118, + Podcast = 0xf119, + Podium = 0xf11a, + PodiumStar = 0xf11b, + PoliceBox = 0xf11c, + PollPeople = 0xf11d, + Pompebled = 0xf11e, + Poo = 0xf11f, + Pool8Ball = 0xf120, + Poop = 0xf121, + PooStorm = 0xf122, + Popcorn = 0xf123, + Popsicle = 0xf124, + Potato = 0xf125, + PotFood = 0xf126, + PowerOff = 0xf127, + Prescription = 0xf128, + PrescriptionBottle = 0xf129, + PrescriptionBottleMedical = 0xf12a, + PrescriptionBottlePill = 0xf12b, + PresentationScreen = 0xf12c, + Pretzel = 0xf12d, + Print = 0xf12e, + PrintMagnifyingGlass = 0xf12f, + PrintSlash = 0xf130, + Projector = 0xf131, + Pump = 0xf132, + Pumpkin = 0xf133, + PumpMedical = 0xf134, + PumpSoap = 0xf135, + Puzzle = 0xf136, + PuzzlePiece = 0xf137, + PuzzlePieceSimple = 0xf138, + Q = 0xf139, + Qrcode = 0xf13a, + Question = 0xf13b, + QuoteLeft = 0xf13c, + QuoteRight = 0xf13d, + Quotes = 0xf13e, + R = 0xf13f, + Rabbit = 0xf140, + RabbitRunning = 0xf141, + Raccoon = 0xf142, + Racquet = 0xf143, + Radar = 0xf144, + Radiation = 0xf145, + Radio = 0xf146, + RadioTuner = 0xf147, + Rainbow = 0xf148, + Raindrops = 0xf149, + Ram = 0xf14a, + RampLoading = 0xf14b, + RankingStar = 0xf14c, + Raygun = 0xf14d, + Receipt = 0xf14e, + RecordVinyl = 0xf14f, + Rectangle = 0xf150, + RectangleAd = 0xf151, + RectangleBarcode = 0xf152, + RectangleCode = 0xf153, + RectangleHistory = 0xf154, + RectangleHistoryCirclePlus = 0xf155, + RectangleHistoryCircleUser = 0xf156, + RectangleList = 0xf157, + RectanglePro = 0xf158, + RectanglesMixed = 0xf159, + RectangleTerminal = 0xf15a, + RectangleVertical = 0xf15b, + RectangleVerticalHistory = 0xf15c, + RectangleWide = 0xf15d, + RectangleXmark = 0xf15e, + Recycle = 0xf15f, + Reel = 0xf160, + ReflectHorizontal = 0xf161, + ReflectVertical = 0xf162, + Refrigerator = 0xf163, + Registered = 0xf164, + Repeat = 0xf165, + Repeat1 = 0xf166, + Reply = 0xf167, + ReplyAll = 0xf168, + ReplyClock = 0xf169, + Republican = 0xf16a, + Restroom = 0xf16b, + RestroomSimple = 0xf16c, + Retweet = 0xf16d, + Rhombus = 0xf16e, + Ribbon = 0xf16f, + Right = 0xf170, + RightFromBracket = 0xf171, + RightFromLine = 0xf172, + RightLeft = 0xf173, + RightLeftLarge = 0xf174, + RightLong = 0xf175, + RightLongToLine = 0xf176, + RightToBracket = 0xf177, + RightToLine = 0xf178, + Ring = 0xf179, + RingDiamond = 0xf17a, + RingsWedding = 0xf17b, + Road = 0xf17c, + RoadBarrier = 0xf17d, + RoadBridge = 0xf17e, + RoadCircleCheck = 0xf17f, + RoadCircleExclamation = 0xf180, + RoadCircleXmark = 0xf181, + RoadLock = 0xf182, + RoadSpikes = 0xf183, + Robot = 0xf184, + RobotAstromech = 0xf185, + Rocket = 0xf186, + RocketLaunch = 0xf187, + RollerCoaster = 0xf188, + Rotate = 0xf189, + RotateExclamation = 0xf18a, + RotateLeft = 0xf18b, + RotateReverse = 0xf18c, + RotateRight = 0xf18d, + Route = 0xf18e, + RouteHighway = 0xf18f, + RouteInterstate = 0xf190, + Router = 0xf191, + Rss = 0xf192, + RubleSign = 0xf193, + Rug = 0xf194, + RugbyBall = 0xf195, + Ruler = 0xf196, + RulerCombined = 0xf197, + RulerHorizontal = 0xf198, + RulerTriangle = 0xf199, + RulerVertical = 0xf19a, + RupeeSign = 0xf19b, + RupiahSign = 0xf19c, + Rv = 0xf19d, + S = 0xf19e, + Sack = 0xf19f, + SackDollar = 0xf1a0, + SackXmark = 0xf1a1, + Sailboat = 0xf1a2, + Salad = 0xf1a3, + SaltShaker = 0xf1a4, + Sandwich = 0xf1a5, + Satellite = 0xf1a6, + SatelliteDish = 0xf1a7, + Sausage = 0xf1a8, + Saxophone = 0xf1a9, + SaxophoneFire = 0xf1aa, + ScaleBalanced = 0xf1ab, + ScaleUnbalanced = 0xf1ac, + ScaleUnbalancedFlip = 0xf1ad, + Scalpel = 0xf1ae, + ScalpelLineDashed = 0xf1af, + ScannerGun = 0xf1b0, + ScannerImage = 0xf1b1, + ScannerKeyboard = 0xf1b2, + ScannerTouchscreen = 0xf1b3, + Scarecrow = 0xf1b4, + Scarf = 0xf1b5, + School = 0xf1b6, + SchoolCircleCheck = 0xf1b7, + SchoolCircleExclamation = 0xf1b8, + SchoolCircleXmark = 0xf1b9, + SchoolFlag = 0xf1ba, + SchoolLock = 0xf1bb, + Scissors = 0xf1bc, + Screencast = 0xf1bd, + ScreenUsers = 0xf1be, + Screwdriver = 0xf1bf, + ScrewdriverWrench = 0xf1c0, + Scribble = 0xf1c1, + Scroll = 0xf1c2, + ScrollOld = 0xf1c3, + ScrollTorah = 0xf1c4, + Scrubber = 0xf1c5, + Scythe = 0xf1c6, + SdCard = 0xf1c7, + SdCards = 0xf1c8, + Seal = 0xf1c9, + SealExclamation = 0xf1ca, + SealQuestion = 0xf1cb, + SeatAirline = 0xf1cc, + Section = 0xf1cd, + Seedling = 0xf1ce, + Semicolon = 0xf1cf, + SendBack = 0xf1d0, + SendBackward = 0xf1d1, + Sensor = 0xf1d2, + SensorCloud = 0xf1d3, + SensorFire = 0xf1d4, + SensorOn = 0xf1d5, + SensorTriangleExclamation = 0xf1d6, + Server = 0xf1d7, + Shapes = 0xf1d8, + Share = 0xf1d9, + ShareAll = 0xf1da, + ShareFromSquare = 0xf1db, + ShareNodes = 0xf1dc, + Sheep = 0xf1dd, + SheetPlastic = 0xf1de, + ShekelSign = 0xf1df, + Shelves = 0xf1e0, + ShelvesEmpty = 0xf1e1, + Shield = 0xf1e2, + ShieldCat = 0xf1e3, + ShieldCheck = 0xf1e4, + ShieldCross = 0xf1e5, + ShieldDog = 0xf1e6, + ShieldExclamation = 0xf1e7, + ShieldHalved = 0xf1e8, + ShieldHeart = 0xf1e9, + ShieldKeyhole = 0xf1ea, + ShieldMinus = 0xf1eb, + ShieldPlus = 0xf1ec, + ShieldQuartered = 0xf1ed, + ShieldSlash = 0xf1ee, + ShieldVirus = 0xf1ef, + ShieldXmark = 0xf1f0, + Ship = 0xf1f1, + Shirt = 0xf1f2, + ShirtLongSleeve = 0xf1f3, + ShirtRunning = 0xf1f4, + ShirtTankTop = 0xf1f5, + ShishKebab = 0xf1f6, + ShoePrints = 0xf1f7, + Shop = 0xf1f8, + ShopLock = 0xf1f9, + ShopSlash = 0xf1fa, + Shovel = 0xf1fb, + ShovelSnow = 0xf1fc, + Shower = 0xf1fd, + ShowerDown = 0xf1fe, + Shredder = 0xf1ff, + Shrimp = 0xf200, + Shuffle = 0xf201, + Shutters = 0xf202, + Shuttlecock = 0xf203, + ShuttleSpace = 0xf204, + Sickle = 0xf205, + Sidebar = 0xf206, + SidebarFlip = 0xf207, + Sigma = 0xf208, + Signal = 0xf209, + SignalBars = 0xf20a, + SignalBarsFair = 0xf20b, + SignalBarsGood = 0xf20c, + SignalBarsSlash = 0xf20d, + SignalBarsWeak = 0xf20e, + SignalFair = 0xf20f, + SignalGood = 0xf210, + UserHairBuns = 0xf211, + SignalStream = 0xf212, + SignalStreamSlash = 0xf213, + SignalStrong = 0xf214, + SignalWeak = 0xf215, + Signature = 0xf216, + SignatureLock = 0xf217, + SignatureSlash = 0xf218, + SignHanging = 0xf219, + SignPost = 0xf21a, + SignPosts = 0xf21b, + SignPostsWrench = 0xf21c, + SignsPost = 0xf21d, + SimCard = 0xf21e, + SimCards = 0xf21f, + Sink = 0xf220, + Siren = 0xf221, + SirenOn = 0xf222, + Sitemap = 0xf223, + Skeleton = 0xf224, + SkeletonRibs = 0xf225, + SkiBoot = 0xf226, + SkiBootSki = 0xf227, + Skull = 0xf228, + SkullCow = 0xf229, + SkullCrossbones = 0xf22a, + Slash = 0xf22b, + SlashBack = 0xf22c, + SlashForward = 0xf22d, + Sleigh = 0xf22e, + Slider = 0xf22f, + Sliders = 0xf230, + SlidersSimple = 0xf231, + SlidersUp = 0xf232, + SlotMachine = 0xf233, + Smog = 0xf234, + Smoke = 0xf235, + Smoking = 0xf236, + Snake = 0xf237, + Snooze = 0xf238, + SnowBlowing = 0xf239, + Snowflake = 0xf23a, + SnowflakeDroplets = 0xf23b, + Snowflakes = 0xf23c, + Snowman = 0xf23d, + SnowmanHead = 0xf23e, + Snowplow = 0xf23f, + Soap = 0xf240, + Socks = 0xf241, + SoftServe = 0xf242, + SolarPanel = 0xf243, + SolarSystem = 0xf244, + Sort = 0xf245, + SortDown = 0xf246, + SortUp = 0xf247, + Spa = 0xf248, + SpaceStationMoon = 0xf249, + SpaceStationMoonConstruction = 0xf24a, + Spade = 0xf24b, + SpaghettiMonsterFlying = 0xf24c, + Sparkles = 0xf24d, + Speaker = 0xf24e, + Speakers = 0xf24f, + SpiderBlackWidow = 0xf250, + SpiderWeb = 0xf251, + Sparkle = 0xf252, + Spinner = 0xf253, + Spider = 0xf254, + SpinnerScale = 0xf255, + SpinnerThird = 0xf256, + Splotch = 0xf257, + Split = 0xf258, + SprayCan = 0xf259, + SprayCanSparkles = 0xf25a, + Sportsball = 0xf25b, + Sprinkler = 0xf25c, + SprinklerCeiling = 0xf25d, + Square = 0xf25e, + Square3 = 0xf25f, + Square0 = 0xf260, + Square1 = 0xf261, + SpellCheck = 0xf262, + Square4 = 0xf263, + Square5 = 0xf264, + Spoon = 0xf265, + Square2 = 0xf266, + Square7 = 0xf267, + Square8 = 0xf268, + Square6 = 0xf269, + Square9 = 0xf26a, + SquareALock = 0xf26b, + SquareA = 0xf26c, + SquareArrowDown = 0xf26d, + SquareAmpersand = 0xf26e, + SquareArrowDownRight = 0xf26f, + SquareArrowDownLeft = 0xf270, + SquareArrowLeft = 0xf271, + SquareArrowRight = 0xf272, + SquareArrowUp = 0xf273, + SquareArrowUpLeft = 0xf274, + SquareArrowUpRight = 0xf275, + SquareB = 0xf276, + SquareBolt = 0xf277, + SquareC = 0xf278, + SquareCaretDown = 0xf279, + SquareCaretLeft = 0xf27a, + SquareCaretRight = 0xf27b, + SquareCaretUp = 0xf27c, + SquareCheck = 0xf27d, + SquareChevronDown = 0xf27e, + SquareChevronLeft = 0xf27f, + SquareChevronRight = 0xf280, + SquareChevronUp = 0xf281, + SquareCode = 0xf282, + SquareD = 0xf283, + SquareDashed = 0xf284, + SquareDashedCirclePlus = 0xf285, + SquareDivide = 0xf286, + SquareDollar = 0xf287, + SquareDown = 0xf288, + SquareDownLeft = 0xf289, + SquareDownRight = 0xf28a, + SquareE = 0xf28b, + SquareEllipsis = 0xf28c, + SquareEllipsisVertical = 0xf28d, + SquareEnvelope = 0xf28e, + SquareExclamation = 0xf28f, + SquareF = 0xf290, + SquareFragile = 0xf291, + SquareFull = 0xf292, + SquareG = 0xf293, + SquareH = 0xf294, + SquareHeart = 0xf295, + SquareI = 0xf296, + SquareInfo = 0xf297, + SquareJ = 0xf298, + SquareK = 0xf299, + SquareKanban = 0xf29a, + SquareL = 0xf29b, + SquareLeft = 0xf29c, + SquareList = 0xf29d, + SquareM = 0xf29e, + SquareMinus = 0xf29f, + SquareN = 0xf2a0, + SquareNfi = 0xf2a1, + SquareO = 0xf2a2, + SquareP = 0xf2a3, + SquareParking = 0xf2a4, + SquareParkingSlash = 0xf2a5, + SquarePen = 0xf2a6, + SquarePersonConfined = 0xf2a7, + SquarePhone = 0xf2a8, + SquarePhoneFlip = 0xf2a9, + SquarePhoneHangup = 0xf2aa, + SquarePlus = 0xf2ab, + SquarePollHorizontal = 0xf2ac, + SquarePollVertical = 0xf2ad, + SquareQ = 0xf2ae, + SquareQuarters = 0xf2af, + SquareQuestion = 0xf2b0, + SquareQuote = 0xf2b1, + SquareR = 0xf2b2, + SquareRight = 0xf2b3, + SquareRing = 0xf2b4, + SquareRoot = 0xf2b5, + SquareRootVariable = 0xf2b6, + SquareRss = 0xf2b7, + SquareS = 0xf2b8, + SquareShareNodes = 0xf2b9, + SquareSliders = 0xf2ba, + SquareSlidersVertical = 0xf2bb, + SquareSmall = 0xf2bc, + SquareStar = 0xf2bd, + SquareT = 0xf2be, + SquareTerminal = 0xf2bf, + SquareThisWayUp = 0xf2c0, + SquareU = 0xf2c1, + SquareUp = 0xf2c2, + SquareUpLeft = 0xf2c3, + SquareUpRight = 0xf2c4, + SquareUser = 0xf2c5, + SquareV = 0xf2c6, + SquareVirus = 0xf2c7, + SquareW = 0xf2c8, + SquareX = 0xf2c9, + SquareXmark = 0xf2ca, + SquareY = 0xf2cb, + SquareZ = 0xf2cc, + Squid = 0xf2cd, + Squirrel = 0xf2ce, + Staff = 0xf2cf, + StaffSnake = 0xf2d0, + Stairs = 0xf2d1, + Stamp = 0xf2d2, + StandardDefinition = 0xf2d3, + Stapler = 0xf2d4, + Star = 0xf2d5, + StarAndCrescent = 0xf2d6, + StarChristmas = 0xf2d7, + StarExclamation = 0xf2d8, + Starfighter = 0xf2d9, + StarfighterTwinIonEngine = 0xf2da, + StarfighterTwinIonEngineAdvanced = 0xf2db, + StarHalf = 0xf2dc, + StarHalfStroke = 0xf2dd, + StarOfDavid = 0xf2de, + StarOfLife = 0xf2df, + Stars = 0xf2e0, + StarSharp = 0xf2e1, + StarSharpHalf = 0xf2e2, + StarSharpHalfStroke = 0xf2e3, + Starship = 0xf2e4, + StarshipFreighter = 0xf2e5, + StarShooting = 0xf2e6, + Steak = 0xf2e7, + SteeringWheel = 0xf2e8, + SterlingSign = 0xf2e9, + Stethoscope = 0xf2ea, + Stocking = 0xf2eb, + Stomach = 0xf2ec, + Stop = 0xf2ed, + Stopwatch = 0xf2ee, + Stopwatch20 = 0xf2ef, + Store = 0xf2f0, + StoreLock = 0xf2f1, + StoreSlash = 0xf2f2, + Strawberry = 0xf2f3, + StreetView = 0xf2f4, + Stretcher = 0xf2f5, + Strikethrough = 0xf2f6, + Stroopwafel = 0xf2f7, + Subscript = 0xf2f8, + Subtitles = 0xf2f9, + SubtitlesSlash = 0xf2fa, + Suitcase = 0xf2fb, + SuitcaseMedical = 0xf2fc, + SuitcaseRolling = 0xf2fd, + Sun = 0xf2fe, + SunBright = 0xf2ff, + SunCloud = 0xf300, + SunDust = 0xf301, + Sunglasses = 0xf302, + SunHaze = 0xf303, + SunPlantWilt = 0xf304, + Sunrise = 0xf305, + Sunset = 0xf306, + Superscript = 0xf307, + Sushi = 0xf308, + SushiRoll = 0xf309, + Swap = 0xf30a, + SwapArrows = 0xf30b, + Swatchbook = 0xf30c, + Sword = 0xf30d, + SwordLaser = 0xf30e, + SwordLaserAlt = 0xf30f, + Swords = 0xf310, + SwordsLaser = 0xf311, + Symbols = 0xf312, + Synagogue = 0xf313, + Syringe = 0xf314, + T = 0xf315, + Table = 0xf316, + TableCells = 0xf317, + TableCellsLarge = 0xf318, + TableColumns = 0xf319, + TableLayout = 0xf31a, + TableList = 0xf31b, + TablePicnic = 0xf31c, + TablePivot = 0xf31d, + TableRows = 0xf31e, + Tablet = 0xf31f, + TabletButton = 0xf320, + TableTennisPaddleBall = 0xf321, + TableTree = 0xf322, + TabletRugged = 0xf323, + Tablets = 0xf324, + TabletScreen = 0xf325, + TabletScreenButton = 0xf326, + TachographDigital = 0xf327, + Taco = 0xf328, + Tag = 0xf329, + Tags = 0xf32a, + Tally = 0xf32b, + Tally1 = 0xf32c, + Tally2 = 0xf32d, + Tally3 = 0xf32e, + Tally4 = 0xf32f, + Tamale = 0xf330, + TankWater = 0xf331, + Tape = 0xf332, + Tarp = 0xf333, + TarpDroplet = 0xf334, + Taxi = 0xf335, + TaxiBus = 0xf336, + TeddyBear = 0xf337, + Teeth = 0xf338, + TeethOpen = 0xf339, + Telescope = 0xf33a, + TemperatureArrowDown = 0xf33b, + TemperatureArrowUp = 0xf33c, + TemperatureEmpty = 0xf33d, + TemperatureFull = 0xf33e, + TemperatureHalf = 0xf33f, + TemperatureHigh = 0xf340, + TemperatureList = 0xf341, + TemperatureLow = 0xf342, + TemperatureQuarter = 0xf343, + TemperatureSnow = 0xf344, + TemperatureSun = 0xf345, + TemperatureThreeQuarters = 0xf346, + TengeSign = 0xf347, + TennisBall = 0xf348, + Tent = 0xf349, + TentArrowDownToLine = 0xf34a, + TentArrowLeftRight = 0xf34b, + TentArrowsDown = 0xf34c, + TentArrowTurnLeft = 0xf34d, + TentDoublePeak = 0xf34e, + Tents = 0xf34f, + Terminal = 0xf350, + Text = 0xf351, + TextHeight = 0xf352, + TextSize = 0xf353, + TextSlash = 0xf354, + TextWidth = 0xf355, + Thermometer = 0xf356, + Theta = 0xf357, + ThoughtBubble = 0xf358, + ThumbsDown = 0xf359, + ThumbsUp = 0xf35a, + Thumbtack = 0xf35b, + Tick = 0xf35c, + Ticket = 0xf35d, + TicketAirline = 0xf35e, + TicketPerforated = 0xf35f, + Tickets = 0xf360, + TicketsAirline = 0xf361, + TicketSimple = 0xf362, + TicketsPerforated = 0xf363, + TicketsSimple = 0xf364, + Tilde = 0xf365, + Timeline = 0xf366, + TimelineArrow = 0xf367, + Timer = 0xf368, + Tire = 0xf369, + TireFlat = 0xf36a, + TirePressureWarning = 0xf36b, + TireRugged = 0xf36c, + ToggleLargeOff = 0xf36d, + ToggleLargeOn = 0xf36e, + ToggleOff = 0xf36f, + ToggleOn = 0xf370, + Toilet = 0xf371, + ToiletPaper = 0xf372, + ToiletPaperBlank = 0xf373, + ToiletPaperBlankUnder = 0xf374, + ToiletPaperCheck = 0xf375, + ToiletPaperSlash = 0xf376, + ToiletPaperUnder = 0xf377, + ToiletPaperUnderSlash = 0xf378, + ToiletPaperXmark = 0xf379, + ToiletPortable = 0xf37a, + ToiletsPortable = 0xf37b, + Tomato = 0xf37c, + Tombstone = 0xf37d, + TombstoneBlank = 0xf37e, + Toolbox = 0xf37f, + Tooth = 0xf380, + Toothbrush = 0xf381, + ToriiGate = 0xf382, + Tornado = 0xf383, + TowerBroadcast = 0xf384, + TowerCell = 0xf385, + TowerControl = 0xf386, + TowerObservation = 0xf387, + Tractor = 0xf388, + Trademark = 0xf389, + TrafficCone = 0xf38a, + TrafficLight = 0xf38b, + TrafficLightGo = 0xf38c, + TrafficLightSlow = 0xf38d, + TrafficLightStop = 0xf38e, + Trailer = 0xf38f, + Train = 0xf390, + TrainSubway = 0xf391, + TrainSubwayTunnel = 0xf392, + TrainTrack = 0xf393, + TrainTram = 0xf394, + TrainTunnel = 0xf395, + TransformerBolt = 0xf396, + Transgender = 0xf397, + Transporter = 0xf398, + Transporter1 = 0xf399, + Transporter2 = 0xf39a, + Transporter3 = 0xf39b, + Transporter4 = 0xf39c, + Transporter5 = 0xf39d, + Transporter6 = 0xf39e, + Transporter7 = 0xf39f, + TransporterEmpty = 0xf3a0, + Trash = 0xf3a1, + TrashArrowUp = 0xf3a2, + TrashCan = 0xf3a3, + TrashCanArrowUp = 0xf3a4, + TrashCanCheck = 0xf3a5, + TrashCanClock = 0xf3a6, + TrashCanList = 0xf3a7, + TrashCanPlus = 0xf3a8, + TrashCanSlash = 0xf3a9, + TrashCanUndo = 0xf3aa, + TrashCanXmark = 0xf3ab, + TrashCheck = 0xf3ac, + TrashClock = 0xf3ad, + TrashList = 0xf3ae, + TrashPlus = 0xf3af, + TrashSlash = 0xf3b0, + TrashUndo = 0xf3b1, + TrashXmark = 0xf3b2, + TreasureChest = 0xf3b3, + Tree = 0xf3b4, + TreeChristmas = 0xf3b5, + TreeCity = 0xf3b6, + TreeDeciduous = 0xf3b7, + TreeDecorated = 0xf3b8, + TreeLarge = 0xf3b9, + TreePalm = 0xf3ba, + Trees = 0xf3bb, + TRex = 0xf3bc, + Triangle = 0xf3bd, + TriangleExclamation = 0xf3be, + TriangleInstrument = 0xf3bf, + TrianglePersonDigging = 0xf3c0, + Tricycle = 0xf3c1, + TricycleAdult = 0xf3c2, + Trillium = 0xf3c3, + Trophy = 0xf3c4, + TrophyStar = 0xf3c5, + Trowel = 0xf3c6, + TrowelBricks = 0xf3c7, + Truck = 0xf3c8, + TruckArrowRight = 0xf3c9, + TruckBolt = 0xf3ca, + TruckClock = 0xf3cb, + TruckContainer = 0xf3cc, + TruckContainerEmpty = 0xf3cd, + TruckDroplet = 0xf3ce, + TruckFast = 0xf3cf, + TruckField = 0xf3d0, + TruckFieldUn = 0xf3d1, + TruckFire = 0xf3d2, + TruckFlatbed = 0xf3d3, + TruckFront = 0xf3d4, + TruckLadder = 0xf3d5, + TruckMedical = 0xf3d6, + TruckMonster = 0xf3d7, + TruckMoving = 0xf3d8, + TruckPickup = 0xf3d9, + TruckPlane = 0xf3da, + TruckPlow = 0xf3db, + TruckRamp = 0xf3dc, + TruckRampBox = 0xf3dd, + TruckRampCouch = 0xf3de, + TruckTow = 0xf3df, + TruckUtensils = 0xf3e0, + Trumpet = 0xf3e1, + Tty = 0xf3e2, + TtyAnswer = 0xf3e3, + TugrikSign = 0xf3e4, + Turkey = 0xf3e5, + TurkishLiraSign = 0xf3e6, + TurnDown = 0xf3e7, + TurnDownLeft = 0xf3e8, + TurnDownRight = 0xf3e9, + TurnLeft = 0xf3ea, + TurnLeftDown = 0xf3eb, + TurnLeftUp = 0xf3ec, + TurnRight = 0xf3ed, + Turntable = 0xf3ee, + TurnUp = 0xf3ef, + Turtle = 0xf3f0, + Tv = 0xf3f1, + TvMusic = 0xf3f2, + TvRetro = 0xf3f3, + Typewriter = 0xf3f4, + U = 0xf3f5, + Ufo = 0xf3f6, + UfoBeam = 0xf3f7, + Umbrella = 0xf3f8, + UmbrellaBeach = 0xf3f9, + UmbrellaSimple = 0xf3fa, + Underline = 0xf3fb, + Unicorn = 0xf3fc, + UniformMartialArts = 0xf3fd, + Union = 0xf3fe, + UniversalAccess = 0xf3ff, + Unlock = 0xf400, + UnlockKeyhole = 0xf401, + Up = 0xf402, + UpDown = 0xf403, + UpDownLeftRight = 0xf404, + UpFromBracket = 0xf405, + UpFromDottedLine = 0xf406, + UpFromLine = 0xf407, + UpLeft = 0xf408, + Upload = 0xf409, + UpLong = 0xf40a, + UpRight = 0xf40b, + UpRightAndDownLeftFromCenter = 0xf40c, + UpRightFromSquare = 0xf40d, + UpToDottedLine = 0xf40e, + UpToLine = 0xf40f, + UsbDrive = 0xf410, + User = 0xf411, + UserAlien = 0xf412, + UserAstronaut = 0xf413, + UserBountyHunter = 0xf414, + UserCheck = 0xf415, + UserChef = 0xf416, + UserClock = 0xf417, + UserCowboy = 0xf418, + UserCrown = 0xf419, + UserDoctor = 0xf41a, + UserDoctorHair = 0xf41b, + UserDoctorHairLong = 0xf41c, + UserDoctorMessage = 0xf41d, + UserGear = 0xf41e, + UserGraduate = 0xf41f, + UserGroup = 0xf420, + UserGroupCrown = 0xf421, + UserGroupSimple = 0xf422, + UserHair = 0xf423, + XmarksLines = 0xf424, + XmarkToSlot = 0xf425, + XRay = 0xf426, + Y = 0xf427, + YenSign = 0xf428, + YinYang = 0xf429, + Z = 0xf42a, + UserHairLong = 0xf42b, + UserHairMullet = 0xf42c, + UserHeadset = 0xf42d, + UserHelmetSafety = 0xf42e, + UserInjured = 0xf42f, + UserLarge = 0xf430, + UserLargeSlash = 0xf431, + UserLock = 0xf432, + UserMagnifyingGlass = 0xf433, + UserMinus = 0xf434, + UserMusic = 0xf435, + UserNinja = 0xf436, + UserNurse = 0xf437, + UserNurseHair = 0xf438, + UserNurseHairLong = 0xf439, + UserPen = 0xf43a, + UserPilot = 0xf43b, + UserPilotTie = 0xf43c, + UserPlus = 0xf43d, + UserPolice = 0xf43e, + UserPoliceTie = 0xf43f, + UserRobot = 0xf440, + UserRobotXmarks = 0xf441, + Users = 0xf442, + UsersBetweenLines = 0xf443, + UserSecret = 0xf444, + UsersGear = 0xf445, + UserShakespeare = 0xf446, + UserShield = 0xf447, + UserSlash = 0xf448, + UsersLine = 0xf449, + UsersMedical = 0xf44a, + UsersRectangle = 0xf44b, + UsersSlash = 0xf44c, + UsersViewfinder = 0xf44d, + UserTag = 0xf44e, + UserTie = 0xf44f, + UserUnlock = 0xf450, + UserTieHairLong = 0xf451, + UserVisor = 0xf452, + UserVneck = 0xf453, + UserTieHair = 0xf454, + UserVneckHair = 0xf455, + UserVneckHairLong = 0xf456, + UsersRays = 0xf457, + UserXmark = 0xf458, + Utensils = 0xf459, + UtensilsSlash = 0xf45a, + UtilityPole = 0xf45b, + UtilityPoleDouble = 0xf45c, + V = 0xf45d, + Vacuum = 0xf45e, + VacuumRobot = 0xf45f, + ValueAbsolute = 0xf460, + VanShuttle = 0xf461, + VectorCircle = 0xf462, + Vault = 0xf463, + VectorPolygon = 0xf464, + VectorSquare = 0xf465, + Venus = 0xf466, + VenusDouble = 0xf467, + VenusMars = 0xf468, + VestPatches = 0xf469, + Vial = 0xf46a, + VialCircleCheck = 0xf46b, + Vials = 0xf46c, + Vest = 0xf46d, + Video = 0xf46e, + VideoArrowDownLeft = 0xf46f, + VideoSlash = 0xf470, + VideoPlus = 0xf471, + Violin = 0xf472, + VirusCovidSlash = 0xf473, + Viruses = 0xf474, + VirusSlash = 0xf475, + Virus = 0xf476, + Vihara = 0xf477, + VirusCovid = 0xf478, + Volcano = 0xf479, + VentDamper = 0xf47a, + VolumeSlash = 0xf47b, + VolumeXmark = 0xf47c, + VrCardboard = 0xf47d, + Volume = 0xf47e, + VolumeLow = 0xf47f, + Volleyball = 0xf480, + VolumeOff = 0xf481, + Waffle = 0xf482, + VialVirus = 0xf483, + VolumeHigh = 0xf484, + Voicemail = 0xf485, + W = 0xf486, + VideoArrowUpRight = 0xf487, + WagonCovered = 0xf488, + Walker = 0xf489, + WalkieTalkie = 0xf48a, + Wallet = 0xf48b, + Wand = 0xf48c, + WandMagic = 0xf48d, + WandMagicSparkles = 0xf48e, + WandSparkles = 0xf48f, + Warehouse = 0xf490, + WarehouseFull = 0xf491, + WashingMachine = 0xf492, + Watch = 0xf493, + WatchApple = 0xf494, + WatchCalculator = 0xf495, + WatchFitness = 0xf496, + WatchSmart = 0xf497, + Water = 0xf498, + WaterArrowDown = 0xf499, + WaterArrowUp = 0xf49a, + WaterLadder = 0xf49b, + WatermelonSlice = 0xf49c, + Wave = 0xf49d, + Waveform = 0xf49e, + WaveformLines = 0xf49f, + WavePulse = 0xf4a0, + WaveSine = 0xf4a1, + WaveSquare = 0xf4a2, + WavesSine = 0xf4a3, + WaveTriangle = 0xf4a4, + Webhook = 0xf4a5, + WeightHanging = 0xf4a6, + WeightScale = 0xf4a7, + Whale = 0xf4a8, + Wheat = 0xf4a9, + WheatAwn = 0xf4aa, + WheatAwnCircleExclamation = 0xf4ab, + WheatAwnSlash = 0xf4ac, + WheatSlash = 0xf4ad, + Wheelchair = 0xf4ae, + WheelchairMove = 0xf4af, + WhiskeyGlass = 0xf4b0, + WhiskeyGlassIce = 0xf4b1, + Whistle = 0xf4b2, + Wifi = 0xf4b3, + WifiExclamation = 0xf4b4, + WifiFair = 0xf4b5, + WifiSlash = 0xf4b6, + WifiWeak = 0xf4b7, + Wind = 0xf4b8, + Window = 0xf4b9, + WindowFlip = 0xf4ba, + WindowFrame = 0xf4bb, + WindowFrameOpen = 0xf4bc, + WindowMaximize = 0xf4bd, + WindowMinimize = 0xf4be, + WindowRestore = 0xf4bf, + Windsock = 0xf4c0, + WindTurbine = 0xf4c1, + WindWarning = 0xf4c2, + WineBottle = 0xf4c3, + WineGlass = 0xf4c4, + WineGlassCrack = 0xf4c5, + WineGlassEmpty = 0xf4c6, + WonSign = 0xf4c7, + Worm = 0xf4c8, + Wreath = 0xf4c9, + WreathLaurel = 0xf4ca, + Wrench = 0xf4cb, + WrenchSimple = 0xf4cc, + X = 0xf4cd, + Xmark = 0xf4ce, + XmarkLarge = 0xf4cf, +}; +Q_ENUM_CREATE(IconName) +Q_END_ENUM_CREATE(ElaIconType) +#endif // ELADEF_H diff --git a/3rd/ElaWidgetTools/include/ElaDialog.h b/3rd/ElaWidgetTools/include/ElaDialog.h new file mode 100644 index 0000000..e687212 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaDialog.h @@ -0,0 +1,37 @@ +#ifndef ELAFRAMEWORK_ELADIALOG_H +#define ELAFRAMEWORK_ELADIALOG_H + +#include "ElaAppBar.h" +#include "ElaDef.h" +#include + +class ElaDialogPrivate; +class ELA_EXPORT ElaDialog : public QDialog +{ + Q_OBJECT + Q_Q_CREATE(ElaDialog) + Q_PROPERTY_CREATE_Q_H(bool, IsStayTop) + Q_PROPERTY_CREATE_Q_H(bool, IsFixedSize) + Q_PROPERTY_CREATE_Q_H(bool, IsDefaultClosed) + Q_PROPERTY_CREATE_Q_H(int, AppBarHeight) + Q_TAKEOVER_NATIVEEVENT_H +public: + explicit ElaDialog(QWidget* parent = nullptr); + ~ElaDialog() override; + void moveToCenter(); + + void setWindowButtonFlag(ElaAppBarType::ButtonType buttonFlag, bool isEnable = true); + void setWindowButtonFlags(ElaAppBarType::ButtonFlags buttonFlags); + ElaAppBarType::ButtonFlags getWindowButtonFlags() const; + +Q_SIGNALS: + Q_SIGNAL void routeBackButtonClicked(); + Q_SIGNAL void navigationButtonClicked(); + Q_SIGNAL void themeChangeButtonClicked(); + Q_SIGNAL void closeButtonClicked(); + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif //ELAFRAMEWORK_ELADIALOG_H diff --git a/3rd/ElaWidgetTools/include/ElaDockWidget.h b/3rd/ElaWidgetTools/include/ElaDockWidget.h new file mode 100644 index 0000000..7be24a7 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaDockWidget.h @@ -0,0 +1,29 @@ +#ifndef ELADOCKWIDGET_H +#define ELADOCKWIDGET_H + +#include + +#include "ElaProperty.h" +class ElaDockWidgetPrivate; +class ELA_EXPORT ElaDockWidget : public QDockWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaDockWidget) +public: + explicit ElaDockWidget(QWidget* parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()); + explicit ElaDockWidget(const QString& title, QWidget* parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()); + ~ElaDockWidget() override; + +protected: + virtual void paintEvent(QPaintEvent* event) override; +#ifdef Q_OS_WIN + virtual bool event(QEvent* event) override; +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override; +#else + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override; +#endif +#endif +}; + +#endif // ELADOCKWIDGET_H diff --git a/3rd/ElaWidgetTools/include/ElaDoubleSpinBox.h b/3rd/ElaWidgetTools/include/ElaDoubleSpinBox.h new file mode 100644 index 0000000..99da894 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaDoubleSpinBox.h @@ -0,0 +1,25 @@ +#ifndef ELADOUBLESPINBOX_H +#define ELADOUBLESPINBOX_H + +#include + +#include "ElaDef.h" + +class ElaDoubleSpinBoxPrivate; +class ELA_EXPORT ElaDoubleSpinBox : public QDoubleSpinBox +{ + Q_OBJECT + Q_Q_CREATE(ElaDoubleSpinBox) + Q_PROPERTY_CREATE_Q_H(ElaSpinBoxType::ButtonMode, ButtonMode) +public: + explicit ElaDoubleSpinBox(QWidget* parent = nullptr); + ~ElaDoubleSpinBox() override; + +protected: + void focusInEvent(QFocusEvent* event) override; + void focusOutEvent(QFocusEvent* event) override; + void paintEvent(QPaintEvent* event) override; + void contextMenuEvent(QContextMenuEvent* event) override; +}; + +#endif // ELADOUBLESPINBOX_H diff --git a/3rd/ElaWidgetTools/include/ElaDrawerArea.h b/3rd/ElaWidgetTools/include/ElaDrawerArea.h new file mode 100644 index 0000000..05c191a --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaDrawerArea.h @@ -0,0 +1,31 @@ +#ifndef ELAFRAMEWORK_ELAWIDGETTOOLS_INCLUDE_ELADRAWERAREA_H_ +#define ELAFRAMEWORK_ELAWIDGETTOOLS_INCLUDE_ELADRAWERAREA_H_ + +#include "ElaProperty.h" +#include + +class ElaDrawerAreaPrivate; +class ELA_EXPORT ElaDrawerArea : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaDrawerArea) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(int, HeaderHeight) +public: + explicit ElaDrawerArea(QWidget* parent = nullptr); + ~ElaDrawerArea() override; + + void setDrawerHeader(QWidget* widget); + + void addDrawer(QWidget* widget); + void removeDrawer(QWidget* widget); + + void expand(); + void collapse(); + + bool getIsExpand() const; +Q_SIGNALS: + Q_SIGNAL void expandStateChanged(bool isExpand); +}; + +#endif //ELAFRAMEWORK_ELAWIDGETTOOLS_INCLUDE_ELADRAWERAREA_H_ diff --git a/3rd/ElaWidgetTools/include/ElaDxgiManager.h b/3rd/ElaWidgetTools/include/ElaDxgiManager.h new file mode 100644 index 0000000..44ebf86 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaDxgiManager.h @@ -0,0 +1,58 @@ +#ifndef ELADXGIMANAGER_H +#define ELADXGIMANAGER_H + +#include +#ifdef Q_OS_WIN +#include "ElaProperty.h" +#include "ElaSingleton.h" + +class ElaDxgiManagerPrivate; +class ELA_EXPORT ElaDxgiManager : public QObject +{ + Q_OBJECT + Q_Q_CREATE(ElaDxgiManager) + Q_SINGLETON_CREATE_H(ElaDxgiManager); + +private: + explicit ElaDxgiManager(QObject* parent = nullptr); + ~ElaDxgiManager() override; + +public: + QStringList getDxDeviceList() const; + QStringList getOutputDeviceList() const; + QImage grabScreenToImage() const; + void startGrabScreen(); + void stopGrabScreen(); + bool getIsGrabScreen() const; + bool setDxDeviceID(int dxID); + int getDxDeviceID() const; + bool setOutputDeviceID(int deviceID); + int getOutputDeviceID() const; + void setGrabArea(int width, int height); //从屏幕中心向外延伸 + void setGrabArea(int x, int y, int width, int height); + QRect getGrabArea() const; + void setGrabFrameRate(int frameRateValue); + int getGrabFrameRate() const; + void setTimeoutMsValue(int timeoutValue); + int getTimeoutMsValue() const; +Q_SIGNALS: + Q_SIGNAL void grabImageUpdate(QImage img); +}; + +class ElaDxgiScreenPrivate; +class ELA_EXPORT ElaDxgiScreen : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaDxgiScreen) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) +public: + explicit ElaDxgiScreen(QWidget* parent = nullptr); + ~ElaDxgiScreen(); + void setIsSyncGrabSize(bool isSyncGrabSize); + bool getIsSyncGrabSize() const; + +protected: + void paintEvent(QPaintEvent* event) override; +}; +#endif +#endif // ELADXGIMANAGER_H diff --git a/3rd/ElaWidgetTools/include/ElaEventBus.h b/3rd/ElaWidgetTools/include/ElaEventBus.h new file mode 100644 index 0000000..28173ec --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaEventBus.h @@ -0,0 +1,45 @@ +#ifndef ELAEVENTBUS_H +#define ELAEVENTBUS_H + +#include +#include + +#include "ElaDef.h" +#include "ElaProperty.h" +#include "ElaSingleton.h" +class ElaEventPrivate; +class ELA_EXPORT ElaEvent : public QObject +{ + Q_OBJECT + Q_Q_CREATE(ElaEvent) + Q_PROPERTY_CREATE_Q_H(QString, EventName); + Q_PROPERTY_CREATE_Q_H(QString, FunctionName); + Q_PROPERTY_CREATE_Q_H(Qt::ConnectionType, ConnectionType); + +public: + explicit ElaEvent(QObject* parent = nullptr); + explicit ElaEvent(QString eventName, QString functionName, QObject* parent = nullptr); + ~ElaEvent() override; + ElaEventBusType::EventBusReturnType registerAndInit(); +}; + +class ElaEventBusPrivate; +class ELA_EXPORT ElaEventBus : public QObject +{ + Q_OBJECT + Q_Q_CREATE(ElaEventBus) + Q_SINGLETON_CREATE_H(ElaEventBus); + +private: + explicit ElaEventBus(QObject* parent = nullptr); + ~ElaEventBus() override; + +public: + ElaEventBusType::EventBusReturnType post(const QString& eventName, const QVariantMap& data = {}); + QStringList getRegisteredEventsName() const; + +private: + friend class ElaEvent; +}; + +#endif // ELAEVENTBUS_H diff --git a/3rd/ElaWidgetTools/include/ElaExponentialBlur.h b/3rd/ElaWidgetTools/include/ElaExponentialBlur.h new file mode 100644 index 0000000..f9656e6 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaExponentialBlur.h @@ -0,0 +1,23 @@ +#ifndef ELAEXPONENTIALBLUR_H +#define ELAEXPONENTIALBLUR_H + +#include + +#include "ElaProperty.h" +#include "ElaSingleton.h" + +class ElaExponentialBlurPrivate; +class ELA_EXPORT ElaExponentialBlur : public QObject +{ + Q_OBJECT + Q_SINGLETON_CREATE_H(ElaExponentialBlur) + Q_Q_CREATE(ElaExponentialBlur) +private: + explicit ElaExponentialBlur(QObject* parent = nullptr); + ~ElaExponentialBlur(); + +public: + static QPixmap doExponentialBlur(QImage img, const quint16& blurRadius); +}; + +#endif // ELAEXPONENTIALBLUR_H diff --git a/3rd/ElaWidgetTools/include/ElaFlowLayout.h b/3rd/ElaWidgetTools/include/ElaFlowLayout.h new file mode 100644 index 0000000..682d05d --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaFlowLayout.h @@ -0,0 +1,35 @@ +#ifndef ELAFLOWLAYOUT_H +#define ELAFLOWLAYOUT_H + +#include +#include +#include + +#include "ElaProperty.h" +class ElaFlowLayoutPrivate; +class ELA_EXPORT ElaFlowLayout : public QLayout +{ + Q_OBJECT + Q_Q_CREATE(ElaFlowLayout) +public: + explicit ElaFlowLayout(QWidget* parent, int margin = -1, int hSpacing = -1, int vSpacing = -1); + explicit ElaFlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1); + ~ElaFlowLayout() override; + + void addItem(QLayoutItem* item) override; + int horizontalSpacing() const; + int verticalSpacing() const; + Qt::Orientations expandingDirections() const override; + bool hasHeightForWidth() const override; + int heightForWidth(int) const override; + int count() const override; + QLayoutItem* itemAt(int index) const override; + QSize minimumSize() const override; + void setGeometry(const QRect& rect) override; + QSize sizeHint() const override; + QLayoutItem* takeAt(int index) override; + + void setIsAnimation(bool isAnimation); +}; + +#endif // ELAFLOWLAYOUT_H diff --git a/3rd/ElaWidgetTools/include/ElaGraphicsItem.h b/3rd/ElaWidgetTools/include/ElaGraphicsItem.h new file mode 100644 index 0000000..159d4d7 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaGraphicsItem.h @@ -0,0 +1,48 @@ +#ifndef ELAGRAPHICSITEM_H +#define ELAGRAPHICSITEM_H + +#include +#include +#include +#include + +#include "ElaProperty.h" +class ElaGraphicsScene; +class ElaGraphicsItemPrivate; +class ELA_EXPORT ElaGraphicsItem : public QGraphicsObject +{ + Q_OBJECT + Q_Q_CREATE(ElaGraphicsItem) + Q_PROPERTY_CREATE_Q_H(int, Width) + Q_PROPERTY_CREATE_Q_H(int, Height) + Q_PROPERTY_CREATE_Q_H(QImage, ItemImage) + Q_PROPERTY_CREATE_Q_H(QImage, ItemSelectedImage) + Q_PROPERTY_CREATE_Q_H(QString, ItemName) + Q_PROPERTY_CREATE_Q_H(QVariantMap, DataRoutes) + Q_PROPERTY_CREATE_Q_H(int, MaxLinkPortCount) +public: + explicit ElaGraphicsItem(QGraphicsItem* parent = nullptr); + explicit ElaGraphicsItem(int width, int height, QGraphicsItem* parent = nullptr); + ~ElaGraphicsItem(); + + QString getItemUID() const; + + void setLinkPortState(bool isFullLink); + void setLinkPortState(bool isLink, int portIndex); + + bool getLinkPortState(int portIndex) const; + QVector getLinkPortState() const; + + int getUsedLinkPortCount() const; + QVector getUsedLinkPort() const; + int getUnusedLinkPortCount() const; + QVector getUnusedLinkPort() const; + +protected: + virtual QRectF boundingRect() const override; + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override; + friend QDataStream& operator<<(QDataStream& stream, const ElaGraphicsItem* item); + friend QDataStream& operator>>(QDataStream& stream, ElaGraphicsItem* item); +}; + +#endif // ELAGRAPHICSITEM_H diff --git a/3rd/ElaWidgetTools/include/ElaGraphicsLineItem.h b/3rd/ElaWidgetTools/include/ElaGraphicsLineItem.h new file mode 100644 index 0000000..b5db967 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaGraphicsLineItem.h @@ -0,0 +1,33 @@ +#ifndef ELAGRAPHICSLINEITEM_H +#define ELAGRAPHICSLINEITEM_H + +#include + +#include "ElaProperty.h" +class ElaGraphicsItem; +class ElaGraphicsLineItemPrivate; +class ELA_EXPORT ElaGraphicsLineItem : public QGraphicsPathItem +{ + Q_Q_CREATE(ElaGraphicsLineItem) + Q_PRIVATE_CREATE_Q_H(QPointF, StartPoint); + Q_PRIVATE_CREATE_Q_H(QPointF, EndPoint); + Q_PRIVATE_CREATE_Q_H(ElaGraphicsItem*, StartItem); + Q_PRIVATE_CREATE_Q_H(ElaGraphicsItem*, EndItem); + Q_PRIVATE_CREATE_Q_H(int, StartItemPort); + Q_PRIVATE_CREATE_Q_H(int, EndItemPort); + +public: + explicit ElaGraphicsLineItem(ElaGraphicsItem* startItem, ElaGraphicsItem* endItem, int startItemPort, int endItemPort, QGraphicsItem* parent = nullptr); + explicit ElaGraphicsLineItem(QPointF startPoint, QPointF endPoint, QGraphicsItem* parent = nullptr); + ~ElaGraphicsLineItem(); + + bool isTargetLink(ElaGraphicsItem* item) const; + bool isTargetLink(ElaGraphicsItem* item1, ElaGraphicsItem* item2) const; + bool isTargetLink(ElaGraphicsItem* item1, ElaGraphicsItem* item2, int port1, int port2) const; + +protected: + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override; + QRectF boundingRect() const override; +}; + +#endif // ELAGRAPHICSLINEITEM_H diff --git a/3rd/ElaWidgetTools/include/ElaGraphicsScene.h b/3rd/ElaWidgetTools/include/ElaGraphicsScene.h new file mode 100644 index 0000000..0d32ac2 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaGraphicsScene.h @@ -0,0 +1,70 @@ +#ifndef ELAGRAPHICSSCENE_H +#define ELAGRAPHICSSCENE_H + +#include +#include +#include +#include +#include +#include + +#include "ElaDef.h" +#include "ElaProperty.h" + +class ElaGraphicsItem; +class ElaGraphicsScenePrivate; +class ELA_EXPORT ElaGraphicsScene : public QGraphicsScene +{ + Q_OBJECT + Q_Q_CREATE(ElaGraphicsScene) + Q_PROPERTY_CREATE_Q_H(bool, IsCheckLinkPort) + Q_PROPERTY_CREATE_Q_H(QString, SerializePath) +public: + explicit ElaGraphicsScene(QObject* parent = nullptr); + ~ElaGraphicsScene(); + void addItem(ElaGraphicsItem* item); + void removeItem(ElaGraphicsItem* item); + void removeSelectedItems(); + void clear(); + + QList createAndAddItem(int width, int height, int count = 1); + QList getSelectedElaItems() const; + QList getElaItems(); + QList getElaItems(QPoint pos); + QList getElaItems(QPointF pos); + QList getElaItems(QRect rect); + QList getElaItems(QRectF rect); + + void setSceneMode(ElaGraphicsSceneType::SceneMode mode); + ElaGraphicsSceneType::SceneMode getSceneMode() const; + + void selectAllItems(); + + QList getItemLinkList() const; + bool addItemLink(ElaGraphicsItem* item1, ElaGraphicsItem* item2, int port1 = 0, int port2 = 0); + bool removeItemLink(ElaGraphicsItem* item1); + bool removeItemLink(ElaGraphicsItem* item1, ElaGraphicsItem* item2, int port1 = 0, int port2 = 0); + + QVector getItemsDataRoute() const; + + // 序列化 反序列化 + void serialize(); + void deserialize(); + +Q_SIGNALS: + void showItemLink(); + void mouseLeftClickedItem(ElaGraphicsItem* item); + void mouseRightClickedItem(ElaGraphicsItem* item); + void mouseDoubleClickedItem(ElaGraphicsItem* item); + +protected: + virtual void focusOutEvent(QFocusEvent* event) override; + virtual void keyPressEvent(QKeyEvent* event) override; + virtual void keyReleaseEvent(QKeyEvent* event) override; + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override; + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override; + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override; + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override; +}; + +#endif // ELAGRAPHICSSCENE_H diff --git a/3rd/ElaWidgetTools/include/ElaGraphicsView.h b/3rd/ElaWidgetTools/include/ElaGraphicsView.h new file mode 100644 index 0000000..c08fae7 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaGraphicsView.h @@ -0,0 +1,26 @@ +#ifndef ELAGRAPHICSVIEW_H +#define ELAGRAPHICSVIEW_H + +#include + +#include "ElaProperty.h" +class ElaGraphicsViewPrivate; +class ELA_EXPORT ElaGraphicsView : public QGraphicsView +{ + Q_OBJECT + Q_Q_CREATE(ElaGraphicsView) + Q_PROPERTY_CREATE_Q_H(qreal, MaxTransform); + Q_PROPERTY_CREATE_Q_H(qreal, MinTransform); + +public: + explicit ElaGraphicsView(QWidget* parent = nullptr); + explicit ElaGraphicsView(QGraphicsScene* scene, QWidget* parent = nullptr); + ~ElaGraphicsView(); + +protected: + void wheelEvent(QWheelEvent* event) override; + void keyPressEvent(QKeyEvent* event) override; + void keyReleaseEvent(QKeyEvent* event) override; +}; + +#endif // ELAGRAPHICSVIEW_H diff --git a/3rd/ElaWidgetTools/include/ElaIcon.h b/3rd/ElaWidgetTools/include/ElaIcon.h new file mode 100644 index 0000000..6cd00d1 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaIcon.h @@ -0,0 +1,24 @@ +#ifndef ELAICON_H +#define ELAICON_H +#include + +#include "ElaDef.h" +#include "ElaProperty.h" +#include "ElaSingleton.h" +class ELA_EXPORT ElaIcon +{ + Q_SINGLETON_CREATE_H(ElaIcon) +private: + explicit ElaIcon(); + ~ElaIcon(); + +public: + QIcon getElaIcon(ElaIconType::IconName awesome); + QIcon getElaIcon(ElaIconType::IconName awesome, QColor iconColor); + QIcon getElaIcon(ElaIconType::IconName awesome, int pixelSize); + QIcon getElaIcon(ElaIconType::IconName awesome, int pixelSize, QColor iconColor); + QIcon getElaIcon(ElaIconType::IconName awesome, int pixelSize, int fixedWidth, int fixedHeight); + QIcon getElaIcon(ElaIconType::IconName awesome, int pixelSize, int fixedWidth, int fixedHeight, QColor iconColor); +}; + +#endif // ELAICON_H diff --git a/3rd/ElaWidgetTools/include/ElaIconButton.h b/3rd/ElaWidgetTools/include/ElaIconButton.h new file mode 100644 index 0000000..9e96598 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaIconButton.h @@ -0,0 +1,39 @@ +#ifndef ELAICONBUTTON_H +#define ELAICONBUTTON_H + +#include + +#include "ElaDef.h" +#include "ElaProperty.h" +class ElaIconButtonPrivate; +class ELA_EXPORT ElaIconButton : public QPushButton +{ + Q_OBJECT + Q_Q_CREATE(ElaIconButton) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(qreal, Opacity); + Q_PROPERTY_CREATE_Q_H(QColor, LightHoverColor); + Q_PROPERTY_CREATE_Q_H(QColor, DarkHoverColor); + Q_PROPERTY_CREATE_Q_H(QColor, LightIconColor); + Q_PROPERTY_CREATE_Q_H(QColor, DarkIconColor); + Q_PROPERTY_CREATE_Q_H(QColor, LightHoverIconColor); + Q_PROPERTY_CREATE_Q_H(QColor, DarkHoverIconColor); + Q_PROPERTY_CREATE_Q_H(bool, IsSelected); + +public: + ElaIconButton(QPixmap pix, QWidget* parent = nullptr); + ElaIconButton(ElaIconType::IconName awesome, QWidget* parent = nullptr); + ElaIconButton(ElaIconType::IconName awesome, int pixelSize, QWidget* parent = nullptr); + ElaIconButton(ElaIconType::IconName awesome, int pixelSize, int fixedWidth, int fixedHeight, QWidget* parent = nullptr); + ~ElaIconButton(); + void setAwesome(ElaIconType::IconName awesome); + ElaIconType::IconName getAwesome() const; + + void setPixmap(QPixmap pix); + +protected: + virtual bool event(QEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAICONBUTTON_H diff --git a/3rd/ElaWidgetTools/include/ElaImageCard.h b/3rd/ElaWidgetTools/include/ElaImageCard.h new file mode 100644 index 0000000..1b9f43e --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaImageCard.h @@ -0,0 +1,24 @@ +#ifndef ELAIMAGECARD_H +#define ELAIMAGECARD_H + +#include + +#include "ElaProperty.h" + +class ElaImageCardPrivate; +class ELA_EXPORT ElaImageCard : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaImageCard) + Q_PROPERTY_CREATE_Q_H(QImage, CardImage); + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(bool, IsPreserveAspectCrop) +public: + explicit ElaImageCard(QWidget* parent = nullptr); + ~ElaImageCard() override; + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAIMAGECARD_H diff --git a/3rd/ElaWidgetTools/include/ElaInteractiveCard.h b/3rd/ElaWidgetTools/include/ElaInteractiveCard.h new file mode 100644 index 0000000..29c86ab --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaInteractiveCard.h @@ -0,0 +1,35 @@ +#ifndef ELAINTERACTIVECARD_H +#define ELAINTERACTIVECARD_H + +#include +#include + +#include "ElaDef.h" +#include "ElaProperty.h" + +class ElaInteractiveCardPrivate; +class ELA_EXPORT ElaInteractiveCard : public QPushButton +{ + Q_OBJECT + Q_Q_CREATE(ElaInteractiveCard) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(QString, Title); + Q_PROPERTY_CREATE_Q_H(QString, SubTitle); + Q_PROPERTY_CREATE_Q_H(int, TitlePixelSize); + Q_PROPERTY_CREATE_Q_H(int, SubTitlePixelSize); + Q_PROPERTY_CREATE_Q_H(int, TitleSpacing); + Q_PROPERTY_CREATE_Q_H(QPixmap, CardPixmap); + Q_PROPERTY_CREATE_Q_H(QSize, CardPixmapSize); + Q_PROPERTY_CREATE_Q_H(int, CardPixmapBorderRadius) + Q_PROPERTY_CREATE_Q_H(ElaCardPixType::PixMode, CardPixMode); + +public: + explicit ElaInteractiveCard(QWidget* parent = nullptr); + ~ElaInteractiveCard(); + void setCardPixmapSize(int width, int height); + +protected: + void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAINTERACTIVECARD_H diff --git a/3rd/ElaWidgetTools/include/ElaKeyBinder.h b/3rd/ElaWidgetTools/include/ElaKeyBinder.h new file mode 100644 index 0000000..3b5d0d1 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaKeyBinder.h @@ -0,0 +1,29 @@ +#ifndef ELAWIDGETTOOLS_SRC_ELAKEYBINDER_H_ +#define ELAWIDGETTOOLS_SRC_ELAKEYBINDER_H_ + +#include "ElaDef.h" +#include + +class ElaKeyBinderPrivate; +class ELA_EXPORT ElaKeyBinder : public QLabel +{ + Q_OBJECT + Q_Q_CREATE(ElaKeyBinder) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(QString, BinderKeyText) + Q_PROPERTY_CREATE_Q_H(quint32, NativeVirtualBinderKey) +public: + explicit ElaKeyBinder(QWidget* parent = nullptr); + ~ElaKeyBinder(); + +Q_SIGNALS: + Q_SIGNAL void binderKeyTextChanged(QString binderKeyText); + Q_SIGNAL void nativeVirtualBinderKeyChanged(quint32 binderKey); + +protected: + virtual bool event(QEvent* event) override; + virtual void mouseReleaseEvent(QMouseEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif //ELAWIDGETTOOLS_SRC_ELAKEYBINDER_H_ diff --git a/3rd/ElaWidgetTools/include/ElaLCDNumber.h b/3rd/ElaWidgetTools/include/ElaLCDNumber.h new file mode 100644 index 0000000..343a2e3 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaLCDNumber.h @@ -0,0 +1,26 @@ +#ifndef ELAWIDGETTOOLS_ELALCDNUMBER_H +#define ELAWIDGETTOOLS_ELALCDNUMBER_H + +#include + +#include "ElaProperty.h" + +class ElaLCDNumberPrivate; +class ELA_EXPORT ElaLCDNumber : public QLCDNumber +{ + Q_OBJECT + Q_Q_CREATE(ElaLCDNumber) + Q_PROPERTY_CREATE_Q_H(bool, IsUseAutoClock) + Q_PROPERTY_CREATE_Q_H(QString, AutoClockFormat) + Q_PROPERTY_CREATE_Q_H(bool, IsTransparent) + +public: + explicit ElaLCDNumber(QWidget* parent = nullptr); + explicit ElaLCDNumber(uint numDigits, QWidget* parent = nullptr); + ~ElaLCDNumber() override; + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif //ELAWIDGETTOOLS_ELALCDNUMBER_H diff --git a/3rd/ElaWidgetTools/include/ElaLineEdit.h b/3rd/ElaWidgetTools/include/ElaLineEdit.h new file mode 100644 index 0000000..1f11791 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaLineEdit.h @@ -0,0 +1,31 @@ +#ifndef ELALINEEDIT_H +#define ELALINEEDIT_H + +#include + +#include "ElaProperty.h" + +class ElaLineEditPrivate; +class ELA_EXPORT ElaLineEdit : public QLineEdit +{ + Q_OBJECT + Q_Q_CREATE(ElaLineEdit) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(bool, IsClearButtonEnable) +public: + explicit ElaLineEdit(QWidget* parent = nullptr); + ~ElaLineEdit() override; + +Q_SIGNALS: + Q_SIGNAL void focusIn(QString text); + Q_SIGNAL void focusOut(QString text); + Q_SIGNAL void wmFocusOut(QString text); + +protected: + void focusInEvent(QFocusEvent* event) override; + void focusOutEvent(QFocusEvent* event) override; + void paintEvent(QPaintEvent* event) override; + void contextMenuEvent(QContextMenuEvent* event) override; +}; + +#endif // ELALINEEDIT_H diff --git a/3rd/ElaWidgetTools/include/ElaListView.h b/3rd/ElaWidgetTools/include/ElaListView.h new file mode 100644 index 0000000..aed1465 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaListView.h @@ -0,0 +1,20 @@ +#ifndef ELALISTVIEW_H +#define ELALISTVIEW_H + +#include + +#include "ElaProperty.h" + +class ElaListViewPrivate; +class ELA_EXPORT ElaListView : public QListView +{ + Q_OBJECT + Q_Q_CREATE(ElaListView) + Q_PROPERTY_CREATE_Q_H(int, ItemHeight) + Q_PROPERTY_CREATE_Q_H(bool, IsTransparent) +public: + explicit ElaListView(QWidget* parent = nullptr); + ~ElaListView(); +}; + +#endif // ELALISTVIEW_H diff --git a/3rd/ElaWidgetTools/include/ElaLog.h b/3rd/ElaWidgetTools/include/ElaLog.h new file mode 100644 index 0000000..e5b0b94 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaLog.h @@ -0,0 +1,29 @@ +#ifndef ELALOG_H +#define ELALOG_H + +#include + +#include "ElaProperty.h" +#include "ElaSingleton.h" + +class ElaLogPrivate; +class ELA_EXPORT ElaLog : public QObject +{ + Q_OBJECT + Q_Q_CREATE(ElaLog) + Q_PROPERTY_CREATE_Q_H(QString, LogSavePath) + Q_PROPERTY_CREATE_Q_H(QString, LogFileName) + Q_PROPERTY_CREATE_Q_H(bool, IsLogFileNameWithTime) + Q_SINGLETON_CREATE_H(ElaLog); + +private: + explicit ElaLog(QObject* parent = nullptr); + ~ElaLog(); + +public: + void initMessageLog(bool isEnable); +Q_SIGNALS: + void logMessage(QString log); +}; + +#endif // ELALOG_H diff --git a/3rd/ElaWidgetTools/include/ElaMenu.h b/3rd/ElaWidgetTools/include/ElaMenu.h new file mode 100644 index 0000000..f2b4ef4 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaMenu.h @@ -0,0 +1,40 @@ +#ifndef ELAMENU_H +#define ELAMENU_H + +#include +#include + +#include "ElaDef.h" +#include "ElaProperty.h" +class ElaMenuPrivate; +class ELA_EXPORT ElaMenu : public QMenu +{ + Q_OBJECT + Q_Q_CREATE(ElaMenu) + +public: + explicit ElaMenu(QWidget* parent = nullptr); + explicit ElaMenu(const QString& title, QWidget* parent = nullptr); + ~ElaMenu(); + void setMenuItemHeight(int menuItemHeight); + int getMenuItemHeight() const; + + QAction* addMenu(QMenu* menu); + ElaMenu* addMenu(const QString& title); + ElaMenu* addMenu(const QIcon& icon, const QString& title); + ElaMenu* addMenu(ElaIconType::IconName icon, const QString& title); + + QAction* addElaIconAction(ElaIconType::IconName icon, const QString& text); + QAction* addElaIconAction(ElaIconType::IconName icon, const QString& text, const QKeySequence& shortcut); + + bool isHasChildMenu() const; + bool isHasIcon() const; +Q_SIGNALS: + Q_SIGNAL void menuShow(); + +protected: + virtual void showEvent(QShowEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAMENU_H diff --git a/3rd/ElaWidgetTools/include/ElaMenuBar.h b/3rd/ElaWidgetTools/include/ElaMenuBar.h new file mode 100644 index 0000000..c3bc4df --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaMenuBar.h @@ -0,0 +1,26 @@ +#ifndef ELAMENUBAR_H +#define ELAMENUBAR_H + +#include + +#include "ElaDef.h" +#include "ElaProperty.h" + +class ElaMenu; +class ELA_EXPORT ElaMenuBar : public QMenuBar +{ + Q_OBJECT +public: + explicit ElaMenuBar(QWidget* parent = nullptr); + ~ElaMenuBar(); + + QAction* addMenu(QMenu* menu); + ElaMenu* addMenu(const QString& title); + ElaMenu* addMenu(const QIcon& icon, const QString& title); + ElaMenu* addMenu(ElaIconType::IconName, const QString& title); + + QAction* addElaIconAction(ElaIconType::IconName icon, const QString& text); + QAction* addElaIconAction(ElaIconType::IconName icon, const QString& text, const QKeySequence& shortcut); +}; + +#endif // ELAMENUBAR_H diff --git a/3rd/ElaWidgetTools/include/ElaMessageBar.h b/3rd/ElaWidgetTools/include/ElaMessageBar.h new file mode 100644 index 0000000..b1e25b2 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaMessageBar.h @@ -0,0 +1,30 @@ +#ifndef ELAMESSAGEBAR_H +#define ELAMESSAGEBAR_H + +#include + +#include "ElaDef.h" +#include "ElaProperty.h" + +class ElaMessageBarPrivate; +class ELA_EXPORT ElaMessageBar : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaMessageBar) + +public: + static void success(ElaMessageBarType::PositionPolicy policy, QString title, QString text, int displayMsec, QWidget* parent = nullptr); + static void warning(ElaMessageBarType::PositionPolicy policy, QString title, QString text, int displayMsec, QWidget* parent = nullptr); + static void information(ElaMessageBarType::PositionPolicy policy, QString title, QString text, int displayMsec, QWidget* parent = nullptr); + static void error(ElaMessageBarType::PositionPolicy policy, QString title, QString text, int displayMsec, QWidget* parent = nullptr); + +protected: + void paintEvent(QPaintEvent* event) override; + bool eventFilter(QObject* watched, QEvent* event) override; + +private: + explicit ElaMessageBar(ElaMessageBarType::PositionPolicy policy, ElaMessageBarType::MessageMode messageMode, QString& title, QString& text, int displayMsec, QWidget* parent = nullptr); + ~ElaMessageBar() override; +}; + +#endif // ELAMESSAGEBAR_H diff --git a/3rd/ElaWidgetTools/include/ElaMessageButton.h b/3rd/ElaWidgetTools/include/ElaMessageButton.h new file mode 100644 index 0000000..f2b55e2 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaMessageButton.h @@ -0,0 +1,33 @@ +#ifndef ELAMESSAGEBUTTON_H +#define ELAMESSAGEBUTTON_H + +#include +#include + +#include "ElaDef.h" +#include "ElaProperty.h" +class ElaMessageButtonPrivate; +class ELA_EXPORT ElaMessageButton : public QPushButton +{ + Q_OBJECT + Q_Q_CREATE(ElaMessageButton) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(QString, BarTitle); + Q_PROPERTY_CREATE_Q_H(QString, BarText); + Q_PROPERTY_CREATE_Q_H(int, DisplayMsec); + Q_PROPERTY_CREATE_Q_H(QWidget*, MessageTargetWidget) + Q_PROPERTY_CREATE_Q_H(ElaMessageBarType::MessageMode, MessageMode); + Q_PROPERTY_CREATE_Q_H(ElaMessageBarType::PositionPolicy, PositionPolicy); + +public: + explicit ElaMessageButton(QWidget* parent = nullptr); + explicit ElaMessageButton(QString text, QWidget* parent = nullptr); + ~ElaMessageButton(); + +protected: + virtual void mousePressEvent(QMouseEvent* event) override; + virtual void mouseReleaseEvent(QMouseEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAMESSAGEBUTTON_H diff --git a/3rd/ElaWidgetTools/include/ElaMultiSelectComboBox.h b/3rd/ElaWidgetTools/include/ElaMultiSelectComboBox.h new file mode 100644 index 0000000..4bac57b --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaMultiSelectComboBox.h @@ -0,0 +1,31 @@ +#ifndef ELAMULTISELECTCOMBOBOX_H +#define ELAMULTISELECTCOMBOBOX_H +#include + +#include "ElaProperty.h" +class ElaMultiSelectComboBoxPrivate; +class ELA_EXPORT ElaMultiSelectComboBox : public QComboBox +{ + Q_OBJECT + Q_Q_CREATE(ElaMultiSelectComboBox) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) +public: + explicit ElaMultiSelectComboBox(QWidget* parent = nullptr); + ~ElaMultiSelectComboBox(); + void setCurrentSelection(QString selection); + void setCurrentSelection(QStringList selection); + void setCurrentSelection(int index); + void setCurrentSelection(QList selectionIndex); + QStringList getCurrentSelection() const; + QList getCurrentSelectionIndex() const; +Q_SIGNALS: + Q_SIGNAL void itemSelectionChanged(QVector itemSelection); + Q_SIGNAL void currentTextListChanged(QStringList selectedTextList); + +protected: + void paintEvent(QPaintEvent* e) override; + void showPopup() override; + void hidePopup() override; +}; + +#endif // ELAMULTISELECTCOMBOBOX_H diff --git a/3rd/ElaWidgetTools/include/ElaNavigationBar.h b/3rd/ElaWidgetTools/include/ElaNavigationBar.h new file mode 100644 index 0000000..d5407e4 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaNavigationBar.h @@ -0,0 +1,66 @@ +#ifndef ELANAVIGATIONBAR_H +#define ELANAVIGATIONBAR_H + +#include + +#include "ElaDef.h" +#include "ElaProperty.h" +#include "ElaSuggestBox.h" +class ElaNavigationBarPrivate; +class ELA_EXPORT ElaNavigationBar : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaNavigationBar) + Q_PROPERTY_CREATE_Q_H(bool, IsTransparent) + Q_PROPERTY_CREATE_Q_H(bool, IsAllowPageOpenInNewWindow) + Q_PROPERTY_CREATE_Q_H(int, NavigationBarWidth) +public: + explicit ElaNavigationBar(QWidget* parent = nullptr); + ~ElaNavigationBar() override; + void setUserInfoCardVisible(bool isVisible); + void setUserInfoCardPixmap(QPixmap pix); + void setUserInfoCardTitle(QString title); + void setUserInfoCardSubTitle(QString subTitle); + + ElaNavigationType::NodeResult addExpanderNode(const QString& expanderTitle, QString& expanderKey, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addExpanderNode(const QString& expanderTitle, QString& expanderKey, const QString& targetExpanderKey, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addPageNode(const QString& pageTitle, QWidget* page, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addPageNode(const QString& pageTitle, QWidget* page, int keyPoints, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addPageNode(const QString& pageTitle, QWidget* page, const QString& targetExpanderKey, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addPageNode(const QString& pageTitle, QWidget* page, const QString& targetExpanderKey, int keyPoints, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addFooterNode(const QString& footerTitle, QString& footerKey, int keyPoints = 0, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addFooterNode(const QString& footerTitle, QWidget* page, QString& footerKey, int keyPoints = 0, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addCategoryNode(const QString& categoryTitle, QString& categoryKey); + ElaNavigationType::NodeResult addCategoryNode(const QString& categoryTitle, QString& categoryKey, const QString& targetExpanderKey); + + bool getNodeIsExpanded(QString expanderKey) const; + void expandNode(QString expanderKey); + void collapseNode(QString expanderKey); + void removeNode(QString nodeKey); + + void setNodeKeyPoints(QString nodeKey, int keyPoints); + int getNodeKeyPoints(QString nodeKey) const; + + void setNodeTitle(QString nodeKey, QString nodeTitle); + QString getNodeTitle(QString nodeKey) const; + + void navigation(QString pageKey, bool isLogClicked = true, bool isRouteBack = false); + void setDisplayMode(ElaNavigationType::NavigationDisplayMode displayMode, bool isAnimation = true); + ElaNavigationType::NavigationDisplayMode getDisplayMode() const; + + int getPageOpenInNewWindowCount(QString nodeKey) const; + + QList getSuggestDataList() const; + +Q_SIGNALS: + Q_SIGNAL void pageOpenInNewWindow(QString nodeKey); + Q_SIGNAL void userInfoCardClicked(); + Q_SIGNAL void navigationNodeClicked(ElaNavigationType::NavigationNodeType nodeType, QString nodeKey, bool isRouteBack); + Q_SIGNAL void navigationNodeAdded(ElaNavigationType::NavigationNodeType nodeType, QString nodeKey, QWidget* page); + Q_SIGNAL void navigationNodeRemoved(ElaNavigationType::NavigationNodeType nodeType, QString nodeKey); + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELANAVIGATIONBAR_H diff --git a/3rd/ElaWidgetTools/include/ElaPivot.h b/3rd/ElaWidgetTools/include/ElaPivot.h new file mode 100644 index 0000000..0ca2685 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaPivot.h @@ -0,0 +1,28 @@ +#ifndef ELAPIVOT_H +#define ELAPIVOT_H +#include + +#include "ElaProperty.h" + +class ElaPivotPrivate; +class ELA_EXPORT ElaPivot : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaPivot) + Q_PROPERTY_CREATE_Q_H(int, TextPixelSize) + Q_PROPERTY_CREATE_Q_H(int, CurrentIndex) + Q_PROPERTY_CREATE_Q_H(int, PivotSpacing) + Q_PROPERTY_CREATE_Q_H(int, MarkWidth) +public: + explicit ElaPivot(QWidget* parent = nullptr); + ~ElaPivot(); + + void appendPivot(QString pivotTitle); + void removePivot(QString pivotTitle); + +Q_SIGNALS: + Q_SIGNAL void pivotClicked(int index); + Q_SIGNAL void pivotDoubleClicked(int index); +}; + +#endif // ELAPIVOT_H diff --git a/3rd/ElaWidgetTools/include/ElaPlainTextEdit.h b/3rd/ElaWidgetTools/include/ElaPlainTextEdit.h new file mode 100644 index 0000000..0b4da57 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaPlainTextEdit.h @@ -0,0 +1,25 @@ +#ifndef ELAPLAINTEXTEDIT_H +#define ELAPLAINTEXTEDIT_H + +#include + +#include "ElaProperty.h" + +class ElaPlainTextEditPrivate; +class ELA_EXPORT ElaPlainTextEdit : public QPlainTextEdit +{ + Q_OBJECT + Q_Q_CREATE(ElaPlainTextEdit) +public: + explicit ElaPlainTextEdit(QWidget* parent = nullptr); + explicit ElaPlainTextEdit(const QString& text, QWidget* parent = nullptr); + ~ElaPlainTextEdit() override; + +protected: + virtual void focusInEvent(QFocusEvent* event) override; + virtual void focusOutEvent(QFocusEvent* event) override; + virtual void contextMenuEvent(QContextMenuEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAPLAINTEXTEDIT_H diff --git a/3rd/ElaWidgetTools/include/ElaPopularCard.h b/3rd/ElaWidgetTools/include/ElaPopularCard.h new file mode 100644 index 0000000..727cb02 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaPopularCard.h @@ -0,0 +1,34 @@ +#ifndef ELAPOPULARCARD_H +#define ELAPOPULARCARD_H + +#include +#include + +#include "ElaProperty.h" +class ElaPopularCardPrivate; +class ELA_EXPORT ElaPopularCard : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaPopularCard) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(QPixmap, CardPixmap) + Q_PROPERTY_CREATE_Q_H(QString, Title) + Q_PROPERTY_CREATE_Q_H(QString, SubTitle) + Q_PROPERTY_CREATE_Q_H(QString, InteractiveTips) + Q_PROPERTY_CREATE_Q_H(QString, DetailedText) + Q_PROPERTY_CREATE_Q_H(QString, CardButtonText) + Q_PROPERTY_CREATE_Q_H(QWidget*, CardFloatArea) + Q_PROPERTY_CREATE_Q_H(QPixmap, CardFloatPixmap) +public: + explicit ElaPopularCard(QWidget* parent = nullptr); + ~ElaPopularCard() override; +Q_SIGNALS: + Q_SIGNAL void popularCardClicked(); + Q_SIGNAL void popularCardButtonClicked(); + +protected: + virtual bool event(QEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAPOPULARCARD_H diff --git a/3rd/ElaWidgetTools/include/ElaProgressBar.h b/3rd/ElaWidgetTools/include/ElaProgressBar.h new file mode 100644 index 0000000..8750fe8 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaProgressBar.h @@ -0,0 +1,24 @@ +#ifndef ELAPROGRESSBAR_H +#define ELAPROGRESSBAR_H + +#include + +#include "ElaProperty.h" + +class ElaProgressBarPrivate; +class ELA_EXPORT ElaProgressBar : public QProgressBar +{ + Q_OBJECT + Q_Q_CREATE(ElaProgressBar) +public: + explicit ElaProgressBar(QWidget* parent = nullptr); + ~ElaProgressBar() override; + void setMinimum(int minimum); + void setMaximum(int maximum); + +protected: + virtual void paintEvent(QPaintEvent* event) override; + virtual void resizeEvent(QResizeEvent* event) override; +}; + +#endif // ELAPROGRESSBAR_H diff --git a/3rd/ElaWidgetTools/include/ElaProgressRing.h b/3rd/ElaWidgetTools/include/ElaProgressRing.h new file mode 100644 index 0000000..62dbfc7 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaProgressRing.h @@ -0,0 +1,36 @@ +#ifndef ELAFRAMEWORK_ELAWIDGETTOOLS_INCLUDE_ELAPROGRESSRING_H_ +#define ELAFRAMEWORK_ELAWIDGETTOOLS_INCLUDE_ELAPROGRESSRING_H_ + +#include "ElaDef.h" + +#include + +class ElaProgressRingPrivate; +class ELA_EXPORT ElaProgressRing : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaProgressRing); + Q_PROPERTY_CREATE_Q_H(bool, IsBusying) + Q_PROPERTY_CREATE_Q_H(bool, IsTransparent) + Q_PROPERTY_CREATE_Q_H(bool, IsDisplayValue) + Q_PROPERTY_CREATE_Q_H(ElaProgressRingType::ValueDisplayMode, ValueDisplayMode) + Q_PROPERTY_CREATE_Q_H(int, BusyingWidth) + Q_PROPERTY_CREATE_Q_H(int, BusyingDurationTime) + Q_PROPERTY_CREATE_Q_H(int, Minimum) + Q_PROPERTY_CREATE_Q_H(int, Maximum) + Q_PROPERTY_CREATE_Q_H(int, Value) + Q_PROPERTY_CREATE_Q_H(int, ValuePixelSize) +public: + explicit ElaProgressRing(QWidget* parent = nullptr); + ~ElaProgressRing() override; + + void setRange(int min, int max); + +Q_SIGNALS: + Q_SIGNAL void rangeChanged(int min, int max); + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif //ELAFRAMEWORK_ELAWIDGETTOOLS_INCLUDE_ELAPROGRESSRING_H_ diff --git a/3rd/ElaWidgetTools/include/ElaPromotionCard.h b/3rd/ElaWidgetTools/include/ElaPromotionCard.h new file mode 100644 index 0000000..35d7d3a --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaPromotionCard.h @@ -0,0 +1,39 @@ +#ifndef ELAPROMOTIONCARD_H +#define ELAPROMOTIONCARD_H +#include + +#include "ElaProperty.h" +class ElaPromotionCardPrivate; +class ELA_EXPORT ElaPromotionCard : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaPromotionCard) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(QPixmap, CardPixmap) + Q_PROPERTY_CREATE_Q_H(QString, CardTitle) + Q_PROPERTY_CREATE_Q_H(QString, PromotionTitle) + Q_PROPERTY_CREATE_Q_H(QString, Title) + Q_PROPERTY_CREATE_Q_H(QString, SubTitle) + Q_PROPERTY_CREATE_Q_H(QColor, CardTitleColor) + Q_PROPERTY_CREATE_Q_H(QColor, PromotionTitleColor) + Q_PROPERTY_CREATE_Q_H(QColor, PromotionTitleBaseColor) + Q_PROPERTY_CREATE_Q_H(QColor, TitleColor) + Q_PROPERTY_CREATE_Q_H(QColor, SubTitleColor) + Q_PROPERTY_CREATE_Q_H(int, CardTitlePixelSize) + Q_PROPERTY_CREATE_Q_H(int, PromotionTitlePixelSize) + Q_PROPERTY_CREATE_Q_H(int, TitlePixelSize) + Q_PROPERTY_CREATE_Q_H(int, SubTitlePixelSize) + Q_PROPERTY_CREATE_Q_H(qreal, HorizontalCardPixmapRatio) + Q_PROPERTY_CREATE_Q_H(qreal, VerticalCardPixmapRatio) +public: + explicit ElaPromotionCard(QWidget* parent = nullptr); + ~ElaPromotionCard(); +Q_SIGNALS: + Q_SIGNAL void promotionCardClicked(); + +protected: + virtual bool event(QEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAPROMOTIONCARD_H diff --git a/3rd/ElaWidgetTools/include/ElaPromotionView.h b/3rd/ElaWidgetTools/include/ElaPromotionView.h new file mode 100644 index 0000000..57da0d9 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaPromotionView.h @@ -0,0 +1,30 @@ +#ifndef ELAPROMOTIONVIEW_H +#define ELAPROMOTIONVIEW_H + +#include +#include + +#include "ElaProperty.h" +class ElaPromotionCard; +class ElaPromotionViewPrivate; +class ELA_EXPORT ElaPromotionView : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaPromotionView) + Q_PROPERTY_CREATE_Q_H(int, CardExpandWidth) + Q_PROPERTY_CREATE_Q_H(int, CardCollapseWidth) + Q_PROPERTY_CREATE_Q_H(int, CurrentIndex) + Q_PROPERTY_CREATE_Q_H(bool, IsAutoScroll) + Q_PROPERTY_CREATE_Q_H(int, AutoScrollInterval) +public: + explicit ElaPromotionView(QWidget* parent = nullptr); + ~ElaPromotionView(); + + void appendPromotionCard(ElaPromotionCard* card); + +protected: + virtual void wheelEvent(QWheelEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAPROMOTIONVIEW_H diff --git a/3rd/ElaWidgetTools/include/ElaProperty.h b/3rd/ElaWidgetTools/include/ElaProperty.h new file mode 100644 index 0000000..8cc8626 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaProperty.h @@ -0,0 +1,168 @@ +#ifndef ELAFRAMEWORK_ELAWIDGETTOOLS_ELAPROPERTY_H_ +#define ELAFRAMEWORK_ELAWIDGETTOOLS_ELAPROPERTY_H_ + +#include + +#ifdef ELAWIDGETTOOLS_LIBRARY +#define ELA_EXPORT Q_DECL_EXPORT +#else +#define ELA_EXPORT Q_DECL_IMPORT +#endif + +#define Q_PROPERTY_CREATE(TYPE, M) \ + Q_PROPERTY(TYPE p##M MEMBER _p##M NOTIFY p##M##Changed) \ +public: \ + Q_SIGNAL void p##M##Changed(); \ + void set##M(TYPE M) \ + { \ + _p##M = std::move(M); \ + Q_EMIT p##M##Changed(); \ + } \ + TYPE get##M() const \ + { \ + return _p##M; \ + } \ + \ +private: \ + TYPE _p##M; + +#define Q_PROPERTY_REF_CREATE(TYPE, M) \ + Q_PROPERTY(TYPE p##M MEMBER _p##M NOTIFY p##M##Changed) \ +public: \ + Q_SIGNAL void p##M##Changed(); \ + void set##M(const TYPE& M) \ + { \ + _p##M = M; \ + Q_EMIT p##M##Changed(); \ + } \ + const TYPE& get##M() const \ + { \ + return _p##M; \ + } \ + \ +private: \ + TYPE _p##M; + +#define Q_PROPERTY_CREATE_Q_H(TYPE, M) \ + Q_PROPERTY(TYPE p##M READ get##M WRITE set##M NOTIFY p##M##Changed) \ +public: \ + Q_SIGNAL void p##M##Changed(); \ + void set##M(TYPE M); \ + TYPE get##M() const; + +#define Q_PROPERTY_REF_CREATE_Q_H(TYPE, M) \ + Q_PROPERTY(TYPE p##M READ get##M WRITE set##M NOTIFY p##M##Changed) \ +public: \ + Q_SIGNAL void p##M##Changed(); \ + void set##M(const TYPE& M); \ + const TYPE& get##M() const; + +#define Q_PRIVATE_CREATE_Q_H(TYPE, M) \ +public: \ + void set##M(TYPE M); \ + TYPE get##M() const; + +#define Q_PRIVATE_REF_CREATE_Q_H(TYPE, M) \ +public: \ + void set##M(const TYPE& M); \ + const TYPE& get##M() const; + +#define Q_PROPERTY_CREATE_Q_CPP(CLASS, TYPE, M) \ + void CLASS::set##M(TYPE M) \ + { \ + Q_D(CLASS); \ + d->_p##M = std::move(M); \ + Q_EMIT p##M##Changed(); \ + } \ + TYPE CLASS::get##M() const \ + { \ + return d_ptr->_p##M; \ + } + +#define Q_PROPERTY_REF_CREATE_Q_CPP(CLASS, TYPE, M) \ + void CLASS::set##M(const TYPE& M) \ + { \ + Q_D(CLASS); \ + d->_p##M = M; \ + Q_EMIT p##M##Changed(); \ + } \ + const TYPE& CLASS::get##M() const \ + { \ + return d_ptr->_p##M; \ + } + +#define Q_PRIVATE_CREATE_Q_CPP(CLASS, TYPE, M) \ + void CLASS::set##M(TYPE M) \ + { \ + Q_D(CLASS); \ + d->_p##M = std::move(M); \ + } \ + TYPE CLASS::get##M() const \ + { \ + return d_ptr->_p##M; \ + } + +#define Q_PRIVATE_REF_CREATE_Q_CPP(CLASS, TYPE, M) \ + void CLASS::set##M(const TYPE& M) \ + { \ + Q_D(CLASS); \ + d->_p##M = M; \ + } \ + const TYPE& CLASS::get##M() const \ + { \ + return d_ptr->_p##M; \ + } + +#define Q_PROPERTY_CREATE_D(TYPE, M) \ +private: \ + TYPE _p##M; + +#define Q_PRIVATE_CREATE_D(TYPE, M) \ +private: \ + TYPE _p##M; + +#define Q_PRIVATE_CREATE(TYPE, M) \ +public: \ + void set##M(TYPE M) \ + { \ + _p##M = std::move(M); \ + } \ + TYPE get##M() const \ + { \ + return _p##M; \ + } \ + \ +private: \ + TYPE _p##M; + +#define Q_PRIVATE_REF_CREATE(TYPE, M) \ +public: \ + void set##M(const TYPE& M) \ + { \ + _p##M = M; \ + } \ + const TYPE& get##M() const \ + { \ + return _p##M; \ + } \ + \ +private: \ + TYPE _p##M; + +#define Q_Q_CREATE(CLASS) \ +protected: \ + explicit CLASS(CLASS##Private& dd, CLASS* parent = nullptr); \ + QScopedPointer d_ptr; \ + \ +private: \ + Q_DISABLE_COPY(CLASS) \ + Q_DECLARE_PRIVATE(CLASS); + +#define Q_D_CREATE(CLASS) \ +protected: \ + CLASS* q_ptr; \ + \ +private: \ + Q_DECLARE_PUBLIC(CLASS); + +#endif // ELAFRAMEWORK_ELAWIDGETTOOLS_ELAPROPERTY_H_ diff --git a/3rd/ElaWidgetTools/include/ElaPushButton.h b/3rd/ElaWidgetTools/include/ElaPushButton.h new file mode 100644 index 0000000..b55129a --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaPushButton.h @@ -0,0 +1,36 @@ +#ifndef ELAPUSHBUTTON_H +#define ELAPUSHBUTTON_H + +#include + +#include "ElaProperty.h" +class ElaPushButtonPrivate; +class ELA_EXPORT ElaPushButton : public QPushButton +{ + Q_OBJECT + Q_Q_CREATE(ElaPushButton) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(QColor, LightDefaultColor) + Q_PROPERTY_CREATE_Q_H(QColor, DarkDefaultColor) + Q_PROPERTY_CREATE_Q_H(QColor, LightHoverColor) + Q_PROPERTY_CREATE_Q_H(QColor, DarkHoverColor) + Q_PROPERTY_CREATE_Q_H(QColor, LightPressColor) + Q_PROPERTY_CREATE_Q_H(QColor, DarkPressColor) +public: + explicit ElaPushButton(QWidget* parent = nullptr); + explicit ElaPushButton(QString text, QWidget* parent = nullptr); + ~ElaPushButton(); + + void setLightTextColor(QColor color); + QColor getLightTextColor() const; + + void setDarkTextColor(QColor color); + QColor getDarkTextColor() const; + +protected: + virtual void mousePressEvent(QMouseEvent* event) override; + virtual void mouseReleaseEvent(QMouseEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAPUSHBUTTON_H diff --git a/3rd/ElaWidgetTools/include/ElaRadioButton.h b/3rd/ElaWidgetTools/include/ElaRadioButton.h new file mode 100644 index 0000000..08248fe --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaRadioButton.h @@ -0,0 +1,21 @@ +#ifndef ELARADIOBUTTON_H +#define ELARADIOBUTTON_H + +#include + +#include "ElaProperty.h" +class ElaRadioButtonPrivate; +class ELA_EXPORT ElaRadioButton : public QRadioButton +{ + Q_OBJECT + Q_Q_CREATE(ElaRadioButton) +public: + explicit ElaRadioButton(QWidget* parent = nullptr); + explicit ElaRadioButton(const QString& text, QWidget* parent = nullptr); + ~ElaRadioButton() override; + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELARADIOBUTTON_H diff --git a/3rd/ElaWidgetTools/include/ElaReminderCard.h b/3rd/ElaWidgetTools/include/ElaReminderCard.h new file mode 100644 index 0000000..02c4e84 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaReminderCard.h @@ -0,0 +1,32 @@ +#ifndef ELAREMINDERCARD_H +#define ELAREMINDERCARD_H + +#include + +#include "ElaDef.h" +class ElaReminderCardPrivate; +class ELA_EXPORT ElaReminderCard : public QPushButton +{ + Q_OBJECT + Q_Q_CREATE(ElaReminderCard) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(QString, Title); + Q_PROPERTY_CREATE_Q_H(QString, SubTitle); + Q_PROPERTY_CREATE_Q_H(int, TitlePixelSize); + Q_PROPERTY_CREATE_Q_H(int, SubTitlePixelSize); + Q_PROPERTY_CREATE_Q_H(int, TitleSpacing); + Q_PROPERTY_CREATE_Q_H(QPixmap, CardPixmap); + Q_PROPERTY_CREATE_Q_H(QSize, CardPixmapSize); + Q_PROPERTY_CREATE_Q_H(int, CardPixmapBorderRadius) + Q_PROPERTY_CREATE_Q_H(ElaCardPixType::PixMode, CardPixMode); + +public: + explicit ElaReminderCard(QWidget* parent = nullptr); + ~ElaReminderCard(); + void setCardPixmapSize(int width, int height); + +protected: + void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAREMINDERCARD_H diff --git a/3rd/ElaWidgetTools/include/ElaRoller.h b/3rd/ElaWidgetTools/include/ElaRoller.h new file mode 100644 index 0000000..9686590 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaRoller.h @@ -0,0 +1,37 @@ +#ifndef ELAFRAMEWORK_ELAWIDGETTOOLS_INCLUDE_ELAROLLER_H_ +#define ELAFRAMEWORK_ELAWIDGETTOOLS_INCLUDE_ELAROLLER_H_ + +#include "ElaProperty.h" +#include + +class ElaRollerPrivate; +class ELA_EXPORT ElaRoller : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaRoller) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(QStringList, ItemList) + Q_PROPERTY_CREATE_Q_H(int, ItemHeight) + Q_PROPERTY_CREATE_Q_H(int, MaxVisibleItems) + Q_PROPERTY_CREATE_Q_H(int, CurrentIndex) + Q_PROPERTY_CREATE_Q_H(bool, IsContainer) + Q_PROPERTY_CREATE_Q_H(bool, IsEnableLoop) +public: + explicit ElaRoller(QWidget* parent = nullptr); + ~ElaRoller() override; + + void setCurrentData(const QString& data); + QString getCurrentData() const; +Q_SIGNALS: + Q_SIGNAL void currentDataChanged(const QString& data); + +protected: + virtual void wheelEvent(QWheelEvent* event) override; + virtual void mousePressEvent(QMouseEvent* event) override; + virtual void mouseReleaseEvent(QMouseEvent* event) override; + virtual void mouseMoveEvent(QMouseEvent* event); + virtual void leaveEvent(QEvent* event); + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif //ELAFRAMEWORK_ELAWIDGETTOOLS_INCLUDE_ELAROLLER_H_ diff --git a/3rd/ElaWidgetTools/include/ElaRollerPicker.h b/3rd/ElaWidgetTools/include/ElaRollerPicker.h new file mode 100644 index 0000000..f431271 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaRollerPicker.h @@ -0,0 +1,41 @@ +#ifndef ELAFRAMEWORK_ELAROLLERPICKER_H +#define ELAFRAMEWORK_ELAROLLERPICKER_H + +#include "ElaProperty.h" +#include + +class ElaRollerPickerPrivate; +class ELA_EXPORT ElaRollerPicker : public QPushButton +{ + Q_OBJECT + Q_Q_CREATE(ElaRollerPicker) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) +public: + explicit ElaRollerPicker(QWidget* parent = nullptr); + ~ElaRollerPicker() override; + + void addRoller(const QStringList& itemList, bool isEnableLoop = true); + void removeRoller(int index); + + void setRollerItemList(int index, const QStringList& itemList); + void setRollerWidth(int index, int width); + + void setCurrentData(int index, const QString& data); + void setCurrentData(const QStringList& dataList); + QString getCurrentData(int index) const; + QStringList getCurrentData() const; + + void setCurrentIndex(int rollerIndex, int index); + void setCurrentIndex(const QList& indexList); + int getCurrentIndex(int rollerIndex) const; + QList getCurrentIndex() const; + +Q_SIGNALS: + Q_SIGNAL void currentDataChanged(const QStringList& dataList); + Q_SIGNAL void currentDataSelectionChanged(const QStringList& dataList); + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif //ELAFRAMEWORK_ELAROLLERPICKER_H diff --git a/3rd/ElaWidgetTools/include/ElaScrollArea.h b/3rd/ElaWidgetTools/include/ElaScrollArea.h new file mode 100644 index 0000000..89cdcec --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaScrollArea.h @@ -0,0 +1,26 @@ +#ifndef ELASCROLLAREA_H +#define ELASCROLLAREA_H + +#include + +#include "ElaProperty.h" + +class ElaScrollAreaPrivate; +class ELA_EXPORT ElaScrollArea : public QScrollArea +{ + Q_OBJECT + Q_Q_CREATE(ElaScrollArea) +public: + explicit ElaScrollArea(QWidget* parent = nullptr); + ~ElaScrollArea(); + + void setIsGrabGesture(bool isEnable, qreal mousePressEventDelay = 0.5); + + void setIsOverShoot(Qt::Orientation orientation, bool isEnable); + bool getIsOverShoot(Qt::Orientation orientation) const; + + void setIsAnimation(Qt::Orientation orientation, bool isAnimation); + bool getIsAnimation(Qt::Orientation orientation) const; +}; + +#endif // ELASCROLLAREA_H diff --git a/3rd/ElaWidgetTools/include/ElaScrollBar.h b/3rd/ElaWidgetTools/include/ElaScrollBar.h new file mode 100644 index 0000000..aeb1770 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaScrollBar.h @@ -0,0 +1,35 @@ +#ifndef ELASCROLLBAR_H +#define ELASCROLLBAR_H + +#include +#include + +#include "ElaProperty.h" + +class ElaScrollBarPrivate; +class ELA_EXPORT ElaScrollBar : public QScrollBar +{ + Q_OBJECT + Q_Q_CREATE(ElaScrollBar) + Q_PROPERTY_CREATE_Q_H(bool, IsAnimation) + Q_PROPERTY_CREATE_Q_H(qreal, SpeedLimit) +public: + explicit ElaScrollBar(QWidget* parent = nullptr); + explicit ElaScrollBar(Qt::Orientation orientation, QWidget* parent = nullptr); + explicit ElaScrollBar(QScrollBar* originScrollBar, QAbstractScrollArea* parent = nullptr); + ~ElaScrollBar() override; + +Q_SIGNALS: + Q_SIGNAL void rangeAnimationFinished(); + +protected: + virtual bool event(QEvent* event) override; + virtual bool eventFilter(QObject* watched, QEvent* event) override; + virtual void mousePressEvent(QMouseEvent* event) override; + virtual void mouseReleaseEvent(QMouseEvent* event) override; + virtual void mouseMoveEvent(QMouseEvent* event) override; + virtual void wheelEvent(QWheelEvent* event) override; + virtual void contextMenuEvent(QContextMenuEvent* event) override; +}; + +#endif // ELASCROLLBAR_H diff --git a/3rd/ElaWidgetTools/include/ElaScrollPage.h b/3rd/ElaWidgetTools/include/ElaScrollPage.h new file mode 100644 index 0000000..207c236 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaScrollPage.h @@ -0,0 +1,29 @@ +#ifndef ELASCROLLPAGE_H +#define ELASCROLLPAGE_H + +#include + +#include "ElaProperty.h" +class ElaScrollArea; +class ElaText; +class QHBoxLayout; +class ElaScrollPagePrivate; +class ELA_EXPORT ElaScrollPage : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaScrollPage) + Q_PROPERTY_CREATE_Q_H(QWidget*, CustomWidget) +public: + explicit ElaScrollPage(QWidget* parent = nullptr); + ~ElaScrollPage() override; + + void addCentralWidget(QWidget* centralWidget, bool isWidgetResizeable = true, bool isVerticalGrabGesture = true, qreal mousePressEventDelay = 0.5); + + void navigation(int widgetIndex, bool isLogRoute = true); + + void setPageTitleSpacing(int spacing); + int getPageTitleSpacing() const; + void setTitleVisible(bool isVisible); +}; + +#endif // ELASCROLLPAGE_H diff --git a/3rd/ElaWidgetTools/include/ElaScrollPageArea.h b/3rd/ElaWidgetTools/include/ElaScrollPageArea.h new file mode 100644 index 0000000..29e2d68 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaScrollPageArea.h @@ -0,0 +1,21 @@ +#ifndef ELASCROLLPAGEAREA_H +#define ELASCROLLPAGEAREA_H + +#include + +#include "ElaProperty.h" +class ElaScrollPageAreaPrivate; +class ELA_EXPORT ElaScrollPageArea : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaScrollPageArea) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) +public: + explicit ElaScrollPageArea(QWidget* parent = nullptr); + ~ElaScrollPageArea() override; + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELASCROLLPAGEAREA_H diff --git a/3rd/ElaWidgetTools/include/ElaSingleton.h b/3rd/ElaWidgetTools/include/ElaSingleton.h new file mode 100644 index 0000000..d3f4550 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaSingleton.h @@ -0,0 +1,60 @@ +#ifndef ELASINGLETON_H +#define ELASINGLETON_H + +#include + +#ifndef Q_SINGLETON_CREATE_H +template +class Singleton +{ +public: + static T* getInstance(); + +private: + Q_DISABLE_COPY(Singleton) +}; + +template +T* Singleton::getInstance() +{ + static QMutex mutex; + QMutexLocker locker(&mutex); + static T* instance = nullptr; + if (instance == nullptr) + { + instance = new T(); + } + return instance; +} + +#define Q_SINGLETON_CREATE(Class) \ +private: \ + friend class Singleton; \ + \ +public: \ + static Class* getInstance() \ + { \ + return Singleton::getInstance(); \ + } + +#define Q_SINGLETON_CREATE_H(Class) \ +private: \ + static Class* _instance; \ + \ +public: \ + static Class* getInstance(); + +#define Q_SINGLETON_CREATE_CPP(Class) \ + Class* Class::_instance = nullptr; \ + Class* Class::getInstance() \ + { \ + static QMutex mutex; \ + QMutexLocker locker(&mutex); \ + if (_instance == nullptr) \ + { \ + _instance = new Class(); \ + } \ + return _instance; \ + } +#endif +#endif // ELASINGLETON_H diff --git a/3rd/ElaWidgetTools/include/ElaSlider.h b/3rd/ElaWidgetTools/include/ElaSlider.h new file mode 100644 index 0000000..5a8545a --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaSlider.h @@ -0,0 +1,16 @@ +#ifndef ELASLIDER_H +#define ELASLIDER_H + +#include + +#include "ElaProperty.h" +class ELA_EXPORT ElaSlider : public QSlider +{ + Q_OBJECT +public: + explicit ElaSlider(QWidget* parent = nullptr); + explicit ElaSlider(Qt::Orientation orientation, QWidget* parent = nullptr); + ~ElaSlider(); +}; + +#endif // ELASLIDER_H diff --git a/3rd/ElaWidgetTools/include/ElaSpinBox.h b/3rd/ElaWidgetTools/include/ElaSpinBox.h new file mode 100644 index 0000000..3c12a8c --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaSpinBox.h @@ -0,0 +1,25 @@ +#ifndef ELASPINBOX_H +#define ELASPINBOX_H + +#include + +#include "ElaDef.h" + +class ElaSpinBoxPrivate; +class ELA_EXPORT ElaSpinBox : public QSpinBox +{ + Q_OBJECT + Q_Q_CREATE(ElaSpinBox) + Q_PROPERTY_CREATE_Q_H(ElaSpinBoxType::ButtonMode, ButtonMode) +public: + explicit ElaSpinBox(QWidget* parent = nullptr); + ~ElaSpinBox() override; + +protected: + void focusInEvent(QFocusEvent* event) override; + void focusOutEvent(QFocusEvent* event) override; + void paintEvent(QPaintEvent* event) override; + void contextMenuEvent(QContextMenuEvent* event) override; +}; + +#endif // ELASPINBOX_H diff --git a/3rd/ElaWidgetTools/include/ElaStatusBar.h b/3rd/ElaWidgetTools/include/ElaStatusBar.h new file mode 100644 index 0000000..25f8bec --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaStatusBar.h @@ -0,0 +1,15 @@ +#ifndef ELASTATUSBAR_H +#define ELASTATUSBAR_H + +#include + +#include "ElaProperty.h" +class ELA_EXPORT ElaStatusBar : public QStatusBar +{ + Q_OBJECT +public: + explicit ElaStatusBar(QWidget* parent = nullptr); + ~ElaStatusBar() override; +}; + +#endif // ELASTATUSBAR_H diff --git a/3rd/ElaWidgetTools/include/ElaSuggestBox.h b/3rd/ElaWidgetTools/include/ElaSuggestBox.h new file mode 100644 index 0000000..51d2619 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaSuggestBox.h @@ -0,0 +1,47 @@ +#ifndef ELASUGGESTBOX_H +#define ELASUGGESTBOX_H + +#include +#include + +#include "ElaDef.h" +#include "ElaProperty.h" + +class ElaSuggestBoxPrivate; +class ELA_EXPORT ElaSuggestBox : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaSuggestBox) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(Qt::CaseSensitivity, CaseSensitivity) +public: + explicit ElaSuggestBox(QWidget* parent = nullptr); + ~ElaSuggestBox() override; + void setPlaceholderText(const QString& placeholderText); + void setFixedSize(const QSize& size); + void setFixedSize(int w, int h); + void setFixedHeight(int h); + + struct ELA_EXPORT SuggestData { + Q_PRIVATE_CREATE(ElaIconType::IconName, ElaIcon) + Q_PRIVATE_CREATE(QString, SuggestText) + Q_PRIVATE_CREATE(QString, SuggestKey) + Q_PRIVATE_CREATE(QVariantMap, SuggestData) + public: + explicit SuggestData(); + explicit SuggestData(ElaIconType::IconName icon, const QString& suggestText, const QVariantMap& suggestData = {}); + ~SuggestData(); + }; + QString addSuggestion(const QString& suggestText, const QVariantMap& suggestData = {}); + QString addSuggestion(ElaIconType::IconName icon, const QString& suggestText, const QVariantMap& suggestData = {}); + QString addSuggestion(const ElaSuggestBox::SuggestData& suggestData); + QStringList addSuggestion(const QList& suggestDataList); + + void removeSuggestion(const QString& suggestKey); + void removeSuggestion(int index); + void clearSuggestion(); +Q_SIGNALS: + Q_SIGNAL void suggestionClicked(const ElaSuggestBox::SuggestData& suggestData); +}; + +#endif // ELASUGGESTBOX_H diff --git a/3rd/ElaWidgetTools/include/ElaTabBar.h b/3rd/ElaWidgetTools/include/ElaTabBar.h new file mode 100644 index 0000000..91d3381 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaTabBar.h @@ -0,0 +1,34 @@ +#ifndef ELATABBAR_H +#define ELATABBAR_H + +#include +#include + +#include "ElaProperty.h" +class ElaTabBarPrivate; +class ELA_EXPORT ElaTabBar : public QTabBar +{ + Q_OBJECT + Q_Q_CREATE(ElaTabBar) + Q_PROPERTY_CREATE_Q_H(QSize, TabSize) +public: + explicit ElaTabBar(QWidget* parent = nullptr); + ~ElaTabBar() override; +Q_SIGNALS: + Q_SIGNAL void tabDragCreate(QMimeData* mimeData); + Q_SIGNAL void tabDragEnter(QMimeData* mimeData); + Q_SIGNAL void tabDragLeave(QMimeData* mimeData); + Q_SIGNAL void tabDragDrop(QMimeData* mimeData); + +protected: + QSize sizeHint() const; + virtual void mouseMoveEvent(QMouseEvent* event) override; + virtual void dragEnterEvent(QDragEnterEvent* event) override; + virtual void dragMoveEvent(QDragMoveEvent* event) override; + virtual void dragLeaveEvent(QDragLeaveEvent* event) override; + virtual void dropEvent(QDropEvent* event) override; + virtual void wheelEvent(QWheelEvent* event) override; + void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELATABBAR_H diff --git a/3rd/ElaWidgetTools/include/ElaTabWidget.h b/3rd/ElaWidgetTools/include/ElaTabWidget.h new file mode 100644 index 0000000..6dc11ea --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaTabWidget.h @@ -0,0 +1,31 @@ +#ifndef ELATABWIDGET_H +#define ELATABWIDGET_H + +#include + +#include "ElaProperty.h" + +class ElaTabWidgetPrivate; +class ELA_EXPORT ElaTabWidget : public QTabWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaTabWidget) + Q_PROPERTY_CREATE_Q_H(bool, IsTabTransparent); + Q_PROPERTY_CREATE_Q_H(bool, IsContainerAcceptDrops); + Q_PROPERTY_CREATE_Q_H(QSize, TabSize) +public: + explicit ElaTabWidget(QWidget* parent = nullptr); + ~ElaTabWidget() override; + void setTabPosition(TabPosition position); + +protected: + virtual void paintEvent(QPaintEvent* event) override; + virtual void dragEnterEvent(QDragEnterEvent* event) override; + virtual void dropEvent(QDropEvent* event) override; + virtual void tabInserted(int index); + +private: + friend class ElaCustomTabWidget; +}; + +#endif // ELATABWIDGET_H diff --git a/3rd/ElaWidgetTools/include/ElaTableView.h b/3rd/ElaWidgetTools/include/ElaTableView.h new file mode 100644 index 0000000..5b557db --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaTableView.h @@ -0,0 +1,29 @@ +#ifndef ELATABLEVIEW_H +#define ELATABLEVIEW_H + +#include + +#include "ElaProperty.h" + +class ElaTableViewPrivate; +class ELA_EXPORT ElaTableView : public QTableView +{ + Q_OBJECT + Q_Q_CREATE(ElaTableView) + Q_PROPERTY_CREATE_Q_H(int, HeaderMargin) +public: + explicit ElaTableView(QWidget* parent = nullptr); + ~ElaTableView(); + +Q_SIGNALS: + Q_SIGNAL void tableViewShow(); + Q_SIGNAL void tableViewHide(); + +protected: + virtual void showEvent(QShowEvent* event) override; + virtual void hideEvent(QHideEvent* event) override; + virtual void mouseMoveEvent(QMouseEvent* event) override; + virtual void leaveEvent(QEvent* event) override; +}; + +#endif // ELATABLEVIEW_H diff --git a/3rd/ElaWidgetTools/include/ElaText.h b/3rd/ElaWidgetTools/include/ElaText.h new file mode 100644 index 0000000..b20d4b9 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaText.h @@ -0,0 +1,28 @@ +#ifndef ELATEXT_H +#define ELATEXT_H + +#include + +#include "ElaDef.h" +#include "ElaProperty.h" +class ElaTextPrivate; +class ELA_EXPORT ElaText : public QLabel +{ + Q_OBJECT + Q_Q_CREATE(ElaText) + Q_PROPERTY_CREATE_Q_H(bool, IsWrapAnywhere) + Q_PROPERTY_CREATE_Q_H(int, TextPixelSize) + Q_PROPERTY_CREATE_Q_H(int, TextPointSize) + Q_PROPERTY_CREATE_Q_H(ElaTextType::TextStyle, TextStyle) + Q_PROPERTY_CREATE_Q_H(ElaIconType::IconName, ElaIcon) +public: + explicit ElaText(QWidget* parent = nullptr); + explicit ElaText(QString text, QWidget* parent = nullptr); + explicit ElaText(QString text, int pixelSize, QWidget* parent = nullptr); + ~ElaText() override; + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELATEXT_H diff --git a/3rd/ElaWidgetTools/include/ElaTheme.h b/3rd/ElaWidgetTools/include/ElaTheme.h new file mode 100644 index 0000000..4fc82e0 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaTheme.h @@ -0,0 +1,35 @@ +#ifndef ELATHEME_H +#define ELATHEME_H + +#include + +#include "ElaDef.h" +#include "ElaProperty.h" +#include "ElaSingleton.h" + +#define eTheme ElaTheme::getInstance() +#define ElaThemeColor(themeMode, themeColor) eTheme->getThemeColor(themeMode, ElaThemeType::themeColor) +class QPainter; +class ElaThemePrivate; +class ELA_EXPORT ElaTheme : public QObject +{ + Q_OBJECT + Q_Q_CREATE(ElaTheme) + Q_SINGLETON_CREATE_H(ElaTheme) +private: + explicit ElaTheme(QObject* parent = nullptr); + ~ElaTheme(); + +public: + void setThemeMode(ElaThemeType::ThemeMode themeMode); + ElaThemeType::ThemeMode getThemeMode() const; + + void drawEffectShadow(QPainter* painter, QRect widgetRect, int shadowBorderWidth, int borderRadius); + + void setThemeColor(ElaThemeType::ThemeMode themeMode, ElaThemeType::ThemeColor themeColor, QColor newColor); + const QColor& getThemeColor(ElaThemeType::ThemeMode themeMode, ElaThemeType::ThemeColor themeColor); +Q_SIGNALS: + Q_SIGNAL void themeModeChanged(ElaThemeType::ThemeMode themeMode); +}; + +#endif // ELATHEME_H diff --git a/3rd/ElaWidgetTools/include/ElaToggleButton.h b/3rd/ElaWidgetTools/include/ElaToggleButton.h new file mode 100644 index 0000000..682dc2e --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaToggleButton.h @@ -0,0 +1,31 @@ +#ifndef ELATOGGLEBUTTON_H +#define ELATOGGLEBUTTON_H + +#include + +#include "ElaProperty.h" +class ElaToggleButtonPrivate; +class ELA_EXPORT ElaToggleButton : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaToggleButton) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(QString, Text) +public: + explicit ElaToggleButton(QWidget* parent = nullptr); + explicit ElaToggleButton(QString text, QWidget* parent = nullptr); + ~ElaToggleButton(); + + void setIsToggled(bool isToggled); + bool getIsToggled() const; +Q_SIGNALS: + Q_SIGNAL void toggled(bool checked); + +protected: + virtual bool event(QEvent* event) override; + virtual void mousePressEvent(QMouseEvent* event) override; + virtual void mouseReleaseEvent(QMouseEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELATOGGLEBUTTON_H diff --git a/3rd/ElaWidgetTools/include/ElaToggleSwitch.h b/3rd/ElaWidgetTools/include/ElaToggleSwitch.h new file mode 100644 index 0000000..dd73154 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaToggleSwitch.h @@ -0,0 +1,29 @@ +#ifndef ELATOGGLESWITCH_H +#define ELATOGGLESWITCH_H + +#include + +#include "ElaProperty.h" +class ElaToggleSwitchPrivate; +class ELA_EXPORT ElaToggleSwitch : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaToggleSwitch); + +public: + explicit ElaToggleSwitch(QWidget* parent = nullptr); + ~ElaToggleSwitch() override; + void setIsToggled(bool isToggled); + bool getIsToggled() const; +Q_SIGNALS: + Q_SIGNAL void toggled(bool checked); + +protected: + virtual bool event(QEvent* event) override; + virtual void mousePressEvent(QMouseEvent* event) override; + virtual void mouseReleaseEvent(QMouseEvent* event) override; + virtual void mouseMoveEvent(QMouseEvent* event) override; + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELATOGGLESWITCH_H diff --git a/3rd/ElaWidgetTools/include/ElaToolBar.h b/3rd/ElaWidgetTools/include/ElaToolBar.h new file mode 100644 index 0000000..9b82648 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaToolBar.h @@ -0,0 +1,30 @@ +#ifndef ELATOOLBAR_H +#define ELATOOLBAR_H + +#include + +#include "ElaDef.h" +class ElaToolBarPrivate; +class ELA_EXPORT ElaToolBar : public QToolBar +{ + Q_OBJECT + Q_Q_CREATE(ElaToolBar) +public: + explicit ElaToolBar(QWidget* parent = nullptr); + explicit ElaToolBar(const QString& title, QWidget* parent = nullptr); + ~ElaToolBar() override; + + void setToolBarSpacing(int spacing); + int getToolBarSpacing() const; + + void setToolButtonSize(const QSize& size); + const QSize& getToolButtonSize() const; + + QAction* addElaIconAction(ElaIconType::IconName icon, const QString& text); + QAction* addElaIconAction(ElaIconType::IconName icon, const QString& text, const QKeySequence& shortcut); + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELATOOLBAR_H diff --git a/3rd/ElaWidgetTools/include/ElaToolButton.h b/3rd/ElaWidgetTools/include/ElaToolButton.h new file mode 100644 index 0000000..8ee3804 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaToolButton.h @@ -0,0 +1,31 @@ +#ifndef ELATOOLBUTTON_H +#define ELATOOLBUTTON_H + +#include + +#include "ElaDef.h" +class ElaMenu; +class ElaToolButtonPrivate; +class ELA_EXPORT ElaToolButton : public QToolButton +{ + Q_OBJECT + Q_Q_CREATE(ElaToolButton) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius); + Q_PROPERTY_CREATE_Q_H(bool, IsSelected); + +public: + explicit ElaToolButton(QWidget* parent = nullptr); + ~ElaToolButton() override; + + void setIsTransparent(bool isTransparent); + bool getIsTransparent() const; + + void setMenu(ElaMenu* menu); + void setElaIcon(ElaIconType::IconName icon); + void setElaIcon(ElaIconType::IconName icon, int rotate); + +protected: + virtual bool eventFilter(QObject* watched, QEvent* event) override; +}; + +#endif // ELATOOLBUTTON_H diff --git a/3rd/ElaWidgetTools/include/ElaToolTip.h b/3rd/ElaWidgetTools/include/ElaToolTip.h new file mode 100644 index 0000000..1808ca1 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaToolTip.h @@ -0,0 +1,28 @@ +#ifndef ELATOOLTIP_H +#define ELATOOLTIP_H + +#include + +#include "ElaProperty.h" +class ElaToolTipPrivate; +class ELA_EXPORT ElaToolTip : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaToolTip) + Q_PROPERTY_CREATE_Q_H(int, BorderRadius) + Q_PROPERTY_CREATE_Q_H(int, DisplayMsec) + Q_PROPERTY_CREATE_Q_H(int, ShowDelayMsec) + Q_PROPERTY_CREATE_Q_H(int, HideDelayMsec) + Q_PROPERTY_CREATE_Q_H(QString, ToolTip) + Q_PROPERTY_CREATE_Q_H(QWidget*, CustomWidget) +public: + explicit ElaToolTip(QWidget* parent = nullptr); + ~ElaToolTip() override; + + void updatePos(); + +protected: + virtual void paintEvent(QPaintEvent* event); +}; + +#endif // ELATOOLTIP_H diff --git a/3rd/ElaWidgetTools/include/ElaTreeView.h b/3rd/ElaWidgetTools/include/ElaTreeView.h new file mode 100644 index 0000000..c31601a --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaTreeView.h @@ -0,0 +1,20 @@ +#ifndef ELATREEVIEW_H +#define ELATREEVIEW_H + +#include + +#include "ElaProperty.h" + +class ElaTreeViewPrivate; +class ELA_EXPORT ElaTreeView : public QTreeView +{ + Q_OBJECT + Q_Q_CREATE(ElaTreeView) + Q_PROPERTY_CREATE_Q_H(int, ItemHeight) + Q_PROPERTY_CREATE_Q_H(int, HeaderMargin) +public: + explicit ElaTreeView(QWidget* parent = nullptr); + ~ElaTreeView(); +}; + +#endif // ELATREEVIEW_H diff --git a/3rd/ElaWidgetTools/include/ElaWidget.h b/3rd/ElaWidgetTools/include/ElaWidget.h new file mode 100644 index 0000000..a03750d --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaWidget.h @@ -0,0 +1,36 @@ +#ifndef ELAWIDGET_H +#define ELAWIDGET_H + +#include + +#include "ElaAppBar.h" +#include "ElaDef.h" +class ElaWidgetPrivate; +class ELA_EXPORT ElaWidget : public QWidget +{ + Q_OBJECT + Q_Q_CREATE(ElaWidget) + Q_PROPERTY_CREATE_Q_H(bool, IsStayTop) + Q_PROPERTY_CREATE_Q_H(bool, IsFixedSize) + Q_PROPERTY_CREATE_Q_H(bool, IsDefaultClosed) + Q_PROPERTY_CREATE_Q_H(int, AppBarHeight) + Q_TAKEOVER_NATIVEEVENT_H +public: + explicit ElaWidget(QWidget* parent = nullptr); + ~ElaWidget() override; + void moveToCenter(); + + void setWindowButtonFlag(ElaAppBarType::ButtonType buttonFlag, bool isEnable = true); + void setWindowButtonFlags(ElaAppBarType::ButtonFlags buttonFlags); + ElaAppBarType::ButtonFlags getWindowButtonFlags() const; +Q_SIGNALS: + Q_SIGNAL void routeBackButtonClicked(); + Q_SIGNAL void navigationButtonClicked(); + Q_SIGNAL void themeChangeButtonClicked(); + Q_SIGNAL void closeButtonClicked(); + +protected: + virtual void paintEvent(QPaintEvent* event) override; +}; + +#endif // ELAWIDGET_H diff --git a/3rd/ElaWidgetTools/include/ElaWindow.h b/3rd/ElaWidgetTools/include/ElaWindow.h new file mode 100644 index 0000000..8daba06 --- /dev/null +++ b/3rd/ElaWidgetTools/include/ElaWindow.h @@ -0,0 +1,115 @@ +#ifndef ELAWINDOW_H +#define ELAWINDOW_H + +#include + +#include "ElaAppBar.h" +#include "ElaDef.h" +#include "ElaSuggestBox.h" +class ElaWindowPrivate; +class ELA_EXPORT ElaWindow : public QMainWindow +{ + Q_OBJECT + Q_Q_CREATE(ElaWindow) + Q_PROPERTY_CREATE_Q_H(bool, IsStayTop) + Q_PROPERTY_CREATE_Q_H(bool, IsFixedSize) + Q_PROPERTY_CREATE_Q_H(bool, IsDefaultClosed) + Q_PROPERTY_CREATE_Q_H(int, AppBarHeight) + Q_PROPERTY_CREATE_Q_H(int, ThemeChangeTime) + Q_PROPERTY_CREATE_Q_H(bool, IsCentralStackedWidgetTransparent) + Q_PROPERTY_CREATE_Q_H(bool, IsAllowPageOpenInNewWindow) + Q_PROPERTY_CREATE_Q_H(bool, IsNavigationBarEnable) + Q_PROPERTY_CREATE_Q_H(int, NavigationBarWidth) + Q_PROPERTY_CREATE_Q_H(int, CurrentStackIndex) + Q_PROPERTY_CREATE_Q_H(ElaNavigationType::NavigationDisplayMode, NavigationBarDisplayMode) + Q_PROPERTY_CREATE_Q_H(ElaWindowType::StackSwitchMode, StackSwitchMode) + Q_PROPERTY_CREATE_Q_H(ElaWindowType::PaintMode, WindowPaintMode) + Q_TAKEOVER_NATIVEEVENT_H +public: + Q_INVOKABLE explicit ElaWindow(QWidget* parent = nullptr); + ~ElaWindow() override; + + void moveToCenter(); + + void setCustomWidget(ElaAppBarType::CustomArea customArea, QWidget* customWidget, QObject* hitTestObject = nullptr, const QString& hitTestFunctionName = ""); + QWidget* getCustomWidget(ElaAppBarType::CustomArea customArea) const; + + void setCentralCustomWidget(QWidget* customWidget); + QWidget* getCentralCustomWidget() const; + + void setCustomMenu(QMenu* customMenu); + QMenu* getCustomMenu() const; + + void setUserInfoCardVisible(bool isVisible); + void setUserInfoCardPixmap(QPixmap pix); + void setUserInfoCardTitle(QString title); + void setUserInfoCardSubTitle(QString subTitle); + ElaNavigationType::NodeResult addExpanderNode(const QString& expanderTitle, QString& expanderKey, ElaIconType::IconName awesome = ElaIconType::None) const; + ElaNavigationType::NodeResult addExpanderNode(const QString& expanderTitle, QString& expanderKey, const QString& targetExpanderKey, ElaIconType::IconName awesome = ElaIconType::None) const; + ElaNavigationType::NodeResult addPageNode(const QString& pageTitle, QWidget* page, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addPageNode(const QString& pageTitle, QWidget* page, int keyPoints, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addPageNode(const QString& pageTitle, QWidget* page, const QString& targetExpanderKey, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addPageNode(const QString& pageTitle, QWidget* page, const QString& targetExpanderKey, int keyPoints, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addFooterNode(const QString& footerTitle, QString& footerKey, int keyPoints = 0, ElaIconType::IconName awesome = ElaIconType::None) const; + ElaNavigationType::NodeResult addFooterNode(const QString& footerTitle, QWidget* page, QString& footerKey, int keyPoints = 0, ElaIconType::IconName awesome = ElaIconType::None); + ElaNavigationType::NodeResult addCategoryNode(const QString& categoryTitle, QString& categoryKey); + ElaNavigationType::NodeResult addCategoryNode(const QString& categoryTitle, QString& categoryKey, const QString& targetExpanderKey); + + void addCentralWidget(QWidget* centralWidget); + QWidget* getCentralWidget(int index) const; + + bool getNavigationNodeIsExpanded(QString expanderKey) const; + void expandNavigationNode(QString expanderKey); + void collapseNavigationNode(QString expanderKey); + void removeNavigationNode(QString nodeKey) const; + int getPageOpenInNewWindowCount(QString nodeKey) const; + void backtrackNavigationNode(QString nodeKey); + + void setNodeKeyPoints(QString nodeKey, int keyPoints); + int getNodeKeyPoints(QString nodeKey) const; + + void setNavigationNodeTitle(QString nodeKey, QString nodeTitle); + QString getNavigationNodeTitle(QString nodeKey) const; + + void navigation(QString pageKey); + int getCurrentNavigationIndex() const; + QString getCurrentNavigationPageKey() const; + + QList getNavigationSuggestDataList() const; + + void setWindowButtonFlag(ElaAppBarType::ButtonType buttonFlag, bool isEnable = true); + void setWindowButtonFlags(ElaAppBarType::ButtonFlags buttonFlags); + ElaAppBarType::ButtonFlags getWindowButtonFlags() const; + + void setWindowMoviePath(ElaThemeType::ThemeMode themeMode, const QString& moviePath); + QString getWindowMoviePath(ElaThemeType::ThemeMode themeMode) const; + + void setWindowPixmap(ElaThemeType::ThemeMode themeMode, const QPixmap& pixmap); + QPixmap getWindowPixmap(ElaThemeType::ThemeMode themeMode) const; + + void setWindowMovieRate(qreal rate); + qreal getWindowMovieRate() const; + + void tabifyDockWidget(QDockWidget* targetDockWidget, QDockWidget* dockWidget); + void tabifyDockWidget(Qt::DockWidgetArea area, const QString& targetDockTitle, QDockWidget* dockWidget); + +Q_SIGNALS: + Q_SIGNAL void userInfoCardClicked(); + Q_SIGNAL void closeButtonClicked(); + Q_SIGNAL void navigationNodeClicked(ElaNavigationType::NavigationNodeType nodeType, QString nodeKey); + Q_SIGNAL void customWidgetChanged(); + Q_SIGNAL void centralCustomWidgetChanged(); + Q_SIGNAL void customMenuChanged(); + Q_SIGNAL void pageOpenInNewWindow(QString nodeKey); + +protected: + virtual bool eventFilter(QObject* watched, QEvent* event) override; + virtual QMenu* createPopupMenu() override; + virtual void paintEvent(QPaintEvent* event) override; + +private: + QWidget* centralWidget() const; + void setCentralWidget(QWidget* widget); +}; + +#endif // ELAWINDOW_H diff --git a/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsConfig.cmake b/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsConfig.cmake new file mode 100644 index 0000000..2dbafa4 --- /dev/null +++ b/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsConfig.cmake @@ -0,0 +1,35 @@ + +####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### +####### Any changes to this file will be overwritten by the next CMake run #### +####### The input file was ElaWidgetToolsConfig.cmake.in ######## + +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE) + +macro(set_and_check _var _file) + set(${_var} "${_file}") + if(NOT EXISTS "${_file}") + message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") + endif() +endmacro() + +macro(check_required_components _NAME) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(NOT ${_NAME}_${comp}_FOUND) + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + endif() + endif() + endforeach() +endmacro() + +#################################################################################### + +set( ElaWidgetTools_LIBRARIES ElaWidgetTools) +set( ElaWidgetTools_INCLUDE_DIRS ${PACKAGE_PREFIX_DIR}/include) +set( ElaWidgetTools_LIBRARY_DIRS ${PACKAGE_PREFIX_DIR}/lib) + +check_required_components(${PROJECT_NAME}) + +include(CMakeFindDependencyMacro) + +include(${PACKAGE_PREFIX_DIR}/lib/cmake/ElaWidgetToolsTargets.cmake) diff --git a/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsConfigVersion.cmake b/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsConfigVersion.cmake new file mode 100644 index 0000000..9969198 --- /dev/null +++ b/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsConfigVersion.cmake @@ -0,0 +1,70 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version, +# but only if the requested major version is the same as the current one. +# The variable CVF_VERSION must be set before calling configure_file(). + + +set(PACKAGE_VERSION "2.0.0") + +if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + + if("2.0.0" MATCHES "^([0-9]+)\\.") + set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") + if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0) + string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}") + endif() + else() + set(CVF_VERSION_MAJOR "2.0.0") + endif() + + if(PACKAGE_FIND_VERSION_RANGE) + # both endpoints of the range must have the expected major version + math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1") + if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT))) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX))) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() + else() + if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() + + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + endif() + endif() +endif() + + +# if the installed project requested no architecture check, don't perform the check +if("FALSE") + return() +endif() + +# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "") + return() +endif() + +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8") + math(EXPR installedBits "8 * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsTargets-debug.cmake b/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsTargets-debug.cmake new file mode 100644 index 0000000..668e15e --- /dev/null +++ b/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsTargets-debug.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Debug". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "ElaWidgetTools" for configuration "Debug" +set_property(TARGET ElaWidgetTools APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(ElaWidgetTools PROPERTIES + IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/ElaWidgetTools/lib/libElaWidgetTools.dll.a" + IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/ElaWidgetTools/bin/ElaWidgetTools.dll" + ) + +list(APPEND _cmake_import_check_targets ElaWidgetTools ) +list(APPEND _cmake_import_check_files_for_ElaWidgetTools "${_IMPORT_PREFIX}/ElaWidgetTools/lib/libElaWidgetTools.dll.a" "${_IMPORT_PREFIX}/ElaWidgetTools/bin/ElaWidgetTools.dll" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsTargets.cmake b/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsTargets.cmake new file mode 100644 index 0000000..c26b0cb --- /dev/null +++ b/3rd/ElaWidgetTools/lib/cmake/ElaWidgetToolsTargets.cmake @@ -0,0 +1,107 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.0 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.3") + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.8.3...3.22) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS ElaWidgetTools) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") + endif() +endforeach() +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") +endif() +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target ElaWidgetTools +add_library(ElaWidgetTools SHARED IMPORTED) + +set_target_properties(ElaWidgetTools PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/ElaWidgetTools/include" + INTERFACE_LINK_LIBRARIES "Qt6::Widgets;Qt6::WidgetsPrivate;D3D11;DXGI" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/ElaWidgetToolsTargets-*.cmake") +foreach(_cmake_config_file IN LISTS _cmake_config_files) + include("${_cmake_config_file}") +endforeach() +unset(_cmake_config_file) +unset(_cmake_config_files) + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(_cmake_target IN LISTS _cmake_import_check_targets) + foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") + if(NOT EXISTS "${_cmake_file}") + message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file + \"${_cmake_file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_cmake_file) + unset("_cmake_import_check_files_for_${_cmake_target}") +endforeach() +unset(_cmake_target) +unset(_cmake_import_check_targets) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/3rd/ElaWidgetTools/lib/libElaWidgetTools.dll.a b/3rd/ElaWidgetTools/lib/libElaWidgetTools.dll.a new file mode 100644 index 0000000..14ea43c Binary files /dev/null and b/3rd/ElaWidgetTools/lib/libElaWidgetTools.dll.a differ diff --git a/app.rc b/app.rc new file mode 100644 index 0000000..901a305 --- /dev/null +++ b/app.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "app.ico" \ No newline at end of file diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..21513b6 --- /dev/null +++ b/build.bat @@ -0,0 +1,91 @@ +@echo off +chcp 65001 >nul +title Build UFT30 ChangeCode + +echo. +echo ========================================== +echo Building UFT30 ChangeCode +echo ========================================== +echo. + +REM Set paths +set QT_PATH=D:\01.InstallInfo\InstallPath\QT\6.6.2\mingw_64 +set MINGW_PATH=D:\01.InstallInfo\InstallPath\QT\Tools\mingw1120_64 + +REM Check if paths exist +if not exist "%QT_PATH%\bin\qmake.exe" ( + echo ERROR: Cannot find qmake.exe + echo Please check QT_PATH variable + pause + exit /b 1 +) + +if not exist "%MINGW_PATH%\bin\mingw32-make.exe" ( + echo ERROR: Cannot find mingw32-make.exe + echo Please check MINGW_PATH variable + pause + exit /b 1 +) + +REM Set PATH +set PATH=%QT_PATH%\bin;%MINGW_PATH%\bin;%PATH% +echo [OK] Environment configured +echo. + +REM Check and close running program +echo [1/4] Checking running program... +tasklist /FI "IMAGENAME eq Uft30ChangeCode.exe" 2>NUL | find /I /N "Uft30ChangeCode.exe">NUL +if "%ERRORLEVEL%"=="0" ( + echo [WARN] Program is running, closing... + taskkill /F /IM "Uft30ChangeCode.exe" >nul 2>&1 + timeout /t 1 /nobreak >nul + echo [OK] Program closed +) +echo. + +REM Clean old files +echo [2/4] Cleaning old build files... +if exist Makefile del /Q Makefile +if exist Makefile.Debug del /Q Makefile.Debug +if exist Makefile.Release del /Q Makefile.Release +if exist .qmake.stash del /Q .qmake.stash +if exist debug rmdir /S /Q debug 2>nul +if exist release rmdir /S /Q release 2>nul +echo [OK] Old files cleaned +echo. + +REM Run qmake +echo [3/4] Running qmake... +qmake Uft30ChangeCode.pro -spec win32-g++ +if errorlevel 1 ( + echo ERROR: qmake failed + pause + exit /b 1 +) +echo [OK] qmake done +echo. + +REM Compile +echo [4/4] Compiling Debug version... +mingw32-make debug +if errorlevel 1 ( + echo. + echo ERROR: Compilation failed + pause + exit /b 1 +) + +echo. +echo ========================================== +echo Build SUCCESSFUL! +echo ========================================== +echo. +echo Output: bin\Uft30ChangeCode.exe +echo. +if exist "bin\uf2touft3\uf2touft3.exe" ( + echo [OK] uf2touft3.exe found, everything is ready! +) else ( + echo [WARN] Please make sure bin\uf2touft3\uf2touft3.exe exists +) +echo. +pause diff --git a/build_advanced.bat b/build_advanced.bat new file mode 100644 index 0000000..dd15fd4 --- /dev/null +++ b/build_advanced.bat @@ -0,0 +1,150 @@ +@echo off +chcp 65001 >nul +title Build UFT30 ChangeCode - Advanced + +echo. +echo ========================================== +echo Build UFT30 ChangeCode (Advanced) +echo ========================================== +echo. + +REM Set paths +set QT_PATH=D:\01.InstallInfo\InstallPath\QT\6.6.2\mingw_64 +set MINGW_PATH=D:\01.InstallInfo\InstallPath\QT\Tools\mingw1120_64 + +REM Check paths +if not exist "%QT_PATH%\bin\qmake.exe" ( + echo ERROR: Cannot find qmake.exe + echo Please check QT_PATH variable + pause + exit /b 1 +) + +if not exist "%MINGW_PATH%\bin\mingw32-make.exe" ( + echo ERROR: Cannot find mingw32-make.exe + echo Please check MINGW_PATH variable + pause + exit /b 1 +) + +REM Set PATH +set PATH=%QT_PATH%\bin;%MINGW_PATH%\bin;%PATH% +echo [OK] Environment configured +echo. + +:MENU +echo Please select build type: +echo 1 - Debug (with debug info) +echo 2 - Release (optimized for release) +echo 3 - Both (Debug + Release) +echo 4 - Exit +echo. +set /p BUILD_TYPE="Enter option (1-4): " + +if "%BUILD_TYPE%"=="1" goto BUILD_DEBUG +if "%BUILD_TYPE%"=="2" goto BUILD_RELEASE +if "%BUILD_TYPE%"=="3" goto BUILD_BOTH +if "%BUILD_TYPE%"=="4" goto EXIT_SCRIPT + +echo ERROR: Invalid option, please try again +echo. +goto MENU + +:BUILD_DEBUG +echo. +echo [Selected] Debug version +call :DO_BUILD Debug +goto END_SUCCESS + +:BUILD_RELEASE +echo. +echo [Selected] Release version +call :DO_BUILD Release +goto END_SUCCESS + +:BUILD_BOTH +echo. +echo [Selected] Both versions +echo. +call :DO_BUILD Debug +echo. +call :DO_BUILD Release +goto END_SUCCESS + +:EXIT_SCRIPT +echo. +echo [Exit] Script terminated +pause +exit /b 0 + +:DO_BUILD +set BUILD_NAME=%~1 + +echo. +echo ========================================== +echo Building %BUILD_NAME% version +echo ========================================== + +REM Check and close running program +echo. +echo [1/4] Checking running program... +tasklist /FI "IMAGENAME eq Uft30ChangeCode.exe" 2>NUL | find /I /N "Uft30ChangeCode.exe">NUL +if "%ERRORLEVEL%"=="0" ( + echo [WARN] Program is running, closing... + taskkill /F /IM "Uft30ChangeCode.exe" >nul 2>&1 + timeout /t 1 /nobreak >nul + echo [OK] Program closed +) + +REM Clean old files +echo. +echo [2/4] Cleaning old build files... +if exist Makefile del /Q Makefile +if exist Makefile.Debug del /Q Makefile.Debug +if exist Makefile.Release del /Q Makefile.Release +if exist .qmake.stash del /Q .qmake.stash +if exist debug rmdir /S /Q debug 2>nul +if exist release rmdir /S /Q release 2>nul +echo [OK] Old files cleaned + +REM Run qmake +echo. +echo [3/4] Running qmake... +qmake Uft30ChangeCode.pro -spec win32-g++ +if errorlevel 1 ( + echo ERROR: qmake failed + exit /b 1 +) +echo [OK] qmake done + +REM Compile +echo. +echo [4/4] Compiling... +if "%BUILD_NAME%"=="Debug" ( + mingw32-make debug +) else ( + mingw32-make release +) +if errorlevel 1 ( + echo ERROR: Compilation failed + exit /b 1 +) + +echo [OK] %BUILD_NAME% version compiled! +goto :eof + +:END_SUCCESS +echo. +echo ========================================== +echo Build SUCCESSFUL! +echo ========================================== +echo. +echo Output: bin\Uft30ChangeCode.exe +echo. +if exist "bin\uf2touft3\uf2touft3.exe" ( + echo [OK] uf2touft3.exe found, everything is ready! +) else ( + echo [WARN] Please make sure bin\uf2touft3\uf2touft3.exe exists +) +echo. +pause diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..8131a80 --- /dev/null +++ b/main.cpp @@ -0,0 +1,12 @@ +#include "src/mainwindow/mainwindow.h" +#include "ElaApplication.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + eApp->init(); + MainWindow w; + w.show(); + return a.exec(); +} \ No newline at end of file diff --git a/python_bindings/INTEGRATION_GUIDE.md b/python_bindings/INTEGRATION_GUIDE.md new file mode 100644 index 0000000..e942d6f --- /dev/null +++ b/python_bindings/INTEGRATION_GUIDE.md @@ -0,0 +1,123 @@ +# Python 项目集成指南 + +本指南说明如何将 `F:/04.python/04.python/uf2touft3` 项目与 Qt 应用程序集成。 + +## 两个方案对比 + +### 方案一:增强的 QProcess 方案 (推荐用于生产环境) + +**优点:** +- 简单稳定,不易出错 +- 进程隔离,不会影响主应用程序 +- Python 依赖问题独立解决 +- 调试方便 + +**缺点:** +- 进程间通信开销 +- 无法直接共享内存 + +**状态:已实现并集成 ✅** + +### 方案二:pybind11 嵌入方案 (高级选项) + +**优点:** +- 更紧密的集成 +- 可以直接调用 Python 函数 +- 更好的性能 + +**缺点:** +- 配置复杂 +- 需要 C++ 编译环境 +- 调试困难 +- Python 全局解释器锁 (GIL) 问题 + +**状态:提供示例代码 ⚠️** + +## 使用方案一 (推荐) + +### 1. 确保 Python 环境可用 + +确保系统已安装 Python 3.8+,并且可以在命令行中运行: +```bash +python --version +``` + +### 2. 确保 Python 项目完整 + +确保 `F:/04.python/04.python/uf2touft3` 目录包含所有必要文件: +- `main.py` +- `processCombination.py` +- `config.ini` +- 其他依赖的模块和配置文件 + +### 3. 使用 Qt 应用程序 + +直接运行编译好的 `Uft30ChangeCode.exe`,点击"开始转换"按钮即可调用 Python 代码。 + +## 构建方案二 (高级) + +如果你想使用 pybind11 方案,按以下步骤: + +### 1. 安装依赖 + +```bash +pip install pybind11 +``` + +### 2. 创建构建目录 + +```bash +cd python_bindings/pybind11_binding +mkdir build +cd build +``` + +### 3. 配置 CMake + +```bash +cmake .. -G "MinGW Makefiles" +# 或使用 Visual Studio +# cmake .. -G "Visual Studio 16 2019" -A x64 +``` + +### 4. 编译 + +```bash +cmake --build . --config Release +``` + +### 5. 集成到 Qt 项目 + +在你的 Qt 代码中动态加载编译好的库。 + +## Python 项目的依赖 + +确保你的 Python 项目所需的所有依赖都已安装: +```bash +pip install -r requirements.txt +``` + +*(需要在 uf2touft3 项目中创建 requirements.txt)* + +## 故障排查 + +### Python 无法启动 +- 检查 Python 是否在 PATH 中 +- 尝试设置完整的 Python 路径 +- 检查是否有多个 Python 版本 + +### 模块导入错误 +- 确保工作目录设置正确 +- 检查所有依赖的模块是否都在 Python 路径中 +- 检查 `config.ini` 中的路径配置是否正确 + +### 中文路径问题 +- 确保所有路径使用 UTF-8 编码 +- 避免在路径中使用特殊字符 + +## 自定义配置 + +如需修改 Python 脚本路径,可以编辑 `mainwindow.cpp` 中的配置: +```cpp +QString scriptPath = "F:/04.python/04.python/uf2touft3/main.py"; +``` diff --git a/python_bindings/README.md b/python_bindings/README.md new file mode 100644 index 0000000..ca0e948 --- /dev/null +++ b/python_bindings/README.md @@ -0,0 +1,20 @@ +# Python Bindings for UFT30 Change Code + +本目录包含将 Python 项目编译为可被 Qt 调用的库的相关代码。 + +## 方案一:使用 pybind11 (推荐用于高性能集成) + +此方案创建一个 C++ 库,直接嵌入 Python 解释器并调用 Python 代码。 + +## 方案二:增强的 QProcess 方案 (推荐用于简单集成) + +此方案保持使用子进程调用,但增加更好的错误处理、进度显示等功能。 + +## 构建说明 + +### 前置要求 + +- Python 3.8+ (开发版,包含头文件) +- CMake 3.15+ +- Visual Studio 2019+ 或 MinGW-w64 +- pybind11 (可以通过 pip 安装) diff --git a/python_bindings/pybind11_binding/CMakeLists.txt b/python_bindings/pybind11_binding/CMakeLists.txt new file mode 100644 index 0000000..74d9e7d --- /dev/null +++ b/python_bindings/pybind11_binding/CMakeLists.txt @@ -0,0 +1,44 @@ +cmake_minimum_required(VERSION 3.15) +project(uf2touft3_binding VERSION 1.0.0 LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +# 查找 Python +find_package(Python3 COMPONENTS Interpreter Development REQUIRED) + +# 尝试查找 pybind11 +# 方法 1: 通过 pip 安装的 pybind11 +execute_process( + COMMAND ${Python3_EXECUTABLE} -m pybind11 --cmakedir + OUTPUT_VARIABLE PYBIND11_CMAKE_DIR + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET +) + +if(PYBIND11_CMAKE_DIR) + list(APPEND CMAKE_PREFIX_PATH ${PYBIND11_CMAKE_DIR}) +endif() + +find_package(pybind11 REQUIRED) + +# 创建 Python 模块 +pybind11_add_module(uf2touft3_binding uf2touft3_binding.cpp) + +# Windows 特定设置 +if(WIN32) + set_target_properties(uf2touft3_binding PROPERTIES + SUFFIX ".pyd" + ) +endif() + +# 安装目标 +install(TARGETS uf2touft3_binding + LIBRARY DESTINATION . + RUNTIME DESTINATION . +) + +message(STATUS "Python3 executable: ${Python3_EXECUTABLE}") +message(STATUS "Python3 include dirs: ${Python3_INCLUDE_DIRS}") +message(STATUS "Python3 libraries: ${Python3_LIBRARIES}") +message(STATUS "pybind11 found: ${pybind11_FOUND}") diff --git a/python_bindings/pybind11_binding/uf2touft3_binding.cpp b/python_bindings/pybind11_binding/uf2touft3_binding.cpp new file mode 100644 index 0000000..abf648e --- /dev/null +++ b/python_bindings/pybind11_binding/uf2touft3_binding.cpp @@ -0,0 +1,81 @@ +#include +#include +#include +#include + +namespace py = pybind11; + +// 全局解释器持有对象 +py::scoped_interpreter* g_python_interpreter = nullptr; + +// 初始化 Python 解释器 +extern "C" __declspec(dllexport) bool InitializePython() +{ + try { + if (!g_python_interpreter) { + g_python_interpreter = new py::scoped_interpreter(); + } + return true; + } catch (const std::exception& e) { + std::cerr << "Failed to initialize Python: " << e.what() << std::endl; + return false; + } +} + +// 清理 Python 解释器 +extern "C" __declspec(dllexport) void FinalizePython() +{ + if (g_python_interpreter) { + delete g_python_interpreter; + g_python_interpreter = nullptr; + } +} + +// 执行 doWork 函数 +extern "C" __declspec(dllexport) bool RunConversion(const char* script_path) +{ + try { + if (!g_python_interpreter) { + std::cerr << "Python interpreter not initialized!" << std::endl; + return false; + } + + // 添加脚本路径到 sys.path + py::module sys = py::module::import("sys"); + py::object path = sys.attr("path"); + + // 获取脚本目录 + std::string script_dir = script_path; + size_t last_sep = script_dir.find_last_of("/\\"); + if (last_sep != std::string::npos) { + script_dir = script_dir.substr(0, last_sep); + } + + // 添加到 sys.path + path.attr("insert")(0, script_dir); + + // 导入脚本模块 + py::module script_module = py::module::import("main"); + + // 调用 doWork 函数 + script_module.attr("doWork")(); + + return true; + } catch (const py::error_already_set& e) { + std::cerr << "Python error: " << e.what() << std::endl; + return false; + } catch (const std::exception& e) { + std::cerr << "Error: " << e.what() << std::endl; + return false; + } +} + +// 简单的 C API 封装 +PYBIND11_MODULE(uf2touft3, m) { + m.doc() = "UFT2 to UFT3 code conversion module"; + + m.def("initialize", &InitializePython, "Initialize Python interpreter"); + m.def("finalize", &FinalizePython, "Finalize Python interpreter"); + m.def("run_conversion", &RunConversion, "Run the conversion process", + py::arg("script_path")); +} diff --git a/resources.qrc b/resources.qrc new file mode 100644 index 0000000..71fe652 --- /dev/null +++ b/resources.qrc @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/setup_python_tool.bat b/setup_python_tool.bat new file mode 100644 index 0000000..fd2039d --- /dev/null +++ b/setup_python_tool.bat @@ -0,0 +1,47 @@ +@echo off +echo ======================================== +echo UFT30 ChangeCode - Python 工具初始化 +echo ======================================== +echo. + +REM 设置目录 +set "PROJECT_DIR=%~dp0" +set "PYTHON_SRC_DIR=F:\04.python\04.python\uf2touft3" +set "PYTHON_DEST_DIR=%PROJECT_DIR%3rd\Python\uf2touft3" +set "BIN_DEST_DIR=%PYTHON_DEST_DIR%\bin" + +echo [步骤 1/4] 创建目录结构... +if not exist "%PYTHON_DEST_DIR%" mkdir "%PYTHON_DEST_DIR%" +if not exist "%PYTHON_DEST_DIR%\src" mkdir "%PYTHON_DEST_DIR%\src" +if not exist "%BIN_DEST_DIR%" mkdir "%BIN_DEST_DIR%" +echo ✓ 目录结构已创建 +echo. + +echo [步骤 2/4] 复制 Python 源代码... +xcopy /E /I /Y "%PYTHON_SRC_DIR%" "%PYTHON_DEST_DIR%\src\" >nul +echo ✓ 源代码已复制 +echo. + +echo [步骤 3/4] 复制配置文件... +if exist "%PYTHON_SRC_DIR%\config.ini" ( + copy /Y "%PYTHON_SRC_DIR%\config.ini" "%BIN_DEST_DIR%\" >nul + echo ✓ 配置文件已复制到 bin 目录 +) +echo. + +echo [步骤 4/4] 复制临时可执行文件(占位符)... +REM 这里可以先放一个简单的说明文件 +echo 请运行 build_package.bat 来生成 uf2touft3_converter.exe > "%BIN_DEST_DIR%\README.txt" +echo. + +echo ======================================== +echo ✓ 初始化完成! +echo. +echo 下一步: +echo 1. 运行 3rd\Python\uf2touft3\build_package.bat +echo 来打包 Python 项目 +echo 2. 编译 Qt 项目,Python 工具会自动 +echo 拷贝到 bin 目录 +echo ======================================== +echo. +pause diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp new file mode 100644 index 0000000..d64d886 --- /dev/null +++ b/src/mainwindow/mainwindow.cpp @@ -0,0 +1,169 @@ +#include "mainwindow.h" +#include "ElaIcon.h" +#include "ElaText.h" +#include "ElaTheme.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MainWindow::MainWindow(QWidget *parent) + : ElaWindow(parent) + , m_pythonRunner(new PythonRunner(this)) +{ + initWindow(); + initContent(); + + // 获取应用程序目录 + QString appDir = QCoreApplication::applicationDirPath(); + + // 配置 Python 运行器 - 只使用打包好的 exe,路径是 uf2touft3/uf2touft3.exe + m_pythonRunner->setRunMode(PythonRunner::UsePackagedExe); + + // 设置打包好的可执行文件路径和工作目录 + QString exePath = appDir + "/uf2touft3/uf2touft3.exe"; + QString workDir = appDir + "/uf2touft3"; + + m_pythonRunner->setPackagedExePath(exePath); + m_pythonRunner->setWorkingDirectory(workDir); + + // 检查 exe 是否存在 + QFileInfo exeInfo(exePath); + if (!exeInfo.exists() || !exeInfo.isFile()) { + m_batchLogEdit->append("⚠️ 警告:未找到 uf2touft3/uf2touft3.exe!"); + m_batchLogEdit->append(QString(" 期望位置:%1").arg(exePath)); + } else { + m_batchLogEdit->append("✓ Python 工具准备就绪"); + } + + connect(m_pythonRunner, &PythonRunner::finished, this, &MainWindow::onPythonRunnerFinished); + connect(m_pythonRunner, &PythonRunner::standardOutput, this, &MainWindow::onPythonRunnerOutput); + connect(m_pythonRunner, &PythonRunner::standardError, this, &MainWindow::onPythonRunnerError); + connect(m_pythonRunner, &PythonRunner::started, [this]() { + m_batchLogEdit->append("转换任务已启动..."); + }); +} + +MainWindow::~MainWindow() +{ +} + +void MainWindow::initWindow() +{ + setWindowTitle("UFT30 Change Code"); + setWindowIcon(QIcon(":/Resource/Image/Cirno.jpg")); + resize(900, 600); + setUserInfoCardTitle("UFT30"); + setUserInfoCardSubTitle("Change Code Tool"); +} + +void MainWindow::initContent() +{ + QString helpKey; + QString aboutKey; + QString settingKey; + addPageNode("转码业务", createBatchConvertPage(), ElaIconType::FileCode); + addPageNode("功能搜索", createFunctionSearchPage(), ElaIconType::MagnifyingGlass); + addFooterNode("帮助", createHelpPage(), helpKey, 0, ElaIconType::CircleQuestion); + addFooterNode("关于", createAboutPage(), aboutKey, 0, ElaIconType::User); + addFooterNode("设置", createSettingsPage(), settingKey, 0, ElaIconType::GearComplex); +} + +QWidget* MainWindow::createBatchConvertPage() +{ + BatchConvertPage *page = new BatchConvertPage; + m_batchLogEdit = page->getLogEdit(); + connect(page, &BatchConvertPage::startConvert, this, &MainWindow::onBatchConvertStart); + connect(m_pythonRunner, &PythonRunner::started, [this]() { + if (m_batchLogEdit) { + m_batchLogEdit->append("转换任务已启动..."); + } + }); + return page; +} + +QWidget* MainWindow::createFunctionSearchPage() +{ + return new FunctionSearchPage; +} + +QWidget* MainWindow::createHelpPage() +{ + return new HelpPage; +} + +QWidget* MainWindow::createAboutPage() +{ + return new AboutPage; +} + +QWidget* MainWindow::createSettingsPage() +{ + return new SettingsPage(); +} + +void MainWindow::onBatchConvertStart() +{ + if (m_pythonRunner->isRunning()) { + m_batchLogEdit->append("警告: 上一个任务还在运行中..."); + QMessageBox::warning(this, "提示", "上一个转换任务正在运行,请等待完成或停止当前任务。"); + return; + } + + QString appDir = QCoreApplication::applicationDirPath(); + QString exePath = appDir + "/uf2touft3/uf2touft3.exe"; + + if (!m_pythonRunner->canRun()) { + m_batchLogEdit->append("错误: 找不到 uf2touft3/uf2touft3.exe!"); + QMessageBox::critical(this, "错误", + QString("无法启动转换任务!\n\n请确保:\nuf2touft3/uf2touft3.exe 存在,且该目录下包含 config.ini\n\n期望路径:\n%1") + .arg(exePath)); + return; + } + + m_batchLogEdit->append("========================================"); + m_batchLogEdit->append("开始执行 UFT2 到 UFT3 的代码转换..."); + m_batchLogEdit->append(QString("工具路径: %1").arg(exePath)); + m_batchLogEdit->append("========================================"); + + if (!m_pythonRunner->start()) { + m_batchLogEdit->append("错误: 无法启动转换进程!"); + } +} + +void MainWindow::onPythonRunnerFinished(int exitCode, QProcess::ExitStatus exitStatus) +{ + m_batchLogEdit->append("========================================"); + if (exitStatus == QProcess::NormalExit && exitCode == 0) { + m_batchLogEdit->append("✓ 代码转换完成!"); + QMessageBox::information(this, "完成", "代码转换任务已成功完成!"); + } else { + m_batchLogEdit->append(QString("✗ 转换失败! 退出码: %1").arg(exitCode)); + QMessageBox::warning(this, "失败", QString("代码转换任务失败,退出码: %1").arg(exitCode)); + } + m_batchLogEdit->append("========================================"); +} + +void MainWindow::onPythonRunnerOutput(const QString &output) +{ + if (!output.trimmed().isEmpty()) { + m_batchLogEdit->append(output); + } +} + +void MainWindow::onPythonRunnerError(const QString &error) +{ + if (!error.trimmed().isEmpty()) { + m_batchLogEdit->append(QString("[ERROR] %1").arg(error)); + } +} diff --git a/src/mainwindow/mainwindow.h b/src/mainwindow/mainwindow.h new file mode 100644 index 0000000..5b07b6b --- /dev/null +++ b/src/mainwindow/mainwindow.h @@ -0,0 +1,41 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include "ElaWindow.h" +#include +#include +#include "src/pythonrunner/PythonRunner.h" +#include "src/pages/batchconvert/batchconvertpage.h" +#include "src/pages/functionsearch/functionsearchpage.h" +#include "src/pages/help/helppage.h" +#include "src/pages/about/aboutpage.h" +#include "src/pages/settings/settingspage.h" + +class MainWindow : public ElaWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + void initWindow(); + void initContent(); + + QWidget* createBatchConvertPage(); + QWidget* createFunctionSearchPage(); + QWidget* createHelpPage(); + QWidget* createAboutPage(); + QWidget* createSettingsPage(); + + void onBatchConvertStart(); + void onPythonRunnerFinished(int exitCode, QProcess::ExitStatus exitStatus); + void onPythonRunnerOutput(const QString &output); + void onPythonRunnerError(const QString &error); + + PythonRunner *m_pythonRunner; + QTextEdit *m_batchLogEdit; +}; + +#endif // MAINWINDOW_H \ No newline at end of file diff --git a/src/pages/about/aboutpage.cpp b/src/pages/about/aboutpage.cpp new file mode 100644 index 0000000..3000c95 --- /dev/null +++ b/src/pages/about/aboutpage.cpp @@ -0,0 +1,41 @@ +#include "aboutpage.h" +#include +#include + +AboutPage::AboutPage(QWidget *parent) + : QWidget(parent) +{ + initUI(); +} + +AboutPage::~AboutPage() +{ +} + +void AboutPage::initUI() +{ + QVBoxLayout *layout = new QVBoxLayout(this); + layout->setContentsMargins(30, 30, 30, 30); + layout->setAlignment(Qt::AlignCenter); + + QLabel *logoLabel = new QLabel; + logoLabel->setStyleSheet("font-size: 48px; text-align: center;"); + logoLabel->setText("UFT30"); + layout->addWidget(logoLabel, 0, Qt::AlignCenter); + + QLabel *title = new QLabel("

UFT30 Change Code

"); + title->setAlignment(Qt::AlignCenter); + layout->addWidget(title); + + QLabel *version = new QLabel("

版本: 1.0.0

"); + version->setAlignment(Qt::AlignCenter); + layout->addWidget(version); + + QLabel *description = new QLabel("

一款强大的编码转换工具,支持批量转码和非LS格式转换。

"); + description->setAlignment(Qt::AlignCenter); + layout->addWidget(description); + + QLabel *copyright = new QLabel("

Copyright © 2024 UFT30 Team. All rights reserved.

"); + copyright->setAlignment(Qt::AlignCenter); + layout->addWidget(copyright); +} \ No newline at end of file diff --git a/src/pages/about/aboutpage.h b/src/pages/about/aboutpage.h new file mode 100644 index 0000000..1be500b --- /dev/null +++ b/src/pages/about/aboutpage.h @@ -0,0 +1,18 @@ +#ifndef ABOUTPAGE_H +#define ABOUTPAGE_H + +#include + +class AboutPage : public QWidget +{ + Q_OBJECT + +public: + explicit AboutPage(QWidget *parent = nullptr); + ~AboutPage(); + +private: + void initUI(); +}; + +#endif // ABOUTPAGE_H \ No newline at end of file diff --git a/src/pages/batchconvert/batchconvertpage.cpp b/src/pages/batchconvert/batchconvertpage.cpp new file mode 100644 index 0000000..fa96941 --- /dev/null +++ b/src/pages/batchconvert/batchconvertpage.cpp @@ -0,0 +1,158 @@ +#include "batchconvertpage.h" +#include +#include +#include +#include +#include +#include +#include + +BatchConvertPage::BatchConvertPage(QWidget *parent) + : QWidget(parent) +{ + initUI(); +} + +BatchConvertPage::~BatchConvertPage() +{ +} + +void BatchConvertPage::initUI() +{ + QVBoxLayout *layout = new QVBoxLayout(this); + layout->setContentsMargins(30, 30, 30, 30); + layout->setSpacing(20); + + QGroupBox *funcBox = new QGroupBox("转码功能"); + QVBoxLayout *funcLayout = new QVBoxLayout(funcBox); + funcLayout->setSpacing(10); + + QLabel *funcLabel = new QLabel("请输入需要转码的功能名称(每行一个):"); + funcLayout->addWidget(funcLabel); + + m_funcEdit = new QTextEdit; + m_funcEdit->setPlaceholderText(""); + m_funcEdit->setMinimumHeight(120); + funcLayout->addWidget(m_funcEdit); + + layout->addWidget(funcBox); + + QHBoxLayout *btnLayout = new QHBoxLayout; + QPushButton *startBtn = new QPushButton("开始转换"); + startBtn->setStyleSheet("background-color: #1abc9c; color: white; padding: 10px 30px; font-size: 14px; border: none; border-radius: 4px;"); + connect(startBtn, &QPushButton::clicked, this, &BatchConvertPage::onStartConvert); + QPushButton *clearBtn = new QPushButton("清空"); + connect(clearBtn, &QPushButton::clicked, this, &BatchConvertPage::onClearLog); + btnLayout->addStretch(); + btnLayout->addWidget(startBtn); + btnLayout->addWidget(clearBtn); + layout->addLayout(btnLayout); + + m_logEdit = new QTextEdit; + m_logEdit->setReadOnly(true); + m_logEdit->setStyleSheet("background-color: #2c3e50; color: #ecf0f1;"); + m_logEdit->append("转码工具已准备就绪..."); + layout->addWidget(m_logEdit); +} + +bool BatchConvertPage::saveToCustJson(const QStringList &funcList) +{ + QString jsonPath = QCoreApplication::applicationDirPath() + "/uf2touft3/cust.json"; + + QFile file(jsonPath); + if (!file.open(QIODevice::ReadOnly)) { + m_logEdit->append("[ERROR] 无法打开文件: " + jsonPath); + return false; + } + + QByteArray data = file.readAll(); + file.close(); + + QString content = QString::fromUtf8(data); + + int dirStart = content.indexOf("\"dir\":["); + if (dirStart < 0) { + dirStart = content.indexOf("\"dir\" : ["); + } + if (dirStart < 0) { + m_logEdit->append("[ERROR] 未找到 \"dir\" 节点"); + return false; + } + + int arrayStart = content.indexOf('[', dirStart); + int bracketCount = 1; + int pos = arrayStart + 1; + while (pos < content.length() && bracketCount > 0) { + if (content[pos] == '[') bracketCount++; + else if (content[pos] == ']') bracketCount--; + pos++; + } + int arrayEnd = pos; + + QString newDirArray = "["; + for (int i = 0; i < funcList.size(); ++i) { + if (i > 0) newDirArray += ","; + newDirArray += "\n \"" + funcList[i] + ".service_design\""; + } + newDirArray += "\n ]"; + + content.replace(arrayStart, arrayEnd - arrayStart, newDirArray); + + if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { + m_logEdit->append("[ERROR] 无法写入文件: " + jsonPath); + return false; + } + + file.write(content.toUtf8()); + file.close(); + + return true; +} + +void BatchConvertPage::onStartConvert() +{ + QString funcText = m_funcEdit->toPlainText().trimmed(); + if (funcText.isEmpty()) { + m_logEdit->append("请输入需要转码的功能名称!"); + return; + } + + QStringList funcs = funcText.split('\n', Qt::SkipEmptyParts); + QStringList trimmedFuncs; + for (const QString &func : funcs) { + QString trimmed = func.trimmed(); + if (!trimmed.isEmpty()) { + trimmedFuncs.append(trimmed); + } + } + + if (trimmedFuncs.isEmpty()) { + m_logEdit->append("请输入有效的功能名称!"); + return; + } + + m_logEdit->append("========================================"); + m_logEdit->append("正在写入 cust.json ..."); + m_logEdit->append("功能列表:"); + + for (const QString &func : trimmedFuncs) { + m_logEdit->append(" - " + func + ".service_design"); + } + + if (saveToCustJson(trimmedFuncs)) { + m_logEdit->append("[OK] cust.json 写入成功!"); + } else { + m_logEdit->append("[FAIL] cust.json 写入失败!"); + m_logEdit->append("========================================"); + return; + } + + m_logEdit->append("========================================"); + emit startConvert(); +} + +void BatchConvertPage::onClearLog() +{ + m_logEdit->clear(); + m_logEdit->append("转码工具已准备就绪..."); +} diff --git a/src/pages/batchconvert/batchconvertpage.h b/src/pages/batchconvert/batchconvertpage.h new file mode 100644 index 0000000..4dca8e7 --- /dev/null +++ b/src/pages/batchconvert/batchconvertpage.h @@ -0,0 +1,33 @@ +#ifndef BATCHCONVERTPAGE_H +#define BATCHCONVERTPAGE_H + +#include +#include +#include + +class BatchConvertPage : public QWidget +{ + Q_OBJECT + +public: + explicit BatchConvertPage(QWidget *parent = nullptr); + ~BatchConvertPage(); + + QTextEdit* getLogEdit() { return m_logEdit; } + +signals: + void startConvert(); + +private slots: + void onStartConvert(); + void onClearLog(); + +private: + void initUI(); + bool saveToCustJson(const QStringList &funcList); + + QTextEdit *m_funcEdit; + QTextEdit *m_logEdit; +}; + +#endif // BATCHCONVERTPAGE_H diff --git a/src/pages/functionsearch/functionsearchpage.cpp b/src/pages/functionsearch/functionsearchpage.cpp new file mode 100644 index 0000000..f69cc55 --- /dev/null +++ b/src/pages/functionsearch/functionsearchpage.cpp @@ -0,0 +1,153 @@ +#include "functionsearchpage.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +FunctionSearchPage::FunctionSearchPage(QWidget *parent) + : QWidget(parent) +{ + initUI(); +} + +FunctionSearchPage::~FunctionSearchPage() +{ +} + +void FunctionSearchPage::initUI() +{ + QVBoxLayout *mainLayout = new QVBoxLayout(this); + mainLayout->setContentsMargins(30, 30, 30, 30); + mainLayout->setSpacing(15); + + m_tabWidget = new QTabWidget; + + // ========================================== + // Tab 1: UF20功能搜索 + // ========================================== + QWidget *uf20Tab = new QWidget; + QVBoxLayout *uf20Layout = new QVBoxLayout(uf20Tab); + uf20Layout->setSpacing(15); + + QHBoxLayout *uf20SearchLayout = new QHBoxLayout; + m_uf20SearchEdit = new QLineEdit; + m_uf20SearchEdit->setPlaceholderText("输入功能名称或关键词搜索..."); + m_uf20SearchBtn = new QPushButton("搜索"); + m_uf20SearchBtn->setStyleSheet("padding: 8px 25px;"); + connect(m_uf20SearchBtn, &QPushButton::clicked, this, &FunctionSearchPage::onSearchUF20); + connect(m_uf20SearchEdit, &QLineEdit::returnPressed, this, &FunctionSearchPage::onSearchUF20); + connect(m_uf20SearchEdit, &QLineEdit::textChanged, this, &FunctionSearchPage::onUF20SearchTextChanged); + uf20SearchLayout->addWidget(m_uf20SearchEdit); + uf20SearchLayout->addWidget(m_uf20SearchBtn); + uf20Layout->addLayout(uf20SearchLayout); + + m_uf20ResultTable = new QTableWidget; + m_uf20ResultTable->setColumnCount(4); + m_uf20ResultTable->setHorizontalHeaderLabels({"功能名称", "功能类型", "所属模块", "文件路径"}); + m_uf20ResultTable->horizontalHeader()->setStretchLastSection(true); + m_uf20ResultTable->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents); + m_uf20ResultTable->horizontalHeader()->setSectionResizeMode(1, QHeaderView::ResizeToContents); + m_uf20ResultTable->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents); + m_uf20ResultTable->setSelectionBehavior(QAbstractItemView::SelectRows); + m_uf20ResultTable->setEditTriggers(QAbstractItemView::NoEditTriggers); + m_uf20ResultTable->setAlternatingRowColors(true); + uf20Layout->addWidget(m_uf20ResultTable); + + m_uf20StatusLabel = new QLabel("请输入关键词搜索UF20功能"); + uf20Layout->addWidget(m_uf20StatusLabel); + + m_tabWidget->addTab(uf20Tab, "UF20功能"); + + // ========================================== + // Tab 2: UFT3功能搜索 + // ========================================== + QWidget *uft3Tab = new QWidget; + QVBoxLayout *uft3Layout = new QVBoxLayout(uft3Tab); + uft3Layout->setSpacing(15); + + QHBoxLayout *uft3SearchLayout = new QHBoxLayout; + m_uft3SearchEdit = new QLineEdit; + m_uft3SearchEdit->setPlaceholderText("输入功能名称或关键词搜索..."); + m_uft3SearchBtn = new QPushButton("搜索"); + m_uft3SearchBtn->setStyleSheet("padding: 8px 25px;"); + connect(m_uft3SearchBtn, &QPushButton::clicked, this, &FunctionSearchPage::onSearchUFT3); + connect(m_uft3SearchEdit, &QLineEdit::returnPressed, this, &FunctionSearchPage::onSearchUFT3); + connect(m_uft3SearchEdit, &QLineEdit::textChanged, this, &FunctionSearchPage::onUFT3SearchTextChanged); + uft3SearchLayout->addWidget(m_uft3SearchEdit); + uft3SearchLayout->addWidget(m_uft3SearchBtn); + uft3Layout->addLayout(uft3SearchLayout); + + m_uft3ResultTable = new QTableWidget; + m_uft3ResultTable->setColumnCount(4); + m_uft3ResultTable->setHorizontalHeaderLabels({"功能名称", "功能类型", "所属模块", "文件路径"}); + m_uft3ResultTable->horizontalHeader()->setStretchLastSection(true); + m_uft3ResultTable->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents); + m_uft3ResultTable->horizontalHeader()->setSectionResizeMode(1, QHeaderView::ResizeToContents); + m_uft3ResultTable->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents); + m_uft3ResultTable->setSelectionBehavior(QAbstractItemView::SelectRows); + m_uft3ResultTable->setEditTriggers(QAbstractItemView::NoEditTriggers); + m_uft3ResultTable->setAlternatingRowColors(true); + uft3Layout->addWidget(m_uft3ResultTable); + + m_uft3StatusLabel = new QLabel("请输入关键词搜索UFT3功能"); + uft3Layout->addWidget(m_uft3StatusLabel); + + m_tabWidget->addTab(uft3Tab, "UFT3功能"); + + mainLayout->addWidget(m_tabWidget); +} + +void FunctionSearchPage::onSearchUF20() +{ + QString keyword = m_uf20SearchEdit->text().trimmed(); + if (keyword.isEmpty()) { + m_uf20StatusLabel->setText("请输入搜索关键词"); + return; + } + + m_uf20ResultTable->setRowCount(0); + m_uf20StatusLabel->setText(QString("正在搜索 \"%1\"...").arg(keyword)); + + m_uf20ResultTable->insertRow(0); + m_uf20ResultTable->setItem(0, 0, new QTableWidgetItem(keyword)); + m_uf20ResultTable->setItem(0, 1, new QTableWidgetItem("-")); + m_uf20ResultTable->setItem(0, 2, new QTableWidgetItem("-")); + m_uf20ResultTable->setItem(0, 3, new QTableWidgetItem("-")); + + m_uf20StatusLabel->setText(QString("搜索完成,共找到 1 条结果")); +} + +void FunctionSearchPage::onSearchUFT3() +{ + QString keyword = m_uft3SearchEdit->text().trimmed(); + if (keyword.isEmpty()) { + m_uft3StatusLabel->setText("请输入搜索关键词"); + return; + } + + m_uft3ResultTable->setRowCount(0); + m_uft3StatusLabel->setText(QString("正在搜索 \"%1\"...").arg(keyword)); + + m_uft3ResultTable->insertRow(0); + m_uft3ResultTable->setItem(0, 0, new QTableWidgetItem(keyword)); + m_uft3ResultTable->setItem(0, 1, new QTableWidgetItem("-")); + m_uft3ResultTable->setItem(0, 2, new QTableWidgetItem("-")); + m_uft3ResultTable->setItem(0, 3, new QTableWidgetItem("-")); + + m_uft3StatusLabel->setText(QString("搜索完成,共找到 1 条结果")); +} + +void FunctionSearchPage::onUF20SearchTextChanged(const QString &text) +{ + Q_UNUSED(text); +} + +void FunctionSearchPage::onUFT3SearchTextChanged(const QString &text) +{ + Q_UNUSED(text); +} diff --git a/src/pages/functionsearch/functionsearchpage.h b/src/pages/functionsearch/functionsearchpage.h new file mode 100644 index 0000000..604f5d9 --- /dev/null +++ b/src/pages/functionsearch/functionsearchpage.h @@ -0,0 +1,41 @@ +#ifndef FUNCTIONSEARCHPAGE_H +#define FUNCTIONSEARCHPAGE_H + +#include +#include +#include +#include +#include +#include + +class FunctionSearchPage : public QWidget +{ + Q_OBJECT + +public: + explicit FunctionSearchPage(QWidget *parent = nullptr); + ~FunctionSearchPage(); + +private slots: + void onSearchUF20(); + void onSearchUFT3(); + void onUF20SearchTextChanged(const QString &text); + void onUFT3SearchTextChanged(const QString &text); + +private: + void initUI(); + + QTabWidget *m_tabWidget; + + QLineEdit *m_uf20SearchEdit; + QPushButton *m_uf20SearchBtn; + QTableWidget *m_uf20ResultTable; + QLabel *m_uf20StatusLabel; + + QLineEdit *m_uft3SearchEdit; + QPushButton *m_uft3SearchBtn; + QTableWidget *m_uft3ResultTable; + QLabel *m_uft3StatusLabel; +}; + +#endif // FUNCTIONSEARCHPAGE_H diff --git a/src/pages/help/helppage.cpp b/src/pages/help/helppage.cpp new file mode 100644 index 0000000..18924e0 --- /dev/null +++ b/src/pages/help/helppage.cpp @@ -0,0 +1,62 @@ +#include "helppage.h" +#include +#include +#include + +HelpPage::HelpPage(QWidget *parent) + : QWidget(parent) +{ + initUI(); +} + +HelpPage::~HelpPage() +{ +} + +void HelpPage::initUI() +{ + QVBoxLayout *layout = new QVBoxLayout(this); + layout->setContentsMargins(30, 30, 30, 30); + + QLabel *title = new QLabel("

使用帮助

"); + layout->addWidget(title); + + QTextEdit *helpText = new QTextEdit; + helpText->setReadOnly(true); + helpText->setStyleSheet("background-color: white;"); + helpText->setHtml(R"( +

批量转码工具

+

批量转码工具用于将指定目录下的多个文件从一种编码格式转换为另一种编码格式。

+
    +
  • 源目录: 选择包含待转换文件的目录
  • +
  • 目标目录: 选择转换后文件的保存目录
  • +
  • 文件过滤: 设置要转换的文件类型,如 *.txt
  • +
  • 源编码: 选择源文件的编码格式
  • +
  • 目标编码: 选择目标编码格式
  • +
+ +

非LS转码工具

+

非LS转码工具用于在LS和非LS格式之间进行转换。

+
    +
  • 非LS转LS: 将非LS格式转换为LS格式
  • +
  • LS转非LS: 将LS格式转换为非LS格式
  • +
+ +

支持的编码格式

+
    +
  • GBK
  • +
  • GB2312
  • +
  • UTF-8
  • +
  • UTF-16
  • +
  • ASCII
  • +
+ +

注意事项

+
    +
  • 转换前请备份重要文件
  • +
  • 确保有足够的磁盘空间
  • +
  • 大文件转换可能需要较长时间
  • +
+ )"); + layout->addWidget(helpText); +} \ No newline at end of file diff --git a/src/pages/help/helppage.h b/src/pages/help/helppage.h new file mode 100644 index 0000000..9c75fee --- /dev/null +++ b/src/pages/help/helppage.h @@ -0,0 +1,18 @@ +#ifndef HELPPAGE_H +#define HELPPAGE_H + +#include + +class HelpPage : public QWidget +{ + Q_OBJECT + +public: + explicit HelpPage(QWidget *parent = nullptr); + ~HelpPage(); + +private: + void initUI(); +}; + +#endif // HELPPAGE_H \ No newline at end of file diff --git a/src/pages/nonlsconvert/nonlsconvertpage.cpp b/src/pages/nonlsconvert/nonlsconvertpage.cpp new file mode 100644 index 0000000..d510bd4 --- /dev/null +++ b/src/pages/nonlsconvert/nonlsconvertpage.cpp @@ -0,0 +1,121 @@ +#include "nonlsconvertpage.h" +#include +#include +#include +#include +#include +#include +#include + +NonLsConvertPage::NonLsConvertPage(QWidget *parent) + : QWidget(parent) +{ + initUI(); +} + +NonLsConvertPage::~NonLsConvertPage() +{ +} + +void NonLsConvertPage::initUI() +{ + QVBoxLayout *layout = new QVBoxLayout(this); + layout->setContentsMargins(30, 30, 30, 30); + layout->setSpacing(20); + + QGroupBox *inputBox = new QGroupBox("输入设置"); + QVBoxLayout *inputLayout = new QVBoxLayout(inputBox); + inputLayout->setSpacing(15); + + QHBoxLayout *srcLayout = new QHBoxLayout; + QLabel *srcLabel = new QLabel("源文件:"); + m_srcFileEdit = new QLineEdit; + QPushButton *srcBtn = new QPushButton("浏览"); + connect(srcBtn, &QPushButton::clicked, this, &NonLsConvertPage::onBrowseSrcFile); + srcLayout->addWidget(srcLabel); + srcLayout->addWidget(m_srcFileEdit); + srcLayout->addWidget(srcBtn); + inputLayout->addLayout(srcLayout); + + QHBoxLayout *dstLayout = new QHBoxLayout; + QLabel *dstLabel = new QLabel("输出文件:"); + m_dstFileEdit = new QLineEdit; + QPushButton *dstBtn = new QPushButton("浏览"); + connect(dstBtn, &QPushButton::clicked, this, &NonLsConvertPage::onBrowseDstFile); + dstLayout->addWidget(dstLabel); + dstLayout->addWidget(m_dstFileEdit); + dstLayout->addWidget(dstBtn); + inputLayout->addLayout(dstLayout); + + layout->addWidget(inputBox); + + QGroupBox *optionBox = new QGroupBox("转换选项"); + QVBoxLayout *optionLayout = new QVBoxLayout(optionBox); + optionLayout->setSpacing(15); + + QHBoxLayout *modeLayout = new QHBoxLayout; + QLabel *modeLabel = new QLabel("转换模式:"); + QComboBox *modeCombo = new QComboBox; + modeCombo->addItems({"非LS转LS", "LS转非LS"}); + modeLayout->addWidget(modeLabel); + modeLayout->addWidget(modeCombo); + optionLayout->addLayout(modeLayout); + + QHBoxLayout *encodingLayout = new QHBoxLayout; + QLabel *encodingLabel = new QLabel("编码格式:"); + QComboBox *encodingCombo = new QComboBox; + encodingCombo->addItems({"UTF-8", "GBK", "GB2312"}); + encodingLayout->addWidget(encodingLabel); + encodingLayout->addWidget(encodingCombo); + optionLayout->addLayout(encodingLayout); + + layout->addWidget(optionBox); + + QHBoxLayout *btnLayout = new QHBoxLayout; + QPushButton *startBtn = new QPushButton("开始转换"); + startBtn->setStyleSheet("background-color: #3498db; color: white; padding: 10px 30px; font-size: 14px; border: none; border-radius: 4px;"); + connect(startBtn, &QPushButton::clicked, this, &NonLsConvertPage::onStartConvert); + QPushButton *previewBtn = new QPushButton("预览"); + connect(previewBtn, &QPushButton::clicked, this, &NonLsConvertPage::onPreview); + btnLayout->addStretch(); + btnLayout->addWidget(startBtn); + btnLayout->addWidget(previewBtn); + layout->addLayout(btnLayout); + + m_resultEdit = new QTextEdit; + m_resultEdit->setReadOnly(true); + m_resultEdit->setStyleSheet("background-color: #2c3e50; color: #ecf0f1;"); + m_resultEdit->append("非LS转码工具已准备就绪..."); + layout->addWidget(m_resultEdit); +} + +void NonLsConvertPage::onBrowseSrcFile() +{ + QString file = QFileDialog::getOpenFileName(this, "选择源文件"); + if (!file.isEmpty()) { + m_srcFileEdit->setText(file); + } +} + +void NonLsConvertPage::onBrowseDstFile() +{ + QString file = QFileDialog::getSaveFileName(this, "选择输出文件"); + if (!file.isEmpty()) { + m_dstFileEdit->setText(file); + } +} + +void NonLsConvertPage::onStartConvert() +{ + m_resultEdit->append("开始转换..."); + m_resultEdit->append("源文件: " + m_srcFileEdit->text()); + m_resultEdit->append("输出文件: " + m_dstFileEdit->text()); + m_resultEdit->append("转换完成!"); +} + +void NonLsConvertPage::onPreview() +{ + m_resultEdit->append("预览模式..."); + m_resultEdit->append("源文件: " + m_srcFileEdit->text()); + m_resultEdit->append("预览完成!"); +} \ No newline at end of file diff --git a/src/pages/nonlsconvert/nonlsconvertpage.h b/src/pages/nonlsconvert/nonlsconvertpage.h new file mode 100644 index 0000000..4718d57 --- /dev/null +++ b/src/pages/nonlsconvert/nonlsconvertpage.h @@ -0,0 +1,30 @@ +#ifndef NONLSCONVERTPAGE_H +#define NONLSCONVERTPAGE_H + +#include +#include +#include + +class NonLsConvertPage : public QWidget +{ + Q_OBJECT + +public: + explicit NonLsConvertPage(QWidget *parent = nullptr); + ~NonLsConvertPage(); + +private slots: + void onBrowseSrcFile(); + void onBrowseDstFile(); + void onStartConvert(); + void onPreview(); + +private: + void initUI(); + + QLineEdit *m_srcFileEdit; + QLineEdit *m_dstFileEdit; + QTextEdit *m_resultEdit; +}; + +#endif // NONLSCONVERTPAGE_H \ No newline at end of file diff --git a/src/pages/settings/settingspage.cpp b/src/pages/settings/settingspage.cpp new file mode 100644 index 0000000..89ad8ba --- /dev/null +++ b/src/pages/settings/settingspage.cpp @@ -0,0 +1,367 @@ +#include "settingspage.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +SettingsPage::SettingsPage(QWidget *parent) + : QWidget(parent) +{ + initUI(); + loadSettings(); +} + +SettingsPage::~SettingsPage() +{ +} + +void SettingsPage::initUI() +{ + QVBoxLayout *layout = new QVBoxLayout(this); + layout->setContentsMargins(30, 30, 30, 30); + layout->setSpacing(20); + + // ========================================== + // 第一部分:环境配置 + // ========================================== + QGroupBox *envBox = new QGroupBox("环境配置"); + QVBoxLayout *envLayout = new QVBoxLayout(envBox); + envLayout->setSpacing(15); + + // UFT30项目环境路径 + QHBoxLayout *uft30Layout = new QHBoxLayout; + QLabel *uft30Label = new QLabel("UFT30项目环境路径:"); + uft30Label->setMinimumWidth(160); + m_uft30PathEdit = new QLineEdit; + QPushButton *uft30Btn = new QPushButton("浏览..."); + uft30Btn->setStyleSheet("padding: 6px 15px;"); + connect(uft30Btn, &QPushButton::clicked, this, &SettingsPage::onSelectUFT30Path); + uft30Layout->addWidget(uft30Label); + uft30Layout->addWidget(m_uft30PathEdit); + uft30Layout->addWidget(uft30Btn); + envLayout->addLayout(uft30Layout); + + // UF20项目环境路径 + QHBoxLayout *uf20Layout = new QHBoxLayout; + QLabel *uf20Label = new QLabel("UF20项目环境路径:"); + uf20Label->setMinimumWidth(160); + m_uf20PathEdit = new QLineEdit; + QPushButton *uf20Btn = new QPushButton("浏览..."); + uf20Btn->setStyleSheet("padding: 6px 15px;"); + connect(uf20Btn, &QPushButton::clicked, this, &SettingsPage::onSelectUF20Path); + uf20Layout->addWidget(uf20Label); + uf20Layout->addWidget(m_uf20PathEdit); + uf20Layout->addWidget(uf20Btn); + envLayout->addLayout(uf20Layout); + + // UF20账户项目环境路径 + QHBoxLayout *uf20AccountLayout = new QHBoxLayout; + QLabel *uf20AccountLabel = new QLabel("UF20账户项目环境路径:"); + uf20AccountLabel->setMinimumWidth(160); + m_uf20AccountPathEdit = new QLineEdit; + QPushButton *uf20AccountBtn = new QPushButton("浏览..."); + uf20AccountBtn->setStyleSheet("padding: 6px 15px;"); + connect(uf20AccountBtn, &QPushButton::clicked, this, &SettingsPage::onSelectUF20AccountPath); + uf20AccountLayout->addWidget(uf20AccountLabel); + uf20AccountLayout->addWidget(m_uf20AccountPathEdit); + uf20AccountLayout->addWidget(uf20AccountBtn); + envLayout->addLayout(uf20AccountLayout); + + // 转码生成路径 + QHBoxLayout *outputLayout = new QHBoxLayout; + QLabel *outputLabel = new QLabel("转码生成路径:"); + outputLabel->setMinimumWidth(160); + m_outputPathEdit = new QLineEdit; + QPushButton *outputBtn = new QPushButton("浏览..."); + outputBtn->setStyleSheet("padding: 6px 15px;"); + connect(outputBtn, &QPushButton::clicked, this, &SettingsPage::onSelectOutputPath); + outputLayout->addWidget(outputLabel); + outputLayout->addWidget(m_outputPathEdit); + outputLayout->addWidget(outputBtn); + envLayout->addLayout(outputLayout); + + layout->addWidget(envBox); + + // ========================================== + // 第二部分:系统配置 + // ========================================== + QGroupBox *systemBox = new QGroupBox("系统配置"); + QVBoxLayout *systemLayout = new QVBoxLayout(systemBox); + systemLayout->setSpacing(15); + + // 主题切换 + QHBoxLayout *themeLayout = new QHBoxLayout; + QLabel *themeLabel = new QLabel("主题模式:"); + themeLabel->setMinimumWidth(160); + m_themeCombo = new QComboBox; + m_themeCombo->addItems({"日间模式", "夜间模式"}); + m_themeCombo->setMinimumWidth(150); + connect(m_themeCombo, QOverload::of(&QComboBox::currentIndexChanged), this, &SettingsPage::onThemeChanged); + themeLayout->addWidget(themeLabel); + themeLayout->addWidget(m_themeCombo); + themeLayout->addStretch(); + systemLayout->addLayout(themeLayout); + + layout->addWidget(systemBox); + + // ========================================== + // 底部按钮 + // ========================================== + QHBoxLayout *btnLayout = new QHBoxLayout; + QPushButton *saveBtn = new QPushButton("保存设置"); + saveBtn->setStyleSheet("background-color: #9b59b6; color: white; padding: 10px 30px; font-size: 14px; border: none; border-radius: 4px;"); + connect(saveBtn, &QPushButton::clicked, this, &SettingsPage::onSaveSettings); + QPushButton *resetBtn = new QPushButton("恢复默认"); + connect(resetBtn, &QPushButton::clicked, this, &SettingsPage::onResetSettings); + btnLayout->addStretch(); + btnLayout->addWidget(saveBtn); + btnLayout->addWidget(resetBtn); + layout->addLayout(btnLayout); + + // 添加弹性空间 + layout->addStretch(); +} + +void SettingsPage::loadSettings() +{ + loadFromConfigIni(); + + QSettings settings("UFT30", "ChangeCode"); + QString theme = settings.value("Theme", "日间模式").toString(); + int index = m_themeCombo->findText(theme); + if (index >= 0) { + m_themeCombo->setCurrentIndex(index); + } +} + +QString SettingsPage::getConfigIniPath() +{ + return QCoreApplication::applicationDirPath() + "/uf2touft3/config.ini"; +} + +void SettingsPage::loadFromConfigIni() +{ + QString iniPath = getConfigIniPath(); + if (!QFile::exists(iniPath)) { + return; + } + + QFile file(iniPath); + if (!file.open(QIODevice::ReadOnly)) { + return; + } + + QByteArray data = file.readAll(); + file.close(); + + QString content = QString::fromLocal8Bit(data); + + bool inProjectPath = false; + const QStringList lines = content.split('\n'); + for (const QString &rawLine : lines) { + QString line = rawLine.trimmed(); + if (line.startsWith('[')) { + inProjectPath = (line == "[projectPath]"); + continue; + } + if (!inProjectPath || line.isEmpty() || line.startsWith(';') || line.startsWith('#')) { + continue; + } + + int eqPos = line.indexOf('='); + if (eqPos < 0) continue; + + QString key = line.left(eqPos).trimmed(); + QString value = line.mid(eqPos + 1).trimmed(); + value.replace("/", "\\"); + + if (key == "uft30") m_uft30PathEdit->setText(value); + else if (key == "uf20") m_uf20PathEdit->setText(value); + else if (key == "ufAcct20") m_uf20AccountPathEdit->setText(value); + else if (key == "createPath") m_outputPathEdit->setText(value); + } +} + +void SettingsPage::saveToConfigIni() +{ + QString iniPath = getConfigIniPath(); + + QString content; + if (QFile::exists(iniPath)) { + QFile file(iniPath); + if (file.open(QIODevice::ReadOnly)) { + QByteArray data = file.readAll(); + file.close(); + content = QString::fromLocal8Bit(data); + } + } + + auto toWinPath = [](const QString &p) -> QString { + return p.trimmed().replace("/", "\\"); + }; + + QString uft30Val = toWinPath(m_uft30PathEdit->text()); + QString uf20Val = toWinPath(m_uf20PathEdit->text()); + QString ufAcct20Val = toWinPath(m_uf20AccountPathEdit->text()); + QString createPathVal = toWinPath(m_outputPathEdit->text()); + + bool foundSection = false; + QStringList lines = content.split('\n'); + QStringList newLines; + QSet updatedKeys; + bool alreadyHadProjectPath = false; + + for (const QString &rawLine : lines) { + QString line = rawLine; + QString trimmed = rawLine.trimmed(); + + if (trimmed.startsWith('[')) { + if (foundSection) { + for (const QString &k : QStringList{"uft30", "uf20", "ufAcct20", "createPath"}) { + if (!updatedKeys.contains(k)) { + QString val; + if (k == "uft30") val = uft30Val; + else if (k == "uf20") val = uf20Val; + else if (k == "ufAcct20") val = ufAcct20Val; + else if (k == "createPath") val = createPathVal; + newLines << (k + "=" + val); + updatedKeys.insert(k); + } + } + foundSection = false; + } + if (trimmed == "[projectPath]") { + if (alreadyHadProjectPath) { + continue; + } + alreadyHadProjectPath = true; + foundSection = true; + } + newLines << line; + continue; + } + + if (foundSection && !trimmed.isEmpty() && !trimmed.startsWith(';') && !trimmed.startsWith('#')) { + int eqPos = trimmed.indexOf('='); + if (eqPos > 0) { + QString key = trimmed.left(eqPos).trimmed(); + if (key == "uft30" || key == "uf20" || key == "ufAcct20" || key == "createPath") { + QString val; + if (key == "uft30") val = uft30Val; + else if (key == "uf20") val = uf20Val; + else if (key == "ufAcct20") val = ufAcct20Val; + else if (key == "createPath") val = createPathVal; + newLines << (key + "=" + val); + updatedKeys.insert(key); + continue; + } + } + } + + newLines << line; + } + + if (foundSection) { + for (const QString &k : QStringList{"uft30", "uf20", "ufAcct20", "createPath"}) { + if (!updatedKeys.contains(k)) { + QString val; + if (k == "uft30") val = uft30Val; + else if (k == "uf20") val = uf20Val; + else if (k == "ufAcct20") val = ufAcct20Val; + else if (k == "createPath") val = createPathVal; + newLines << (k + "=" + val); + } + } + } else { + newLines << ""; + newLines << "[projectPath]"; + newLines << ("uft30=" + uft30Val); + newLines << ("uf20=" + uf20Val); + newLines << ("ufAcct20=" + ufAcct20Val); + newLines << ("createPath=" + createPathVal); + } + + QFile outFile(iniPath); + if (outFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) { + QByteArray outData = newLines.join("\n").toLocal8Bit(); + outFile.write(outData); + outFile.close(); + } +} + +void SettingsPage::onSaveSettings() +{ + QSettings settings("UFT30", "ChangeCode"); + settings.setValue("Theme", m_themeCombo->currentText()); + + saveToConfigIni(); + + QMessageBox::information(this, "保存成功", "配置已保存!"); +} + +void SettingsPage::onResetSettings() +{ + QMessageBox::StandardButton reply; + reply = QMessageBox::question(this, "确认重置", "确定要恢复所有默认设置吗?", + QMessageBox::Yes | QMessageBox::No); + if (reply == QMessageBox::Yes) { + m_uft30PathEdit->clear(); + m_uf20PathEdit->clear(); + m_uf20AccountPathEdit->clear(); + m_outputPathEdit->clear(); + m_themeCombo->setCurrentIndex(0); + + saveToConfigIni(); + + QSettings settings("UFT30", "ChangeCode"); + settings.clear(); + QMessageBox::information(this, "重置成功", "已恢复默认设置!"); + } +} + +void SettingsPage::onSelectUFT30Path() +{ + QString dir = QFileDialog::getExistingDirectory(this, "选择UFT30项目环境路径", m_uft30PathEdit->text()); + if (!dir.isEmpty()) { + m_uft30PathEdit->setText(dir); + } +} + +void SettingsPage::onSelectUF20Path() +{ + QString dir = QFileDialog::getExistingDirectory(this, "选择UF20项目环境路径", m_uf20PathEdit->text()); + if (!dir.isEmpty()) { + m_uf20PathEdit->setText(dir); + } +} + +void SettingsPage::onSelectUF20AccountPath() +{ + QString dir = QFileDialog::getExistingDirectory(this, "选择UF20账户项目环境路径", m_uf20AccountPathEdit->text()); + if (!dir.isEmpty()) { + m_uf20AccountPathEdit->setText(dir); + } +} + +void SettingsPage::onSelectOutputPath() +{ + QString dir = QFileDialog::getExistingDirectory(this, "选择转码生成路径", m_outputPathEdit->text()); + if (!dir.isEmpty()) { + m_outputPathEdit->setText(dir); + } +} + +void SettingsPage::onThemeChanged(int index) +{ + // 这里可以添加主题切换的逻辑 + Q_UNUSED(index); + // 暂时只保存设置,切换效果可以在后续实现 +} diff --git a/src/pages/settings/settingspage.h b/src/pages/settings/settingspage.h new file mode 100644 index 0000000..02aa559 --- /dev/null +++ b/src/pages/settings/settingspage.h @@ -0,0 +1,42 @@ +#ifndef SETTINGSPAGE_H +#define SETTINGSPAGE_H + +#include +#include +#include +#include +#include + +class SettingsPage : public QWidget +{ + Q_OBJECT + +public: + explicit SettingsPage(QWidget *parent = nullptr); + ~SettingsPage(); + +private slots: + void onSaveSettings(); + void onResetSettings(); + void onSelectUFT30Path(); + void onSelectUF20Path(); + void onSelectUF20AccountPath(); + void onSelectOutputPath(); + void onThemeChanged(int index); + +private: + void initUI(); + void loadSettings(); + void saveToConfigIni(); + void loadFromConfigIni(); + QString getConfigIniPath(); + + QLineEdit *m_uft30PathEdit; + QLineEdit *m_uf20PathEdit; + QLineEdit *m_uf20AccountPathEdit; + QLineEdit *m_outputPathEdit; + + QComboBox *m_themeCombo; +}; + +#endif // SETTINGSPAGE_H \ No newline at end of file diff --git a/src/pythonrunner/PythonRunner.cpp b/src/pythonrunner/PythonRunner.cpp new file mode 100644 index 0000000..a10c586 --- /dev/null +++ b/src/pythonrunner/PythonRunner.cpp @@ -0,0 +1,166 @@ +#include "PythonRunner.h" + +PythonRunner::PythonRunner(QObject *parent) + : QObject(parent) + , m_runMode(AutoDetect) + , m_pythonPath("python") + , m_process(new QProcess(this)) +{ + connect(m_process, &QProcess::started, this, &PythonRunner::started); + connect(m_process, QOverload::of(&QProcess::finished), + this, &PythonRunner::finished); + connect(m_process, &QProcess::readyReadStandardOutput, + this, &PythonRunner::onReadyReadStandardOutput); + connect(m_process, &QProcess::readyReadStandardError, + this, &PythonRunner::onReadyReadStandardError); + connect(m_process, &QProcess::errorOccurred, + this, &PythonRunner::errorOccurred); + connect(m_process, &QProcess::stateChanged, + this, &PythonRunner::stateChanged); +} + +PythonRunner::~PythonRunner() +{ + stop(); +} + +void PythonRunner::setRunMode(RunMode mode) +{ + m_runMode = mode; +} + +PythonRunner::RunMode PythonRunner::runMode() const +{ + return m_runMode; +} + +void PythonRunner::setPackagedExePath(const QString &path) +{ + m_packagedExePath = path; +} + +QString PythonRunner::packagedExePath() const +{ + return m_packagedExePath; +} + +void PythonRunner::setPythonPath(const QString &path) +{ + m_pythonPath = path; +} + +void PythonRunner::setScriptPath(const QString &path) +{ + m_scriptPath = path; +} + +void PythonRunner::setWorkingDirectory(const QString &dir) +{ + m_workingDir = dir; +} + +void PythonRunner::setArguments(const QStringList &args) +{ + m_arguments = args; +} + +PythonRunner::RunMode PythonRunner::detectRunMode() const +{ + QFileInfo exeInfo(m_packagedExePath); + if (exeInfo.exists() && exeInfo.isFile()) { + return UsePackagedExe; + } + + return UsePythonScript; +} + +bool PythonRunner::canRun() const +{ + RunMode effectiveMode = (m_runMode == AutoDetect) ? detectRunMode() : m_runMode; + + if (effectiveMode == UsePackagedExe) { + QFileInfo exeInfo(m_packagedExePath); + return exeInfo.exists() && exeInfo.isFile(); + } else { + QFileInfo scriptInfo(m_scriptPath); + return scriptInfo.exists() && scriptInfo.isFile(); + } +} + +bool PythonRunner::start() +{ + if (m_process->state() == QProcess::Running) { + return false; + } + + RunMode effectiveMode = (m_runMode == AutoDetect) ? detectRunMode() : m_runMode; + + QString program; + QStringList arguments; + + if (effectiveMode == UsePackagedExe) { + program = m_packagedExePath; + arguments = m_arguments; + QFileInfo exeInfo(m_packagedExePath); + QString exeDir = exeInfo.absolutePath(); + m_process->setWorkingDirectory(exeDir); + + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); + env.insert("UF2TOUFT3_HOME", exeDir); + m_process->setProcessEnvironment(env); + } else { + program = m_pythonPath; + arguments << m_scriptPath << m_arguments; + if (!m_workingDir.isEmpty()) { + m_process->setWorkingDirectory(m_workingDir); + } + } + + m_process->start(program, arguments); + + return m_process->waitForStarted(3000); +} + +void PythonRunner::stop() +{ + if (m_process->state() == QProcess::Running) { + m_process->terminate(); + if (!m_process->waitForFinished(3000)) { + m_process->kill(); + m_process->waitForFinished(); + } + } +} + +bool PythonRunner::isRunning() const +{ + return m_process->state() == QProcess::Running; +} + +bool PythonRunner::runSync(int timeout) +{ + if (!start()) { + return false; + } + return m_process->waitForFinished(timeout); +} + +void PythonRunner::onReadyReadStandardOutput() +{ + QByteArray output = m_process->readAllStandardOutput(); + QString result = QString::fromUtf8(output); + if (result.contains(QChar(0xFFFD))) { + result = QString::fromLocal8Bit(output); + } + emit standardOutput(result); +} + +void PythonRunner::onReadyReadStandardError() +{ + QByteArray error = m_process->readAllStandardError(); + QString result = QString::fromUtf8(error); + if (result.contains(QChar(0xFFFD))) { + result = QString::fromLocal8Bit(error); + } + emit standardError(result); +} diff --git a/src/pythonrunner/PythonRunner.h b/src/pythonrunner/PythonRunner.h new file mode 100644 index 0000000..d260630 --- /dev/null +++ b/src/pythonrunner/PythonRunner.h @@ -0,0 +1,86 @@ +#ifndef PYTHONRUNNER_H +#define PYTHONRUNNER_H + +#include +#include +#include +#include +#include +#include + +class PythonRunner : public QObject +{ + Q_OBJECT + +public: + // 运行模式 + enum RunMode { + UsePackagedExe, // 使用打包好的 exe 文件 + UsePythonScript, // 使用 Python 脚本 + 解释器 + AutoDetect // 自动检测,优先使用打包好的 + }; + + explicit PythonRunner(QObject *parent = nullptr); + ~PythonRunner(); + + // 设置运行模式 + void setRunMode(RunMode mode); + RunMode runMode() const; + + // 设置打包好的可执行文件路径 + void setPackagedExePath(const QString &path); + QString packagedExePath() const; + + // 设置 Python 解释器路径 + void setPythonPath(const QString &path); + + // 设置要运行的脚本路径 + void setScriptPath(const QString &path); + + // 设置工作目录 + void setWorkingDirectory(const QString &dir); + + // 设置传递给脚本的参数 + void setArguments(const QStringList &args); + + // 检查是否可以运行 + bool canRun() const; + + // 开始执行 + bool start(); + + // 停止执行 + void stop(); + + // 检查是否正在运行 + bool isRunning() const; + + // 同步执行 + bool runSync(int timeout = 300000); + +signals: + void started(); + void finished(int exitCode, QProcess::ExitStatus exitStatus); + void standardOutput(const QString &output); + void standardError(const QString &error); + void errorOccurred(QProcess::ProcessError error); + void stateChanged(QProcess::ProcessState state); + +private slots: + void onReadyReadStandardOutput(); + void onReadyReadStandardError(); + +private: + RunMode m_runMode; + QString m_packagedExePath; + QString m_pythonPath; + QString m_scriptPath; + QString m_workingDir; + QStringList m_arguments; + QProcess *m_process; + + // 自动检测可用的运行方式 + RunMode detectRunMode() const; +}; + +#endif // PYTHONRUNNER_H