equal
deleted
inserted
replaced
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: Interface for controlpanel plugins, with this interface client application can launch a view from outside of controlpanel application. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 #ifndef CPLAUNCHERINTERFACE_H |
19 #ifndef CPLAUNCHERINTERFACE_H |
22 #include <QtPlugin> |
22 #include <QtPlugin> |
23 #include <QList> |
23 #include <QList> |
24 |
24 |
25 /*! |
25 /*! |
26 \class CpLauncherInterface |
26 \class CpLauncherInterface |
27 \brief The class CpLauncherInterface defines an interface for plugins which can be launched a specific view from outside controlpanel application. |
27 \brief The class CpLauncherInterface defines an interface for plugins, if one controlpanel plugin implements |
|
28 this interface, client application can launch a setting view from outside of controlpanel application by two ways. |
|
29 |
|
30 (1) launch setting view in client process, using CpPluginLauncher. |
|
31 |
|
32 \code |
|
33 CpBaseSettingView *settingView = CpPluginLauncher::launchSettingView("cpmyplugin.dll",QVariant()); |
|
34 \endcode |
|
35 |
|
36 (2) launch setting view in embedded mode, using QtHighway client API. |
|
37 |
|
38 \code |
|
39 if (mRequest) { |
|
40 delete mRequest; |
|
41 mRequest = 0; |
|
42 } |
|
43 |
|
44 mRequest = mAppMgr.create("com.nokia.symbian.ICpPluginLauncher", "launchSettingView(QString,QVariant)", true); |
|
45 |
|
46 if (!mRequest) |
|
47 { |
|
48 return; |
|
49 } |
|
50 else |
|
51 { |
|
52 connect(mRequest, SIGNAL(requestOk(QVariant)), SLOT(handleReturnValue(QVariant))); |
|
53 connect(mRequest, SIGNAL(requestError(int,QString)), SLOT(handleError(int,QString))); |
|
54 } |
|
55 |
|
56 // Set arguments for request |
|
57 QList<QVariant> args; |
|
58 args << QVariant("cpmyplugin.dll"); |
|
59 args << QVariant(); |
|
60 mRequest->setArguments(args); |
|
61 |
|
62 mRequest->setSynchronous(false); |
|
63 // Make the request |
|
64 if (!mRequest->send()) |
|
65 { |
|
66 //report error |
|
67 } |
|
68 \endcode |
|
69 |
28 */ |
70 */ |
29 |
71 |
30 class QVariant; |
72 class QVariant; |
31 class CpBaseSettingView; |
73 class CpBaseSettingView; |
32 |
74 |