OpendTect  6.6
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
uiMainWin Class Reference

User interface main window. More...

Inheritance diagram for uiMainWin:
[legend]

Classes

class  Setup
 

Public Types

enum  ActModalTyp {
  None =0 , Main , Message , File ,
  Colour , Font , Unknown
}
 
enum  Dock {
  Top , Bottom , Right , Left ,
  Minimized , TornOff , Unmanaged
}
 Dock Selector. More...
 
enum  PopupArea {
  TopLeft , TopRight , BottomLeft , BottomRight ,
  Middle , Auto
}
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Public Member Functions

 uiMainWin (uiParent *, const uiMainWin::Setup &)
 
 uiMainWin (uiParent *, const uiString &caption=uiString::emptyString(), int nrstatusflds=1, bool withmenubar=true, bool modal=false)
 
virtual ~uiMainWin ()
 
void activate ()
 
void activateInGUIThread (const CallBack &, bool busywait=true)
 
void addDockWindow (uiDockWin &, Dock)
 
void addToolBar (uiToolBar *)
 
void addToolBarBreak ()
 
const uiStringcaption (bool unique=false) const
 
void close ()
 
void copyToClipBoard ()
 
const ObjectSet< uiDockWin > & dockWins () const
 
bool finalised () const
 
uiToolBarfindToolBar (const char *)
 
void forceClose ()
 
uiRect geometry (bool frame=true) const
 Position of top-left corner in screen pixel coords. More...
 
PopupArea getPopupArea () const
 
const char * getScriptToRun () const
 
uiMenugetToolbarsMenu () const
 
bool grab (const char *filenm, int zoom=1, const char *format=0, int quality=-1) const
 
bool isHidden () const
 
bool isMaximized () const
 
bool isMinimized () const
 
bool isModal () const
 
virtual uiMainWinmainwin ()
 
uiMenuBarmenuBar ()
 
uiParentparent ()
 
const uiParentparent () const
 
bool poppedUp () const
 
QWidget * qWidget () const
 
void raise ()
 
virtual void reDraw (bool deep)
 
void removeDockWindow (uiDockWin *)
 
uiToolBarremoveToolBar (uiToolBar *)
 
void runScript (const char *filename)
 
void saveAsPDF (const char *fnm, int w, int h, int res)
 
mDeprecatedObs void saveAsPS (const char *fnm, int w, int h, int res)
 
void saveImage (const char *fnm, int w, int h, int res)
 
void setActivateOnFirstShow (bool yn=true)
 
void setCaption (const char *str)
 
void setCaption (const uiString &)
 
void setCornerPos (int x, int y)
 
void setDeleteOnClose (bool yn)
 
void setExitAppOnClose (bool yn)
 automatically set by uiMain::setTopLevel More...
 
void setIcon (const uiPixmap &)
 Default icon is set in uiMain. More...
 
void setIconText (const uiString &)
 
void setPopupArea (PopupArea pa)
 
void setSensitive (bool yn)
 
void setShrinkAllowed (bool yn)
 
virtual void show ()
 
bool showAlwaysOnTop (bool yn=true)
 
void showAndActivate ()
 
void showMaximized ()
 
void showMinimized ()
 
bool showMinMaxButtons (bool yn=true)
 
void showNormal ()
 
bool shrinkAllowed ()
 
uiStatusBarstatusBar ()
 
const ObjectSet< uiToolBar > & toolBars () const
 
uiGrouptopGroup ()
 
void toStatusBar (const uiString &, int fldidx=0, int msecs=-1)
 
bool touch ()
 resets pop-up timer if !poppedUp yet More...
 
void translateText ()
 
- Public Member Functions inherited from uiParent
uiSize actualsize (bool inclborder=true) const
 
uiSize actualSize (bool include_border) const
 
void addChild (uiBaseObject &)
 
void attach (constraintType t, int margin=-1)
 
void attach (constraintType t, uiObject *oth, int margin=-1, bool reciprocal=true)
 
void attach (constraintType t, uiParent *oth, int margin=-1, bool reciprocal=true)
 
void attachChild (constraintType tp, uiObject *child, uiObject *other, int margin, bool reciprocal)
 
Color backgroundColor () const
 
const ObjectSet< uiBaseObject > * childList () const
 
void deepRedraw (CallBacker *=0)
 
virtual void display (bool yn, bool shrk=false, bool maximize=false)
 
