Changeset View
Changeset View
Standalone View
Standalone View
src/plasma/dataengine.h
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | 64 | public: | |||
---|---|---|---|---|---|
67 | typedef QMapIterator<QString, QVariant> DataIterator; | 67 | typedef QMapIterator<QString, QVariant> DataIterator; | ||
68 | typedef QHash<QString, DataContainer *> SourceDict; | 68 | typedef QHash<QString, DataContainer *> SourceDict; | ||
69 | 69 | | |||
70 | /** | 70 | /** | ||
71 | * Constructor. | 71 | * Constructor. | ||
72 | * | 72 | * | ||
73 | * @param parent The parent object. | 73 | * @param parent The parent object. | ||
74 | * @param plugin plugin info that describes the engine | 74 | * @param plugin plugin info that describes the engine | ||
75 | * | ||||
76 | * @deprecated since 5.62 | ||||
kossebau: For people reading the generated API dox, we need to duplicate the recommendation what to do… | |||||
75 | **/ | 77 | **/ | ||
76 | explicit DataEngine(const KPluginInfo &plugin, QObject *parent = nullptr); | 78 | PLASMA_DEPRECATED explicit DataEngine(const KPluginInfo &plugin, QObject *parent = nullptr); | ||
79 | | ||||
80 | /** | ||||
broulik: Docs, with `@since` | |||||
81 | * Constructor. | ||||
82 | * | ||||
83 | * @param parent The parent object. | ||||
84 | * @param plugin metadata that describes the engine | ||||
85 | * | ||||
86 | * @since 5.62 | ||||
87 | */ | ||||
88 | explicit DataEngine(const KPluginMetaData &plugin, QObject *parent = nullptr); | ||||
kossebau: own line again recommended | |||||
77 | 89 | | |||
78 | explicit DataEngine(QObject *parent = nullptr, const QVariantList &args = QVariantList()); | 90 | explicit DataEngine(QObject *parent = nullptr, const QVariantList &args = QVariantList()); | ||
79 | 91 | | |||
80 | ~DataEngine() override; | 92 | ~DataEngine() override; | ||
81 | 93 | | |||
82 | /** | 94 | /** | ||
83 | * @return a list of all the data sources available via this DataEngine | 95 | * @return a list of all the data sources available via this DataEngine | ||
84 | * Whether these sources are currently available (which is what | 96 | * Whether these sources are currently available (which is what | ||
85 | * the default implementation provides) or not is up to the | 97 | * the default implementation provides) or not is up to the | ||
86 | * DataEngine to decide. | 98 | * DataEngine to decide. | ||
87 | **/ | 99 | **/ | ||
88 | virtual QStringList sources() const; | 100 | virtual QStringList sources() const; | ||
89 | 101 | | |||
90 | /** | 102 | /** | ||
91 | * @param source the source to target the Service at | 103 | * @param source the source to target the Service at | ||
92 | * @return a Service that has the source as a destination. The service | 104 | * @return a Service that has the source as a destination. The service | ||
93 | * is parented to the DataEngine, but should be deleted by the | 105 | * is parented to the DataEngine, but should be deleted by the | ||
94 | * caller when finished with it | 106 | * caller when finished with it | ||
95 | */ | 107 | */ | ||
96 | Q_INVOKABLE virtual Service *serviceForSource(const QString &source); | 108 | Q_INVOKABLE virtual Service *serviceForSource(const QString &source); | ||
97 | 109 | | |||
98 | /** | 110 | /** | ||
99 | * @return description of the plugin that implements this DataEngine | 111 | * @return description of the plugin that implements this DataEngine | ||
112 | * | ||||
113 | * @deprecated since 5.62, use metadata | ||||
114 | */ | ||||
115 | PLASMA_DEPRECATED KPluginInfo pluginInfo() const; | ||||
kossebau: own line | |||||
116 | | ||||
117 | /** | ||||
118 | * @return description of the plugin that implements this DataEngine | ||||
119 | * | ||||
120 | * @since 5.62 | ||||
broulik: 5 | |||||
100 | */ | 121 | */ | ||
101 | KPluginInfo pluginInfo() const; | 122 | KPluginMetaData metadata() const; | ||
102 | 123 | | |||
103 | /** | 124 | /** | ||
104 | * Connects a source to an object for data updates. The object must | 125 | * Connects a source to an object for data updates. The object must | ||
105 | * have a slot with the following signature: | 126 | * have a slot with the following signature: | ||
106 | * @code | 127 | * @code | ||
107 | * void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data); | 128 | * void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data); | ||
108 | * @endcode | 129 | * @endcode | ||
109 | * | 130 | * | ||
▲ Show 20 Lines • Show All 356 Lines • Show Last 20 Lines |
For people reading the generated API dox, we need to duplicate the recommendation what to do: