dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
tlendpage.cpp
Go to the documentation of this file.
1 
13 /*
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful, but
20  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  * for more details.
23  *
24  * You should have received a copy of the GNU General Public License along
25  * with this program; if not, see <http://www.gnu.org/licenses/>
26  */
27 #include "tlendpage.h"
28 #include "ui_endpage.h"
29 #include <coreplugin/modemanager.h>
32 #include <QMessageBox>
33 
34 TLEndPage::TLEndPage(SetupWizard *wizard, QWidget *parent)
35  : AbstractWizardPage(wizard, parent)
36  , ui(new Ui::EndPage)
37 {
38  ui->setupUi(this);
39  setFinalPage(true);
40  connect(ui->inputWizardButton, &QAbstractButton::clicked, this, &TLEndPage::openInputWizard);
41 }
42 
44 {
45  delete ui;
46 }
47 
48 void TLEndPage::openInputWizard()
49 {
50  ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
51  ConfigGadgetFactory *configGadgetFactory = pm->getObject<ConfigGadgetFactory>();
52 
53  if (configGadgetFactory) {
54  // Core::ModeManager::instance()->activateModeByWorkspaceName("Configuration");
55  getWizard()->close();
56  configGadgetFactory->startInputWizard();
57  } else {
58  QMessageBox msgBox(this);
59  msgBox.setText(tr("Unable to open Input Wizard since the Config Plugin is not\nloaded in "
60  "the current workspace."));
61  msgBox.setStandardButtons(QMessageBox::Ok);
62  msgBox.setDefaultButton(QMessageBox::Ok);
63  msgBox.exec();
64  }
65 }
The SetupWizard class is the main interface to the setup wizard. It provides selects the sequence of ...
Definition: setupwizard.h:47
SetupWizard * getWizard() const
Core plugin system that manages the plugins, their life cycle and their registered objects...
Definition: pluginmanager.h:53
TLEndPage(SetupWizard *wizard, QWidget *parent=nullptr)
Definition: tlendpage.cpp:34