]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/QT/QuadSplitter.h
Widget integration (step 5/6): Interactive plugins now supported, widgets updates...
[cpPlugins.git] / lib / cpExtensions / QT / QuadSplitter.h
1 #ifndef __CPEXTENSIONS__QT__QUADSPLITTER__H__
2 #define __CPEXTENSIONS__QT__QUADSPLITTER__H__
3
4 #include <cpExtensions/Config.h>
5
6 #ifdef cpExtensions_Interface_QT4
7
8 /**
9  * Inspired by:
10  * https://forum.qt.io/topic/7144/quad-splitter-windows-an-implementation/2
11  */
12
13 #include <QFrame>
14 #include <QSplitter>
15
16 namespace cpExtensions
17 {
18   namespace QT
19   {
20     /**
21      */
22     class QuadSplitter
23       : public QFrame
24     {
25       Q_OBJECT;
26
27     public:
28       QuadSplitter( QWidget* parent = 0, Qt::WindowFlags f = 0 );
29       virtual ~QuadSplitter( );
30
31       void show( );
32       void addWidgets( QWidget* a, QWidget* b, QWidget* c, QWidget* d );
33
34
35     private slots:
36       void _SyncBottom( int a, int b );
37       void _SyncUpper( int a, int b );
38
39     protected:
40       QSplitter m_Parent;
41       QSplitter m_Bottom;
42       QSplitter m_Upper;
43     };
44
45   } // ecapseman
46
47 } // ecapseman
48
49 #endif // cpExtensions_Interface_QT4
50
51 #endif // __CPEXTENSIONS__QT__QUADSPLITTER__H__
52
53 // eof - $RCSfile$