Plasma/libplasma2/API Review/Containment: Difference between revisions
No edit summary |
No edit summary |
||
Line 49: | Line 49: | ||
! Method | ! Method | ||
{{ | {{FeatureDone|Rename| Applet *addApplet(const QString &name, const QVariantList args, const QRectF geometry ; -> becomes createApplet, args and geometry arguments go away}} | ||
{{ | {{FeatureDone | Paramenters| void addApplet(Applet *applet, const QPointF pos); -> pos parameter goes }} | ||
{{FeatureDone | Keep| QList<Applet *> applets() const; }} | {{FeatureDone | Keep| QList<Applet *> applets() const; }} | ||
{{FeatureTodo | Remove| void clearApplets(); }} | {{FeatureTodo | Remove| void clearApplets(); }} | ||
Line 67: | Line 67: | ||
{{FeatureDone | Keep| void setActivity(const QString &activityId); }} | {{FeatureDone | Keep| void setActivity(const QString &activityId); }} | ||
{{FeatureDone | Keep| QString activity() const; }} | {{FeatureDone | Keep| QString activity() const; }} | ||
{{ | {{FeatureDone | Paramenters| signal void appletAdded(Plasma::Applet *applet, const QPointF &pos); Remove pos}} | ||
{{FeatureDone | Keep| signal void appletRemoved(Plasma::Applet *applet);}} | {{FeatureDone | Keep| signal void appletRemoved(Plasma::Applet *applet);}} | ||
{{FeatureTodo | Paramenters| void screenChanged(int wasScreen, int isScreen, Plasma::Containment *containment); -> remove containment parameter}} | {{FeatureTodo | Paramenters| void screenChanged(int wasScreen, int isScreen, Plasma::Containment *containment); -> remove containment parameter}} |
Revision as of 16:30, 18 February 2013
Q_PROPERTIES
All qproperties and invokables must go
Enums
Type probably goes in plasma.h
enum Type { NoContainmentType = -1, /**< @internal */ DesktopContainment = 0, /**< A desktop containment */ New name -> suggestions [ Canvas ] PanelContainment, /**< A desktop panel */ CustomContainment = 127, /**< A containment that is neither a desktop nor a panel but something application specific */ CustomPanelContainment = 128 /**< A customized desktop panel */ };
ToolType goes in plasma.h it becomes ActionType (not related to toolbox anymore)
enum ToolType { AddTool = 0, ConfigureTool = 100, ControlTool = 200, MiscTool = 300, DestructiveTool = 400, UserToolType = DestructiveTool + 1000 }; Q_ENUMS(ToolType)
Constructors
asStatus | Action | Method |
---|---|---|
DONE | Keep | explicit Containment(QObject *parent , const QString &serviceId , uint containmentId ); |
DONE | Keep | Containment(QObject *parent, const QVariantList &args); |
DONE | Keep | ~Containment();
|
Bookkeeping
asStatus | Action | Method | |
---|---|---|---|
DONE | Rename | Applet *addApplet(const QString &name, const QVariantList args, const QRectF geometry ; -> becomes createApplet, args and geometry arguments go away | |
DONE | Paramenters | void addApplet(Applet *applet, const QPointF pos); -> pos parameter goes | |
DONE | Keep | QList<Applet *> applets() const; | |
TO DO | Remove | void clearApplets(); | <{{{3}}}> |
TO DO | Paramenters | void setScreen(int screen, int desktop); -> remove desktop | <{{{3}}}> |
DONE | Keep | int screen() const; | |
TO DO | Remove | int lastScreen() const; | <{{{3}}}> |
TO DO | Remove | int desktop() const; | <{{{3}}}> |
TO DO | Remove | int lastDesktop() const; | <{{{3}}}> |
TO DO | Remove | void addAssociatedWidget(QWidget *widget); | <{{{3}}}> |
TO DO | Remove | void removeAssociatedWidget(QWidget *widget); | <{{{3}}}> |
TO DO | Remove | bool drawWallpaper(); | <{{{3}}}> |
TO DO | Remove | slot void setDrawWallpaper(bool drawWallpaper); | <{{{3}}}> |
DONE | Keep | signal void wallpaperChanged(); | |
DONE | Keep | void setWallpaper(const QString &pluginName); | |
DONE | Keep | QString wallpaper() const; | |
DONE | Keep | void setActivity(const QString &activityId); | |
DONE | Keep | QString activity() const; | |
DONE | Paramenters | signal void appletAdded(Plasma::Applet *applet, const QPointF &pos); Remove pos | |
DONE | Keep | signal void appletRemoved(Plasma::Applet *applet); | |
TO DO | Paramenters | void screenChanged(int wasScreen, int isScreen, Plasma::Containment *containment); -> remove containment parameter | <{{{3}}}> |
DONE | Keep | void configureRequested(Plasma::Containment *containment); -> not completely sure | |
DONE | Keep | slot void setLocation(Plasma::Location location); | |
DONE | Keep | slot void setFormFactor(Plasma::FormFactor formFactor); | |
DONE | Keep | slot void destroy(); | |
TO DO | Remove | slot void destroy(bool confirm); | <{{{3}}}> |
DONE | Keep | slot void setContainmentType(Containment::Type type); |
Actions
asStatus | Action | Method | |
---|---|---|---|
DONE | Keep | void enableAction(const QString &name, bool enable); | |
TO DO | Remove | void addToolBoxAction(QAction *action); | <{{{3}}}> |
TO DO | Remove | void removeToolBoxAction(QAction *action); | <{{{3}}}>
|
Containment Actions
asStatus | Action | Method | |
---|---|---|---|
TO DO | Rename | void setContainmentActions(const QString &trigger, const QString &pluginName); -> Rename to addContainmentActions | <{{{3}}}>
{{FeatureTodo | Remove | QString containmentActions(const QString &trigger); {{FeatureTodo | Remove | QStringList containmentActionsTriggers(); {{FeatureTodo | Add | QHash<QString, ContainmentsActions *> containmentActions() const; |
TO DO | Remove | KConfigGroup containmentActionsConfig(); Remove after adding ContainmentActions::config() | <{{{3}}}>
|
Plugin loading
asStatus | Action | Method | |
---|---|---|---|
TO DO | PluginLoader | static KPluginInfo::List listContainments(const QString &category, const QString &parentApp); | <{{{3}}}> |
TO DO | PluginLoader | static KPluginInfo::List listContainmentsOfType(const QString &type, const QString &category , const QString &parentApp ); | <{{{3}}}> |
TO DO | PluginLoader | static QStringList listContainmentTypes(); | <{{{3}}}> |
TO DO | PluginLoader | static KPluginInfo::List listContainmentsForMimeType(const QString &mimeType); | <{{{3}}}>
|
Configuration
asStatus | Action | Method | |
---|---|---|---|
DONE | Keep | void save(KConfigGroup &group) const; | |
DONE | Keep | void restore(KConfigGroup &group); | |
DONE | Keep | protected virtual void saveContents(KConfigGroup &group) const; | |
DONE | Keep | protected virtual void restoreContents(KConfigGroup &group); | |
TO DO | Move | slot void showConfigurationInterface(); -> into scriptengine | <{{{3}}}> |
UI specific stuff
UI specific things don't belong to this library
asStatus | Action | Method | |
---|---|---|---|
TO DO | Remove | void showContextMenu(const QPointF &containmentPos, const QPoint &screenPos); | <{{{3}}}> |
TO DO | Remove | virtual void showDropZone(const QPoint pos); | <{{{3}}}> |
TO DO | Remove | void contextMenuEvent(QContextMenuEvent *event); | <{{{3}}}> |
TO DO | Remove | void wheelEvent(QWheelEvent *event); | <{{{3}}}> |
TO DO | Remove | signal void toolBoxToggled(); | <{{{3}}}> |
TO DO | Remove | signal void toolBoxVisibilityChanged(bool); | <{{{3}}}>
|