# kdeui Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# 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);
    00055
    00056   virtual bool eventFilter(QObject *, QEvent *);
    00057   virtual bool event( QEvent * );
    00058
    00059   QWidget* getFirst() const { return child0; }
    00060   QWidget* getLast() const { return child1; }
    00061   QWidget* getAnother( QWidget* ) const;
    00062   void updateName();
    00063
    00064   void setOpaqueResize(bool b=true);
    00065   bool opaqueResize() const;
    00066
    00067   void setKeepSize(bool b=true);
    00068   bool keepSize() const;
    00069
    00070   void setHighResolution(bool b=true);
    00071   bool highResolution() const;
    00072
    00073   void setForcedFixedWidth(KDockWidget *dw,int w);
    00074   void setForcedFixedHeight(KDockWidget *dw,int h);
    00075   void restoreFromForcedFixedSize(KDockWidget *dw);
    00076
    00077   Orientation orientation(){return m_orientation;}
    00078
    00079 protected:
    00080   int checkValue( int ) const;
    00081   virtual void resizeEvent(QResizeEvent *);
    00082 /*
    00083 protected slots:
    00084   void delayedResize();*/
    00085
    00086 private:
    00087   void setupMinMaxSize();
    00088
    00089   QWidget *child0, *child1;
    00090   Orientation m_orientation;
    00091   bool initialised;
    00092   QFrame* divider;
    00093   int xpos, savedXPos;
    00094   bool mOpaqueResize, mKeepSize, mHighResolution;
    00095   int fixedWidth0,fixedWidth1;
    00096   int fixedHeight0,fixedHeight1;
    00097 };
    00098
    00105 class KDockButton_Private : public QPushButton
    00106 {
    00107   Q_OBJECT
    00108 public:
    00109   KDockButton_Private( QWidget *parent=0, const char *name=0 );
    00110   ~KDockButton_Private();
    00111
    00112 protected:
    00113   virtual void drawButton( QPainter * );
    00114   virtual void enterEvent( QEvent * );
    00115   virtual void leaveEvent( QEvent * );
    00116
    00117 private:
    00118   bool moveMouse;
    00119 };
    00120
    00130 class KDockWidgetPrivate : public QObject
    00131 {
    00132   Q_OBJECT
    00133 public:
    00134   KDockWidgetPrivate();
    00135   ~KDockWidgetPrivate();
    00136
    00137 public slots:
    00141   void slotFocusEmbeddedWidget(QWidget* w = 0L);
    00142
    00143 public:
    00144  enum KDockWidgetResize
    00145 {ResizeLeft,ResizeTop,ResizeRight,ResizeBottom,ResizeBottomLeft,ResizeTopLeft,ResizeBottomRight,ResizeTopRight};
    00146
    00147   int index;
    00148   int splitPosInPercent;
    00149   bool pendingFocusInEvent;
    00150   bool blockHasUndockedSignal;
    00151   bool pendingDtor;
    00152   int forcedWidth;
    00153   int forcedHeight;
    00154   bool isContainer;
    00155
    00156 #ifndef NO_KDE2
    00157   NET::WindowType windowType;
    00158 #endif
    00159
    00160   QWidget *_parent;
    00161   bool transient;
    00162
    00163   QGuardedPtr<QWidget> container;
    00164
    00165   QPoint resizePos;
    00166   bool resizing;
    00167   KDockWidgetResize resizeMode;
    00168
    00169 };
    00170
    00171 class KDockWidgetHeaderPrivate
    00172    : public QObject
    00173 {
    00174 public:
    00175   KDockWidgetHeaderPrivate( QObject* parent )
    00176         : QObject( parent )
    00177   {
    00178     toDesktopButton = 0;
    00179     showToDesktopButton = true;
    00180     topLevel = false;
    00181   }
    00182   KDockButton_Private* toDesktopButton;
    00183
    00184   bool showToDesktopButton;
    00185   bool topLevel;
    00186 };
    00187
    00188 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:56:39 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001