93 installLayout->addItem(installNew); |
93 installLayout->addItem(installNew); |
94 HbPushButton *installOld = new HbPushButton(tr("Install using old API")); |
94 HbPushButton *installOld = new HbPushButton(tr("Install using old API")); |
95 installLayout->addItem(installOld); |
95 installLayout->addItem(installOld); |
96 HbPushButton *launchApp = new HbPushButton(tr("Install by opening file")); |
96 HbPushButton *launchApp = new HbPushButton(tr("Install by opening file")); |
97 installLayout->addItem(launchApp); |
97 installLayout->addItem(launchApp); |
|
98 HbPushButton *cancelInstall = new HbPushButton(tr("Cancel installing")); |
|
99 installLayout->addItem(cancelInstall); |
98 installLayout->addStretch(); |
100 installLayout->addStretch(); |
99 connect(installNew, SIGNAL(clicked()), this, SLOT(installUsingNewApi())); |
101 connect(installNew, SIGNAL(clicked()), this, SLOT(installUsingNewApi())); |
100 connect(installOld, SIGNAL(clicked()), this, SLOT(installUsingOldApi())); |
102 connect(installOld, SIGNAL(clicked()), this, SLOT(installUsingOldApi())); |
101 connect(launchApp, SIGNAL(clicked()), this, SLOT(installByOpeningFile())); |
103 connect(launchApp, SIGNAL(clicked()), this, SLOT(installByOpeningFile())); |
|
104 connect(cancelInstall, SIGNAL(clicked()), this, SLOT(cancelInstalling())); |
102 |
105 |
103 HbToolBar *installToolBar = new HbToolBar(); |
106 HbToolBar *installToolBar = new HbToolBar(); |
104 installToolBar->addAction(tr("RemoveView"), this, SLOT(removeViewActivated())); |
107 installToolBar->addAction(tr("RemoveView"), this, SLOT(removeViewActivated())); |
105 installToolBar->addAction(tr("Exit"), this, SLOT(closeApp())); |
108 installToolBar->addAction(tr("Exit"), this, SLOT(closeApp())); |
106 mInstallView->setToolBar(installToolBar); |
109 mInstallView->setToolBar(installToolBar); |
224 |
227 |
225 void TestInstaller::installByOpeningFile() |
228 void TestInstaller::installByOpeningFile() |
226 { |
229 { |
227 if (mInstallableFiles) { |
230 if (mInstallableFiles) { |
228 doOpenFile(mCurrentFile); |
231 doOpenFile(mCurrentFile); |
|
232 } |
|
233 } |
|
234 |
|
235 void TestInstaller::cancelInstalling() |
|
236 { |
|
237 if (mRunner) { |
|
238 delete mRunner; |
|
239 mRunner = 0; |
|
240 HbMessageBox::warning(tr("Running operation deleted")); |
|
241 } else { |
|
242 HbMessageBox::warning(tr("No operation running")); |
229 } |
243 } |
230 } |
244 } |
231 |
245 |
232 void TestInstaller::removeUsingNewApi() |
246 void TestInstaller::removeUsingNewApi() |
233 { |
247 { |