Candidate_v1.7.0
stable
|
Last change
on this file since c41ce0 was c41ce0, checked in by Frederik Heber <frederik.heber@…>, 3 months ago |
|
Adds qt_size and qt_position arguments to control Qt window size.
- override is only temporary and is not stored in QSettings.
- this allows using these parameters in scripts to take screenshots
in a reliable manner but retain the actual window size for other
usages.
|
-
Property mode
set to
100644
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * QtUIFactory.hpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Jan 14, 2010
|
|---|
| 5 | * Author: crueger
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #ifndef QTUIFACTORY_HPP_
|
|---|
| 9 | #define QTUIFACTORY_HPP_
|
|---|
| 10 |
|
|---|
| 11 | // include config.h
|
|---|
| 12 | #ifdef HAVE_CONFIG_H
|
|---|
| 13 | #include <config.h>
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 | #include "UIElements/UIFactory.hpp"
|
|---|
| 18 |
|
|---|
| 19 | #include <boost/thread.hpp>
|
|---|
| 20 | #include <string>
|
|---|
| 21 | #include <vector>
|
|---|
| 22 |
|
|---|
| 23 | class QApplication;
|
|---|
| 24 |
|
|---|
| 25 | class QtUIFactory : public UIFactory
|
|---|
| 26 | {
|
|---|
| 27 | friend class UIFactory;
|
|---|
| 28 |
|
|---|
| 29 | public:
|
|---|
| 30 | virtual ~QtUIFactory();
|
|---|
| 31 |
|
|---|
| 32 | virtual Dialog* makeDialog(const std::string &_title);
|
|---|
| 33 | virtual MainWindow* makeMainWindow();
|
|---|
| 34 |
|
|---|
| 35 | struct description : public UIFactory::factoryDescription {
|
|---|
| 36 | description(int _argc, char **_argv);
|
|---|
| 37 | virtual ~description();
|
|---|
| 38 |
|
|---|
| 39 | virtual UIFactory* makeFactory();
|
|---|
| 40 |
|
|---|
| 41 | private:
|
|---|
| 42 | int argc;
|
|---|
| 43 | char **argv;
|
|---|
| 44 | };
|
|---|
| 45 | virtual std::string getUIName(){ return "Qt4"; }
|
|---|
| 46 |
|
|---|
| 47 | static bool isTestMode(const char *_argument);
|
|---|
| 48 | static bool isGuiMode(const char *_argument);
|
|---|
| 49 |
|
|---|
| 50 | protected:
|
|---|
| 51 | QtUIFactory(int _argc, char **_argv);
|
|---|
| 52 |
|
|---|
| 53 | private:
|
|---|
| 54 |
|
|---|
| 55 | void testrun(const std::vector<std::string> _scripts, const bool _singleLineStepping = false) const;
|
|---|
| 56 |
|
|---|
| 57 | void testlauncher_sleep(const boost::posix_time::time_duration& _period) const;
|
|---|
| 58 |
|
|---|
| 59 | private:
|
|---|
| 60 | QApplication *app;
|
|---|
| 61 |
|
|---|
| 62 | int argc;
|
|---|
| 63 | char **argv;
|
|---|
| 64 |
|
|---|
| 65 | //!> internal flag to tell testlauncher_thread to stop
|
|---|
| 66 | mutable bool testlauncher_Interrupted;
|
|---|
| 67 |
|
|---|
| 68 | //!> internal thread to call Actions
|
|---|
| 69 | boost::thread *testlauncher_thread;
|
|---|
| 70 | };
|
|---|
| 71 |
|
|---|
| 72 | #endif /* QTUIFACTORY_HPP_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.