OpendTect-6_4  6.4
uimain.h
Go to the documentation of this file.
1 #ifndef uimain_h
2 #define uimain_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Lammertink
9  Date: 03/12/1999
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uibasemod.h"
16 #include "uigeom.h"
17 #include "color.h"
18 
19 mFDQtclass(QApplication)
20 mFDQtclass(QWidget)
21 mFDQtclass(QtTabletEventFilter)
22 
23 class uiMainWin;
24 class uiFont;
25 class BufferStringSet;
27 class KeyboardEventFilter;
28 
29 
31 {
32 public:
33  uiMain(int& argc,char** argv);
34 private:
35  uiMain(mQtclass(QApplication*));
36  void init(mQtclass(QApplication*),int& argc,char **argv);
37 
38 public:
39 
40  virtual ~uiMain();
41 
42  virtual int exec();
43  void exit(int retcode=0);
44  void* thread();
45 
46  void getCmdLineArgs(BufferStringSet&) const;
47  void setTopLevel(uiMainWin*);
48  uiMainWin* topLevel() { return mainobj_; }
49  void setFont(const uiFont&,bool passtochildren);
50  const uiFont* font();
51  Color windowColor() const;
52  static void setIcon(const char* icid);
53 
54  int nrScreens() const;
55  uiSize getScreenSize(int screennr,bool availablesz) const;
56  uiSize desktopSize() const;
58 
59  static uiMain& theMain();
60  static void setXpmIconData( const char** xpmdata );
61  static const char** XpmIconData;
62  static void cleanQtOSEnv();
63 
64  static void flushX();
65 
70  static void processEvents(int msec=3000);
71 
72  static KeyboardEventHandler& keyboardEventHandler();
73  static int getDPI();
74 
75  static void useNameToolTip(bool);
76  static bool isNameToolTipUsed();
77  static void formatNameToolTipString(BufferString&);
78 
79 protected:
80 
81  static uiMain* themain_;
82  uiMainWin* mainobj_;
83 
84  static mQtclass(QApplication*) app_;
85  static const uiFont* font_;
86 
87  static mQtclass(QtTabletEventFilter*) tabletfilter_;
88  static KeyboardEventHandler* keyhandler_;
89  static KeyboardEventFilter* keyfilter_;
90 
92  virtual void init( mQtclass(QWidget*) mainwidget ) {}
94  void preInit();
95 };
96 
97 
98 mGlobal(uiBase) bool isMainThread(const void*);
99 mGlobal(uiBase) bool isMainThreadCurrent();
100 
101 #endif
#define mExpClass(module)
Definition: commondefs.h:160
User interface main window.
Definition: uimainwin.h:36
static const char ** XpmIconData
Definition: uimain.h:61
void setIcon(int, const char *icon_identifier)
#define mQtclass(cls)
Definition: commondefs.h:229
#define mGlobal(module)
Definition: commondefs.h:163
bool init()
Definition: uifont.h:39
bool isMainThreadCurrent()
Set of BufferString objects.
Definition: bufstringset.h:28
Definition: uigeom.h:25
mFDQtclass(QApplication) mFDQtclass(QWidget) mFDQtclass(QtTabletEventFilter) class uiMainWin
const uiFont * font() const
Definition: uiparent.h:76
uiMainWin * topLevel()
Definition: uimain.h:48
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Definition: uimain.h:30
bool isMainThread(const void *)
virtual void setFont(const QFont &)
override Qt
Definition: i_uiobjqtbody.h:32
Handles KeyboardEvent.
Definition: keyboardevent.h:47
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
uiMainWin * mainobj_
Definition: uimain.h:82
static uiMain * themain_
Definition: uimain.h:81

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019