OpendTect-6_4  6.4
i_qmdiarea.h
Go to the documentation of this file.
1 #ifndef i_qmdiarea_h
2 #define i_qmdiarea_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: September 2007
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uimdiarea.h"
16 
17 #include <QObject>
18 #include <QWidget>
19 #include <QMdiArea>
20 
21 
23 
27 QT_BEGIN_NAMESPACE
28 
29 class i_MdiAreaMessenger : public QObject
30 {
31  Q_OBJECT
32  friend class uiMdiAreaBody;
33 
34 protected:
35 
36 i_MdiAreaMessenger( QMdiArea* sndr, uiMdiArea* receiver )
37  : sender_(sndr)
38  , receiver_(receiver)
39 {
40  connect( sndr, SIGNAL(subWindowActivated(QMdiSubWindow*)),
41  this, SLOT(subWindowActivated(QMdiSubWindow*)) );
42 }
43 
44 private:
45 
47  QMdiArea* sender_;
48 
49 private slots:
50 
51 void subWindowActivated( QMdiSubWindow* )
52 { receiver_->windowActivated.trigger( *receiver_ ); }
53 
54 };
55 
56 QT_END_NAMESPACE
57 
58 #endif
i_MdiAreaMessenger(QMdiArea *sndr, uiMdiArea *receiver)
Definition: i_qmdiarea.h:36
friend class uiMdiAreaBody
Definition: i_qmdiarea.h:32
Definition: uimdiarea.h:65
QMdiArea * sender_
Definition: i_qmdiarea.h:47
Helper class for uiMdiArea to relay Qt&#39;s messages.
Definition: i_qmdiarea.h:29
void trigger(T &t)
Definition: callback.h:258
void subWindowActivated(QMdiSubWindow *)
Definition: i_qmdiarea.h:51
uiMdiArea * receiver_
Definition: i_qmdiarea.h:46
Notifier< uiMdiArea > windowActivated
Definition: uimdiarea.h:88

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