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

Plasma

popupapplet.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2008 by Montel Laurent <montel@kde.org>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor,
00017  * Boston, MA  02110-1301  USA
00018  */
00019 
00020 #ifndef PLASMA_POPUPAPPLET_H
00021 #define PLASMA_POPUPAPPLET_H
00022 
00023 #include <plasma/applet.h>
00024 #include <plasma/plasma_export.h>
00025 
00026 class QGraphicsProxyWidget;
00027 class QGraphicsLinearLayout;
00028 
00029 namespace Plasma
00030 {
00031 
00032 class Dialog;
00033 class IconWidget;
00034 class PopupAppletPrivate;
00035 
00049 class PLASMA_EXPORT PopupApplet : public Plasma::Applet
00050 {
00051     Q_OBJECT
00052 public:
00053     PopupApplet(QObject *parent, const QVariantList &args);
00054     ~PopupApplet();
00055 
00059     void setPopupIcon(const QIcon &icon);
00060 
00064     void setPopupIcon(const QString &iconName);
00065 
00069     QIcon popupIcon() const;
00070 
00076     virtual QWidget *widget();
00077 
00083     virtual QGraphicsWidget *graphicsWidget();
00084 
00088     Plasma::PopupPlacement popupPlacement() const;
00089 
00096     void setPassivePopup(bool passive);
00097 
00101     bool isPassivePopup() const;
00102 
00106     bool isPopupShowing() const;
00107 
00108 public Q_SLOTS:
00112     void hidePopup();
00113 
00119     void showPopup(uint displayTime = 0);
00120 
00124     void togglePopup();
00125 
00126 protected:
00134     virtual void popupEvent(bool show);
00135 
00136     void mousePressEvent(QGraphicsSceneMouseEvent *event);
00137     void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
00138     bool eventFilter(QObject *watched, QEvent *event);
00139 
00140 private:
00141     Q_PRIVATE_SLOT(d, void internalTogglePopup())
00142     Q_PRIVATE_SLOT(d, void hideTimedPopup())
00143     Q_PRIVATE_SLOT(d, void clearPopupLostFocus())
00144     Q_PRIVATE_SLOT(d, void dialogSizeChanged())
00145     Q_PRIVATE_SLOT(d, void dialogStatusChanged(bool))
00146 
00147     friend class Applet;
00148     friend class PopupAppletPrivate;
00149     PopupAppletPrivate * const d;
00150 };
00151 
00152 } // Plasma namespace
00153 
00154 #endif /* POPUPAPPLET_H */
00155 

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