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

Plasma

  • sources
  • kde-4.12
  • kdelibs
  • plasma
dialog.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 by Alessandro Diaferia <alediaferia@gmail.com>
3  * Copyright 2007 by Alexis Ménard <darktears31@gmail.com>
4  * Copyright 2007 Sebastian Kuegler <sebas@kde.org>
5  * Copyright 2006 Aaron Seigo <aseigo@kde.org>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef PLASMA_DIALOG_H
24 #define PLASMA_DIALOG_H
25 
26 #include <QtGui/QWidget>
27 #include <QtGui/QGraphicsSceneEvent>
28 #include <QtGui/QGraphicsView>
29 
30 #include <plasma/plasma_export.h>
31 #include <plasma/plasma.h>
32 
33 namespace Plasma
34 {
35 
36 class DialogPrivate;
37 
51 class PLASMA_EXPORT Dialog : public QWidget
52 {
53  Q_OBJECT
54  public:
58  enum ResizeCorner {
59  NoCorner = 0,
60  NorthEast = 1,
61  SouthEast = 2,
62  NorthWest = 4,
63  SouthWest = 8,
64  All = NorthEast | SouthEast | NorthWest | SouthWest
65  };
66  Q_DECLARE_FLAGS(ResizeCorners, ResizeCorner)
67 
68 
72  explicit Dialog(QWidget * parent = 0, Qt::WindowFlags f = Qt::Window);
73  virtual ~Dialog();
74 
82  void setGraphicsWidget(QGraphicsWidget *widget);
83 
87  QGraphicsWidget *graphicsWidget();
88 
92  void setResizeHandleCorners(ResizeCorners corners);
93 
98  ResizeCorners resizeCorners() const;
99 
103  bool isUserResizing() const;
104 
113  void setMinimumResizeLimits(int left, int top, int right, int bottom);
114 
123  void getMinimumResizeLimits(int *left, int *top, int *right, int *bottom);
124 
130  void animatedHide(Plasma::Direction direction);
131 
137  void animatedShow(Plasma::Direction direction);
138 
143  Plasma::AspectRatioMode aspectRatioMode() const;
144 
149  void setAspectRatioMode(Plasma::AspectRatioMode mode);
150 
151  Q_SIGNALS:
155  void dialogResized();
156 
160  void dialogVisible(bool status);
161 
162  public Q_SLOTS:
171  void syncToGraphicsWidget();
172 
173  protected:
177  void paintEvent(QPaintEvent *e);
178  bool event(QEvent *event);
179  void resizeEvent(QResizeEvent *e);
180  bool eventFilter(QObject *watched, QEvent *event);
181  void hideEvent(QHideEvent *event);
182  void showEvent(QShowEvent *event);
183  void focusInEvent(QFocusEvent *event);
184  void mouseMoveEvent(QMouseEvent *event);
185  void mousePressEvent(QMouseEvent *event);
186  void mouseReleaseEvent(QMouseEvent *event);
187  void keyPressEvent(QKeyEvent *event);
188  void moveEvent(QMoveEvent *event);
189 
195  bool inControlArea(const QPoint &point);
196 
197  private:
198  DialogPrivate *const d;
199 
200  friend class DialogPrivate;
204  Q_PRIVATE_SLOT(d, void themeChanged())
205  Q_PRIVATE_SLOT(d, void checkBorders())
206  Q_PRIVATE_SLOT(d, void delayedAdjustSize())
207 
208  friend class PopupAppletPrivate;
209 };
210 
211 } // Plasma namespace
212 
213 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Dialog::ResizeCorners)
214 
215 #endif
QWidget
QObject
Plasma::Dialog::ResizeCorner
ResizeCorner
Use these flags to choose the active resize corners.
Definition: dialog.h:58
Plasma::Dialog
A dialog that uses the Plasma style.
Definition: dialog.h:51
plasma.h
Plasma::Direction
Direction
The Direction enumeration describes in which direction, relative to the Applet (and its managing cont...
Definition: plasma.h:89
plasma_export.h
Plasma::AspectRatioMode
AspectRatioMode
Defines the aspect ratio used when scaling an applet.
Definition: plasma.h:208
QGraphicsWidget
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

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

kdelibs API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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