• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
kdockwidget_private.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 Max Judin <novaprint@mtu-net.ru>
3  Copyright (C) 2005 Dominik Haumann <dhdev@gmx.de>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 /*
21  IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition
22 */
23 
24 #ifndef KDOCKWIDGET_PRIVATE_H
25 #define KDOCKWIDGET_PRIVATE_H
26 
27 #include <tqwidget.h>
28 #include <tqpushbutton.h>
29 
30 #ifndef NO_KDE2
31 #include <netwm_def.h>
32 #endif
33 
34 class TQFrame;
35 class KDockContainer;
36 
37 
44 class TDEUI_EXPORT KDockSplitter : public TQWidget
45 {
46  // NOTE: in theory the TDEUI_EXPORT above shouldn't be there, but it's needed for kexi,
47  // which copies the whole definition of the class to be able to access separatorPosInPercent etc.
48  // This needs real fixing in KDE4.
49 
50  Q_OBJECT
51 public:
59  KDockSplitter(TQWidget *parent= 0, const char *name= 0, Orientation orient= Qt::Vertical, int pos= 50);
60  virtual ~KDockSplitter(){}
61 
70  void activate(TQWidget *c0, TQWidget *c1 = 0L);
74  void deactivate();
75 
80  int separatorPosInPercent();
85  void setSeparatorPosInPercent(int percent);
86 
95  int separatorPos() const;
102  void setSeparatorPos(int pos, bool do_resize = true);
111  // ### please come up with a nicer name
112  void setSeparatorPosX(int pos, bool do_resize=false);
113 
118  virtual bool eventFilter(TQObject *, TQEvent *);
119  virtual bool event( TQEvent * );
120 
124  TQWidget* getFirst() const { return child0; }
128  TQWidget* getLast() const { return child1; }
133  TQWidget* getAnother( TQWidget* w ) const;
134  void updateName();
135 
141  void setOpaqueResize(bool b=true);
142  bool opaqueResize() const;
143 
148  void setKeepSize(bool b=true);
149  bool keepSize() const;
150 
151 
152  void setForcedFixedWidth(KDockWidget *dw,int w);
153  void setForcedFixedHeight(KDockWidget *dw,int h);
154  void restoreFromForcedFixedSize(KDockWidget *dw);
155 
159  Orientation orientation(){return m_orientation;}
160 
161 protected:
162  friend class KDockContainer;
168  int checkValue(int position) const;
176  int checkValueOverlapped(int position, TQWidget* child) const;
177 
192  virtual void resizeEvent(TQResizeEvent *ev);
193 
194 /*
195 protected slots:
196  void delayedResize();*/
197 
198 private:
204  void setupMinMaxSize();
210  TQWidget *child0, *child1;
211  Orientation m_orientation;
215  bool initialised;
220  TQFrame* divider;
231  int xpos, savedXPos;
232  bool mOpaqueResize, mKeepSize;
233  int fixedWidth0,fixedWidth1;
234  int fixedHeight0,fixedHeight1;
235  bool m_dontRecalc;
239  static const int factor = 100000;
240 };
241 
248 class TDEUI_EXPORT KDockButton_Private : public TQPushButton
249 {
250  Q_OBJECT
251 public:
252  KDockButton_Private( TQWidget *parent=0, const char *name=0 );
253  ~KDockButton_Private();
254 
255 protected:
256  virtual void drawButton( TQPainter * );
257  virtual void enterEvent( TQEvent * );
258  virtual void leaveEvent( TQEvent * );
259 
260 private:
261  bool moveMouse;
262 };
263 
273 class KDockWidgetPrivate : public TQObject
274 {
275  Q_OBJECT
276 public:
277  KDockWidgetPrivate();
278  ~KDockWidgetPrivate();
279 
280 public slots:
284  void slotFocusEmbeddedWidget(TQWidget* w = 0L);
285 
286 public:
287  enum KDockWidgetResize
288 {ResizeLeft,ResizeTop,ResizeRight,ResizeBottom,ResizeBottomLeft,ResizeTopLeft,ResizeBottomRight,ResizeTopRight};
289 
290  int index;
291  int splitPosInPercent;
292  bool pendingFocusInEvent;
293  bool blockHasUndockedSignal;
294  bool pendingDtor;
295  int forcedWidth;
296  int forcedHeight;
297  bool isContainer;
298 
299 #ifndef NO_KDE2
300  NET::WindowType windowType;
301 #endif
302 
303  TQWidget *_parent;
304  bool transient;
305 
306  TQGuardedPtr<TQWidget> container;
307 
308  TQPoint resizePos;
309  bool resizing;
310  KDockWidgetResize resizeMode;
311 };
312 
313 class KDockWidgetHeaderPrivate
314  : public TQObject
315 {
316 public:
317  KDockWidgetHeaderPrivate( TQObject* parent )
318  : TQObject( parent )
319  {
320  forceCloseButtonHidden=false;
321  toDesktopButton = 0;
322  showToDesktopButton = true;
323  topLevel = false;
324  dummy=0;
325  }
326  KDockButton_Private* toDesktopButton;
327 
328  bool showToDesktopButton;
329  bool topLevel;
330  TQPtrList<KDockButton_Private> btns;
331  bool forceCloseButtonHidden;
332  TQWidget *dummy;
333 };
334 
335 #endif
Vertical
KDockSplitter
Like TQSplitter but specially designed for dockwidgets stuff.
Definition: kdockwidget_private.h:44
KDockSplitter::getFirst
TQWidget * getFirst() const
Definition: kdockwidget_private.h:124
NET::WindowType
WindowType
KDockSplitter::orientation
Orientation orientation()
The orientation is either Horizontal or Vertical.
Definition: kdockwidget_private.h:159
KDockButton_Private
A mini-button usually placed in the dockpanel.
Definition: kdockwidget_private.h:248
KDockWidgetPrivate::slotFocusEmbeddedWidget
void slotFocusEmbeddedWidget(TQWidget *w=0L)
Especially used for Tab page docking.
Definition: kdockwidget_private.cpp:700
KDockWidgetPrivate
resizing enum
Definition: kdockwidget_private.h:273
KDockWidget
Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...
Definition: kdockwidget.h:428
KDockSplitter::getLast
TQWidget * getLast() const
Definition: kdockwidget_private.h:128

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.8.8
This website is maintained by Timothy Pearson.