OpendTect-6_4  6.4
uimdiarea.h
Go to the documentation of this file.
1 #ifndef uimdiarea_h
2 #define uimdiarea_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: August 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uibasemod.h"
16 #include "uigroup.h"
17 #include "uiobj.h"
18 
19 class BufferStringSet;
20 class uiMdiArea;
21 class uiMdiAreaBody;
22 
23 mFDQtclass(QMdiArea)
24 mFDQtclass(QMdiSubWindow)
25 
26 
27 mExpClass(uiBase) uiMdiAreaWindow : public uiGroup
28 {
29 public:
30  uiMdiAreaWindow(uiMdiArea&,
32 
33  ~uiMdiAreaWindow() {}
34 
35  void setTitle(const uiString&);
36  const uiString& getTitle() const { return title_; }
37 
38  void setIcon(const char* img[]);
39 
40  void show();
41  void close();
42  void showMinimized();
43  void showMaximized();
44  bool isMinimized() const;
45  bool isMaximized() const;
46 
47  uiMdiArea& getMdiArea() { return mdiarea_; }
48 
49  NotifierAccess& closed();
51 
52 
53  mQtclass(QMdiSubWindow*) qWidget();
54  const mQtclass(QMdiSubWindow*) qWidget() const;
55 
56 
57 private:
58  uiString title_;
59  uiMdiArea& mdiarea_;
60  mQtclass(QMdiSubWindow*) qmdisubwindow_;
61 
62 };
63 
64 
65 mExpClass(uiBase) uiMdiArea : public uiObject
66 {
67 friend class uiMdiAreaBody;
68 friend class i_MdiAreaMessenger;
69 public:
70  uiMdiArea(uiParent*,const char* nm="uiMdiArea");
71  ~uiMdiArea();
72 
73  void tileHorizontal();
74  void tileVertical();
75  void tile();
76  void cascade();
77  void closeAll();
78 
79  void addWindow(uiMdiAreaWindow*);
80  uiMdiAreaWindow* getWindow(const char*);
81  const uiMdiAreaWindow* getWindow(const char*) const;
82 
83  void setActiveWin(const char*);
84  void setActiveWin(uiMdiAreaWindow*);
85  const char* getActiveWin() const;
86  void getWindowNames(uiStringSet&) const;
87 
89 
90 protected:
91 
92  uiMdiAreaBody& mkbody(uiParent*,const char*);
94 
96 
97  void grpClosed(CallBacker*);
98  void grpChanged(CallBacker*);
99 
100 public:
101  // Temporarily prevent some Qt feedback loop to change
102  // active window (solves problems when disabling data
103  // tree or when Scenes-menu overlaps workspace)
104  bool paralyse(bool yn);
105 };
106 
107 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
#define mQtclass(cls)
Definition: commondefs.h:229
friend class uiMdiAreaBody
Definition: i_qmdiarea.h:32
Interface class for Notifier. See comments there.
Definition: callback.h:161
#define private
Definition: winstreambuf.h:13
static const uiString & emptyString()
Definition: uistring.h:109
The base class for most UI elements.
Definition: uiobj.h:38
Definition: uimdiarea.h:65
Definition: uistring.h:89
Definition: uiparent.h:26
Set of BufferString objects.
Definition: bufstringset.h:28
Definition: callback.h:254
uiMdiAreaBody * body_
Definition: uimdiarea.h:93
Helper class for uiMdiArea to relay Qt's messages.
Definition: i_qmdiarea.h:29
ObjectSet< uiMdiAreaWindow > grps_
Definition: uimdiarea.h:95
#define mFDQtclass(cls)
Definition: commondefs.h:228
uiParent const uiString & title
pops a selector box to select a new font
Definition: uifont.h:27
Definition: uistring.h:218
Notifier< uiMdiArea > windowActivated
Definition: uimdiarea.h:88

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