|
DAWorkbench 0.0.1
DAWorkbench API
|
总体界面接口,负责生成DAAppDockingArea和DAAppRibbonArea 更多...
#include <DAAppUI.h>
Public 成员函数 | |
| DAAppUI (SARibbonMainWindow *m, DACoreInterface *c) | |
| virtual QMainWindow * | getMainWindow () const override |
| virtual DADockingAreaInterface * | getDockingArea () override |
| virtual DARibbonAreaInterface * | getRibbonArea () override |
| virtual DAStatusBarInterface * | getStatusBar () override |
| virtual QJsonObject | getConfigValues (const QString &jsonConfig, QWidget *parent=nullptr, const QString &cacheKey=QString()) override |
| 执行一个通用的设置窗口,来获取设置信息,传入内容为构建窗口的设置信息 | |
| virtual void | addInfoLogMessage (const QString &msg, bool showInStatusBar=true) override |
| virtual void | addWarningLogMessage (const QString &msg, bool showInStatusBar=true) override |
| virtual void | addCriticalLogMessage (const QString &msg, bool showInStatusBar=true) override |
| virtual void | setDirty (bool on=true) override |
| void | createUi () |
| DAAppCore * | getAppCore () |
| 获取app core | |
| DAAppActions * | getAppActions () |
| DAAppCommand * | getAppCmd () |
| DAAppDockingArea * | getAppDockingArea () |
| DAAppRibbonArea * | getAppRibbonArea () |
| DAAppStatusBar * | getAppStatusBar () |
Public 成员函数 继承自 DA::DAUIInterface | |
| DAUIInterface (SARibbonMainWindow *m, DACoreInterface *c) | |
| SARibbonMainWindow * | mainWindow () const |
| 获取主窗口 | |
| virtual void | retranslateUi () |
| 发生语言变更时会调用此函数 | |
| void | registeAction (DAActionsInterface *ac) |
| void | registeExtend (DAUIExtendInterface *ex) |
| 注册扩展 | |
| void | registeCommand (DACommandInterface *cmd) |
| 注册命令接口 | |
| int | getExtendCount () const |
| 获取扩展的数量 | |
| DAUIExtendInterface * | getExtend (int index) |
| 获取扩展 | |
| DACommandInterface * | getCommandInterface () const |
| 获取命令接口 | |
| DAActionsInterface * | getActionInterface () const |
| 获取action管理器 | |
| void | processEvents () const |
| 手动处理一下事件 | |
| QString | getExistingDirectory (const QString &title=QString(), const QString &dir=QString()) |
| void | setColorTheme (const DAColorTheme &th) |
| 设置程序主题 | |
| virtual DAColorTheme | getColorTheme () const |
| 获取程序主题 | |
Public 成员函数 继承自 DA::DABaseInterface | |
| DABaseInterface (DACoreInterface *c, QObject *par=nullptr) | |
| DACoreInterface * | core () const |
Public 属性 | |
| DAAppActions * | m_actions |
| DAAppCommand * | m_cmd |
| DAAppDockingArea * | m_dockingArea |
| DAAppRibbonArea * | m_ribbonArea |
| DAAppStatusBar * | m_statusBar |
| QHash< QString, DACommonPropertySettingDialog * > | m_cachePropertyDialog |
Protected 成员函数 | |
| void | createActions () |
| void | createCmd () |
| void | createDockingArea () |
| void | createRibbonArea () |
| void | createStatusBar () |
Protected 成员函数 继承自 DA::DAUIInterface | |
| bool | eventFilter (QObject *watched, QEvent *event) override |
总体界面接口,负责生成DAAppDockingArea和DAAppRibbonArea
| DAAppUI::DAAppUI | ( | SARibbonMainWindow * | m, |
| DACoreInterface * | c | ||
| ) |
这里不进行createUi的调用,因为很多地方的窗口的构建需要DAAppActions, 而DAAppActions又依赖DAAppUI,在DAAppCore构建DAAppUI时,如果在DAAppUI的构造函数中调用createUi 那么会导致DAAppUI构造过程中调用createDockingArea,而createDockingArea是创建窗口的主要函数, 很多窗口的创建又依赖DAAppActions,虽然DAAppActions已经创建,但如果把createUi放到DAAppUI构造函数中, 此时DAAppUI还未构造完成,DAAppUI未构造完成就导致DAAppCore还无法持有DAAppUI指针, 那么createDockingArea构造各种窗口时就无法通过DA_APP_UI_ACTIONS宏(DA::DAAppCore::getInstance().getUi()->getActions())来获取action
因此createUi要等DAAppCore持有DAAppUI指针后再调用
|
overridevirtual |
实现了 DA::DAUIInterface.
|
overridevirtual |
实现了 DA::DAUIInterface.
|
overridevirtual |
实现了 DA::DAUIInterface.
| DAAppCore * DAAppUI::getAppCore | ( | ) |
获取app core
|
overridevirtual |
执行一个通用的设置窗口,来获取设置信息,传入内容为构建窗口的设置信息
具体json的设置见DACommonPropertySettingDialog
| jsonConfig | json设置文件内容 |
| parent | 父窗口 |
| cacheKey | 缓存关键字,如果缓存关键字有值,优先匹配缓存的窗口,如果匹配中 |
| defaultTitle |
实现了 DA::DAUIInterface.
|
overridevirtual |
实现了 DA::DAUIInterface.
|
overridevirtual |
实现了 DA::DAUIInterface.
|
overridevirtual |
实现了 DA::DAUIInterface.
|
overridevirtual |
实现了 DA::DAUIInterface.
|
overridevirtual |
实现了 DA::DAUIInterface.