• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • 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 
00032 namespace Plasma
00033 {
00034 
00035 class DialogPrivate;
00036 
00050 class PLASMA_EXPORT Dialog : public QWidget
00051 {
00052     Q_OBJECT
00053 
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 
00075         void setGraphicsWidget(QGraphicsWidget *widget);
00076         QGraphicsWidget *graphicsWidget();
00077 
00081         void setResizeHandleCorners(ResizeCorners corners);
00082 
00087         ResizeCorners resizeCorners() const;
00088 
00089     Q_SIGNALS:
00093         void dialogResized();
00094 
00098         void dialogVisible(bool status);
00099 
00100     protected:
00104         void paintEvent(QPaintEvent *e);
00105         bool event(QEvent *event);
00106         void resizeEvent(QResizeEvent *e);
00107         bool eventFilter(QObject *watched, QEvent *event);
00108         void hideEvent(QHideEvent *event);
00109         void showEvent(QShowEvent *event);
00110         void mouseMoveEvent(QMouseEvent *event);
00111         void mousePressEvent(QMouseEvent *event);
00112         void mouseReleaseEvent(QMouseEvent *event);
00113         void keyPressEvent(QKeyEvent *event);
00114 
00120         bool inControlArea(const QPoint &point);
00121 
00122     private:
00123         DialogPrivate *const d;
00124 
00125         friend class DialogPrivate;
00129         Q_PRIVATE_SLOT(d, void themeUpdated())
00130 };
00131 
00132 } // Plasma namespace
00133 
00134 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Dialog::ResizeCorners)
00135 
00136 #endif

Plasma

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal