Plasma/libplasma2/API Review/DataEngine: Difference between revisions
(→API) |
|||
Line 14: | Line 14: | ||
{{FeatureDone|Keep| virtual QStringList sources() const;}} | {{FeatureDone|Keep| virtual QStringList sources() const;}} | ||
{{FeatureDone|Keep| virtual Service *serviceForSource(const QString &source);}} | {{FeatureDone|Keep| virtual Service *serviceForSource(const QString &source);}} | ||
{{ | {{FeatureDone|Add|KPluginInfo pluginInfo() const;}} | ||
{{ | {{FeatureDone|Remove|QString name() const;}} | ||
{{ | {{FeatureDone|Remove|QString icon() const;}} | ||
{{FeatureTodo|Remove|QString pluginName() const;}} | {{FeatureTodo|Remove|QString pluginName() const;}} | ||
{{FeatureDone|Keep| void connectSource(const QString &source, QObject *visualization, uint pollingInterval, Plasma::IntervalAlignment intervalAlignment ) const;}} | {{FeatureDone|Keep| void connectSource(const QString &source, QObject *visualization, uint pollingInterval, Plasma::IntervalAlignment intervalAlignment ) const;}} | ||
Line 57: | Line 57: | ||
|} | |} | ||
=DataEngine functionality currently:= | =DataEngine functionality currently:= |
Revision as of 18:49, 3 April 2013
API
Status | Action | Method | |
---|---|---|---|
TO DO | Remove | explicit DataEngine(QObject *parent , KService::Ptr service); | <{{{3}}}> |
TO DO | Add | explicit DataEngine(QObject *parent, const KPluginInfo &info); | <{{{3}}}> |
TO DO | Remove | DataEngine(QObject *parent, const QVariantList &args); | <{{{3}}}> |
DONE | Keep | ~DataEngine(); | |
TO DO | Remove? | virtual void init(); can be removed is there will be only one constructor | <{{{3}}}> |
DONE | Keep | virtual QStringList sources() const; | |
DONE | Keep | virtual Service *serviceForSource(const QString &source); | |
DONE | Add | KPluginInfo pluginInfo() const; | |
DONE | Remove | QString name() const; | |
DONE | Remove | QString icon() const; | |
TO DO | Remove | QString pluginName() const; | <{{{3}}}> |
DONE | Keep | void connectSource(const QString &source, QObject *visualization, uint pollingInterval, Plasma::IntervalAlignment intervalAlignment ) const; | |
DONE | Keep | void connectAllSources(QObject *visualization, uint pollingInterval, Plasma::IntervalAlignment intervalAlignment) const; | |
DONE | Keep | void disconnectSource(const QString &source, QObject *visualization) const; | |
DONE | Keep | DataContainer *containerForSource(const QString &source); | |
TO DO | Remove | DataEngine::Data query(const QString &source) const; | <{{{3}}}> |
DONE | Keep | bool isValid() const; | |
DONE | Keep | bool isEmpty() const; | |
DONE | Keep | Package package() const; | |
TO DO | Remove | Service* createDefaultService(QObject *parent ); | <{{{3}}}> |
TO DO | Move | static QStringList listAllEngines(const QString &parentApp); -> in PluginLoader | <{{{3}}}> |
TO DO | Move | static KPluginInfo::List listEngineInfo(const QString &parentApp); -> in PluginLoader | <{{{3}}}> |
TO DO | Move | static KPluginInfo::List listEngineInfoByCategory(const QString &category, const QString &parentApp); | <{{{3}}}> |
DONE | Keep | void sourceAdded(const QString &source); | |
DONE | Keep | void sourceRemoved(const QString &source); | |
DONE | Keep | virtual bool sourceRequestEvent(const QString &source); | |
DONE | Keep | virtual bool updateSourceEvent(const QString &source); | |
DONE | Keep | void setData(const QString &source, const QVariant &value); | |
DONE | Keep | void setData(const QString &source, const QString &key, const QVariant &value); | |
TO DO | Signature | void setData(const QString &source, const Data ->QHash<QString, QVariant> &data); -> Data becomes QHash<QString, QVariant> | <{{{3}}}> |
DONE | Keep | void removeAllData(const QString &source); | |
DONE | Keep | void removeData(const QString &source, const QString &key); | |
DONE | Keep | void addSource(DataContainer *source); | |
DONE | Keep | void setMinimumPollingInterval(int minimumMs); | |
DONE | Keep | int minimumPollingInterval() const; | |
DONE | Keep | void setPollingInterval(uint frequency); | |
DONE | Keep | void removeAllSources(); | |
DONE | Keep | void setValid(bool valid); | |
TO DO | Signature | SourceDict -> QHash<QString, DataContainer*> containerDict() const; | <{{{3}}}> |
DONE | Keep | void timerEvent(QTimerEvent *event); | |
TO DO | Remove | void setName(const QString &name); | <{{{3}}}> |
TO DO | Remove | void setIcon(const QString &icon); | <{{{3}}}> |
TO DO | Remove | void setDefaultService(const QString &serviceName); | <{{{3}}}> |
DONE | Keep | void setStorageEnabled(const QString &source, bool store); | |
TO DO | Move | slot void scheduleSourcesUpdated(); -> to private class | <{{{3}}}> |
DONE | Keep | slot void removeSource(const QString &source); | |
DONE | Keep | slot void updateAllSources(); | |
DONE | Keep | slot void forceImmediateUpdateOfAllVisualizations();
|
DataEngine functionality currently:
* Timed updates * Ease of item creation and update * Item destruction when not used * Service integration
DataEngine functionality missing:
* Introspection / self-documenting structures * Ability to represent as model internally
QML Access
* Can haz a model?
DataEngine { public: QAbstractItemModel *model() const; }
DataSource { engine: “keystate” sources: “*Button” fields: {“Pressed”} }
Example of source types of twitter engine
Twitter tweets posting identi.ca 1 dents posting identi.ca 2 dents posting avatars model { name : picture }
TwitterModel *model = new TwitterModel(“twitter account foo”); setData(“twitter account foo”, model);
bool pressedState = false; setData(“key”, “pressed”, pressedState);
DataContainer -> model, or contains a model …
What do we want?
- lifecycle management
- ondemand creation
- keep existing API (setData, service-related stuff)
- make it easy to use “3rd party models” (e.g. some akonadi model)
Current dataengines
- akonadi - Akonadi PIM data engine
- applicationjobs - Application job updates (via kuiserver)
- apps - Information and launching of all applications in * the app menu.
- calendar - Calendar data engine
- comic - Online comic strips
- devicenotifications - Passive device notifications for the user.
- dict - Look up word meanings
- executable - Run Executable Data Engine
- favicons - Data Engine for getting favicons of web sites
- filebrowser - Information about files and directories.
- geolocation - Geolocation Data Engine
- hotplug - Tracks hot-pluggable devices as they appear and disappear.
- kdeobservatory - A Data Engine for acquiring consolidated data about KDE projects
- keystate - Keyboard modifier and mouse buttons states
- kget - No description available
- kimpanel - DataEngine for Kimpanel
- kremotecontrol - Data engine for kremotecontrol
- ktorrent - KTorrent data engine, for getting information from KTorrent
- metadata - No description available
- microblog - identi.ca and twitter micro-blogging services
- mixer - No description available
- mouse - Mouse position and cursor
- mpris2 - Provides information from and control over media players via MPRIS2
- network - Network interface information
- networkmanagement - Network Manager data engine
- notifications - Passive visual notifications for the user.
- nowplaying - Lists currently playing music
- obsdataengine - DataEngine to make API Calls to the Open Build Service
- ocs - No description available
- openstreetmap - The OpenStreetMap data engine can be used to query things near the user.
- org.kde.active.apps - Information and launching of all applications in the app menu.
- org.kde.active.bookmarks - Bookmarks from Nepomuk
- org.kde.active.capabilities - Provides information and services for device-specific aspects
- org.kde.active.customsearch - Provides metadata for custom searches in semantic resources
- org.kde.active.metadata - Provides metadata for semantic resources
- org.kde.active.persons - Provides metadata for custom searches in semantic resources
- org.kde.activities - Information on Plasma Activities
- org.kde.alarms - List and set Akonadi Alarms
- org.kde.devicecapabilities - Provides information and services for device-specific aspects
- org.kde.examples.customDataContainers - A demonstration of how to subclass DataContainer
- org.kde.examples.simpleEngine - A very basic DataEngine implementation
- org.kde.examples.sourcesOnRequest - A DataEngine example showing how to respond to requests for source creation and updates
- org.kde.konqprofiles - List and launch Konqueror profiles
- org.kde.konsoleprofiles - List and launch Konsole profiles
- org.kde.mobilenetworkengine - Mobile network engine
- org.kde.mobileprofileengine - No description available
- org.kde.plasma.dataengine.share - Engine to share content using different services
- org.kde.preview - Shows previews for webpages
- org.kde.printers - No description available
- org.kde.printjobs - No description available
- org.kde.runner - Query KRunner and execute the results
- org.kde.sharelikeconnect - Provider of actions for sharing resources
- parley - Vocabulary data for Plasmoids
- places - Places, as seen in the file manager and in file dialogs.
- potd - Data Engine for getting various online Pictures of The Day.
- powermanagement - Battery, AC, sleep and PowerDevil information.
- publictransport - Plasma data engine for public transport
- rss - RSS News Data Engine
- rtm - An engine to work with Remember the Milk.
- searchlaunch - Engine to handle queries to SAL containment
- soliddevice - Device data via Solid
- statusnotifieritem - Engine for applications' status information, based on the Status Notifier protocol.
- systemmonitor - System status information
- tasks - Information and management services for all available windows.
- time - Date and time by timezone
- weather - Weather data from multiple online sources
- workareas - Workareas Data Engine, as described in the WorkFlow Project