const uiFontfont () const
 
bool hasFocus () const
 
bool isDisplayed () const
 
uiObjectmainObject ()
 
const uiObjectmainObject () const
 
void manageChld (uiBaseObject &, uiObjectBody &)
 
uiParentBodypbody ()
 
const uiParentBodypbody () const
 
int prefHNrPics () const
 
int prefVNrPics () const
 
Color roBackgroundColor () const
 
bool sensitive () const
 
void setBackgroundColor (const Color &c)
 
void setCaption (const uiString &c)
 
void setCursor (const MouseCursor &c)
 
void setFocus ()
 
void setFont (const uiFont &f)
 
void setPrefHeight (int h)
 
void setPrefHeightInChar (float h)
 
void setPrefHeightInChar (int h)
 
void setPrefWidth (int w)
 
void setPrefWidthInChar (float w)
 
void setPrefWidthInChar (int w)
 
void setSensitive (bool yn=true)
 
void setStretch (int h, int v)
 
void shallowRedraw (CallBacker *=0)
 
int stretch (bool h) const
 
void translateText ()
 
- Public Member Functions inherited from uiBaseObject
 uiBaseObject (const char *nm, uiBody *=0)
 
virtual ~uiBaseObject ()
 
int beginCmdRecEvent (const char *msg=0)
 
int beginCmdRecEvent (od_uint64 id, const char *msg=0)
 
uiBodybody ()
 
const uiBodybody () const
 
void clear ()
 
void endCmdRecEvent (int refnr, const char *msg=0)
 
void endCmdRecEvent (od_uint64 id, int refnr, const char *msg=0)
 
void finalise ()
 
bool finalised () const
 
virtual QWidget * getWidget ()
 
const QWidget * getWidget () const
 
virtual Notifier< uiBaseObject > & postFinalise ()
 
virtual Notifier< uiBaseObject > & preFinalise ()
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
virtual const name_typename () const
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Static Public Member Functions

static const char * activeModalQDlgButTxt (int butnr)
 
static int activeModalQDlgRetVal (int butnr)
 
static const char * activeModalQDlgTitle ()
 
static ActModalTyp activeModalType ()
 
static uiMainWinactiveModalWindow ()
 
static uiMainWinactiveWindow ()
 
static void closeActiveModalQDlg (int retval)
 
static OD::WindowActivationBehavior getActivateBehaviour ()
 
static void getModalSignatures (BufferStringSet &)
 
static void getTopLevelWindows (ObjectSet< uiMainWin > &, bool visibleonly=true)
 
static bool grabScreen (const char *filenm, const char *format=0, int quality=-1, int screen=0)
 
static uiMainWingtUiWinIfIsBdy (QWidget *mwimpl)
 get uiMainWin for mwimpl if it is a uiMainWinBody More...
 
static void programActiveWindow (uiMainWin *)
 
static uiMainWinprogrammedActiveWindow ()
 
static void setActivateBehaviour (OD::WindowActivationBehavior)
 
static uiString uniqueWinTitle (const uiString &, QWidget *forwindow=0, BufferString *addendum=0)
 
- Static Public Member Functions inherited from uiBaseObject
static void addCmdRecorder (const CallBack &)
 
static void removeCmdRecorder (const CallBack &)
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Public Attributes

Notifier< uiMainWinactivatedone
 
Notifier< uiMainWinafterPopup
 
Notifier< uiMainWinctrlCPressed
 
Notifier< uiMainWinrunScriptRequest
 
Notifier< uiMainWinwindowClosed
 triggered when window exits More...
 
Notifier< uiMainWinwindowHidden
 
Notifier< uiMainWinwindowShown
 

Protected Member Functions

 uiMainWin (uiString, uiParent *)
 
void aftPopupCB (CallBacker *)
 
virtual bool closeOK ()
 confirm window close More...
 
void copyToClipBoardCB (CallBacker *)
 
void languageChangeCB (CallBacker *)
 
uiObjectmainobject ()
 
void readSettings ()
 
void saveAsPDF_PS (const char *fnm, int w, int h, int res)
 
void saveSettings ()
 
void setForceFinalise (bool)
 
void updateCaption ()
 
- Protected Member Functions inherited from uiParent
 uiParent (const char *nm, uiParentBody *)
 
virtual void attach_ (constraintType t, uiObject *oth, int margin=-1, bool reciprocal=true)
 
