OpendTect  6.6
menubutcommands.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: Jaap Glas
8  Date: February 2009
9  RCS: $Id$
10  ________________________________________________________________________
11 
12 -*/
13 
14 #include "uicmddrivermod.h"
15 #include "command.h"
16 #include "cmdcomposer.h"
17 
18 #include "uibutton.h"
19 #include "uimdiarea.h"
20 #include "uimenu.h"
21 #include "uitabbar.h"
22 
23 
24 namespace CmdDrive
25 {
26 
27 mStartDeclCmdClass( uiCmdDriver, Menu, UiObjectCmd )
28  bool isLocalEnvCommand() const { return false; }
30 
31 mExpClass(uiCmdDriver) MenuActivator : public Activator
32 {
33 public:
34  MenuActivator(const uiAction&);
35  void actCB(CallBacker*);
36 
37 protected:
38  uiAction& actmnuitm_;
39 };
40 
41 
42 mStartDeclCmdClass( uiCmdDriver, Button, UiObjectCmd )
43  bool isOpenQDlgCommand() const { return true; }
44 
45 protected:
46  bool actQDlgButton(const char* parstr);
48 
49 mExpClass(uiCmdDriver) ButtonActivator : public Activator
50 {
51 public:
52  ButtonActivator(const uiButton&);
53  void actCB(CallBacker*);
54 
55 protected:
56  uiButton& actbut_;
57 };
58 
59 
60 mStartDeclCmdClass( uiCmdDriver, Close, Command )
61 protected:
62  bool actCloseCurWin(const char* parstr);
64 
66 {
67 public:
68  MdiAreaCloseActivator(const uiMdiArea&,const char* winname);
69  void actCB(CallBacker*);
70 
71 protected:
72  uiMdiAreaWindow* actwindow_;
73 };
74 
75 
76 mStartDeclCmdClass( uiCmdDriver, Show, Command )
77  bool isOpenQDlgCommand() const { return false; }
78 
79 protected:
80  bool actShowCurWin(const char* parstr);
82 
83 mExpClass(uiCmdDriver) ShowActivator : public Activator
84 {
85 public:
86  ShowActivator(const uiMainWin&,int minnormax);
87  void actCB(CallBacker*);
88 
89 protected:
92 };
93 
94 
96 {
97 public:
98  MdiAreaShowActivator(const uiMdiArea&,const char* winname,
99  int minnormax);
101 
102 protected:
103  uiMdiAreaWindow* actwindow_;
105 };
106 
107 
109 
110 mExpClass(uiCmdDriver) TabActivator : public Activator
111 {
112 public:
113  TabActivator(const uiTabBar&,int tabidx);
115 
116 protected:
119 };
120 
121 
126 
127 
128 
129 mStartDeclCmdClass( uiCmdDriver, NrMenuItems, UiObjQuestionCmd )
130  bool isLocalEnvCommand() const { return false; }
132 
133 mStartDeclCmdClass( uiCmdDriver, IsMenuItemOn, UiObjQuestionCmd )
134  bool isLocalEnvCommand() const { return false; }
136 
137 mStartDeclCmdClass( uiCmdDriver, GetMenuItem, UiObjQuestionCmd )
138  bool isLocalEnvCommand() const { return false; }
140 
141 mStartDeclCmdClass( uiCmdDriver, IsButtonOn, UiObjQuestionCmd )
142  bool isOpenQDlgCommand() const { return true; }
143 protected:
144  bool actQDlgButton(const char* parstr);
146 
147 mStartDeclCmdClass( uiCmdDriver, GetButton, UiObjQuestionCmd )
148  bool isOpenQDlgCommand() const { return true; }
149 protected:
150  bool actQDlgButton(const char* parstr);
152 
153 mStartDeclCmdClass( uiCmdDriver, NrButtonMenuItems, UiObjQuestionCmd )
155 mStartDeclCmdClass( uiCmdDriver, IsButtonMenuItemOn, UiObjQuestionCmd )
157 mStartDeclCmdClass( uiCmdDriver, GetButtonMenuItem, UiObjQuestionCmd )
159 
164 
165 
166 mStartDeclCmdClass( uiCmdDriver, IsShown, UiObjQuestionCmd )
167  bool isLocalEnvCommand() const { return false; }
168 protected:
169  bool actIsCurWinShown(const char* parstr);
171 
172 
173 mStartDeclComposerClass( uiCmdDriver, Menu, CmdComposer, uiAction )
175 mStartDeclComposerClass( uiCmdDriver, Button, CmdComposer, uiButton )
183 
184 mStartDeclComposerClass( uiCmdDriver, QMsgBoxBut, CmdComposer, uiMainWin )
186 
187 
188 }; // namespace CmdDrive
189 
OD::Ok
@ Ok
Definition: oduicommon.h:87
OD::Cancel
@ Cancel
Definition: oduicommon.h:82
CmdDrive::MenuActivator::MenuActivator
MenuActivator(const uiAction &)
CmdDrive::ButtonActivator::ButtonActivator
ButtonActivator(const uiButton &)
cmdcomposer.h
uiMainWin
User interface main window.
Definition: uimainwin.h:35
CmdDrive::TabActivator::TabActivator
TabActivator(const uiTabBar &, int tabidx)
CmdDrive::ShowActivator::actminnormax_
int actminnormax_
Definition: menubutcommands.h:91
CmdDrive::MdiAreaCloseActivator::actwindow_
uiMdiAreaWindow * actwindow_
Definition: menubutcommands.h:72
CmdDrive::MdiAreaCloseActivator::MdiAreaCloseActivator
MdiAreaCloseActivator(const uiMdiArea &, const char *winname)
CmdDrive::UiObjectCmd
Definition: command.h:155
mEndDeclCmdClass
#define mEndDeclCmdClass
Definition: command.h:151
CmdDrive::OkCancelCmd
Definition: menubutcommands.h:123
CmdDrive::ButtonActivator
Definition: menubutcommands.h:50
CmdDrive::MenuActivator
Definition: menubutcommands.h:32
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
CmdDrive::CloseCmd::actCloseCurWin
bool actCloseCurWin(const char *parstr)
CmdDrive::MdiAreaShowActivator::actCB
void actCB(CallBacker *)
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
CmdDrive::MdiAreaShowActivator::actwindow_
uiMdiAreaWindow * actwindow_
Definition: menubutcommands.h:103
uimdiarea.h
CmdDrive::mStartDeclCmdClass
mStartDeclCmdClass(CmdDriver, Wheel, UiObjectCmd) mEndDeclCmdClass class WheelActivator mStartDeclCmdClass(CmdDriver, GetWheel, UiObjQuestionCmd) mEndDeclCmdClass mStartDeclComposerClassWithInit(CmdDriver
CmdDrive::GetButtonCmd::actQDlgButton
bool actQDlgButton(const char *parstr)
uibutton.h
CmdDrive::ButtonActivator::actbut_
uiButton & actbut_
Definition: menubutcommands.h:56
command.h
CmdDrive::CmdComposer
Definition: cmdcomposer.h:52
uitabbar.h
uiMdiArea
Definition: uimdiarea.h:68
CmdDrive::MenuActivator::actCB
void actCB(CallBacker *)
CmdDrive::MdiAreaCloseActivator::actCB
void actCB(CallBacker *)
mEndDeclComposerClass
#define mEndDeclComposerClass
Definition: cmdcomposer.h:148
CmdDrive::MdiAreaShowActivator::actminnormax_
int actminnormax_
Definition: menubutcommands.h:104
CmdDrive::IsShownCmd::actIsCurWinShown
bool actIsCurWinShown(const char *parstr)
mStartDeclCmdClassNoEntry
#define mStartDeclCmdClassNoEntry(mod, cmdkey, parentclass)
Definition: command.h:143
uimenu.h
CmdDrive::ShowCmd::actShowCurWin
bool actShowCurWin(const char *parstr)
CmdDrive::TabActivator::acttabbar_
uiTabBar & acttabbar_
Definition: menubutcommands.h:117
CmdDrive::MdiAreaCloseActivator
Definition: menubutcommands.h:66
CmdDrive::ShowActivator::actCB
void actCB(CallBacker *)
uiTabBar
TabBar widget only. Normally you'd want to use the uiTabStack class.
Definition: uitabbar.h:25
CmdDrive::ShowActivator::actmainwin_
uiMainWin & actmainwin_
Definition: menubutcommands.h:90
CmdDrive::IsButtonOnCmd::actQDlgButton
bool actQDlgButton(const char *parstr)
mStartDeclComposerClass
#define mStartDeclComposerClass(mod, cmdkey, parentclass, callerclass)
Definition: cmdcomposer.h:130
CmdDrive
Command Drive
Definition: canvascommands.h:22
CmdDrive::MdiAreaShowActivator::MdiAreaShowActivator
MdiAreaShowActivator(const uiMdiArea &, const char *winname, int minnormax)
CmdDrive::MdiAreaShowActivator
Definition: menubutcommands.h:96
CmdDrive::TabActivator::actCB
void actCB(CallBacker *)
CmdDrive::Command
Definition: command.h:35
CmdDrive::UiObjQuestionCmd
Definition: command.h:161
CmdDrive::TabActivator
Definition: menubutcommands.h:111
CmdDrive::ButtonActivator::actCB
void actCB(CallBacker *)
CmdDrive::ButtonCmd::actQDlgButton
bool actQDlgButton(const char *parstr)
CmdDrive::TabActivator::acttabidx_
int acttabidx_
Definition: menubutcommands.h:118
mStartDeclCmdClassNoAct
#define mStartDeclCmdClassNoAct(mod, cmdkey, parentclass)
Definition: command.h:133
CmdDrive::ShowActivator
Definition: menubutcommands.h:84
CmdDrive::MenuActivator::actmnuitm_
uiAction & actmnuitm_
Definition: menubutcommands.h:38
CmdDrive::Activator
Definition: command.h:186
CmdDrive::ShowActivator::ShowActivator
ShowActivator(const uiMainWin &, int minnormax)

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