OpendTect  6.6
i_qtoolbar.h
Go to the documentation of this file.
1 #ifndef i_qtoolbar_h
2 #define i_qtoolbar_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: January 2010
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uitoolbar.h"
16 
17 #include <QToolBar>
18 
19 
21 
25 QT_BEGIN_NAMESPACE
26 
27 class i_ToolBarMessenger : public QObject
28 {
29  Q_OBJECT
30  friend class uiToolBar;
31 
32 protected:
33 i_ToolBarMessenger( QToolBar* sndr, uiToolBar* receiver )
34  : sender_(sndr)
35  , receiver_(receiver)
36 {
37  connect( sndr, SIGNAL(actionTriggered(QAction*)),
38  this, SLOT(actionTriggered(QAction*)) );
39  connect( sndr, SIGNAL(orientationChanged(Qt::Orientation)),
40  this, SLOT(orientationChanged(Qt::Orientation)) );
41 }
42 
43 private:
45  QToolBar* sender_;
46 
47 private slots:
48 
49 void actionTriggered( QAction* qaction )
50 {
51  const int butid = receiver_->getID( qaction );
53 }
54 
57 
58 };
59 
60 QT_END_NAMESPACE
61 
62 #endif
uiToolBar::buttonClicked
CNotifier< uiToolBar, int > buttonClicked
Definition: uitoolbar.h:110
Notifier::trigger
void trigger()
Definition: notify.h:132
uiToolBar
Definition: uitoolbar.h:31
uiToolBar::orientationChanged
Notifier< uiToolBar > orientationChanged
Definition: uitoolbar.h:111
i_ToolBarMessenger::orientationChanged
void orientationChanged(Qt::Orientation)
Definition: i_qtoolbar.h:55
uiActionContainer::getID
int getID(const uiAction *) const
uitoolbar.h
i_ToolBarMessenger
Helper class for uiToolBar to relay Qt's messages.
Definition: i_qtoolbar.h:28
i_ToolBarMessenger::i_ToolBarMessenger
i_ToolBarMessenger(QToolBar *sndr, uiToolBar *receiver)
Definition: i_qtoolbar.h:33
CNotifier::trigger
void trigger(PayLoad pl)
Definition: notify.h:175
i_ToolBarMessenger::sender_
QToolBar * sender_
Definition: i_qtoolbar.h:45
i_ToolBarMessenger::receiver_
uiToolBar * receiver_
Definition: i_qtoolbar.h:44
OD::Orientation
Orientation
Fundamental orientation in 2D UIs.
Definition: oduicommon.h:23
i_ToolBarMessenger::actionTriggered
void actionTriggered(QAction *qaction)
Definition: i_qtoolbar.h:49

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