20#ifndef PLASMA_EXTENDERITEM_H
21#define PLASMA_EXTENDERITEM_H
23#include <QtGui/QGraphicsWidget>
25#include <kconfiggroup.h>
36class ExtenderItemPrivate;
83 Q_PROPERTY(QGraphicsItem * widget READ widget WRITE setWidget)
84 Q_PROPERTY(QString title READ title WRITE setTitle)
85 Q_PROPERTY(QString name READ name WRITE setName)
86 Q_PROPERTY(QIcon icon READ icon WRITE setIcon)
87 Q_PROPERTY(
Extender * extender READ extender WRITE setExtender)
88 Q_PROPERTY(
bool collapsed READ isCollapsed WRITE setCollapsed)
89 Q_PROPERTY(
bool detached READ isDetached)
90 Q_PROPERTY(uint autoExpireDelay READ autoExpireDelay WRITE setAutoExpireDelay)
107 KConfigGroup config()
const;
113 void setWidget(QGraphicsItem *widget);
118 QGraphicsItem *widget()
const;
125 void setTitle(
const QString &title);
130 QString title()
const;
138 void setName(
const QString &name);
143 QString name()
const;
151 void setIcon(
const QString &icon);
157 void setIcon(
const QIcon &icon);
169 void setExtender(
Extender *extender,
const QPointF &pos = QPointF(-1, -1));
203 bool isGroup()
const;
209 void setAutoExpireDelay(uint time);
214 uint autoExpireDelay()
const;
219 bool isDetached()
const;
224 bool isCollapsed()
const;
231 void addAction(
const QString &name, QAction *action);
238 QAction *action(
const QString &name)
const;
249 void setTransient(
const bool transient);
255 bool isTransient()
const;
267 void setCollapsed(
bool collapsed);
272 void returnToSource();
278 void showCloseButton();
283 void hideCloseButton();
295 void moveEvent(QGraphicsSceneMoveEvent *event);
296 void resizeEvent(QGraphicsSceneResizeEvent *event);
298 void mousePressEvent(QGraphicsSceneMouseEvent *event);
299 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
300 void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
301 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
303 void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
304 void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
306 bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
308 QSizeF sizeHint(Qt::SizeHint which,
const QSizeF &constraint)
const;
311 Q_PRIVATE_SLOT(d,
void toggleCollapse())
312 Q_PRIVATE_SLOT(d,
void updateToolBox())
313 Q_PRIVATE_SLOT(d,
void themeChanged())
314 Q_PRIVATE_SLOT(d,
void sourceAppletRemoved())
315 Q_PRIVATE_SLOT(d,
void actionDestroyed(
QObject*))
317 ExtenderItemPrivate * const d;
321 friend class ExtenderPrivate;
322 friend class ExtenderItemPrivate;
Allows for grouping of extender items.
Provides detachable items for an Extender.
void destroyed(Plasma::ExtenderItem *item)
Emitted when the extender item is destroyed.
Extends applets to allow detachable parts.
Namespace for everything in libplasma.