OpendTect-6_4
6.4
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
od6.4.5
include
uiBase
uimsg.h
Go to the documentation of this file.
1
#ifndef uimsg_H
2
#define uimsg_H
3
4
/*+
5
________________________________________________________________________
6
7
(C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8
Author: A.H. Bril
9
Date: 26/04/2000
10
RCS: $Id$
11
________________________________________________________________________
12
13
-*/
14
15
#include "uibasemod.h"
16
#include "
gendefs.h
"
17
#include "
uistring.h
"
18
class
MouseCursorChanger
;
19
class
uiMainWin
;
20
class
uiStatusBar
;
21
mFDQtclass
(QWidget)
22
class
BufferStringSet
;
23
class
FileMultiString
;
24
class
uiParent
;
25
26
27
mExpClass
(uiBase)
uiMsg
28
{
mODTextTranslationClass
(uiMsg)
29
30
friend
class
uiMain
;
31
mGlobal
(uiBase)
friend
uiMsg&
uiMSG
();
32
33
public
:
34
35
// Messages
36
void
message
(
const
uiString
&,
37
const
uiString
& part2=
uiString::emptyString
(),
38
const
uiString
& part3=
uiString::emptyString
());
39
bool
message
(
const
uiString
&,
40
const
uiString
& part2,
41
const
uiString
& part3,
42
bool
withdontshowatain );
46
void
warning(
const
uiString
&,
47
const
uiString
& part2=
uiString::emptyString
(),
48
const
uiString
& part3=
uiString::emptyString
());
49
bool
warning(
const
uiString
&,
50
const
uiString
& part2,
51
const
uiString
& part3,
52
bool
withdontshowatain );
56
void
error(
const
uiString
&,
57
const
uiString
& part2=
uiString::emptyString
(),
58
const
uiString
& part3=
uiString::emptyString
());
59
bool
error(
const
uiString
&,
60
const
uiString
& part2,
61
const
uiString
& part3,
62
bool
withdontshowatain );
66
void
errorWithDetails(
const
FileMultiString&);
70
void
errorWithDetails(
const
uiStringSet
&,
71
const
uiString
& firstmsg);
72
void
errorWithDetails(
const
uiStringSet
&);
73
void
errorWithDetails(
const
BufferStringSet&);
74
75
// Interaction
76
int
question(
const
uiString
&,
77
const
uiString
& textyes,
78
const
uiString
& textno,
79
const
uiString
& textcncl,
80
const
uiString
& caption,
81
bool
* dontaskagain);
85
int
question(
const
uiString
&,
86
const
uiString
& textyes=
uiString::emptyString
(),
87
const
uiString
& textno=
uiString::emptyString
(),
88
const
uiString
& textcncl=
uiString::emptyString
(),
89
const
uiString
& caption=
uiString::emptyString
());
90
int
askSave(
const
uiString
&,
bool
cancelbut=
true
);
92
int
askRemove(
const
uiString
&,
bool
cancelbut=
false
);
94
int
askContinue(
const
uiString
&);
96
int
askOverwrite(
const
uiString
&);
98
int
ask2D3D(
const
uiString
&,
bool
cancelbut=
false
);
100
101
bool
askGoOn(
const
uiString
&,
bool
withyesno=
true
);
103
bool
askGoOn(
const
uiString
& msg,
const
uiString
& textyes,
104
const
uiString
& textno);
105
int
askGoOnAfter(
const
uiString
&,
106
const
uiString
& cnclmsg=
uiString::emptyString
(),
107
const
uiString
& textyes=
uiString::emptyString
(),
108
const
uiString
& textno=
uiString::emptyString
());
109
bool
askGoOn(
const
uiString
&,
bool
withyesno,
110
bool
* dontaskagain);
115
bool
askGoOn(
const
uiString
& msg,
const
uiString
& textyes,
116
const
uiString
& textno,
117
bool
* dontaskagain);
121
int
askGoOnAfter(
const
uiString
&,
122
const
uiString
& cnclmsg,
123
const
uiString
& textyes,
124
const
uiString
& textno,
125
bool
* dontaskagain);
130
bool
showMsgNextTime(
const
uiString
&,
131
const
uiString
& msg=
uiString::emptyString
());
134
135
static
void
setNextCaption(
const
uiString
&);
138
139
uiMainWin
* setMainWin(
uiMainWin
*);
140
141
bool
toStatusbar(
uiString
,
int
fld=0,
int
msec=-1);
143
uiStatusBar
* statusBar();
144
145
void
about(
const
uiString
&);
146
void
aboutOpendTect(
const
uiString
&);
147
148
enum
Icon
{
NoIcon
, Information,
Warning
, Critical, Question };
149
int
showMessageBox(
Icon
icon,QWidget* parent,
150
const
uiString
& txt,
const
uiString
& yestxtinp,
151
const
uiString
& notxtinp,
const
uiString
& cncltxtinp,
152
const
uiString
&
title
=
uiString::emptyString
());
153
int
showMessageBox(
Icon
icon,QWidget* parent,
154
const
uiString
& txt,
const
uiString
& yestxtinp,
155
const
uiString
& notxtinp,
const
uiString
& cncltxtinp,
156
const
uiString
&
title
,
157
bool
* notagain);
158
159
static
uiString
sDontShowAgain();
160
161
protected
:
162
163
uiMsg();
164
165
mQtclass
(QWidget*) popParnt();
166
167
static
uiMsg*
theinst_
;
168
169
private
:
170
171
int
beginCmdRecEvent(
const
char
* wintitle );
172
void
endCmdRecEvent(
int
refnr,
int
retval,
const
char
* buttxt0,
173
const
char
* buttxt1=0,
const
char
* buttxt2=0);
174
175
uiMainWin
*
uimainwin_
;
176
};
177
178
mGlobal
(uiBase)
uiMsg
&
uiMSG
();
179
180
182
mExpClass
(uiBase)
uiMsgMainWinSetter
183
{
184
public
:
185
uiMsgMainWinSetter
(
uiMainWin
* np )
186
: isset_( np )
187
, oldparent_( 0 )
188
{
189
if
( np ) oldparent_ =
::uiMSG
().
setMainWin
( np );
190
}
191
192
~uiMsgMainWinSetter
()
193
{
if
( isset_ )
::uiMSG
().
setMainWin
( oldparent_ ); }
194
protected
:
195
uiMainWin
*
oldparent_
;
196
bool
isset_
;
197
};
198
199
200
210
mExpClass
(uiBase)
uiUserShowWait
211
{
212
public
:
213
214
uiUserShowWait(
uiParent
*,
const
uiString
&,
int
sbfld=0);
215
~uiUserShowWait
() { readyNow(); }
216
217
void
setMessage(
const
uiString
&);
218
void
readyNow();
219
220
protected
:
221
222
uiStatusBar
*
sb_
;
223
MouseCursorChanger
*
mcc_
;
224
const
int
fldidx_
;
225
226
};
227
228
229
230
#endif
uiMsgMainWinSetter
Sets the uiMSG's main window temporary during the scope of the object.
Definition:
uimsg.h:182
mExpClass
#define mExpClass(module)
Definition:
commondefs.h:160
OD::NoIcon
Definition:
oduicommon.h:63
uiMainWin
User interface main window.
Definition:
uimainwin.h:36
uiMsgMainWinSetter::oldparent_
uiMainWin * oldparent_
Definition:
uimsg.h:195
mQtclass
#define mQtclass(cls)
Definition:
commondefs.h:229
uistring.h
mODTextTranslationClass
#define mODTextTranslationClass(clss)
Definition:
uistring.h:38
mGlobal
#define mGlobal(module)
Definition:
commondefs.h:163
uiUserShowWait::sb_
uiStatusBar * sb_
Definition:
uimsg.h:222
uiMsg
Definition:
uimsg.h:27
uiMsg::uimainwin_
uiMainWin * uimainwin_
Definition:
uimsg.h:175
uiUserShowWait::~uiUserShowWait
~uiUserShowWait()
Definition:
uimsg.h:215
uiMsg::Warning
Definition:
uimsg.h:148
uiMsg::setMainWin
uiMainWin * setMainWin(uiMainWin *)
return old
uiString::emptyString
static const uiString & emptyString()
Definition:
uistring.h:109
uiString
Definition:
uistring.h:89
uiMsg::Icon
Icon
Definition:
uimsg.h:148
uiParent
Definition:
uiparent.h:26
BufferStringSet
Set of BufferString objects.
Definition:
bufstringset.h:28
uiMsgMainWinSetter::uiMsgMainWinSetter
uiMsgMainWinSetter(uiMainWin *np)
Definition:
uimsg.h:185
uiMsgMainWinSetter::isset_
bool isset_
Definition:
uimsg.h:196
uiStatusBar
Definition:
uistatusbar.h:26
FileMultiString
SeparString with backquotes as separators, use in most ascii files.
Definition:
separstr.h:119
DBG::message
void message(const char *)
default: to stderr
gendefs.h
uiMSG
uiMsg & uiMSG()
uiMsgMainWinSetter::~uiMsgMainWinSetter
~uiMsgMainWinSetter()
Definition:
uimsg.h:192
uiUserShowWait
tells user something is happening.
Definition:
uimsg.h:210
uiUserShowWait::mcc_
MouseCursorChanger * mcc_
Definition:
uimsg.h:223
title
uiParent const uiString & title
pops a selector box to select a new font
Definition:
uifont.h:27
uiMain
Definition:
uimain.h:30
uiMsg::theinst_
static uiMsg * theinst_
Definition:
uimsg.h:167
mFDQtclass
mFDQtclass(QWidget) class BufferStringSet
Definition:
uibody.h:18
MouseCursorChanger
Class to automatically change cursor, and change it back automatically when class is running out of s...
Definition:
mousecursor.h:141
uiStringSet
Definition:
uistring.h:218
uiUserShowWait::fldidx_
const int fldidx_
Definition:
uimsg.h:224
Generated at for the
OpendTect
seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019