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

Plasma

extender.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2008 by Rob Scheepmaker <r.scheepmaker@student.utwente.nl>
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_EXTENDER_H
00021 #define PLASMA_EXTENDER_H
00022 
00023 #include <QtGui/QGraphicsWidget>
00024 
00025 #include "plasma/framesvg.h"
00026 #include "plasma/plasma_export.h"
00027 
00028 namespace Plasma
00029 {
00030 class ExtenderPrivate;
00031 class ExtenderItem;
00032 class Applet;
00033 
00063 class PLASMA_EXPORT Extender : public QGraphicsWidget
00064 {
00065     Q_OBJECT
00066     Q_PROPERTY(QString emptyExtenderMessage READ emptyExtenderMessage WRITE setEmptyExtenderMessage)
00067 
00068     public:
00072         enum Appearance {
00073             NoBorders = 0,  
00076             BottomUpStacked = 1, 
00082             TopDownStacked = 2 
00088         };
00089 
00098         explicit Extender(Applet *applet);
00099 
00100         ~Extender();
00101 
00106         void setEmptyExtenderMessage(const QString &message);
00107 
00111         QString emptyExtenderMessage() const;
00112 
00117         QList<ExtenderItem*> items() const;
00118 
00122         QList<ExtenderItem*> attachedItems() const;
00123 
00127         QList<ExtenderItem*> detachedItems() const;
00128 
00138         ExtenderItem *item(const QString &name) const;
00139 
00145         void setAppearance(Appearance appearance);
00146 
00150         Appearance appearance() const;
00151 
00152     protected:
00161         virtual void itemAddedEvent(ExtenderItem *item, const QPointF &pos);
00162 
00168         virtual void itemRemovedEvent(ExtenderItem *item);
00169 
00174         virtual void itemHoverEnterEvent(ExtenderItem *item);
00175 
00185         virtual void itemHoverMoveEvent(ExtenderItem *item, const QPointF &pos);
00186 
00191         virtual void itemHoverLeaveEvent(ExtenderItem *item);
00192 
00199         virtual void saveState();
00200 
00207         virtual FrameSvg::EnabledBorders enabledBordersForItem(ExtenderItem *item) const;
00208 
00212         QVariant itemChange(GraphicsItemChange change, const QVariant &value);
00213 
00217         void resizeEvent(QGraphicsSceneResizeEvent *event);
00218 
00222         void mousePressEvent(QGraphicsSceneMouseEvent *event);
00223 
00224     Q_SIGNALS:
00228         void itemAttached(Plasma::ExtenderItem *);
00229 
00233         void itemDetached(Plasma::ExtenderItem *);
00234 
00238         void geometryChanged();
00239 
00240     private:
00241         ExtenderPrivate *const d;
00242 
00243         friend class ExtenderPrivate;
00244         friend class ExtenderItem;
00245         friend class ExtenderItemPrivate;
00246         //dialog needs access to the extender's applet location.
00247         friend class DialogPrivate;
00248         //applet should be able to call saveState();
00249         friend class Applet;
00250 
00251     };
00252 } // Plasma namespace
00253 
00254 #endif //PLASMA_EXTENDER_H
00255 

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