Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/taskfilterproxymodel.h
Show First 20 Lines • Show All 209 Lines • ▼ Show 20 Line(s) | 56 | public: | |||
---|---|---|---|---|---|
210 | 210 | | |||
211 | /** | 211 | /** | ||
212 | * Request activation of the task at the given index. Derived classes are | 212 | * Request activation of the task at the given index. Derived classes are | ||
213 | * free to interpret the meaning of "activate" themselves depending on | 213 | * free to interpret the meaning of "activate" themselves depending on | ||
214 | * the nature and state of the task, e.g. launch or raise a window task. | 214 | * the nature and state of the task, e.g. launch or raise a window task. | ||
215 | * | 215 | * | ||
216 | * @param index An index in this tasks model. | 216 | * @param index An index in this tasks model. | ||
217 | **/ | 217 | **/ | ||
218 | void requestActivate(const QModelIndex &index); | 218 | void requestActivate(const QModelIndex &index) override; | ||
219 | 219 | | |||
220 | /** | 220 | /** | ||
221 | * Request an additional instance of the application backing the task | 221 | * Request an additional instance of the application backing the task | ||
222 | * at the given index. | 222 | * at the given index. | ||
223 | * | 223 | * | ||
224 | * @param index An index in this tasks model. | 224 | * @param index An index in this tasks model. | ||
225 | **/ | 225 | **/ | ||
226 | void requestNewInstance(const QModelIndex &index); | 226 | void requestNewInstance(const QModelIndex &index) override; | ||
227 | 227 | | |||
228 | /** | 228 | /** | ||
229 | * Request the task at the given index be closed. | 229 | * Request the task at the given index be closed. | ||
230 | * | 230 | * | ||
231 | * @param index An index in this tasks model. | 231 | * @param index An index in this tasks model. | ||
232 | **/ | 232 | **/ | ||
233 | void requestClose(const QModelIndex &index); | 233 | void requestClose(const QModelIndex &index) override; | ||
234 | 234 | | |||
235 | /** | 235 | /** | ||
236 | * Request starting an interactive move for the task at the given index. | 236 | * Request starting an interactive move for the task at the given index. | ||
237 | * | 237 | * | ||
238 | * This is meant for tasks that have an associated window, and may be | 238 | * This is meant for tasks that have an associated window, and may be | ||
239 | * a no-op when there is no window. | 239 | * a no-op when there is no window. | ||
240 | * | 240 | * | ||
241 | * @param index An index in this tasks model. | 241 | * @param index An index in this tasks model. | ||
242 | **/ | 242 | **/ | ||
243 | void requestMove(const QModelIndex &index); | 243 | void requestMove(const QModelIndex &index) override; | ||
244 | 244 | | |||
245 | /** | 245 | /** | ||
246 | * Request starting an interactive resize for the task at the given index. | 246 | * Request starting an interactive resize for the task at the given index. | ||
247 | * | 247 | * | ||
248 | * This is meant for tasks that have an associated window, and may be a | 248 | * This is meant for tasks that have an associated window, and may be a | ||
249 | * no-op when there is no window. | 249 | * no-op when there is no window. | ||
250 | * | 250 | * | ||
251 | * @param index An index in this tasks model. | 251 | * @param index An index in this tasks model. | ||
252 | **/ | 252 | **/ | ||
253 | void requestResize(const QModelIndex &index); | 253 | void requestResize(const QModelIndex &index) override; | ||
254 | 254 | | |||
255 | /** | 255 | /** | ||
256 | * Request toggling the minimized state of the task at the given index. | 256 | * Request toggling the minimized state of the task at the given index. | ||
257 | * | 257 | * | ||
258 | * This is meant for tasks that have an associated window, and may be | 258 | * This is meant for tasks that have an associated window, and may be | ||
259 | * a no-op when there is no window. | 259 | * a no-op when there is no window. | ||
260 | * | 260 | * | ||
261 | * @param index An index in this tasks model. | 261 | * @param index An index in this tasks model. | ||
262 | **/ | 262 | **/ | ||
263 | void requestToggleMinimized(const QModelIndex &index); | 263 | void requestToggleMinimized(const QModelIndex &index) override; | ||
264 | 264 | | |||
265 | /** | 265 | /** | ||
266 | * Request toggling the maximized state of the task at the given index. | 266 | * Request toggling the maximized state of the task at the given index. | ||
267 | * | 267 | * | ||
268 | * This is meant for tasks that have an associated window, and may be | 268 | * This is meant for tasks that have an associated window, and may be | ||
269 | * a no-op when there is no window. | 269 | * a no-op when there is no window. | ||
270 | * | 270 | * | ||
271 | * @param index An index in this tasks model. | 271 | * @param index An index in this tasks model. | ||
272 | **/ | 272 | **/ | ||
273 | void requestToggleMaximized(const QModelIndex &index); | 273 | void requestToggleMaximized(const QModelIndex &index) override; | ||
274 | 274 | | |||
275 | /** | 275 | /** | ||
276 | * Request toggling the keep-above state of the task at the given index. | 276 | * Request toggling the keep-above state of the task at the given index. | ||
277 | * | 277 | * | ||
278 | * This is meant for tasks that have an associated window, and may be | 278 | * This is meant for tasks that have an associated window, and may be | ||
279 | * a no-op when there is no window. | 279 | * a no-op when there is no window. | ||
280 | * | 280 | * | ||
281 | * @param index An index in this tasks model. | 281 | * @param index An index in this tasks model. | ||
282 | **/ | 282 | **/ | ||
283 | void requestToggleKeepAbove(const QModelIndex &index); | 283 | void requestToggleKeepAbove(const QModelIndex &index) override; | ||
284 | 284 | | |||
285 | /** | 285 | /** | ||
286 | * Request toggling the keep-below state of the task at the given index. | 286 | * Request toggling the keep-below state of the task at the given index. | ||
287 | * | 287 | * | ||
288 | * This is meant for tasks that have an associated window, and may be | 288 | * This is meant for tasks that have an associated window, and may be | ||
289 | * a no-op when there is no window. | 289 | * a no-op when there is no window. | ||
290 | * | 290 | * | ||
291 | * @param index An index in this tasks model. | 291 | * @param index An index in this tasks model. | ||
292 | **/ | 292 | **/ | ||
293 | void requestToggleKeepBelow(const QModelIndex &index); | 293 | void requestToggleKeepBelow(const QModelIndex &index) override; | ||
294 | 294 | | |||
295 | /** | 295 | /** | ||
296 | * Request toggling the fullscreen state of the task at the given index. | 296 | * Request toggling the fullscreen state of the task at the given index. | ||
297 | * | 297 | * | ||
298 | * This is meant for tasks that have an associated window, and may be | 298 | * This is meant for tasks that have an associated window, and may be | ||
299 | * a no-op when there is no window. | 299 | * a no-op when there is no window. | ||
300 | * | 300 | * | ||
301 | * @param index An index in this tasks model. | 301 | * @param index An index in this tasks model. | ||
302 | **/ | 302 | **/ | ||
303 | void requestToggleFullScreen(const QModelIndex &index); | 303 | void requestToggleFullScreen(const QModelIndex &index) override; | ||
304 | 304 | | |||
305 | /** | 305 | /** | ||
306 | * Request toggling the shaded state of the task at the given index. | 306 | * Request toggling the shaded state of the task at the given index. | ||
307 | * | 307 | * | ||
308 | * This is meant for tasks that have an associated window, and may be | 308 | * This is meant for tasks that have an associated window, and may be | ||
309 | * a no-op when there is no window. | 309 | * a no-op when there is no window. | ||
310 | * | 310 | * | ||
311 | * @param index An index in this tasks model. | 311 | * @param index An index in this tasks model. | ||
312 | **/ | 312 | **/ | ||
313 | void requestToggleShaded(const QModelIndex &index); | 313 | void requestToggleShaded(const QModelIndex &index) override; | ||
314 | 314 | | |||
315 | /** | 315 | /** | ||
316 | * Request moving the task at the given index to the specified virtual | 316 | * Request moving the task at the given index to the specified virtual | ||
317 | * desktop. | 317 | * desktop. | ||
318 | * | 318 | * | ||
319 | * This is meant for tasks that have an associated window, and may be | 319 | * This is meant for tasks that have an associated window, and may be | ||
320 | * a no-op when there is no window. | 320 | * a no-op when there is no window. | ||
321 | * | 321 | * | ||
322 | * @param index An index in this tasks model. | 322 | * @param index An index in this tasks model. | ||
323 | * @param desktop A virtual desktop number. | 323 | * @param desktop A virtual desktop number. | ||
324 | **/ | 324 | **/ | ||
325 | void requestVirtualDesktop(const QModelIndex &index, qint32 desktop); | 325 | void requestVirtualDesktop(const QModelIndex &index, qint32 desktop) override; | ||
326 | 326 | | |||
327 | /** | 327 | /** | ||
328 | * Request informing the window manager of new geometry for a visual | 328 | * Request informing the window manager of new geometry for a visual | ||
329 | * delegate for the task at the given index. The geometry should be in | 329 | * delegate for the task at the given index. The geometry should be in | ||
330 | * screen coordinates. | 330 | * screen coordinates. | ||
331 | * | 331 | * | ||
332 | * @param index An index in this tasks model. | 332 | * @param index An index in this tasks model. | ||
333 | * @param geometry Visual delegate geometry in screen coordinates. | 333 | * @param geometry Visual delegate geometry in screen coordinates. | ||
334 | * @param delegate The delegate. Implementations are on their own with | 334 | * @param delegate The delegate. Implementations are on their own with | ||
335 | * regard to extracting information from this, and should take care to | 335 | * regard to extracting information from this, and should take care to | ||
336 | * reject invalid objects. | 336 | * reject invalid objects. | ||
337 | **/ | 337 | **/ | ||
338 | void requestPublishDelegateGeometry(const QModelIndex &index, const QRect &geometry, | 338 | void requestPublishDelegateGeometry(const QModelIndex &index, const QRect &geometry, | ||
339 | QObject *delegate = nullptr); | 339 | QObject *delegate = nullptr) override; | ||
340 | 340 | | |||
341 | Q_SIGNALS: | 341 | Q_SIGNALS: | ||
342 | void virtualDesktopChanged() const; | 342 | void virtualDesktopChanged() const; | ||
343 | void screenChanged() const; | 343 | void screenChanged() const; | ||
344 | void activityChanged() const; | 344 | void activityChanged() const; | ||
345 | void filterByVirtualDesktopChanged() const; | 345 | void filterByVirtualDesktopChanged() const; | ||
346 | void filterByScreenChanged() const; | 346 | void filterByScreenChanged() const; | ||
347 | void filterByActivityChanged() const; | 347 | void filterByActivityChanged() const; | ||
348 | void filterNotMinimizedChanged() const; | 348 | void filterNotMinimizedChanged() const; | ||
349 | 349 | | |||
350 | protected: | 350 | protected: | ||
351 | bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; | 351 | bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; | ||
352 | 352 | | |||
353 | private: | 353 | private: | ||
354 | class Private; | 354 | class Private; | ||
355 | QScopedPointer<Private> d; | 355 | QScopedPointer<Private> d; | ||
356 | }; | 356 | }; | ||
357 | 357 | | |||
358 | } | 358 | } | ||
359 | 359 | | |||
360 | #endif | 360 | #endif |