• Skip to content
  • Skip to link menu
KDE 4.3 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 
00051 class PLASMA_EXPORT PopupApplet : public Plasma::Applet
00052 {
00053     Q_OBJECT
00054 public:
00055     PopupApplet(QObject *parent, const QVariantList &args);
00056     ~PopupApplet();
00057 
00061     void setPopupIcon(const QIcon &icon);
00062 
00066     void setPopupIcon(const QString &iconName);
00067 
00071     QIcon popupIcon() const;
00072 
00078     virtual QWidget *widget();
00079     void setWidget(QWidget * widget);
00080 
00086     virtual QGraphicsWidget *graphicsWidget();
00087     void setGraphicsWidget(QGraphicsWidget * widget);
00088 
00092     Plasma::PopupPlacement popupPlacement() const;
00093 
00100     void setPassivePopup(bool passive);
00101 
00105     bool isPassivePopup() const;
00106 
00110     bool isPopupShowing() const;
00111 
00112 public Q_SLOTS:
00116     void hidePopup();
00117 
00123     void showPopup(uint displayTime = 0);
00124 
00128     void togglePopup();
00129 
00130 protected:
00138     virtual void popupEvent(bool show);
00139 
00140     void mousePressEvent(QGraphicsSceneMouseEvent *event);
00141     void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
00142     bool eventFilter(QObject *watched, QEvent *event);
00143     void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
00144     void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
00145     void dropEvent(QGraphicsSceneDragDropEvent *event);
00146 
00147 private:
00148     Q_PRIVATE_SLOT(d, void internalTogglePopup())
00149     Q_PRIVATE_SLOT(d, void hideTimedPopup())
00150     Q_PRIVATE_SLOT(d, void clearPopupLostFocus())
00151     Q_PRIVATE_SLOT(d, void dialogSizeChanged())
00152     Q_PRIVATE_SLOT(d, void dialogStatusChanged(bool))
00153     Q_PRIVATE_SLOT(d, void updateDialogPosition())
00154 
00155     friend class Applet;
00156     friend class PopupAppletPrivate;
00157     PopupAppletPrivate * const d;
00158 };
00159 
00160 } // Plasma namespace
00161 
00162 #endif /* POPUPAPPLET_H */
00163 

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