kdeui Library API Documentation

kdockwidget_private.h

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2000 Max Judin <novaprint@mtu-net.ru> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00016 Boston, MA 02111-1307, USA. 00017 */ 00018 00019 /* 00020 IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition 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 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 // ### please come up with a nicer name 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 protected slots: 00096 void delayedResize();*/ 00097 00098 private: 00099 void setupMinMaxSize(); 00100 00101 QWidget *child0, *child1; 00102 Orientation m_orientation; 00103 bool initialised; 00104 QFrame* divider; 00105 int xpos, savedXPos; 00106 bool mOpaqueResize, mKeepSize, mHighResolution; 00107 int fixedWidth0,fixedWidth1; 00108 int fixedHeight0,fixedHeight1; 00109 }; 00110 00117 class KDockButton_Private : public QPushButton 00118 { 00119 Q_OBJECT 00120 public: 00121 KDockButton_Private( QWidget *parent=0, const char *name=0 ); 00122 ~KDockButton_Private(); 00123 00124 protected: 00125 virtual void drawButton( QPainter * ); 00126 virtual void enterEvent( QEvent * ); 00127 virtual void leaveEvent( QEvent * ); 00128 00129 private: 00130 bool moveMouse; 00131 }; 00132 00142 class KDockWidgetPrivate : public QObject 00143 { 00144 Q_OBJECT 00145 public: 00146 KDockWidgetPrivate(); 00147 ~KDockWidgetPrivate(); 00148 00149 public slots: 00153 void slotFocusEmbeddedWidget(QWidget* w = 0L); 00154 00155 public: 00156 enum KDockWidgetResize 00157 {ResizeLeft,ResizeTop,ResizeRight,ResizeBottom,ResizeBottomLeft,ResizeTopLeft,ResizeBottomRight,ResizeTopRight}; 00158 00159 int index; 00160 int splitPosInPercent; 00161 bool pendingFocusInEvent; 00162 bool blockHasUndockedSignal; 00163 bool pendingDtor; 00164 int forcedWidth; 00165 int forcedHeight; 00166 bool isContainer; 00167 00168 #ifndef NO_KDE2 00169 NET::WindowType windowType; 00170 #endif 00171 00172 QWidget *_parent; 00173 bool transient; 00174 00175 QGuardedPtr<QWidget> container; 00176 00177 QPoint resizePos; 00178 bool resizing; 00179 KDockWidgetResize resizeMode; 00180 }; 00181 00182 class KDockWidgetHeaderPrivate 00183 : public QObject 00184 { 00185 public: 00186 KDockWidgetHeaderPrivate( QObject* parent ) 00187 : QObject( parent ) 00188 { 00189 forceCloseButtonHidden=false; 00190 toDesktopButton = 0; 00191 showToDesktopButton = true; 00192 topLevel = false; 00193 dummy=0; 00194 } 00195 KDockButton_Private* toDesktopButton; 00196 00197 bool showToDesktopButton; 00198 bool topLevel; 00199 QPtrList<KDockButton_Private> btns; 00200 bool forceCloseButtonHidden; 00201 QWidget *dummy; 00202 }; 00203 00204 #endif
KDE Logo
This file is part of the documentation for kdeui Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:43:28 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003