Preferences.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #pragma once
  2. #include "Common.h"
  3. #define DEFAULT_PROJECT_PATH "./Project"
  4. #define DEFAULT_PROJECT_NAME "Default"
  5. class QPreferences
  6. {
  7. public:
  8. QPreferences();
  9. ~QPreferences();
  10. static void Init();
  11. static void Uninit();
  12. static QString m_strProjectPath; //项目路径
  13. static QString m_strProjectName; //项目名称
  14. static QString m_strProjectInfo; //项目的描述
  15. static QString m_strHdwConfigID; //项目的硬件组态ID
  16. static QString m_strLiveTime; //运行时长
  17. static QString m_strSystemTime; //系统时间
  18. static QString m_strCurr_UserName; //用户名
  19. static QString m_strCurr_PassWord; //密码
  20. static QString m_strCurr_UserType; //用户类型
  21. static QString m_strDefaultDocument; //默认文档
  22. static QString m_strConfigPath; //配置信息目录
  23. static QString m_strProductName; //产品名称
  24. static QString m_strMessage;
  25. static bool m_bEnableDebugView; //打开调试窗口
  26. static bool m_bEnableRunningMode; //打开运行模式(无配置与流程栏显示)
  27. static bool m_bEnablePreventStandby;//防止待机
  28. static bool m_bEnableAutoRun; //自动运行
  29. static bool m_bEnableAutoStart; //开机自动启动软件
  30. static bool m_bEnableAlone; //防止重复打开
  31. static bool m_bEnableAutoLodin; //自动登录
  32. static bool m_bEnableAutoSave; //自动保存
  33. static bool m_bEnableRibbonBar; //RibbonBar 菜单模式
  34. static bool m_bCleanState; //清理注册表
  35. static bool m_bCleanDATA; //清理数据
  36. static bool m_bWriteProtection; //写保护
  37. static bool m_bSystemIsRunning; //系统运行中
  38. static QString m_astrDefaultDirs[13];
  39. static QString m_strBuildInfo;
  40. static QString m_strExeDir;
  41. static QString m_strTitle;
  42. static QString m_strPhine;
  43. static QString m_strMailbox;
  44. static QString m_strURL;
  45. static QString m_strCompanyName;
  46. static QString m_strAuthorizeInfo;
  47. static int m_nRunningCount; //运行计数
  48. static int m_nTotalRunningCount; //总运行计数
  49. static int m_nRunningTime; //运行计数
  50. static int m_nTotalRunningTime; //总运行计数
  51. static int m_nDocVersion; // 当前加载的工程文件版本号
  52. static int m_nHdwVersion; // 当前加载的硬件配置文件版本号
  53. //static int m_nUiViewWidth; // 用户设置的UI界面的宽和高
  54. //static int m_nUiViewHeight;
  55. //static QList<int> listUiStretchFactors; // UiFrame各个窗体的拉伸尺寸
  56. //static QList<int> listPouStretchFactors; // PouFrame各个窗体的拉伸尺寸
  57. static QString GetUserName();
  58. static QString GetPassWord();
  59. static void SetUserName(QString strUserName);
  60. static void SetPassWord(QString strPassWord);
  61. static int Login();
  62. };
  63. extern QPreferences thePrefs;