forked from qt-creator/qt-creator
Settings: Regroup all Devices-related configuration pages
Each kind of Device used to add its own top-level preference page, with only a single tab in each, which makes the list of categories almost irrelevant. Regrouping all these under the 'Devices' category makes the settings page much more consistent and reduces the clutter. Change-Id: I72c04b57004c2e1b1f57208bdaabe8b944390558 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -47,9 +47,7 @@ enum AndroidQemuStatus {
|
|||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
namespace Constants {
|
namespace Constants {
|
||||||
const char ANDROID_SETTINGS_ID[] = "ZZ.Android Configurations";
|
const char ANDROID_SETTINGS_ID[] = "BB.Android Configurations";
|
||||||
const char ANDROID_SETTINGS_CATEGORY[] = "XA.Android";
|
|
||||||
const char ANDROID_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("Android", "Android");
|
|
||||||
const char ANDROID_SETTINGS_CATEGORY_ICON[] = ":/android/images/QtAndroid.png";
|
const char ANDROID_SETTINGS_CATEGORY_ICON[] = ":/android/images/QtAndroid.png";
|
||||||
const char ANDROID_TOOLCHAIN_ID[] = "Qt4ProjectManager.ToolChain.Android";
|
const char ANDROID_TOOLCHAIN_ID[] = "Qt4ProjectManager.ToolChain.Android";
|
||||||
const char ANDROIDQT[] = "Qt4ProjectManager.QtVersion.Android";
|
const char ANDROIDQT[] = "Qt4ProjectManager.QtVersion.Android";
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
#include "androidsettingswidget.h"
|
#include "androidsettingswidget.h"
|
||||||
#include "androidconstants.h"
|
#include "androidconstants.h"
|
||||||
#include "androidtoolchain.h"
|
#include "androidtoolchain.h"
|
||||||
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/toolchainmanager.h>
|
#include <projectexplorer/toolchainmanager.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
@@ -41,11 +42,10 @@ AndroidSettingsPage::AndroidSettingsPage(QObject *parent)
|
|||||||
: Core::IOptionsPage(parent)
|
: Core::IOptionsPage(parent)
|
||||||
{
|
{
|
||||||
setId(Constants::ANDROID_SETTINGS_ID);
|
setId(Constants::ANDROID_SETTINGS_ID);
|
||||||
setDisplayName(tr("Android Configurations"));
|
setDisplayName(tr("Android"));
|
||||||
setCategory(Constants::ANDROID_SETTINGS_CATEGORY);
|
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
||||||
setDisplayCategory(QCoreApplication::translate("Android",
|
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||||
Constants::ANDROID_SETTINGS_TR_CATEGORY));
|
ProjectExplorer::Constants::DEVICE_SETTINGS_TR_CATEGORY));
|
||||||
setCategoryIcon(Utils::Icon(Constants::ANDROID_SETTINGS_CATEGORY_ICON));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *AndroidSettingsPage::widget()
|
QWidget *AndroidSettingsPage::widget()
|
||||||
|
@@ -47,5 +47,3 @@ HEADERS += baremetalplugin.h \
|
|||||||
openocdgdbserverprovider.h \
|
openocdgdbserverprovider.h \
|
||||||
defaultgdbserverprovider.h \
|
defaultgdbserverprovider.h \
|
||||||
stlinkutilgdbserverprovider.h
|
stlinkutilgdbserverprovider.h
|
||||||
|
|
||||||
RESOURCES = baremetal.qrc
|
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
<RCC>
|
|
||||||
<qresource prefix="/baremetal">
|
|
||||||
<file>images/QtBareMetal.png</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
@@ -34,11 +34,7 @@ const char BareMetalOsType[] = "BareMetalOsType";
|
|||||||
const char ACTION_ID[] = "BareMetal.Action";
|
const char ACTION_ID[] = "BareMetal.Action";
|
||||||
const char MENU_ID[] = "BareMetal.Menu";
|
const char MENU_ID[] = "BareMetal.Menu";
|
||||||
|
|
||||||
const char BAREMETAL_SETTINGS_CATEGORY[] = "ZZ.BareMetal";
|
const char GDB_PROVIDERS_SETTINGS_ID[] = "EE.BareMetal.GdbServerProvidersOptions";
|
||||||
const char BAREMETAL_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("BareMetal", "Bare Metal");
|
|
||||||
const char BAREMETAL_SETTINGS_CATEGORY_ICON[] = ":/baremetal/images/QtBareMetal.png";
|
|
||||||
|
|
||||||
const char GDB_PROVIDERS_SETTINGS_ID[] = "AA.BareMetal.GdbServerProvidersOptions";
|
|
||||||
|
|
||||||
// Debugger Server Provider Ids
|
// Debugger Server Provider Ids
|
||||||
const char OPENOCD_PROVIDER_ID[] = "BareMetal.GdbServerProvider.OpenOcd";
|
const char OPENOCD_PROVIDER_ID[] = "BareMetal.GdbServerProvider.OpenOcd";
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
|
|
||||||
#include <utils/detailswidget.h>
|
#include <utils/detailswidget.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -47,6 +48,7 @@
|
|||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <QTreeView>
|
#include <QTreeView>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
#include <QGroupBox>
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
@@ -293,10 +295,16 @@ GdbServerProvidersSettingsWidget::GdbServerProvidersSettingsWidget
|
|||||||
verticalLayout->addWidget(m_providerView);
|
verticalLayout->addWidget(m_providerView);
|
||||||
verticalLayout->addLayout(buttonLayout);
|
verticalLayout->addLayout(buttonLayout);
|
||||||
|
|
||||||
auto horizontalLayout = new QHBoxLayout(this);
|
auto horizontalLayout = new QHBoxLayout();
|
||||||
horizontalLayout->addLayout(verticalLayout);
|
horizontalLayout->addLayout(verticalLayout);
|
||||||
horizontalLayout->addWidget(m_container);
|
horizontalLayout->addWidget(m_container);
|
||||||
|
|
||||||
|
auto groupBox = new QGroupBox(tr("GDB Server Providers"), this);
|
||||||
|
groupBox->setLayout(horizontalLayout);
|
||||||
|
|
||||||
|
auto topLayout = new QVBoxLayout(this);
|
||||||
|
topLayout->addWidget(groupBox);
|
||||||
|
|
||||||
connect(&m_model, &GdbServerProviderModel::providerStateChanged,
|
connect(&m_model, &GdbServerProviderModel::providerStateChanged,
|
||||||
this, &GdbServerProvidersSettingsWidget::updateState);
|
this, &GdbServerProvidersSettingsWidget::updateState);
|
||||||
|
|
||||||
@@ -411,12 +419,11 @@ QModelIndex GdbServerProvidersSettingsWidget::currentIndex() const
|
|||||||
GdbServerProvidersSettingsPage::GdbServerProvidersSettingsPage(QObject *parent)
|
GdbServerProvidersSettingsPage::GdbServerProvidersSettingsPage(QObject *parent)
|
||||||
: Core::IOptionsPage(parent)
|
: Core::IOptionsPage(parent)
|
||||||
{
|
{
|
||||||
setCategory(Constants::BAREMETAL_SETTINGS_CATEGORY);
|
|
||||||
setDisplayCategory(QCoreApplication::translate(
|
|
||||||
"BareMetal", Constants::BAREMETAL_SETTINGS_TR_CATEGORY));
|
|
||||||
setCategoryIcon(Utils::Icon(Constants::BAREMETAL_SETTINGS_CATEGORY_ICON));
|
|
||||||
setId(Constants::GDB_PROVIDERS_SETTINGS_ID);
|
setId(Constants::GDB_PROVIDERS_SETTINGS_ID);
|
||||||
setDisplayName(tr("GDB Server Providers"));
|
setDisplayName(tr("Bare Metal"));
|
||||||
|
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
||||||
|
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||||
|
ProjectExplorer::Constants::DEVICE_SETTINGS_TR_CATEGORY));
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *GdbServerProvidersSettingsPage::widget()
|
QWidget *GdbServerProvidersSettingsPage::widget()
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 5.1 KiB |
@@ -34,9 +34,7 @@ Q_DECLARE_LOGGING_CATEGORY(iosLog)
|
|||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
namespace Constants {
|
namespace Constants {
|
||||||
const char IOS_SETTINGS_ID[] = "ZZ.Ios Configurations";
|
const char IOS_SETTINGS_ID[] = "CC.Ios Configurations";
|
||||||
const char IOS_SETTINGS_CATEGORY[] = "XA.Ios";
|
|
||||||
const char IOS_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("Ios", "iOS");
|
|
||||||
const char IOS_SETTINGS_CATEGORY_ICON[] = ":/ios/images/iossettings.png";
|
const char IOS_SETTINGS_CATEGORY_ICON[] = ":/ios/images/iossettings.png";
|
||||||
const char IOSQT[] = "Qt4ProjectManager.QtVersion.Ios"; // this literal is replicated to avoid dependencies
|
const char IOSQT[] = "Qt4ProjectManager.QtVersion.Ios"; // this literal is replicated to avoid dependencies
|
||||||
|
|
||||||
|
@@ -28,6 +28,8 @@
|
|||||||
#include "iossettingswidget.h"
|
#include "iossettingswidget.h"
|
||||||
#include "iosconstants.h"
|
#include "iosconstants.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
namespace Ios {
|
namespace Ios {
|
||||||
@@ -37,11 +39,10 @@ IosSettingsPage::IosSettingsPage(QObject *parent)
|
|||||||
: Core::IOptionsPage(parent)
|
: Core::IOptionsPage(parent)
|
||||||
{
|
{
|
||||||
setId(Constants::IOS_SETTINGS_ID);
|
setId(Constants::IOS_SETTINGS_ID);
|
||||||
setDisplayName(tr("iOS Configurations"));
|
setDisplayName(tr("iOS"));
|
||||||
setCategory(Constants::IOS_SETTINGS_CATEGORY);
|
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
||||||
setDisplayCategory(QCoreApplication::translate("iOS",
|
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||||
Constants::IOS_SETTINGS_TR_CATEGORY));
|
ProjectExplorer::Constants::DEVICE_SETTINGS_TR_CATEGORY));
|
||||||
setCategoryIcon(Utils::Icon(QLatin1String(Constants::IOS_SETTINGS_CATEGORY_ICON)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *IosSettingsPage::widget()
|
QWidget *IosSettingsPage::widget()
|
||||||
|
@@ -41,7 +41,8 @@ DeviceSettingsPage::DeviceSettingsPage(QObject *parent)
|
|||||||
setId(Constants::DEVICE_SETTINGS_PAGE_ID);
|
setId(Constants::DEVICE_SETTINGS_PAGE_ID);
|
||||||
setDisplayName(tr("Devices"));
|
setDisplayName(tr("Devices"));
|
||||||
setCategory(Constants::DEVICE_SETTINGS_CATEGORY);
|
setCategory(Constants::DEVICE_SETTINGS_CATEGORY);
|
||||||
setDisplayCategory(QCoreApplication::translate("ProjectExplorer", "Devices"));
|
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||||
|
ProjectExplorer::Constants::DEVICE_SETTINGS_TR_CATEGORY));
|
||||||
setCategoryIcon(Utils::Icon(":/projectexplorer/images/MaemoDevice.png"));
|
setCategoryIcon(Utils::Icon(":/projectexplorer/images/MaemoDevice.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -172,6 +172,7 @@ const char KITS_SETTINGS_PAGE_ID[] = "D.ProjectExplorer.KitsOptions";
|
|||||||
|
|
||||||
// Device settings page
|
// Device settings page
|
||||||
const char DEVICE_SETTINGS_CATEGORY[] = "XW.Devices";
|
const char DEVICE_SETTINGS_CATEGORY[] = "XW.Devices";
|
||||||
|
const char DEVICE_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Devices");
|
||||||
const char DEVICE_SETTINGS_PAGE_ID[] = "AA.Device Settings";
|
const char DEVICE_SETTINGS_PAGE_ID[] = "AA.Device Settings";
|
||||||
|
|
||||||
// Task categories
|
// Task categories
|
||||||
|
@@ -55,10 +55,8 @@ const char QNX_DEBUG_EXECUTABLE[] = "pdebug";
|
|||||||
const char QNX_TOOLCHAIN_ID[] = "Qnx.QccToolChain";
|
const char QNX_TOOLCHAIN_ID[] = "Qnx.QccToolChain";
|
||||||
|
|
||||||
// QNX settings constants
|
// QNX settings constants
|
||||||
const char QNX_CATEGORY[] = "XF.Qnx";
|
|
||||||
const char QNX_CATEGORY_TR[] = QT_TRANSLATE_NOOP("QNX", "QNX");
|
|
||||||
const char QNX_CATEGORY_ICON[] = ":/qnx/images/qnx-target.png";
|
const char QNX_CATEGORY_ICON[] = ":/qnx/images/qnx-target.png";
|
||||||
const char QNX_SETTINGS_ID[] = "ZZ.Qnx Configuration";
|
const char QNX_SETTINGS_ID[] = "DD.Qnx Configuration";
|
||||||
|
|
||||||
const char QNX_CONFIGS_FILENAME[] = "qnxconfigurations.xml";
|
const char QNX_CONFIGS_FILENAME[] = "qnxconfigurations.xml";
|
||||||
|
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include "qnxsettingswidget.h"
|
#include "qnxsettingswidget.h"
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
@@ -43,10 +44,9 @@ QnxSettingsPage::QnxSettingsPage(QObject* parent) :
|
|||||||
{
|
{
|
||||||
setId(Core::Id(Constants::QNX_SETTINGS_ID));
|
setId(Core::Id(Constants::QNX_SETTINGS_ID));
|
||||||
setDisplayName(tr("QNX"));
|
setDisplayName(tr("QNX"));
|
||||||
setCategory(Constants::QNX_CATEGORY);
|
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
||||||
setDisplayCategory(QCoreApplication::translate("QNX",
|
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||||
Constants::QNX_CATEGORY_TR));
|
ProjectExplorer::Constants::DEVICE_SETTINGS_TR_CATEGORY));
|
||||||
setCategoryIcon(Utils::Icon(Constants::QNX_CATEGORY_ICON));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget* QnxSettingsPage::widget()
|
QWidget* QnxSettingsPage::widget()
|
||||||
|
Reference in New Issue
Block a user