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

Plasma

dialog.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2008 by Alessandro Diaferia <alediaferia@gmail.com>
00003  * Copyright 2007 by Alexis Ménard <darktears31@gmail.com>
00004  * Copyright 2007 Sebastian Kuegler <sebas@kde.org>
00005  * Copyright 2006 Aaron Seigo <aseigo@kde.org>
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor,
00020  * Boston, MA  02110-1301  USA
00021  */
00022 
00023 #ifndef PLASMA_DIALOG_H
00024 #define PLASMA_DIALOG_H
00025 
00026 #include <QtGui/QWidget>
00027 #include <QtGui/QGraphicsSceneEvent>
00028 #include <QtGui/QGraphicsView>
00029 
00030 #include <plasma/plasma_export.h>
00031 #include <plasma/plasma.h>
00032 
00033 namespace Plasma
00034 {
00035 
00036 class DialogPrivate;
00037 
00051 class PLASMA_EXPORT Dialog : public QWidget
00052 {
00053     Q_OBJECT
00054     public:
00058         enum ResizeCorner {
00059             NoCorner = 0,
00060             NorthEast = 1,
00061             SouthEast = 2,
00062             NorthWest = 4,
00063             SouthWest = 8,
00064             All = NorthEast | SouthEast | NorthWest | SouthWest
00065         };
00066         Q_DECLARE_FLAGS(ResizeCorners, ResizeCorner)
00067 
00068         
00072         explicit Dialog(QWidget * parent = 0, Qt::WindowFlags f =  Qt::Window);
00073         virtual ~Dialog();
00074 
00082         void setGraphicsWidget(QGraphicsWidget *widget);
00083 
00087         QGraphicsWidget *graphicsWidget();
00088 
00092         void setResizeHandleCorners(ResizeCorners corners);
00093 
00098         ResizeCorners resizeCorners() const;
00099 
00103         bool isUserResizing() const;
00104 
00113         void setMinimumResizeLimits(int left, int top, int right, int bottom);
00114 
00123         void getMinimumResizeLimits(int *left, int *top, int *right, int *bottom);
00124 
00130         void animatedHide(Plasma::Direction direction);
00131 
00137         void animatedShow(Plasma::Direction direction);
00138 
00143         Plasma::AspectRatioMode aspectRatioMode() const;
00144 
00149         void setAspectRatioMode(Plasma::AspectRatioMode mode);
00150 
00151     Q_SIGNALS:
00155         void dialogResized();
00156 
00160         void dialogVisible(bool status);
00161 
00162     public Q_SLOTS:
00171         void syncToGraphicsWidget();
00172 
00173     protected:
00177         void paintEvent(QPaintEvent *e);
00178         bool event(QEvent *event);
00179         void resizeEvent(QResizeEvent *e);
00180         bool eventFilter(QObject *watched, QEvent *event);
00181         void hideEvent(QHideEvent *event);
00182         void showEvent(QShowEvent *event);
00183         void focusInEvent(QFocusEvent *event);
00184         void mouseMoveEvent(QMouseEvent *event);
00185         void mousePressEvent(QMouseEvent *event);
00186         void mouseReleaseEvent(QMouseEvent *event);
00187         void keyPressEvent(QKeyEvent *event);
00188         void moveEvent(QMoveEvent *event);
00189 
00195         bool inControlArea(const QPoint &point);
00196 
00197     private:
00198         DialogPrivate *const d;
00199 
00200         friend class DialogPrivate;
00204         Q_PRIVATE_SLOT(d, void themeChanged())
00205         Q_PRIVATE_SLOT(d, void checkBorders())
00206         Q_PRIVATE_SLOT(d, void delayedAdjustSize())
00207 
00208         friend class PopupAppletPrivate;
00209 };
00210 
00211 } // Plasma namespace
00212 
00213 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Dialog::ResizeCorners)
00214 
00215 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed May 2 2012 17:36:05 by doxygen 1.8.0 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-4.8.3 API Reference

Skip menu "kdelibs-4.8.3 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