source:
src/UIElements/Qt4/QtUIFactory.hpp@
2c97ad
| Last change on this file since 2c97ad was 08d042, checked in by , 10 years ago | |
|---|---|
|
|
| File size: 1.3 KB | |
| Rev | Line | |
|---|---|---|
| [ea94a8] | 1 | /* |
| [4cf323d] | 2 | * QtUIFactory.hpp |
| [ea94a8] | 3 | * |
| 4 | * Created on: Jan 14, 2010 | |
| 5 | * Author: crueger | |
| 6 | */ | |
| 7 | ||
| 8 | #ifndef QTUIFACTORY_HPP_ | |
| 9 | #define QTUIFACTORY_HPP_ | |
| 10 | ||
| [56f73b] | 11 | // include config.h |
| 12 | #ifdef HAVE_CONFIG_H | |
| 13 | #include <config.h> | |
| 14 | #endif | |
| 15 | ||
| 16 | ||
| [ea94a8] | 17 | #include "UIElements/UIFactory.hpp" |
| 18 | ||
| [15e197] | 19 | #include <boost/thread.hpp> |
| 20 | #include <string> | |
| 21 | #include <vector> | |
| 22 | ||
| [8f67e2] | 23 | class QApplication; |
| 24 | ||
| [4cf323d] | 25 | class QtUIFactory : public UIFactory |
| [ea94a8] | 26 | { |
| 27 | friend class UIFactory; | |
| 28 | ||
| 29 | public: | |
| [4cf323d] | 30 | virtual ~QtUIFactory(); |
| [ea94a8] | 31 | |
| [163110] | 32 | virtual Dialog* makeDialog(const std::string &_title); |
| [257c77] | 33 | virtual MainWindow* makeMainWindow(); |
| [ea94a8] | 34 | |
| [82b71a] | 35 | struct description : public UIFactory::factoryDescription { |
| [15e197] | 36 | description(int _argc, char **_argv); |
| [82b71a] | 37 | virtual ~description(); |
| 38 | ||
| 39 | virtual UIFactory* makeFactory(); | |
| [15e197] | 40 | |
| 41 | private: | |
| 42 | int argc; | |
| 43 | char **argv; | |
| 44 | }; | |
| [462201] | 45 | virtual std::string getUIName(){ return "Qt4"; } |
| [82b71a] | 46 | |
| [3054689] | 47 | static bool isTestMode(const char *_argument); |
| 48 | ||
| [ea94a8] | 49 | protected: |
| [15e197] | 50 | QtUIFactory(int _argc, char **_argv); |
| 51 | ||
| 52 | private: | |
| 53 | ||
| [08d042] | 54 | void testrun(const std::vector<std::string> _scripts, const bool _singleLineStepping = false) const; |
| [15e197] | 55 | |
| 56 | void testlauncher_sleep(const boost::posix_time::time_duration& _period) const; | |
| [8f67e2] | 57 | |
| 58 | private: | |
| [15e197] | 59 | QApplication *app; |
| 60 | ||
| [6a661c] | 61 | int argc; |
| 62 | char **argv; | |
| [15e197] | 63 | |
| 64 | //!> internal flag to tell testlauncher_thread to stop | |
| 65 | mutable bool testlauncher_Interrupted; | |
| 66 | ||
| 67 | //!> internal thread to call Actions | |
| 68 | boost::thread *testlauncher_thread; | |
| [ea94a8] | 69 | }; |
| 70 | ||
| 71 | #endif /* QTUIFACTORY_HPP_ */ |
Note:
See TracBrowser
for help on using the repository browser.
