UOSTools.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include <string>
  2. namespace UOS
  3. {
  4. //工具栏隐藏模式
  5. const std::string domain_dock = "com.deepin.dde.dock";
  6. const std::string attribute_hide_mode = "hide-mode";
  7. const std::string keep_hidden = "keep-hidden";
  8. const std::string keep_show = "keep-showing";
  9. const std::string smart_show = "smart-hide'";
  10. const std::string wallpaper_stored_path = "/usr/share/wallpapers/deepin/";
  11. const std::string shellscript_get_screen_names = "xrandr |awk '/connected/ {print $1}'";
  12. const std::string shellscript_get_screen_resolutions = "xrandr |awk '/connected/ {print $4}'";
  13. struct MonitorInfo
  14. {
  15. std::string name;
  16. bool isPrimary;
  17. int posDirecttion; //-1:skip;0:copy mode;1:up;2:right;3:bottom;4:left; 如果isPrimary,该字段无效
  18. int nResolutionX;
  19. int nResolutionY;
  20. int refreshRate;
  21. std::string other;//如果是副屏,要设置扩展模式,这个是主屏幕的名称
  22. MonitorInfo() :name(""), isPrimary(false), posDirecttion(-1), nResolutionX(1920), nResolutionY(1080), refreshRate(60)
  23. {
  24. }
  25. };
  26. class CQSettings
  27. {
  28. public:
  29. CQSettings(bool fGet):mGet(fGet) {}
  30. ~CQSettings() {}
  31. private:
  32. bool mGet;
  33. };
  34. }