• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDE3Support

  • kde3support
  • kdeui
k3dockwidget_private.h
Go to the documentation of this file.
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 <kde3support_export.h>
28
29#include <QtCore/QPointer>
30#include <QtGui/QPushButton>
31#include <QtGui/QWidget>
32#include <Qt3Support/Q3PtrList>
33
34#ifndef NO_KDE2
35#include <netwm_def.h>
36#endif
37
38class QFrame;
39class K3DockContainer;
40class K3DockWidget;
41
42
49class KDE3SUPPORT_EXPORT K3DockSplitter : public QWidget
50{
51 // NOTE: in theory the KDE3SUPPORT_EXPORT above shouldn't be there, but it's needed for kexi,
52 // which copies the whole definition of the class to be able to access separatorPosInPercent etc.
53 // This needs real fixing in KDE4.
54
55 Q_OBJECT
56public:
64 K3DockSplitter(QWidget *parent= 0, const char *name= 0, Qt::Orientation orient= Qt::Vertical, int pos= 50);
65 virtual ~K3DockSplitter(){}
66
75 void activate(QWidget *c0, QWidget *c1 = 0L);
79 void deactivate();
80
85 int separatorPosInPercent();
90 void setSeparatorPosInPercent(int percent);
91
100 int separatorPos() const;
107 void setSeparatorPos(int pos, bool do_resize = true);
116 // ### please come up with a nicer name
117 void setSeparatorPosX(int pos, bool do_resize=false);
118
123 virtual bool eventFilter(QObject *, QEvent *);
124 virtual bool event( QEvent * );
125
129 QWidget* getFirst() const { return child0; }
133 QWidget* getLast() const { return child1; }
138 QWidget* getAnother( QWidget* w ) const;
139 void updateName();
140
146 void setOpaqueResize(bool b=true);
147 bool opaqueResize() const;
148
153 void setKeepSize(bool b=true);
154 bool keepSize() const;
155
156
157 void setForcedFixedWidth(K3DockWidget *dw,int w);
158 void setForcedFixedHeight(K3DockWidget *dw,int h);
159 void restoreFromForcedFixedSize(K3DockWidget *dw);
160
164 Qt::Orientation orientation(){return m_orientation;}
165
166protected:
167 friend class K3DockContainer;
173 int checkValue(int position) const;
181 int checkValueOverlapped(int position, QWidget* child) const;
182
197 virtual void resizeEvent(QResizeEvent *ev);
198
199/*
200protected Q_SLOTS:
201 void delayedResize();*/
202
203private:
209 void setupMinMaxSize();
215 QWidget *child0, *child1;
216 Qt::Orientation m_orientation;
220 bool initialised;
225 QFrame* divider;
236 int xpos, savedXPos;
237 bool mOpaqueResize, mKeepSize;
238 int fixedWidth0,fixedWidth1;
239 int fixedHeight0,fixedHeight1;
240 bool m_dontRecalc;
244 static const int factor = 100000;
245};
246
253class KDE3SUPPORT_EXPORT K3DockButton_Private : public QPushButton
254{
255 Q_OBJECT
256public:
257 K3DockButton_Private( QWidget *parent=0, const char *name=0 );
258 ~K3DockButton_Private();
259
260protected:
261 virtual void drawButton( QPainter * );
262 virtual void enterEvent( QEvent * );
263 virtual void leaveEvent( QEvent * );
264 virtual void paintEvent( QPaintEvent * );
265
266private:
267 bool moveMouse;
268};
269
279class K3DockWidgetPrivate : public QObject
280{
281 Q_OBJECT
282public:
283 K3DockWidgetPrivate();
284 ~K3DockWidgetPrivate();
285
286public Q_SLOTS:
290 void slotFocusEmbeddedWidget(QWidget* w = 0L);
291
292public:
293 enum K3DockWidgetResize
294{ResizeLeft,ResizeTop,ResizeRight,ResizeBottom,ResizeBottomLeft,ResizeTopLeft,ResizeBottomRight,ResizeTopRight};
295
296 int index;
297 int splitPosInPercent;
298 bool pendingFocusInEvent;
299 bool blockHasUndockedSignal;
300 bool pendingDtor;
301 int forcedWidth;
302 int forcedHeight;
303 bool isContainer;
304
305#ifndef NO_KDE2
306 NET::WindowType windowType;
307#endif
308
309 QWidget *_parent;
310 bool transient;
311
312 QPointer<QWidget> container;
313
314 QPoint resizePos;
315 bool resizing;
316 K3DockWidgetResize resizeMode;
317};
318
319class K3DockWidgetHeaderPrivate
320 : public QObject
321{
322public:
323 K3DockWidgetHeaderPrivate( QObject* parent )
324 : QObject( parent )
325 {
326 forceCloseButtonHidden=false;
327 toDesktopButton = 0;
328 showToDesktopButton = true;
329 topLevel = false;
330 dummy=0;
331 }
332 K3DockButton_Private* toDesktopButton;
333
334 bool showToDesktopButton;
335 bool topLevel;
336 Q3PtrList<K3DockButton_Private> btns;
337 bool forceCloseButtonHidden;
338 QWidget *dummy;
339};
340
341#endif
K3DockButton_Private
A mini-button usually placed in the dockpanel.
Definition: k3dockwidget_private.h:254
K3DockContainer
Definition: k3dockwidget_p.h:44
K3DockSplitter
Like QSplitter but specially designed for dockwidgets stuff.
Definition: k3dockwidget_private.h:50
K3DockSplitter::getFirst
QWidget * getFirst() const
Definition: k3dockwidget_private.h:129
K3DockSplitter::orientation
Qt::Orientation orientation()
The orientation is either Horizontal or Vertical.
Definition: k3dockwidget_private.h:164
K3DockSplitter::~K3DockSplitter
virtual ~K3DockSplitter()
Definition: k3dockwidget_private.h:65
K3DockSplitter::getLast
QWidget * getLast() const
Definition: k3dockwidget_private.h:133
K3DockWidgetHeaderPrivate
Definition: k3dockwidget_private.h:321
K3DockWidgetHeaderPrivate::btns
Q3PtrList< K3DockButton_Private > btns
Definition: k3dockwidget_private.h:336
K3DockWidgetHeaderPrivate::dummy
QWidget * dummy
Definition: k3dockwidget_private.h:338
K3DockWidgetHeaderPrivate::showToDesktopButton
bool showToDesktopButton
Definition: k3dockwidget_private.h:334
K3DockWidgetHeaderPrivate::topLevel
bool topLevel
Definition: k3dockwidget_private.h:335
K3DockWidgetHeaderPrivate::forceCloseButtonHidden
bool forceCloseButtonHidden
Definition: k3dockwidget_private.h:337
K3DockWidgetHeaderPrivate::toDesktopButton
K3DockButton_Private * toDesktopButton
Definition: k3dockwidget_private.h:332
K3DockWidgetHeaderPrivate::K3DockWidgetHeaderPrivate
K3DockWidgetHeaderPrivate(QObject *parent)
Definition: k3dockwidget_private.h:323
K3DockWidgetPrivate
resizing enum
Definition: k3dockwidget_private.h:280
K3DockWidgetPrivate::resizePos
QPoint resizePos
Definition: k3dockwidget_private.h:314
K3DockWidgetPrivate::index
int index
Definition: k3dockwidget_private.h:296
K3DockWidgetPrivate::windowType
NET::WindowType windowType
Definition: k3dockwidget_private.h:306
K3DockWidgetPrivate::container
QPointer< QWidget > container
Definition: k3dockwidget_private.h:312
K3DockWidgetPrivate::pendingDtor
bool pendingDtor
Definition: k3dockwidget_private.h:300
K3DockWidgetPrivate::blockHasUndockedSignal
bool blockHasUndockedSignal
Definition: k3dockwidget_private.h:299
K3DockWidgetPrivate::pendingFocusInEvent
bool pendingFocusInEvent
Definition: k3dockwidget_private.h:298
K3DockWidgetPrivate::K3DockWidgetPrivate
K3DockWidgetPrivate()
Definition: k3dockwidget_private.cpp:683
K3DockWidgetPrivate::splitPosInPercent
int splitPosInPercent
Definition: k3dockwidget_private.h:297
K3DockWidgetPrivate::isContainer
bool isContainer
Definition: k3dockwidget_private.h:303
K3DockWidgetPrivate::resizing
bool resizing
Definition: k3dockwidget_private.h:315
K3DockWidgetPrivate::slotFocusEmbeddedWidget
void slotFocusEmbeddedWidget(QWidget *w=0L)
Especially used for Tab page docking.
Definition: k3dockwidget_private.cpp:709
K3DockWidgetPrivate::resizeMode
K3DockWidgetResize resizeMode
Definition: k3dockwidget_private.h:316
K3DockWidgetPrivate::K3DockWidgetResize
K3DockWidgetResize
Definition: k3dockwidget_private.h:294
K3DockWidgetPrivate::ResizeLeft
@ ResizeLeft
Definition: k3dockwidget_private.h:294
K3DockWidgetPrivate::ResizeBottomLeft
@ ResizeBottomLeft
Definition: k3dockwidget_private.h:294
K3DockWidgetPrivate::ResizeTopLeft
@ ResizeTopLeft
Definition: k3dockwidget_private.h:294
K3DockWidgetPrivate::ResizeBottom
@ ResizeBottom
Definition: k3dockwidget_private.h:294
K3DockWidgetPrivate::ResizeTopRight
@ ResizeTopRight
Definition: k3dockwidget_private.h:294
K3DockWidgetPrivate::ResizeRight
@ ResizeRight
Definition: k3dockwidget_private.h:294
K3DockWidgetPrivate::ResizeTop
@ ResizeTop
Definition: k3dockwidget_private.h:294
K3DockWidgetPrivate::ResizeBottomRight
@ ResizeBottomRight
Definition: k3dockwidget_private.h:294
K3DockWidgetPrivate::forcedHeight
int forcedHeight
Definition: k3dockwidget_private.h:302
K3DockWidgetPrivate::forcedWidth
int forcedWidth
Definition: k3dockwidget_private.h:301
K3DockWidgetPrivate::transient
bool transient
Definition: k3dockwidget_private.h:310
K3DockWidgetPrivate::_parent
QWidget * _parent
Definition: k3dockwidget_private.h:309
K3DockWidgetPrivate::~K3DockWidgetPrivate
~K3DockWidgetPrivate()
Definition: k3dockwidget_private.cpp:705
K3DockWidget
Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...
Definition: k3dockwidget.h:416
NET::WindowType
WindowType
Q3PtrList
QEvent
QFrame
QObject
QPushButton
QWidget
kde3support_export.h
name
const char * name(StandardAction id)
netwm_def.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDE3Support

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal