summaryrefslogtreecommitdiffstats
path: root/src/widgets/qsplitter.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-08-06 01:36:40 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-08-06 01:36:40 -0500
commitf97ed1fa6cdcdb4e70979899145f3d3da34c3932 (patch)
treef4639dff22269b84573a51cdfe715b352adaaa03 /src/widgets/qsplitter.cpp
parentd82327fe4f56dcffc27a6af162cbed23adf83d8d (diff)
downloadqt3-f97ed1fa6cdcdb4e70979899145f3d3da34c3932.tar.gz
qt3-f97ed1fa6cdcdb4e70979899145f3d3da34c3932.zip
Expose some QSplitter private classes for added functionality in Trinity
This is not a security risk
Diffstat (limited to 'src/widgets/qsplitter.cpp')
-rw-r--r--src/widgets/qsplitter.cpp71
1 files changed, 1 insertions, 70 deletions
diff --git a/src/widgets/qsplitter.cpp b/src/widgets/qsplitter.cpp
index 4810911..efbe870 100644
--- a/src/widgets/qsplitter.cpp
+++ b/src/widgets/qsplitter.cpp
@@ -52,39 +52,9 @@
#include "qptrlist.h"
#include "qstyle.h"
-class QSplitterHandle : public QWidget
-{
- Q_OBJECT
-public:
- QSplitterHandle( Orientation o,
- QSplitter *parent, const char* name=0 );
- void setOrientation( Orientation o );
- Orientation orientation() const { return orient; }
-
- bool opaque() const { return s->opaqueResize(); }
-
- QSize sizeHint() const;
-
- int id() const { return myId; } // d->list.at(id())->wid == this
- void setId( int i ) { myId = i; }
-
-protected:
- void paintEvent( QPaintEvent * );
- void mouseMoveEvent( QMouseEvent * );
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
-
-private:
- Orientation orient;
- bool opaq;
- int myId;
-
- QSplitter *s;
-};
-
#include "qsplitter.moc"
-const uint Default = 2;
+const uint Default = QT_QSPLITTER_DEFAULT;
static int mouseOffset;
static int opaqueOldPos = -1; // this assumes that there's only one mouse
@@ -180,45 +150,6 @@ void QSplitterHandle::paintEvent( QPaintEvent * )
QStyle::Style_Horizontal : 0) );
}
-class QSplitterLayoutStruct : public Qt
-{
-public:
- QCOORD sizer;
- uint isHandle : 1;
- uint collapsible : 2;
- uint resizeMode : 2;
- QWidget *wid;
-
- QSplitterLayoutStruct()
- : sizer( -1 ), collapsible( Default ) { }
- QCOORD getSizer( Orientation orient );
-};
-
-QCOORD QSplitterLayoutStruct::getSizer( Orientation orient )
-{
- if ( sizer == -1 ) {
- QSize s = wid->sizeHint();
- if ( !s.isValid() || wid->testWState(WState_Resized) )
- s = wid->size();
- sizer = ( orient == Horizontal ) ? s.width() : s.height();
- }
- return sizer;
-}
-
-class QSplitterPrivate
-{
-public:
- QSplitterPrivate()
- : opaque( FALSE ), firstShow( TRUE ), childrenCollapsible( TRUE ),
- handleWidth( 0 ) { }
-
- QPtrList<QSplitterLayoutStruct> list;
- bool opaque : 8;
- bool firstShow : 8;
- bool childrenCollapsible : 8;
- int handleWidth;
-};
-
/*!
\class QSplitter