1 #include "qb.hpp" 2 3 class Application : public QObject { 4 Q_OBJECT 5 6 public: 7 class App : public QApplication { 8 public: 9 #if defined(PLATFORM_WIN) 10 bool winEventFilter(MSG *msg, long *result); 11 #endif 12 App(int & argc,char ** argv)13 App(int &argc, char **argv) : QApplication(argc, argv) {} 14 } *app; 15 16 QTimer *timer; 17 18 bool terminate; //set to true to terminate main() loop and exit emulator 19 bool power; 20 bool pause; 21 bool autopause; 22 bool debug; //debugger sets this to true when entered to suspend emulation 23 bool debugrun; //debugger sets this to true to run emulation to a debug event 24 25 clock_t clockTime; 26 clock_t autosaveTime; 27 clock_t screensaverTime; 28 29 string configFilename; 30 string styleSheetFilename; 31 32 array<QbWindow*> windowList; 33 34 int main(int &argc, char **argv); 35 void locateFile(string &filename, bool createDataDirectory = false); 36 void initPaths(const char *basename); 37 void init(); 38 39 Application(); 40 ~Application(); 41 42 public slots: 43 void run(); 44 }; 45 46 extern Application application; 47