From 35c57f00175f34f3d2de3edc67720c2b408d0537 Mon Sep 17 00:00:00 2001 From: tianduanrui Date: Thu, 3 May 2018 09:08:55 +0800 Subject: [PATCH] update qqtapplication.h --- src/app_multi_link_technology.pri | 3 ++ src/frame/qqtapplication.cpp | 5 ++ src/frame/qqtapplication.h | 14 ++++- src/frame/systeminfo/qqtsysteminfo.h | 10 +++- test/inputtest/dialog.ui | 79 ++++++++++++++++++++++++++++ wiki/knack.md | 6 +++ wiki/wiki.md | 5 ++ 7 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 wiki/knack.md diff --git a/src/app_multi_link_technology.pri b/src/app_multi_link_technology.pri index bb5948ad..919b5f06 100644 --- a/src/app_multi_link_technology.pri +++ b/src/app_multi_link_technology.pri @@ -17,6 +17,9 @@ #Ubuntu: /home/xxx/.qmake/app_configure.pri #公共路径:应用编译路径、LibrarySDK路径、产品输出路径 +#2018年5月3日 08点55分 +#Multi-link技术只能应用于Qt5,Qt4没有windeployqt程序。 + #-------------------------------------------------------------------------------- #这个pri依赖qqt_function.pri #qqt_function.pri,哪里需要就在哪里包含。 diff --git a/src/frame/qqtapplication.cpp b/src/frame/qqtapplication.cpp index f978b2a3..6566f11d 100644 --- a/src/frame/qqtapplication.cpp +++ b/src/frame/qqtapplication.cpp @@ -126,6 +126,11 @@ void QQtApplication::setQSSStyle ( QString qssfile ) //setPalette(QPalette(QColor("#F0F0F0"))); } +void QQtApplication::setFrameworkStyle ( QString style ) +{ + setStyle ( style ); +} + void QQtApplication::setUPanAutorun ( bool run ) { diff --git a/src/frame/qqtapplication.h b/src/frame/qqtapplication.h index 5fa7c10b..4cb6a017 100644 --- a/src/frame/qqtapplication.h +++ b/src/frame/qqtapplication.h @@ -21,18 +21,30 @@ public: //palette void setTextFont ( QString fontfile = "/usr/lib/fonts/heiti.ttf", int fontsize = 11 ); + //这是设置全部控件的,基本的QSS,通用的QSS,全在这个里,特殊不变的也在这里。 void setQSSStyle ( QString qssfile = "./skin/default.qss" ); void setUPanAutorun ( bool run = false ); void setWriteLogSystem ( bool open = true ); + /** + * 这个是设置应用程序框架窗口风格的, + * "windows", "motif", "cde", "plastique", "windowsxp", or "macintosh" + */ + void setFrameworkStyle ( QString style = "macintosh" ); + //这两个函数和MFC架构里的那两个函数一样的功能,但是Qt提供了main函数里的更好的窗口方法,所以,这里无效。 virtual int initInstance() { return 0; } virtual int unInitInstance() { return 0; } + /** + * 用户从这里接收语言更改信号,更改所有窗口的语言。 + */ signals: void languageChanged(); + + //这个是给PluginWatcher用的,和用户无关。允许重写 public slots: - void slotUPanAutoRun ( int status ); + virtual void slotUPanAutoRun ( int status ); private: bool bUPanAutoRun; diff --git a/src/frame/systeminfo/qqtsysteminfo.h b/src/frame/systeminfo/qqtsysteminfo.h index 0554bd2a..c791de49 100644 --- a/src/frame/systeminfo/qqtsysteminfo.h +++ b/src/frame/systeminfo/qqtsysteminfo.h @@ -3,15 +3,21 @@ #include +class QQtSystemInfoPrivate; + class QQtSystemInfo : public QObject { Q_OBJECT public: - explicit QQtSystemInfo(QObject *parent = nullptr); + explicit QQtSystemInfo ( QObject* parent = nullptr ); signals: public slots: + +private: + Q_DECLARE_PRIVATE ( QQtSystemInfo ) + Q_DISABLE_COPY ( QQtSystemInfo ) }; -#endif // QQTSYSTEMINFO_H \ No newline at end of file +#endif // QQTSYSTEMINFO_H diff --git a/test/inputtest/dialog.ui b/test/inputtest/dialog.ui index 91425ea8..8a9c6ed8 100644 --- a/test/inputtest/dialog.ui +++ b/test/inputtest/dialog.ui @@ -33,6 +33,85 @@ + + + + 90 + 260 + 101 + 61 + + + + PushButton + + + + + + 210 + 260 + 101 + 61 + + + + PushButton + + + + + + 330 + 260 + 101 + 61 + + + + PushButton + + + + + + 400 + 60 + 113 + 20 + + + + + + + 400 + 100 + 113 + 20 + + + + + + + 400 + 140 + 113 + 20 + + + + + + + 230 + 60 + 131 + 22 + + + diff --git a/wiki/knack.md b/wiki/knack.md new file mode 100644 index 00000000..8a6322bc --- /dev/null +++ b/wiki/knack.md @@ -0,0 +1,6 @@ +# QQtApp 开发诀窍 + +- 找到常用中转Class,就基本掌握了所有类的使用。 + - 比如 + - QByteArray 这个类,用于QString qint QChar char* QBuffer QIODevice等类型和字节序列设备之间的字符转换。它是个重要的中转类别。 + - QImage 这个类,用于QPixmap 本地文件 QIcon的转换,通过它把文件传到屏幕上。它是个重要的图像中转类型。 diff --git a/wiki/wiki.md b/wiki/wiki.md index f8384823..ad994fcc 100644 --- a/wiki/wiki.md +++ b/wiki/wiki.md @@ -28,6 +28,11 @@ [LibQQt的地位](LibQQt's-position.md) +## LibQQt程序开发诀窍 + +[QQt应用程序的开发诀窍](knack.md) + + ## 返回 [返回](../)