OpendTect-6_4
6.4
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
od6.4.5
src
uiBase
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 <QToolBar>
16
#include "
uitoolbar.h
"
17
18
20
24
QT_BEGIN_NAMESPACE
25
26
class
i_ToolBarMessenger
:
public
QObject
27
{
28
Q_OBJECT
29
friend
class
uiToolBar
;
30
31
protected
:
32
i_ToolBarMessenger
( QToolBar* sndr,
uiToolBar
* receiver )
33
:
sender_
(sndr)
34
,
receiver_
(receiver)
35
{
36
connect( sndr, SIGNAL(
actionTriggered
(QAction*)),
37
this
, SLOT(
actionTriggered
(QAction*)) );
38
connect( sndr, SIGNAL(
orientationChanged
(
Qt::Orientation
)),
39
this
, SLOT(
orientationChanged
(
Qt::Orientation
)) );
40
}
41
42
private
:
43
uiToolBar
*
receiver_
;
44
QToolBar*
sender_
;
45
46
private
slots:
47
48
void
actionTriggered
( QAction* qaction )
49
{
50
const
int
butid = receiver_->
getID
( qaction );
51
receiver_->
buttonClicked
.
trigger
( butid, *receiver_ );
52
}
53
54
void
orientationChanged
(
Qt::Orientation
)
55
{ receiver_->
orientationChanged
.
trigger
( *receiver_ ); }
56
57
};
58
59
QT_END_NAMESPACE
60
61
#endif
uiToolBar
Definition:
uitoolbar.h:31
uitoolbar.h
CNotifier::trigger
void trigger(C c, T &t)
Definition:
callback.h:399
i_ToolBarMessenger::sender_
QToolBar * sender_
Definition:
i_qtoolbar.h:44
i_ToolBarMessenger
Helper class for uiToolBar to relay Qt's messages.
Definition:
i_qtoolbar.h:26
i_ToolBarMessenger::actionTriggered
void actionTriggered(QAction *qaction)
Definition:
i_qtoolbar.h:48
uiToolBar::orientationChanged
Notifier< uiToolBar > orientationChanged
Definition:
uitoolbar.h:110
i_ToolBarMessenger::i_ToolBarMessenger
i_ToolBarMessenger(QToolBar *sndr, uiToolBar *receiver)
Definition:
i_qtoolbar.h:32
uiActionContainer::getID
int getID(const uiAction *) const
Notifier::trigger
void trigger(T &t)
Definition:
callback.h:258
uiToolBar::buttonClicked
CNotifier< uiToolBar, int > buttonClicked
Definition:
uitoolbar.h:109
i_ToolBarMessenger::receiver_
uiToolBar * receiver_
Definition:
i_qtoolbar.h:43
i_ToolBarMessenger::orientationChanged
void orientationChanged(Qt::Orientation)
Definition:
i_qtoolbar.h:54
OD::Orientation
Orientation
Fundamental orientation in 2D UIs.
Definition:
oduicommon.h:23
Generated at for the
OpendTect
seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019