- Protected Member Functions inherited from uiBaseObject
void setBody (uiBody *b)
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Protected Attributes

Timerafterpopuptimer_
 
uiMainWinBodybody_
 
uiString caption_
 
int languagechangecount_
 
uiParentparent_
 
PopupArea popuparea_
 
BufferString scripttorun_
 
uiString uniquecaption_
 
- Protected Attributes inherited from uiBaseObject
Notifier< uiBaseObjectfinaliseDone
 triggered when finalising finished More...
 
Notifier< uiBaseObjectfinaliseStart
 triggered when about to start finalising More...
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Private Member Functions

bool doSetWindowFlags (od_uint32 qtwinflag, bool set)
 

Friends

class uiMainWinBody
 

Detailed Description

User interface main window.

<>

Member Enumeration Documentation

◆ ActModalTyp

Enumerator
None 
Main 
Message 
File 
Colour 
Font 
Unknown 

◆ Dock

Dock Selector.

Enumerator
Top 

above the central uiGroup, below the menubar.

Bottom 

below the central uiGroup, above the status bar.

Right 

to the right of the central uiGroup.

Left 

to the left of the central uiGroup.

Minimized 

the toolbar is not shown - all handles of minimized toolbars are drawn in one row below the menu bar.

TornOff 

the dock window floats as its own top level window which always stays on top of the main window.

Unmanaged 

not managed by a uiMainWin

◆ PopupArea

Enumerator
TopLeft 
TopRight 
BottomLeft 
BottomRight 
Middle 
Auto 

Constructor & Destructor Documentation

◆ uiMainWin() [1/3]

uiMainWin::uiMainWin ( uiParent ,
const uiMainWin::Setup  
)

◆ uiMainWin() [2/3]

uiMainWin::uiMainWin ( uiParent ,
const uiString caption = uiString::emptyString(),
int  nrstatusflds = 1,
bool  withmenubar = true,
bool  modal = false 
)

◆ ~uiMainWin()

virtual uiMainWin::~uiMainWin ( )
virtual

◆ uiMainWin() [3/3]

uiMainWin::uiMainWin ( uiString  ,
uiParent  
)
protected

Member Function Documentation

◆ activate()

void uiMainWin::activate ( )

◆ activateInGUIThread()

void uiMainWin::activateInGUIThread ( const CallBack ,
bool  busywait = true 
)

◆ activeModalQDlgButTxt()

static const char* uiMainWin::activeModalQDlgButTxt ( int  butnr)
static

◆ activeModalQDlgRetVal()

static int uiMainWin::activeModalQDlgRetVal ( int  butnr)
static

◆ activeModalQDlgTitle()

static const char* uiMainWin::activeModalQDlgTitle ( )
static

◆ activeModalType()

static ActModalTyp uiMainWin::activeModalType ( )
static

◆ activeModalWindow()

static uiMainWin* uiMainWin::activeModalWindow ( )
static

◆ activeWindow()

static uiMainWin* uiMainWin::activeWindow ( )
static

◆ addDockWindow()

void uiMainWin::addDockWindow ( uiDockWin ,
Dock   
)

◆ addToolBar()

void uiMainWin::addToolBar ( uiToolBar )

◆ addToolBarBreak()

void uiMainWin::addToolBarBreak ( )

◆ aftPopupCB()

void uiMainWin::aftPopupCB ( CallBacker )
protected

◆ caption()

const uiString& uiMainWin::caption ( bool  unique = false) const

◆ close()

void uiMainWin::close ( )

◆ closeActiveModalQDlg()

static void uiMainWin::closeActiveModalQDlg ( int  retval)
static

◆ closeOK()

virtual bool uiMainWin::closeOK ( )
inlineprotectedvirtual

confirm window close

Reimplemented in uiStratLayerModel, uiWellLogToolWin, uiColorBarDialog, uiStratTreeWin, and uiODMain.

◆ copyToClipBoard()

void uiMainWin::copyToClipBoard ( )

◆ copyToClipBoardCB()

void uiMainWin::copyToClipBoardCB ( CallBacker )
protected

◆ dockWins()

const ObjectSet<uiDockWin>& uiMainWin::dockWins ( ) const

◆ doSetWindowFlags()

bool uiMainWin::doSetWindowFlags ( od_uint32  qtwinflag,
bool  set 
)
private

◆ finalised()

