Plasma/libplasma2/API Review

From KDE Community Wiki
Revision as of 15:09, 6 February 2013 by Notmart (talk | contribs)

Applet

Contstructors

Probably not all of them are still required:

  • explicit Applet(QObject *parent = 0, const QString &serviceId = QString(), uint appletId = 0);
  • explicit Applet(const KPluginInfo &info, QObject *parent = 0, uint appletId = 0);
  • explicit Applet(QObject *parent, const QString &serviceId, uint appletId, const QVariantList &args);
  • protected Applet(QObject *parent, const QVariantList &args);
  • private Applet(const QString &packagePath, uint appletId, const QVariantList &args);

Methods

To be removed

Those two in some qml binding:

  • QPoint popupPosition(const QSize &s) const;
  • QPoint popupPosition(const QSize &s, Qt::AlignmentFlag alignment) const;

Needs to see what constraints are still valid and what not (probably just sizeconstraint invalid now)

  • void updateConstraints(Plasma::Constraints constraints = Plasma::AllConstraints);

Completely obsolete:

  • QFont font() const;
  • bool shouldConserveResources() const;
  • void showMessage(const QIcon &icon, const QString &message, const Plasma::MessageButtons buttons); (messagebox qml components)

Are those still applicable?

  • bool destroyed() const;
  • bool hasAuthorization(const QString &constraint) const;

In PluginLoader?

  • static KPluginInfo::List listAppletInfo(const QString &category = QString(), const QString &parentApp = QString());
  • static KPluginInfo::List listAppletInfoForMimeType(const QString &mimetype);
  • static KPluginInfo::List listAppletInfoForUrl(const QUrl &url);
  • static QStringList listCategories(const QString &parentApp = QString(), bool visibleOnly = true);
  • void setCustomCategories(const QStringList &categories);
  • QStringList customCategories();
  • static Applet *loadPlasmoid(const QString &path, uint appletId = 0, const QVariantList &args = QVariantList());
  • static QString category(const KPluginInfo &applet);
  • static QString category(const QString &appletName);


Signals

  • void releaseVisualFocus();
  • void appletTransformedByUser();
  • void appletTransformedItself();
  • void messageButtonPressed(const Plasma::MessageButton button);

Slots

  • void destroy();
  • virtual void showConfigurationInterface();
  • void showConfigurationInterface(QWidget *widget); probably still valid, but not qwidget based
  • bool hasFocus() const;
  • void setFocus(Qt::FocusReason);

Containment

Corona