|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #include "tstasksettings.h" |
|
18 #include "tstasksettings_p.h" |
|
19 |
|
20 /*! |
|
21 @class TsTaskSettings |
|
22 @ingroup publicApi |
|
23 @brief TsTaskSettings allows application to alter the way it will be |
|
24 handled by TsTaskMonitor. |
|
25 |
|
26 This class is one of the Qt interfaces for Task Monitor server. It can be |
|
27 used to set custom screenshot of the task, or to change the task visibility. |
|
28 */ |
|
29 |
|
30 /*! |
|
31 Constructor. |
|
32 */ |
|
33 TsTaskSettings::TsTaskSettings() : d_ptr(new TsTaskSettingsPrivate()) |
|
34 { |
|
35 } |
|
36 |
|
37 /*! |
|
38 Destructor. |
|
39 */ |
|
40 TsTaskSettings::~TsTaskSettings() |
|
41 { |
|
42 delete d_ptr; |
|
43 } |
|
44 |
|
45 /*! |
|
46 Overwrites default screenshot of task with \a screenshot. If \a |
|
47 screenshot is null, this method will return false. |
|
48 @return True if the screenshot is successfully saved, false otherwise. |
|
49 */ |
|
50 bool TsTaskSettings::registerScreenshot(const QPixmap &screenshot) |
|
51 { |
|
52 return d_ptr->registerScreenshot(screenshot); |
|
53 } |
|
54 |
|
55 /*! |
|
56 Removes custom screenshot saved with registerScreenshot(). If there was no |
|
57 saved screenshot, this method will return false. |
|
58 @return True if the screenshot is successfully removed, false otherwise. |
|
59 */ |
|
60 bool TsTaskSettings::unregisterScreenshot() |
|
61 { |
|
62 return d_ptr->unregisterScreenshot(); |
|
63 } |
|
64 |
|
65 /*! |
|
66 Changes the \a visibilty of task. Hidden tasks are not present on the task |
|
67 list returned by TsTaskMonitor::taskList(). |
|
68 @return True if the visibility is changed successfully, false otherwise. |
|
69 */ |
|
70 bool TsTaskSettings::setVisibility(bool visibility) |
|
71 { |
|
72 return d_ptr->setVisibility(visibility); |
|
73 } |