Changed: Rename all WizardDialog to Dialog (not really a wizard)
This commit is contained in:
parent
59d128b5df
commit
47e31b913e
15 changed files with 69 additions and 68 deletions
|
@ -15,7 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdpch.h"
|
||||
#include "installwizarddialog.h"
|
||||
#include "installdialog.h"
|
||||
#include "configfile.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
CInstallWizardDialog::CInstallWizardDialog():QDialog()
|
||||
CInstallDialog::CInstallDialog():QDialog()
|
||||
{
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
|
@ -82,18 +82,18 @@ CInstallWizardDialog::CInstallWizardDialog():QDialog()
|
|||
connect(advancedCheckBox, SIGNAL(stateChanged(int)), SLOT(onShowAdvancedParameters(int)));
|
||||
}
|
||||
|
||||
CInstallWizardDialog::~CInstallWizardDialog()
|
||||
CInstallDialog::~CInstallDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void CInstallWizardDialog::onShowAdvancedParameters(int state)
|
||||
void CInstallDialog::onShowAdvancedParameters(int state)
|
||||
{
|
||||
advancedFrame->setVisible(state != Qt::Unchecked);
|
||||
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
void CInstallWizardDialog::onAnotherLocationBrowseButtonClicked()
|
||||
void CInstallDialog::onAnotherLocationBrowseButtonClicked()
|
||||
{
|
||||
QString directory;
|
||||
|
||||
|
@ -116,7 +116,7 @@ void CInstallWizardDialog::onAnotherLocationBrowseButtonClicked()
|
|||
updateAnotherLocationText();
|
||||
}
|
||||
|
||||
void CInstallWizardDialog::onDestinationBrowseButtonClicked()
|
||||
void CInstallDialog::onDestinationBrowseButtonClicked()
|
||||
{
|
||||
QString directory = QFileDialog::getExistingDirectory(this, tr("Please choose directory where to install Ryzom"));
|
||||
|
||||
|
@ -127,17 +127,17 @@ void CInstallWizardDialog::onDestinationBrowseButtonClicked()
|
|||
updateDestinationText();
|
||||
}
|
||||
|
||||
void CInstallWizardDialog::updateAnotherLocationText()
|
||||
void CInstallDialog::updateAnotherLocationText()
|
||||
{
|
||||
anotherLocationRadioButton->setText(tr("Another location: %1").arg(m_anotherDirectory.isEmpty() ? tr("Undefined"):m_anotherDirectory));
|
||||
}
|
||||
|
||||
void CInstallWizardDialog::updateDestinationText()
|
||||
void CInstallDialog::updateDestinationText()
|
||||
{
|
||||
destinationLabel->setText(m_dstDirectory);
|
||||
}
|
||||
|
||||
void CInstallWizardDialog::accept()
|
||||
void CInstallDialog::accept()
|
||||
{
|
||||
// check free disk space
|
||||
qint64 freeSpace = NLMISC::CSystemInfo::availableHDSpace(m_dstDirectory.toUtf8().constData());
|
|
@ -14,10 +14,10 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef INSTALLWIZARDDIALOG_H
|
||||
#define INSTALLWIZARDDIALOG_H
|
||||
#ifndef INSTALLDIALOG_H
|
||||
#define INSTALLDIALOG_H
|
||||
|
||||
#include "ui_installwizard.h"
|
||||
#include "ui_installdialog.h"
|
||||
|
||||
/**
|
||||
* Wizard displayed at first launch, that asks user to choose source and destination directories.
|
||||
|
@ -25,13 +25,13 @@
|
|||
* \author Cedric 'Kervala' OCHS
|
||||
* \date 2016
|
||||
*/
|
||||
class CInstallWizardDialog : public QDialog, public Ui::InstallWizardDialog
|
||||
class CInstallDialog : public QDialog, public Ui::InstallDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CInstallWizardDialog();
|
||||
virtual ~CInstallWizardDialog();
|
||||
CInstallDialog();
|
||||
virtual ~CInstallDialog();
|
||||
|
||||
private slots:
|
||||
void onShowAdvancedParameters(int state);
|
|
@ -17,9 +17,9 @@
|
|||
#include "stdpch.h"
|
||||
#include "mainwindow.h"
|
||||
#include "configfile.h"
|
||||
#include "migratewizarddialog.h"
|
||||
#include "installwizarddialog.h"
|
||||
#include "uninstallwizarddialog.h"
|
||||
#include "migratedialog.h"
|
||||
#include "installdialog.h"
|
||||
#include "uninstalldialog.h"
|
||||
#include "operationdialog.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -120,7 +120,7 @@ int main(int argc, char *argv[])
|
|||
// show uninstall wizard dialog if not in silent mode
|
||||
if (!parser.isSet(silentOption))
|
||||
{
|
||||
CUninstallWizardDialog dialog;
|
||||
CUninstallDialog dialog;
|
||||
|
||||
dialog.setSelectedComponents(components);
|
||||
|
||||
|
@ -142,7 +142,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (step == CConfigFile::ShowMigrateWizard)
|
||||
{
|
||||
CMigrateWizardDialog dialog;
|
||||
CMigrateDialog dialog;
|
||||
|
||||
if (!dialog.exec()) return 1;
|
||||
|
||||
|
@ -150,7 +150,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
else if (step == CConfigFile::ShowInstallWizard)
|
||||
{
|
||||
CInstallWizardDialog dialog;
|
||||
CInstallDialog dialog;
|
||||
|
||||
if (!dialog.exec()) return 1;
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
#include "mainwindow.h"
|
||||
#include "downloader.h"
|
||||
#include "profilesdialog.h"
|
||||
#include "uninstallwizarddialog.h"
|
||||
#include "settingsdialog.h"
|
||||
#include "uninstalldialog.h"
|
||||
#include "operationdialog.h"
|
||||
#include "configfile.h"
|
||||
#include "config.h"
|
||||
|
@ -173,7 +174,7 @@ void CMainWindow::onUninstall()
|
|||
}
|
||||
|
||||
{
|
||||
CUninstallWizardDialog dialog(this);
|
||||
CUninstallDialog dialog(this);
|
||||
|
||||
dialog.setSelectedComponents(components);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdpch.h"
|
||||
#include "migratewizarddialog.h"
|
||||
#include "migratedialog.h"
|
||||
#include "configfile.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
CMigrateWizardDialog::CMigrateWizardDialog():QDialog()
|
||||
CMigrateDialog::CMigrateDialog():QDialog()
|
||||
{
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
|
@ -79,18 +79,18 @@ CMigrateWizardDialog::CMigrateWizardDialog():QDialog()
|
|||
connect(advancedCheckBox, SIGNAL(stateChanged(int)), SLOT(onShowAdvancedParameters(int)));
|
||||
}
|
||||
|
||||
CMigrateWizardDialog::~CMigrateWizardDialog()
|
||||
CMigrateDialog::~CMigrateDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void CMigrateWizardDialog::onShowAdvancedParameters(int state)
|
||||
void CMigrateDialog::onShowAdvancedParameters(int state)
|
||||
{
|
||||
advancedFrame->setVisible(state != Qt::Unchecked);
|
||||
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
void CMigrateWizardDialog::onDestinationBrowseButtonClicked()
|
||||
void CMigrateDialog::onDestinationBrowseButtonClicked()
|
||||
{
|
||||
QString directory = QFileDialog::getExistingDirectory(this, tr("Please choose directory where to install Ryzom"));
|
||||
|
||||
|
@ -101,12 +101,12 @@ void CMigrateWizardDialog::onDestinationBrowseButtonClicked()
|
|||
updateDestinationText();
|
||||
}
|
||||
|
||||
void CMigrateWizardDialog::updateDestinationText()
|
||||
void CMigrateDialog::updateDestinationText()
|
||||
{
|
||||
destinationLabel->setText(m_dstDirectory);
|
||||
}
|
||||
|
||||
void CMigrateWizardDialog::accept()
|
||||
void CMigrateDialog::accept()
|
||||
{
|
||||
// check free disk space
|
||||
qint64 freeSpace = NLMISC::CSystemInfo::availableHDSpace(m_dstDirectory.toUtf8().constData());
|
|
@ -14,10 +14,10 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef MIGRATEWIZARDDIALOG_H
|
||||
#define MIGRATEWIZARDDIALOG_H
|
||||
#ifndef MIGRATEDIALOG_H
|
||||
#define MIGRATEDIALOG_H
|
||||
|
||||
#include "ui_migratewizard.h"
|
||||
#include "ui_migratedialog.h"
|
||||
|
||||
/**
|
||||
* Wizard displayed at first launch, that asks user to choose source and destination directories.
|
||||
|
@ -25,13 +25,13 @@
|
|||
* \author Cedric 'Kervala' OCHS
|
||||
* \date 2016
|
||||
*/
|
||||
class CMigrateWizardDialog : public QDialog, public Ui::MigrateWizardDialog
|
||||
class CMigrateDialog : public QDialog, public Ui::MigrateDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CMigrateWizardDialog();
|
||||
virtual ~CMigrateWizardDialog();
|
||||
CMigrateDialog();
|
||||
virtual ~CMigrateDialog();
|
||||
|
||||
private slots:
|
||||
void onShowAdvancedParameters(int state);
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef PROFILESDIALOG_H
|
||||
#define PROFILESDIALOG_H
|
||||
|
||||
#include "ui_profiles.h"
|
||||
#include "ui_profilesdialog.h"
|
||||
|
||||
class CProfilesModel;
|
||||
class CServersModel;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef SETTINGSDIALOG_H
|
||||
#define SETTINGSDIALOG_H
|
||||
|
||||
#include "ui_settings.h"
|
||||
#include "ui_settingsdialog.h"
|
||||
|
||||
/**
|
||||
* Settings dialog
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdpch.h"
|
||||
#include "uninstallwizarddialog.h"
|
||||
#include "uninstalldialog.h"
|
||||
#include "configfile.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
CUninstallWizardDialog::CUninstallWizardDialog(QWidget *parent):QDialog(parent), m_installerIndex(-1)
|
||||
CUninstallDialog::CUninstallDialog(QWidget *parent):QDialog(parent), m_installerIndex(-1)
|
||||
{
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
|
@ -102,19 +102,19 @@ CUninstallWizardDialog::CUninstallWizardDialog(QWidget *parent):QDialog(parent),
|
|||
connect(this, SIGNAL(updateLayout()), SLOT(onUpdateLayout()));
|
||||
}
|
||||
|
||||
CUninstallWizardDialog::~CUninstallWizardDialog()
|
||||
CUninstallDialog::~CUninstallDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void CUninstallWizardDialog::showEvent(QShowEvent *event)
|
||||
void CUninstallDialog::showEvent(QShowEvent *event)
|
||||
{
|
||||
QDialog::showEvent(event);
|
||||
|
||||
// update size of all components sizes in a thread to not block interface
|
||||
QtConcurrent::run(this, &CUninstallWizardDialog::updateSizes);
|
||||
QtConcurrent::run(this, &CUninstallDialog::updateSizes);
|
||||
}
|
||||
|
||||
void CUninstallWizardDialog::setSelectedComponents(const SUninstallComponents &components)
|
||||
void CUninstallDialog::setSelectedComponents(const SUninstallComponents &components)
|
||||
{
|
||||
QStandardItemModel *model = qobject_cast<QStandardItemModel*>(componentsTreeView->model());
|
||||
if (model == NULL) return;
|
||||
|
@ -150,7 +150,7 @@ void CUninstallWizardDialog::setSelectedComponents(const SUninstallComponents &c
|
|||
if (item) item->setCheckState(components.installer ? Qt::Checked : Qt::Unchecked);
|
||||
}
|
||||
|
||||
SUninstallComponents CUninstallWizardDialog::getSelectedCompenents() const
|
||||
SUninstallComponents CUninstallDialog::getSelectedCompenents() const
|
||||
{
|
||||
SUninstallComponents res;
|
||||
|
||||
|
@ -190,17 +190,17 @@ SUninstallComponents CUninstallWizardDialog::getSelectedCompenents() const
|
|||
return res;
|
||||
}
|
||||
|
||||
void CUninstallWizardDialog::accept()
|
||||
void CUninstallDialog::accept()
|
||||
{
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
void CUninstallWizardDialog::onItemChanged(QStandardItem * /* item */)
|
||||
void CUninstallDialog::onItemChanged(QStandardItem * /* item */)
|
||||
{
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
void CUninstallWizardDialog::onUpdateSize(int row, const QString &text)
|
||||
void CUninstallDialog::onUpdateSize(int row, const QString &text)
|
||||
{
|
||||
QStandardItemModel *model = qobject_cast<QStandardItemModel*>(componentsTreeView->model());
|
||||
if (model == NULL) return;
|
||||
|
@ -210,14 +210,14 @@ void CUninstallWizardDialog::onUpdateSize(int row, const QString &text)
|
|||
model->setItem(row, 1, item);
|
||||
}
|
||||
|
||||
void CUninstallWizardDialog::onUpdateLayout()
|
||||
void CUninstallDialog::onUpdateLayout()
|
||||
{
|
||||
componentsTreeView->resizeColumnToContents(1);
|
||||
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
void CUninstallWizardDialog::updateSizes()
|
||||
void CUninstallDialog::updateSizes()
|
||||
{
|
||||
CConfigFile *config = CConfigFile::getInstance();
|
||||
|
||||
|
@ -252,7 +252,7 @@ void CUninstallWizardDialog::updateSizes()
|
|||
emit updateLayout();
|
||||
}
|
||||
|
||||
void CUninstallWizardDialog::updateButtons()
|
||||
void CUninstallDialog::updateButtons()
|
||||
{
|
||||
QStandardItemModel *model = qobject_cast<QStandardItemModel*>(componentsTreeView->model());
|
||||
if (model == NULL) return;
|
|
@ -14,10 +14,10 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef UNINSTALLWIZARDDIALOG_H
|
||||
#define UNINSTALLWIZARDDIALOG_H
|
||||
#ifndef UNINSTALLDIALOG_H
|
||||
#define UNINSTALLDIALOG_H
|
||||
|
||||
#include "ui_uninstallwizard.h"
|
||||
#include "ui_uninstalldialog.h"
|
||||
#include "operation.h"
|
||||
|
||||
/**
|
||||
|
@ -27,13 +27,13 @@
|
|||
* \author Cedric 'Kervala' OCHS
|
||||
* \date 2016
|
||||
*/
|
||||
class CUninstallWizardDialog : public QDialog, public Ui::UninstallWizardDialog
|
||||
class CUninstallDialog : public QDialog, public Ui::UninstallDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CUninstallWizardDialog(QWidget *parent = NULL);
|
||||
virtual ~CUninstallWizardDialog();
|
||||
CUninstallDialog(QWidget *parent = NULL);
|
||||
virtual ~CUninstallDialog();
|
||||
|
||||
void setSelectedComponents(const SUninstallComponents &components);
|
||||
SUninstallComponents getSelectedCompenents() const;
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>InstallWizardDialog</class>
|
||||
<widget class="QDialog" name="InstallWizardDialog">
|
||||
<class>InstallDialog</class>
|
||||
<widget class="QDialog" name="InstallDialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
|
@ -219,7 +219,7 @@ Just follow the different steps and make your choice between the different propo
|
|||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>InstallWizardDialog</receiver>
|
||||
<receiver>InstallDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
@ -235,7 +235,7 @@ Just follow the different steps and make your choice between the different propo
|
|||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>InstallWizardDialog</receiver>
|
||||
<receiver>InstallDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MigrateWizardDialog</class>
|
||||
<widget class="QDialog" name="MigrateWizardDialog">
|
||||
<class>MigrateDialog</class>
|
||||
<widget class="QDialog" name="MigrateDialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
|
@ -24,7 +24,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox"/>
|
||||
<widget class="QComboBox" name="languageComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
|
@ -34,7 +34,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<widget class="QPushButton" name="installationDirectoryButton">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
|
@ -55,7 +55,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<widget class="QCheckBox" name="use64bitsClientsCheckBox">
|
||||
<property name="text">
|
||||
<string>Use 64 bits client</string>
|
||||
</property>
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>UninstallWizardDialog</class>
|
||||
<widget class="QDialog" name="UninstallWizardDialog">
|
||||
<class>UninstallDialog</class>
|
||||
<widget class="QDialog" name="UninstallDialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
Loading…
Reference in a new issue