21 #ifndef PLASMA_CORONA_H
22 #define PLASMA_CORONA_H
24 #include <QtGui/QGraphicsScene>
31 class QGraphicsGridLayout;
40 class ContainmentActionsPluginsConfig;
41 class AbstractDialogManager;
62 void setAppletMimeType(
const QString &mimetype);
67 QString appletMimeType();
73 QString defaultContainmentPlugin()
const;
78 QList<Containment*> containments()
const;
83 void clearContainments();
88 KSharedConfig::Ptr config()
const;
105 Containment *addContainment(
const QString &name,
const QVariantList &args = QVariantList());
125 Containment *addContainmentDelayed(
const QString &name,
126 const QVariantList &args = QVariantList());
135 Containment *containmentForScreen(
int screen,
int desktop = -1)
const;
149 Containment *containmentForScreen(
int screen,
int desktop,
150 const QString &defaultPluginIfNonExistent,
151 const QVariantList &defaultArgs = QVariantList());
170 QList <QGraphicsWidget *> offscreenWidgets()
const;
177 virtual int numScreens()
const;
185 virtual QRect screenGeometry(
int id)
const;
195 virtual QRegion availableScreenRegion(
int id)
const;
204 QPoint popupPosition(
const QGraphicsItem *item,
const QSize &size);
215 QPoint popupPosition(
const QGraphicsItem *item,
const QSize &size, Qt::AlignmentFlag alignment);
223 QList<Plasma::Location> freeEdges(
int screen)
const;
228 QAction *action(QString name)
const;
233 void addAction(QString name, QAction *action);
238 QList<QAction*> actions()
const;
246 void enableAction(
const QString &name,
bool enable);
254 void updateShortcuts();
262 void addShortcuts(KActionCollection *newShortcuts);
271 KAction* addAction(QString name);
309 #ifndef KDE_NO_DEPRECATED
310 KDE_DEPRECATED QList<Plasma::Containment *> importLayout(
const KConfigBase &config);
331 QList<Plasma::Containment *> importLayout(
const KConfigGroup &config);
340 void exportLayout(KConfigGroup &config, QList<Containment*> containments);
351 void initializeLayout(
const QString &config = QString());
360 void loadLayout(
const QString &config = QString());
366 void saveLayout(
const QString &config = QString())
const;
384 void requestConfigSync();
393 void requireConfigSync();
401 void layoutContainments();
426 void releaseVisualFocus();
436 void availableScreenRegionChanged();
454 void shortcutsChanged();
460 virtual void loadDefaultLayout();
486 void setPreferredToolBoxPlugin(
const Containment::Type type,
const QString &plugin);
492 void setDefaultContainmentPlugin(
const QString &name);
495 void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
496 void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
497 void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
500 CoronaPrivate *
const d;
502 Q_PRIVATE_SLOT(d,
void containmentDestroyed(
QObject*))
503 Q_PRIVATE_SLOT(d,
void offscreenWidgetDestroyed(
QObject *))
504 Q_PRIVATE_SLOT(d,
void syncConfig())
505 Q_PRIVATE_SLOT(d,
void toggleImmutability())
506 Q_PRIVATE_SLOT(d,
void showShortcutConfig())
508 friend class CoronaPrivate;
ImmutabilityType
Defines the immutability of items like applets, corona and containments they can be free to modify...
A QGraphicsView for a single Containment.
static QScriptValue type(QScriptContext *ctx, QScriptEngine *eng)
The AbstractDialogManager class shows the dialogs shown by applets and the rest of the shell...
The base class for plugins that provide backgrounds and applet grouping containers.
A class that holds a map of triggers to plugin names.
A QGraphicsScene for Plasma::Applets.