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

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