|
|
@ -48,11 +48,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef TQT_NO_SPLITTER
|
|
|
|
#ifndef TQT_NO_SPLITTER
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TQT_TQSPLITTER_DEFAULT 2
|
|
|
|
|
|
|
|
|
|
|
|
class TQSplitterHandle;
|
|
|
|
class TQSplitterHandle;
|
|
|
|
class TQSplitterPrivate;
|
|
|
|
class TQSplitterPrivate;
|
|
|
|
class TQSplitterLayoutStruct;
|
|
|
|
class TQSplitterLayoutStruct;
|
|
|
|
class TQTextStream;
|
|
|
|
class TQTextStream;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQSplitterPrivate
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
TQSplitterPrivate()
|
|
|
|
|
|
|
|
: opaque( FALSE ), firstShow( TRUE ), tqchildrenCollapsible( TRUE ),
|
|
|
|
|
|
|
|
handleWidth( 0 ) { }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TQPtrList<TQSplitterLayoutStruct> list;
|
|
|
|
|
|
|
|
bool opaque : 8;
|
|
|
|
|
|
|
|
bool firstShow : 8;
|
|
|
|
|
|
|
|
bool tqchildrenCollapsible : 8;
|
|
|
|
|
|
|
|
int handleWidth;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQSplitterLayoutStruct : public TQt
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
TQCOORD sizer;
|
|
|
|
|
|
|
|
uint isHandle : 1;
|
|
|
|
|
|
|
|
uint collapsible : 2;
|
|
|
|
|
|
|
|
uint resizeMode : 2;
|
|
|
|
|
|
|
|
TQWidget *wid;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TQSplitterLayoutStruct()
|
|
|
|
|
|
|
|
: sizer( -1 ), collapsible( Default ) { }
|
|
|
|
|
|
|
|
TQCOORD getSizer( Qt::Orientation orient );
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TQCOORD TQSplitterLayoutStruct::getSizer( Qt::Orientation orient )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if ( sizer == -1 ) {
|
|
|
|
|
|
|
|
TQSize s = wid->tqsizeHint();
|
|
|
|
|
|
|
|
if ( !s.isValid() || wid->testWState(WState_Resized) )
|
|
|
|
|
|
|
|
s = wid->size();
|
|
|
|
|
|
|
|
sizer = ( orient == Qt::Horizontal ) ? s.width() : s.height();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return sizer;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class TQ_EXPORT TQSplitter : public TQFrame
|
|
|
|
class TQ_EXPORT TQSplitter : public TQFrame
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_OBJECT
|
|
|
@ -165,6 +206,36 @@ TQ_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& );
|
|
|
|
TQ_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
|
|
|
|
TQ_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQSplitterHandle : public TQWidget
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TQ_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
TQSplitterHandle( Qt::Orientation o,
|
|
|
|
|
|
|
|
TQSplitter *tqparent, const char* name=0 );
|
|
|
|
|
|
|
|
void setOrientation( Qt::Orientation o );
|
|
|
|
|
|
|
|
Qt::Orientation orientation() const { return orient; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool opaque() const { return s->opaqueResize(); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TQSize tqsizeHint() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int id() const { return myId; } // d->list.at(id())->wid == this
|
|
|
|
|
|
|
|
void setId( int i ) { myId = i; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
void paintEvent( TQPaintEvent * );
|
|
|
|
|
|
|
|
void mouseMoveEvent( TQMouseEvent * );
|
|
|
|
|
|
|
|
void mousePressEvent( TQMouseEvent * );
|
|
|
|
|
|
|
|
void mouseReleaseEvent( TQMouseEvent * );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
Qt::Orientation orient;
|
|
|
|
|
|
|
|
bool opaq;
|
|
|
|
|
|
|
|
int myId;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TQSplitter *s;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // TQT_NO_SPLITTER
|
|
|
|
#endif // TQT_NO_SPLITTER
|
|
|
|
|
|
|
|
|
|
|
|
#endif // TQSPLITTER_H
|
|
|
|
#endif // TQSPLITTER_H
|
|
|
|