source: src/UIElements/Qt4/QtUIFactory.hpp@ c41ce0

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
RevLine 
[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]23class QApplication;
24
[4cf323d]25class QtUIFactory : public UIFactory
[ea94a8]26{
27 friend class UIFactory;
28
29public:
[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);
[c41ce0]48 static bool isGuiMode(const char *_argument);
[3054689]49
[ea94a8]50protected:
[15e197]51 QtUIFactory(int _argc, char **_argv);
52
53private:
54
[08d042]55 void testrun(const std::vector<std::string> _scripts, const bool _singleLineStepping = false) const;
[15e197]56
57 void testlauncher_sleep(const boost::posix_time::time_duration& _period) const;
[8f67e2]58
59private:
[15e197]60 QApplication *app;
61
[6a661c]62 int argc;
63 char **argv;
[15e197]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;
[ea94a8]70};
71
72#endif /* QTUIFACTORY_HPP_ */
Note: See TracBrowser for help on using the repository browser.