Changeset View
Changeset View
Standalone View
Standalone View
src/lib/changeaccountdisplaynamejob.h
- This file was copied from src/lib/accountservicetogglejob.h.
Show All 10 Lines | |||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
12 | * GNU General Public License for more details. * | 12 | * GNU General Public License for more details. * | ||
13 | * * | 13 | * * | ||
14 | * You should have received a copy of the GNU General Public License * | 14 | * You should have received a copy of the GNU General Public License * | ||
15 | * along with this program; if not, write to the Free Software * | 15 | * along with this program; if not, write to the Free Software * | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * | ||
17 | *************************************************************************************/ | 17 | *************************************************************************************/ | ||
18 | 18 | | |||
19 | #ifndef ACCOUNTSERVICETOGGLE_H | 19 | #ifndef CHANGEACCOUNTDISPLAYNAMEJOB_H | ||
20 | #define ACCOUNTSERVICETOGGLE_H | 20 | #define CHANGEACCOUNTDISPLAYNAMEJOB_H | ||
21 | 21 | | |||
22 | #include "kaccounts_export.h" | 22 | #include "kaccounts_export.h" | ||
23 | 23 | | |||
24 | #include <kjob.h> | 24 | #include <kjob.h> | ||
25 | 25 | | |||
26 | #include <QStringList> | 26 | #include <QStringList> | ||
27 | 27 | | |||
28 | class KACCOUNTS_EXPORT AccountServiceToggleJob : public KJob | 28 | /** | ||
29 | * @brief A job used to change the human-readable name of a specified account | ||||
30 | * | ||||
31 | * This job will refuse to change the name to something empty (while it is technically | ||||
32 | * possible to do so for an account, it is highly undesirable) | ||||
33 | */ | ||||
34 | class KACCOUNTS_EXPORT ChangeAccountDisplayNameJob : public KJob | ||||
29 | { | 35 | { | ||
30 | Q_OBJECT | 36 | Q_OBJECT | ||
31 | Q_PROPERTY(QString accountId READ accountId WRITE setAccountId NOTIFY accountIdChanged) | 37 | Q_PROPERTY(QString accountId READ accountId WRITE setAccountId NOTIFY accountIdChanged) | ||
32 | Q_PROPERTY(QString serviceId READ serviceId WRITE setServiceId NOTIFY serviceIdChanged) | 38 | Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName NOTIFY displayNameChanged) | ||
33 | Q_PROPERTY(bool serviceEnabled READ serviceEnabled WRITE setServiceEnabled NOTIFY serviceEnabledChanged) | | |||
34 | public: | 39 | public: | ||
35 | explicit AccountServiceToggleJob(QObject* parent = nullptr); | 40 | explicit ChangeAccountDisplayNameJob(QObject* parent = nullptr); | ||
36 | virtual ~AccountServiceToggleJob(); | 41 | virtual ~ChangeAccountDisplayNameJob(); | ||
37 | 42 | | |||
38 | void start() override; | 43 | void start() override; | ||
39 | 44 | | |||
40 | QString accountId() const; | 45 | QString accountId() const; | ||
41 | void setAccountId(const QString& accountId); | 46 | void setAccountId(const QString& accountId); | ||
42 | Q_SIGNAL void accountIdChanged(); | 47 | Q_SIGNAL void accountIdChanged(); | ||
43 | 48 | | |||
44 | QString serviceId() const; | 49 | QString displayName() const; | ||
45 | void setServiceId(const QString& serviceId); | 50 | void setDisplayName(const QString& displayName); | ||
46 | Q_SIGNAL void serviceIdChanged(); | 51 | Q_SIGNAL void displayNameChanged(); | ||
47 | | ||||
48 | bool serviceEnabled() const; | | |||
49 | void setServiceEnabled(bool serviceEnabled); | | |||
50 | Q_SIGNAL void serviceEnabledChanged(); | | |||
51 | private: | 52 | private: | ||
52 | class Private; | 53 | class Private; | ||
53 | Private* d; | 54 | Private* d; | ||
54 | }; | 55 | }; | ||
55 | #endif//ACCOUNTSERVICETOGGLE_H | 56 | #endif//CHANGEACCOUNTDISPLAYNAMEJOB_H |