You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
#include <IxSystem.h>
|
|
|
|
|
#include "ZxDynamic.h"
|
|
|
|
|
|
|
|
|
|
#include "iAppBase_global.h"
|
|
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QSettings;
|
|
|
|
|
class QTimer;
|
|
|
|
|
class QAction;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
// 存放全局对象/路径等信息
|
|
|
|
|
class I_APPBASE_EXPORT ZxSystem
|
|
|
|
|
: public QObject
|
|
|
|
|
, virtual public IxSystem
|
|
|
|
|
, virtual public IxDynObj
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
ZX_DECLARE_DYNAMIC
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
ZxSystem();
|
|
|
|
|
~ZxSystem();
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual bool init();
|
|
|
|
|
|
|
|
|
|
// 配置载体
|
|
|
|
|
virtual QSettings* getSettings(const QString& sModule, \
|
|
|
|
|
bool bResetIfExists = false);
|
|
|
|
|
|
|
|
|
|
// 版本
|
|
|
|
|
virtual QString getAppVer() const;
|
|
|
|
|
|
|
|
|
|
// 图标加载(缓存)
|
|
|
|
|
virtual QIcon loadIcon(const QString& name, int wh = -1) const;
|
|
|
|
|
|
|
|
|
|
// 加载css
|
|
|
|
|
virtual void loadCss(const QString& cssFile = "", \
|
|
|
|
|
QApplication* pApp = NULL) const;
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
|
|
void onAppDestroyed();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
void onIdle();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
// 配置载体
|
|
|
|
|
QMap<QString, QSettings*> m_mapSettings;
|
|
|
|
|
|
|
|
|
|
// 空闲处理
|
|
|
|
|
QObject* m_pIdleEventFilter;
|
|
|
|
|
bool m_bInited;
|
|
|
|
|
|
|
|
|
|
friend class ZxModuleInfo;
|
|
|
|
|
friend class ZxIdleEventFilter;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|