]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/QT/QuadSplitter.h
Widget integration (step 5/6): Interactive plugins now supported, widgets updates...
[cpPlugins.git] / lib / cpExtensions / QT / QuadSplitter.h
diff --git a/lib/cpExtensions/QT/QuadSplitter.h b/lib/cpExtensions/QT/QuadSplitter.h
new file mode 100644 (file)
index 0000000..c431dfa
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef __CPEXTENSIONS__QT__QUADSPLITTER__H__
+#define __CPEXTENSIONS__QT__QUADSPLITTER__H__
+
+#include <cpExtensions/Config.h>
+
+#ifdef cpExtensions_Interface_QT4
+
+/**
+ * Inspired by:
+ * https://forum.qt.io/topic/7144/quad-splitter-windows-an-implementation/2
+ */
+
+#include <QFrame>
+#include <QSplitter>
+
+namespace cpExtensions
+{
+  namespace QT
+  {
+    /**
+     */
+    class QuadSplitter
+      : public QFrame
+    {
+      Q_OBJECT;
+
+    public:
+      QuadSplitter( QWidget* parent = 0, Qt::WindowFlags f = 0 );
+      virtual ~QuadSplitter( );
+
+      void show( );
+      void addWidgets( QWidget* a, QWidget* b, QWidget* c, QWidget* d );
+
+
+    private slots:
+      void _SyncBottom( int a, int b );
+      void _SyncUpper( int a, int b );
+
+    protected:
+      QSplitter m_Parent;
+      QSplitter m_Bottom;
+      QSplitter m_Upper;
+    };
+
+  } // ecapseman
+
+} // ecapseman
+
+#endif // cpExtensions_Interface_QT4
+
+#endif // __CPEXTENSIONS__QT__QUADSPLITTER__H__
+
+// eof - $RCSfile$