|
HyperspaceExplorer 0.7.1
|
As a workaround to end the embarassing practice of keeping global variables, I have created this class as a singleton. You might also call it a namespace. More...
#include <Globals.h>

Classes | |
| struct | Impl |
Public Member Functions | |
| QStringList & | rcdirs () |
| QAction * | getQuitAction () |
| QMainWindow * | getMainWindow () |
| Color & | FogColor () |
| void | setFogColor (const Color &rgba) |
| Set the global fog color. | |
Static Public Member Functions | |
| static unsigned long | getMaxMemory () |
| static Color & | white () |
| static Color & | grey50 () |
| static bool | checkMemory () |
Public Attributes | |
| const double | SR3 |
Private Attributes | |
| Impl * | pImpl_ |
As a workaround to end the embarassing practice of keeping global variables, I have created this class as a singleton. You might also call it a namespace.
I plan to advance this class to a full-blown registry though. One day.
Members are accessed with the SingletonHolder static function, i.e. Globals::Instance().
| bool Global::checkMemory | ( | ) | [static] |
References Global::Impl::check_memory.
| Color & Global::FogColor | ( | ) |
References Global::Impl::fog_color.
| QMainWindow * Global::getMainWindow | ( | ) |
References Global::Impl::mainWindow.
| long unsigned int Global::getMaxMemory | ( | ) | [static] |
maximum amount of memory available for use
References Global::Impl::MaximumMemory.
| QAction * Global::getQuitAction | ( | ) |
References Global::Impl::quitAction.
| Color & Global::grey50 | ( | ) | [static] |
color definition for Grey
References Global::Impl::Grey50.
| QStringList & Global::rcdirs | ( | ) |
why tf did i make that global again? damn, i really should write comments immediately after writing the code
| void Global::setFogColor | ( | const Color & | rgba | ) |
| Color & Global::white | ( | ) | [static] |
color definition for White
References Global::Impl::White.
| const double Global::SR3 |
sqrt (3), stored to save computation time, probably superfluous
1.7.4
-
Hosted by