forked from qt-creator/qt-creator
Ios: Merge settings page related file pairs [1/2]
Move all to *widget.cpp, to keep the diff small. Will be renamed in step #2 to *page.cpp again. Change-Id: I391e4c823d796f5af0970067642e1b3eaec2637e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -16,7 +16,6 @@ add_qtc_plugin(Ios
|
||||
iosqtversion.cpp iosqtversion.h
|
||||
iosrunconfiguration.cpp iosrunconfiguration.h
|
||||
iosrunner.cpp iosrunner.h
|
||||
iossettingspage.cpp iossettingspage.h
|
||||
iossettingswidget.cpp iossettingswidget.h
|
||||
iossimulator.cpp iossimulator.h
|
||||
iostoolhandler.cpp iostoolhandler.h
|
||||
|
||||
@@ -41,8 +41,6 @@ QtcPlugin {
|
||||
"iosrunconfiguration.h",
|
||||
"iosrunner.cpp",
|
||||
"iosrunner.h",
|
||||
"iossettingspage.cpp",
|
||||
"iossettingspage.h",
|
||||
"iossettingswidget.cpp",
|
||||
"iossettingswidget.h",
|
||||
"iossimulator.cpp",
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "iosdsymbuildstep.h"
|
||||
#include "iosqtversion.h"
|
||||
#include "iosrunner.h"
|
||||
#include "iossettingspage.h"
|
||||
#include "iossettingswidget.h"
|
||||
#include "iossimulator.h"
|
||||
#include "iostoolhandler.h"
|
||||
#include "iostr.h"
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "iossettingspage.h"
|
||||
|
||||
#include "iosconstants.h"
|
||||
#include "iossettingswidget.h"
|
||||
#include "iostr.h"
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
namespace Ios::Internal {
|
||||
|
||||
IosSettingsPage::IosSettingsPage()
|
||||
{
|
||||
setId(Constants::IOS_SETTINGS_ID);
|
||||
setDisplayName(Tr::tr("iOS"));
|
||||
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
||||
setWidgetCreator([] { return new IosSettingsWidget; });
|
||||
}
|
||||
|
||||
} // Ios::Internal
|
||||
@@ -1,16 +0,0 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
namespace Ios::Internal {
|
||||
|
||||
class IosSettingsPage final : public Core::IOptionsPage
|
||||
{
|
||||
public:
|
||||
IosSettingsPage();
|
||||
};
|
||||
|
||||
} // Ios::Internal
|
||||
@@ -5,12 +5,14 @@
|
||||
|
||||
#include "createsimulatordialog.h"
|
||||
#include "iosconfigurations.h"
|
||||
#include "iosconfigurations.h"
|
||||
#include "iosconstants.h"
|
||||
#include "iostr.h"
|
||||
#include "simulatorcontrol.h"
|
||||
#include "simulatorinfomodel.h"
|
||||
#include "simulatoroperationdialog.h"
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/async.h>
|
||||
#include <utils/layoutbuilder.h>
|
||||
@@ -32,6 +34,35 @@ using namespace std::placeholders;
|
||||
|
||||
namespace Ios::Internal {
|
||||
|
||||
class IosSettingsWidget final : public Core::IOptionsPageWidget
|
||||
{
|
||||
public:
|
||||
IosSettingsWidget();
|
||||
~IosSettingsWidget() final;
|
||||
|
||||
private:
|
||||
void apply() final;
|
||||
|
||||
void saveSettings();
|
||||
|
||||
void onStart();
|
||||
void onCreate();
|
||||
void onReset();
|
||||
void onRename();
|
||||
void onDelete();
|
||||
void onScreenshot();
|
||||
void onSelectionChanged();
|
||||
|
||||
private:
|
||||
Utils::PathChooser *m_pathWidget;
|
||||
QPushButton *m_startButton;
|
||||
QPushButton *m_renameButton;
|
||||
QPushButton *m_deleteButton;
|
||||
QPushButton *m_resetButton;
|
||||
QTreeView *m_deviceView;
|
||||
QCheckBox *m_deviceAskCheckBox;
|
||||
};
|
||||
|
||||
const int simStartWarnCount = 4;
|
||||
|
||||
static SimulatorInfoList selectedSimulators(const QTreeView *deviceTreeView)
|
||||
@@ -358,5 +389,15 @@ void IosSettingsWidget::saveSettings()
|
||||
IosConfigurations::setScreenshotDir(m_pathWidget->filePath());
|
||||
}
|
||||
|
||||
// IosSettingsPage
|
||||
|
||||
IosSettingsPage::IosSettingsPage()
|
||||
{
|
||||
setId(Constants::IOS_SETTINGS_ID);
|
||||
setDisplayName(Tr::tr("iOS"));
|
||||
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
||||
setWidgetCreator([] { return new IosSettingsWidget; });
|
||||
}
|
||||
|
||||
} // Ios::Internal
|
||||
|
||||
|
||||
@@ -5,43 +5,12 @@
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QCheckBox;
|
||||
class QPushButton;
|
||||
class QTreeView;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Utils { class PathChooser; }
|
||||
|
||||
namespace Ios::Internal {
|
||||
|
||||
class IosSettingsWidget final : public Core::IOptionsPageWidget
|
||||
class IosSettingsPage final : public Core::IOptionsPage
|
||||
{
|
||||
public:
|
||||
IosSettingsWidget();
|
||||
~IosSettingsWidget() final;
|
||||
|
||||
private:
|
||||
void apply() final;
|
||||
|
||||
void saveSettings();
|
||||
|
||||
void onStart();
|
||||
void onCreate();
|
||||
void onReset();
|
||||
void onRename();
|
||||
void onDelete();
|
||||
void onScreenshot();
|
||||
void onSelectionChanged();
|
||||
|
||||
private:
|
||||
Utils::PathChooser *m_pathWidget;
|
||||
QPushButton *m_startButton;
|
||||
QPushButton *m_renameButton;
|
||||
QPushButton *m_deleteButton;
|
||||
QPushButton *m_resetButton;
|
||||
QTreeView *m_deviceView;
|
||||
QCheckBox *m_deviceAskCheckBox;
|
||||
IosSettingsPage();
|
||||
};
|
||||
|
||||
} // Ios::Internal
|
||||
|
||||
Reference in New Issue
Block a user