equal
deleted
inserted
replaced
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 |
|
18 #include "cpthemeclient_p.h" |
|
19 |
|
20 #ifdef Q_OS_SYMBIAN |
|
21 #include "cpthemeclientsymbian_p.h" |
|
22 #else |
|
23 #include "cpthemeclientqt_p.h" |
|
24 #endif |
|
25 |
|
26 static CpThemeClient *clientInst=0; |
|
27 |
|
28 /** |
|
29 * Constructor |
|
30 */ |
|
31 CpThemeClient::CpThemeClient():d_ptr(new CpThemeClientPrivate) |
|
32 { |
|
33 |
|
34 } |
|
35 |
|
36 /** |
|
37 * CpThemeClient::connectToServer() |
|
38 */ |
|
39 bool CpThemeClient::connectToServer() |
|
40 { |
|
41 Q_D(CpThemeClient); |
|
42 return d->connectToServer(); |
|
43 } |
|
44 |
|
45 bool CpThemeClient::isConnected() |
|
46 { |
|
47 Q_D(CpThemeClient); |
|
48 return d->isConnected(); |
|
49 } |
|
50 |
|
51 /** |
|
52 * Change a theme |
|
53 */ |
|
54 bool CpThemeClient::changeTheme(const QString& newtheme) |
|
55 { |
|
56 Q_D(CpThemeClient); |
|
57 return d->changeTheme(newtheme); |
|
58 } |
|
59 |
|
60 |
|
61 |
|
62 /** |
|
63 * CpThemeClient::~CpThemeClient() |
|
64 */ |
|
65 CpThemeClient::~CpThemeClient() |
|
66 { |
|
67 Q_D(CpThemeClient); |
|
68 delete d; |
|
69 } |
|
70 |
|
71 |
|
72 |
|
73 /** |
|
74 * CpThemeClient::global() |
|
75 */ |
|
76 CpThemeClient *CpThemeClient::global() |
|
77 { |
|
78 if ( !clientInst ) { |
|
79 clientInst = new CpThemeClient; |
|
80 } |
|
81 return clientInst; |
|
82 } |
|
83 |
|
84 /** |
|
85 * CpThemeClient::releaseInstance() |
|
86 */ |
|
87 void CpThemeClient::releaseInstance() |
|
88 { |
|
89 delete clientInst; |
|
90 clientInst = 0; |
|
91 } |
|