Just create a normal header file and include it in every file where you need that global variables. (Using namespaces is also a good choice to group your variables!)
Qt Code:
  1. #ifndef ARTISTICSTYLECONSTANTS_H
  2. #define ARTISTICSTYLECONSTANTS_H
  3.  
  4. namespace ArtisticStyle
  5. {
  6. namespace Constants
  7. {
  8. // Predefined Style Options
  9. const char* const ASP_STYLE = "style";
  10. const int ASP_STYLE_DEF = -1;
  11.  
  12. // Tab and Bracket Options
  13. const char* const ASP_INDENT = "indent";
  14. const bool ASP_INDENT_DEF = true;
  15. const char* const ASP_INDENTSTYLE = "indentStyle";
  16. const char* const ASP_INDENTSTYLE_DEF = "spaces";
  17. const char* const ASP_INDENTSIZE = "indentSize";
  18. const int ASP_INDENTSIZE_DEF = 2;
  19. const char* const ASP_BRACKETS = "brackets";
  20. const bool ASP_BRACKETS_DEF = true;
  21. const char* const ASP_BRACKETSSTYLE = "bracketsStyle";
  22. const int ASP_BRACKETSSTYLE_DEF = astyle::BREAK_MODE;
  23.  
  24. // [...]
  25. }
  26. }
  27.  
  28. #endif // ARTISTICSTYLECONSTANTS_H
To copy to clipboard, switch view to plain text mode