kdockwidget_private.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KDOCKWIDGET_PRIVATE_H
00024 #define KDOCKWIDGET_PRIVATE_H
00025
00026 #include <qwidget.h>
00027 #include <qpushbutton.h>
00028
00029 #ifndef NO_KDE2
00030 #include <netwm_def.h>
00031 #endif
00032
00033 class QFrame;
00034 class KDockContainer;
00035
00036
00043 class KDEUI_EXPORT KDockSplitter : public QWidget
00044 {
00045 Q_OBJECT
00046 public:
00047 KDockSplitter(QWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50, bool highResolution=false);
00048 virtual ~KDockSplitter(){};
00049
00050 void activate(QWidget *c0, QWidget *c1 = 0L);
00051 void deactivate();
00052
00053 int separatorPos() const;
00054 void setSeparatorPos(int pos, bool do_resize = true);
00063
00064 void setSeparatorPosX(int pos, bool do_resize=false);
00065
00066 virtual bool eventFilter(QObject *, QEvent *);
00067 virtual bool event( QEvent * );
00068
00069 QWidget* getFirst() const { return child0; }
00070 QWidget* getLast() const { return child1; }
00071 QWidget* getAnother( QWidget* ) const;
00072 void updateName();
00073
00074 void setOpaqueResize(bool b=true);
00075 bool opaqueResize() const;
00076
00077 void setKeepSize(bool b=true);
00078 bool keepSize() const;
00079
00080 void setHighResolution(bool b=true);
00081 bool highResolution() const;
00082
00083 void setForcedFixedWidth(KDockWidget *dw,int w);
00084 void setForcedFixedHeight(KDockWidget *dw,int h);
00085 void restoreFromForcedFixedSize(KDockWidget *dw);
00086
00087 Orientation orientation(){return m_orientation;}
00088
00089 protected:
00090 friend class KDockContainer;
00091 int checkValue( int ) const;
00092 int checkValueOverlapped( int ,QWidget*) const;
00093 virtual void resizeEvent(QResizeEvent *);
00094
00095
00096
00097
00098 private:
00099 void setupMinMaxSize();
00100 QWidget *child0, *child1;
00101 Orientation m_orientation;
00102 bool initialised;
00103 QFrame* divider;
00104 int xpos, savedXPos;
00105 bool mOpaqueResize, mKeepSize, mHighResolution;
00106 int fixedWidth0,fixedWidth1;
00107 int fixedHeight0,fixedHeight1;
00108 };
00109
00116 class KDEUI_EXPORT KDockButton_Private : public QPushButton
00117 {
00118 Q_OBJECT
00119 public:
00120 KDockButton_Private( QWidget *parent=0, const char *name=0 );
00121 ~KDockButton_Private();
00122
00123 protected:
00124 virtual void drawButton( QPainter * );
00125 virtual void enterEvent( QEvent * );
00126 virtual void leaveEvent( QEvent * );
00127
00128 private:
00129 bool moveMouse;
00130 };
00131
00141 class KDEUI_EXPORT KDockWidgetPrivate : public QObject
00142 {
00143 Q_OBJECT
00144 public:
00145 KDockWidgetPrivate();
00146 ~KDockWidgetPrivate();
00147
00148 public slots:
00152 void slotFocusEmbeddedWidget(QWidget* w = 0L);
00153
00154 public:
00155 enum KDockWidgetResize
00156 {ResizeLeft,ResizeTop,ResizeRight,ResizeBottom,ResizeBottomLeft,ResizeTopLeft,ResizeBottomRight,ResizeTopRight};
00157
00158 int index;
00159 int splitPosInPercent;
00160 bool pendingFocusInEvent;
00161 bool blockHasUndockedSignal;
00162 bool pendingDtor;
00163 int forcedWidth;
00164 int forcedHeight;
00165 bool isContainer;
00166
00167 #ifndef NO_KDE2
00168 NET::WindowType windowType;
00169 #endif
00170
00171 QWidget *_parent;
00172 bool transient;
00173
00174 QGuardedPtr<QWidget> container;
00175
00176 QPoint resizePos;
00177 bool resizing;
00178 KDockWidgetResize resizeMode;
00179 };
00180
00181 class KDEUI_EXPORT KDockWidgetHeaderPrivate
00182 : public QObject
00183 {
00184 public:
00185 KDockWidgetHeaderPrivate( QObject* parent )
00186 : QObject( parent )
00187 {
00188 forceCloseButtonHidden=false;
00189 toDesktopButton = 0;
00190 showToDesktopButton = true;
00191 topLevel = false;
00192 dummy=0;
00193 }
00194 KDockButton_Private* toDesktopButton;
00195
00196 bool showToDesktopButton;
00197 bool topLevel;
00198 QPtrList<KDockButton_Private> btns;
00199 bool forceCloseButtonHidden;
00200 QWidget *dummy;
00201 };
00202
00203 #endif
This file is part of the documentation for kdeui Library Version 3.3.90.