• Skip to content
  • Skip to link menu
KDE 4.3 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 #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 
00055     public:
00059         enum ResizeCorner {
00060             NoCorner = 0,
00061             NorthEast = 1,
00062             SouthEast = 2,
00063             NorthWest = 4,
00064             SouthWest = 8,
00065             All = NorthEast | SouthEast | NorthWest | SouthWest
00066         };
00067         Q_DECLARE_FLAGS(ResizeCorners, ResizeCorner)
00068 
00069         
00073         explicit Dialog(QWidget * parent = 0, Qt::WindowFlags f =  Qt::Window);
00074         virtual ~Dialog();
00075 
00076         void setGraphicsWidget(QGraphicsWidget *widget);
00077         QGraphicsWidget *graphicsWidget();
00078 
00082         void setResizeHandleCorners(ResizeCorners corners);
00083 
00088         ResizeCorners resizeCorners() const;
00089 
00094         void animatedHide(Plasma::Direction direction);
00095 
00100         void animatedShow(Plasma::Direction direction);
00101 
00102     Q_SIGNALS:
00106         void dialogResized();
00107 
00111         void dialogVisible(bool status);
00112 
00113     protected:
00117         void paintEvent(QPaintEvent *e);
00118         bool event(QEvent *event);
00119         void resizeEvent(QResizeEvent *e);
00120         bool eventFilter(QObject *watched, QEvent *event);
00121         void hideEvent(QHideEvent *event);
00122         void showEvent(QShowEvent *event);
00123         void mouseMoveEvent(QMouseEvent *event);
00124         void mousePressEvent(QMouseEvent *event);
00125         void mouseReleaseEvent(QMouseEvent *event);
00126         void keyPressEvent(QKeyEvent *event);
00127         void moveEvent(QMoveEvent *event);
00128 
00134         bool inControlArea(const QPoint &point);
00135 
00136     private:
00137         DialogPrivate *const d;
00138 
00139         friend class DialogPrivate;
00143         Q_PRIVATE_SLOT(d, void themeChanged())
00144         Q_PRIVATE_SLOT(d, void progressHide(qreal))
00145         Q_PRIVATE_SLOT(d, void progressShow(qreal))
00146 };
00147 
00148 } // Plasma namespace
00149 
00150 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Dialog::ResizeCorners)
00151 
00152 #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
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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