bool uiMainWin::finalised ( ) const

◆ findToolBar()

uiToolBar* uiMainWin::findToolBar ( const char *  )

◆ forceClose()

void uiMainWin::forceClose ( )

◆ geometry()

uiRect uiMainWin::geometry ( bool  frame = true) const

Position of top-left corner in screen pixel coords.

◆ getActivateBehaviour()

static OD::WindowActivationBehavior uiMainWin::getActivateBehaviour ( )
static

◆ getModalSignatures()

static void uiMainWin::getModalSignatures ( BufferStringSet )
static

◆ getPopupArea()

PopupArea uiMainWin::getPopupArea ( ) const
inline

◆ getScriptToRun()

const char* uiMainWin::getScriptToRun ( ) const

◆ getToolbarsMenu()

uiMenu& uiMainWin::getToolbarsMenu ( ) const

◆ getTopLevelWindows()

static void uiMainWin::getTopLevelWindows ( ObjectSet< uiMainWin > &  ,
bool  visibleonly = true 
)
static

◆ grab()

bool uiMainWin::grab ( const char *  filenm,
int  zoom = 1,
const char *  format = 0,
int  quality = -1 
) const

zoom=0: grab desktop, zoom=1: grab this window, zoom=2: grab active modal window/qdialog, format = .bpm|.jpg|.jpeg|.png|.ppm|.xbm|.xpm format=0: use filenm suffix quality = 0...100: small compressed to large uncompressed file, quality=-1: use default

◆ grabScreen()

static bool uiMainWin::grabScreen ( const char *  filenm,
const char *  format = 0,
int  quality = -1,
int  screen = 0 
)
static

◆ gtUiWinIfIsBdy()

static uiMainWin* uiMainWin::gtUiWinIfIsBdy ( QWidget *  mwimpl)
static

get uiMainWin for mwimpl if it is a uiMainWinBody

◆ isHidden()

bool uiMainWin::isHidden ( ) const

◆ isMaximized()

bool uiMainWin::isMaximized ( ) const

◆ isMinimized()

bool uiMainWin::isMinimized ( ) const

◆ isModal()

bool uiMainWin::isModal ( ) const

◆ languageChangeCB()

void uiMainWin::languageChangeCB ( CallBacker )
protected

◆ mainobject()

uiObject* uiMainWin::mainobject ( )
protectedvirtual

Reimplemented from uiParent.

◆ mainwin()

virtual uiMainWin* uiMainWin::mainwin ( )
inlinevirtual

Reimplemented from uiParent.

◆ menuBar()

uiMenuBar* uiMainWin::menuBar ( )

◆ parent() [1/2]

uiParent* uiMainWin::parent ( )
inline

◆ parent() [2/2]

const uiParent* uiMainWin::parent ( ) const
inline

◆ poppedUp()

bool uiMainWin::poppedUp ( ) const

◆ programActiveWindow()

static void uiMainWin::programActiveWindow ( uiMainWin )
static

◆ programmedActiveWindow()

static uiMainWin* uiMainWin::programmedActiveWindow ( )
static

◆ qWidget()

QWidget* uiMainWin::qWidget ( ) const

◆ raise()

void uiMainWin::raise ( )

◆ readSettings()

void uiMainWin::readSettings ( )
protected

◆ reDraw()

virtual void uiMainWin::reDraw ( bool  deep)
virtual

Reimplemented from uiParent.

Reimplemented in uiColorTableMan.

◆ removeDockWindow()

void uiMainWin::removeDockWindow ( uiDockWin )

◆ removeToolBar()

uiToolBar* uiMainWin::removeToolBar ( uiToolBar )

◆ runScript()

void uiMainWin::runScript ( const char *  filename)

◆ saveAsPDF()

void uiMainWin::saveAsPDF ( const char *  fnm,
int  w,
int  h,
int  res 
)

◆ saveAsPDF_PS()

void uiMainWin::saveAsPDF_PS ( const char *  fnm,
int  w,
int  h,
int  res 
)
protected

◆ saveAsPS()

mDeprecatedObs void uiMainWin::saveAsPS ( const char *  fnm,
int  w,
int  h,
int  res 
)
inline

◆ saveImage()

void uiMainWin::saveImage ( const char *  fnm,
int  w,
int  h,
int  res 
)

◆ saveSettings()

void uiMainWin::saveSettings ( )
protected

◆ setActivateBehaviour()

static void uiMainWin::setActivateBehaviour ( OD::WindowActivationBehavior  )
static

◆ setActivateOnFirstShow()

void uiMainWin::setActivateOnFirstShow ( bool  yn = true)

◆ setCaption() [1/2]

void uiMainWin::setCaption ( const char *  str)
inline

◆ setCaption() [2/2]

void uiMainWin::setCaption ( const uiString )

◆ setCornerPos()

void uiMainWin::setCornerPos ( int  x,
int  y 
)

◆ setDeleteOnClose()

void uiMainWin::setDeleteOnClose ( bool  yn)

◆ setExitAppOnClose()

void uiMainWin::setExitAppOnClose ( bool  yn)

automatically set by uiMain::setTopLevel

◆ setForceFinalise()

void uiMainWin::setForceFinalise ( bool  )
protected

◆ setIcon()

void uiMainWin::setIcon ( const uiPixmap )

Default icon is set in uiMain.

◆ setIconText()

void uiMainWin::setIconText ( const uiString )

◆ setPopupArea()

void uiMainWin::setPopupArea ( PopupArea  pa)
inline

◆ setSensitive()

void uiMainWin::setSensitive ( bool  yn)

◆ setShrinkAllowed()

void uiMainWin::setShrinkAllowed ( bool  yn)

◆ show()

virtual void uiMainWin::show ( )
virtual

Reimplemented in uiDirLightDlg, and uiSeisExpCubePositionsDlg.

◆ showAlwaysOnTop()

bool uiMainWin::showAlwaysOnTop ( bool  yn = true)

◆ showAndActivate()

void uiMainWin::showAndActivate ( )

◆ showMaximized()

void uiMainWin::showMaximized ( )

◆ showMinimized()

void uiMainWin::showMinimized ( )

◆ showMinMaxButtons()

bool uiMainWin::showMinMaxButtons ( bool  yn = true)

◆ showNormal()

void uiMainWin::showNormal ( )

◆ shrinkAllowed()

bool uiMainWin::shrinkAllowed ( )

◆ statusBar()

uiStatusBar* uiMainWin::statusBar ( )

◆ toolBars()

const ObjectSet<uiToolBar>& uiMainWin::toolBars ( ) const

◆ topGroup()

uiGroup* uiMainWin::topGroup ( )

◆ toStatusBar()

void uiMainWin::toStatusBar ( const uiString ,
int  fldidx = 0,
int  msecs = -1 
)

◆ touch()

bool uiMainWin::touch ( )

resets pop-up timer if !poppedUp yet

◆ translateText()

void uiMainWin::translateText ( )
virtual

Triggers translation of object and all members to current language.

Reimplemented from uiBaseObject.

Reimplemented in uiODMain.

◆ uniqueWinTitle()

static uiString uiMainWin::uniqueWinTitle ( const uiString ,
QWidget *  forwindow = 0,
BufferString addendum = 0 
)
static

◆ updateCaption()

void uiMainWin::updateCaption ( )
protected

Friends And Related Function Documentation

◆ uiMainWinBody

friend class uiMainWinBody
friend

Member Data Documentation

◆ activatedone

Notifier<uiMainWin> uiMainWin::activatedone

◆ afterPopup

Notifier<uiMainWin> uiMainWin::afterPopup

◆ afterpopuptimer_

Timer* uiMainWin::afterpopuptimer_
protected

◆ body_

uiMainWinBody* uiMainWin::body_
protected

◆ caption_

uiString uiMainWin::caption_
protected

◆ ctrlCPressed

Notifier<uiMainWin> uiMainWin::ctrlCPressed

◆ languagechangecount_

int uiMainWin::languagechangecount_
protected

◆ parent_

uiParent* uiMainWin::parent_
protected

◆ popuparea_

PopupArea uiMainWin::popuparea_
protected

◆ runScriptRequest

Notifier<uiMainWin> uiMainWin::runScriptRequest

◆ scripttorun_

BufferString uiMainWin::scripttorun_
protected

◆ uniquecaption_

uiString uiMainWin::uniquecaption_
protected

◆ windowClosed

Notifier<uiMainWin> uiMainWin::windowClosed

triggered when window exits

◆ windowHidden

Notifier<uiMainWin> uiMainWin::windowHidden

◆ windowShown

Notifier<uiMainWin> uiMainWin::windowShown

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