#pragma once #include "Common.h" #define DEFAULT_PROJECT_PATH "./Project" #define DEFAULT_PROJECT_NAME "Default" class QPreferences { public: QPreferences(); ~QPreferences(); static void Init(); static void Uninit(); static QString m_strProjectPath; //项目路径 static QString m_strProjectName; //项目名称 static QString m_strProjectInfo; //项目的描述 static QString m_strHdwConfigID; //项目的硬件组态ID static QString m_strLiveTime; //运行时长 static QString m_strSystemTime; //系统时间 static QString m_strCurr_UserName; //用户名 static QString m_strCurr_PassWord; //密码 static QString m_strCurr_UserType; //用户类型 static QString m_strDefaultDocument; //默认文档 static QString m_strConfigPath; //配置信息目录 static QString m_strProductName; //产品名称 static QString m_strMessage; static bool m_bEnableDebugView; //打开调试窗口 static bool m_bEnableRunningMode; //打开运行模式(无配置与流程栏显示) static bool m_bEnablePreventStandby;//防止待机 static bool m_bEnableAutoRun; //自动运行 static bool m_bEnableAutoStart; //开机自动启动软件 static bool m_bEnableAlone; //防止重复打开 static bool m_bEnableAutoLodin; //自动登录 static bool m_bEnableAutoSave; //自动保存 static bool m_bEnableRibbonBar; //RibbonBar 菜单模式 static bool m_bCleanState; //清理注册表 static bool m_bCleanDATA; //清理数据 static bool m_bWriteProtection; //写保护 static bool m_bSystemIsRunning; //系统运行中 static QString m_astrDefaultDirs[13]; static QString m_strBuildInfo; static QString m_strExeDir; static QString m_strTitle; static QString m_strPhine; static QString m_strMailbox; static QString m_strURL; static QString m_strCompanyName; static QString m_strAuthorizeInfo; static int m_nRunningCount; //运行计数 static int m_nTotalRunningCount; //总运行计数 static int m_nRunningTime; //运行计数 static int m_nTotalRunningTime; //总运行计数 static int m_nDocVersion; // 当前加载的工程文件版本号 static int m_nHdwVersion; // 当前加载的硬件配置文件版本号 //static int m_nUiViewWidth; // 用户设置的UI界面的宽和高 //static int m_nUiViewHeight; //static QList listUiStretchFactors; // UiFrame各个窗体的拉伸尺寸 //static QList listPouStretchFactors; // PouFrame各个窗体的拉伸尺寸 static QString GetUserName(); static QString GetPassWord(); static void SetUserName(QString strUserName); static void SetPassWord(QString strPassWord); static int Login(); }; extern QPreferences thePrefs;