Utils: Make Layouting a top level namespace

The whole machinery is now almost only layoutbuilder.{h,cpp},
mostly independent of the rest of Utils. Idea is to finish the
separation to make it stand-alone usable also outside creator.

Change-Id: I958aa667d17ae26b21209f22412309c5307a579c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-04-25 10:15:07 +02:00
parent 68c92f6dfa
commit 8cf500c5bc
127 changed files with 154 additions and 149 deletions

View File

@@ -79,7 +79,7 @@ WorkspaceNameInputDialog::WorkspaceNameInputDialog(DockManager *manager, QWidget
connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
label,
@@ -137,7 +137,7 @@ WorkspaceDialog::WorkspaceDialog(DockManager *manager, QWidget *parent)
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Row {

View File

@@ -53,7 +53,7 @@ public:
, license(createTextEdit())
, dependencies(new QListWidget(q))
{
using namespace Utils::Layouting;
using namespace Layouting;
// clang-format off
Form {

View File

@@ -42,7 +42,7 @@ PluginErrorOverview::PluginErrorOverview(QWidget *parent)
QObject::connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
QObject::connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting;
using namespace Layouting;
auto createLabel = [this](const QString &text) {
QLabel *label = new QLabel(text, this);

View File

@@ -41,7 +41,7 @@ public:
errorString->setTabChangesFocus(true);
errorString->setReadOnly(true);
using namespace Utils::Layouting;
using namespace Layouting;
Form {
Tr::tr("State:"), state, br,

View File

@@ -80,7 +80,7 @@ ContextPaneTextWidget::ContextPaneTextWidget(QWidget *parent) :
vAlignButtons->addButton(m_centerVAlignmentButton);
vAlignButtons->addButton(m_bottomAlignmentButton);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Row { m_fontComboBox, m_colorButton, m_fontSizeSpinBox, },
Row {

View File

@@ -97,7 +97,7 @@ ContextPaneWidgetImage::ContextPaneWidgetImage(QWidget *parent, bool borderImage
vRadioButtons->addButton(m_borderImage.verticalStretchRadioButton);
vRadioButtons->addButton(m_borderImage.verticalTileRadioButtonNoCrop);
using namespace Utils::Layouting;
using namespace Layouting;
Row {
Column { m_previewLabel, m_sizeLabel, },
Column {
@@ -146,7 +146,7 @@ ContextPaneWidgetImage::ContextPaneWidgetImage(QWidget *parent, bool borderImage
m_image.cropAspectFitRadioButton = radioButton("aspect-crop-icon",
Tr::tr("The image is scaled uniformly to fill, cropping if necessary."));
using namespace Utils::Layouting;
using namespace Layouting;
Row {
Column { m_previewLabel, m_sizeLabel, },
Column {

View File

@@ -56,7 +56,7 @@ ContextPaneWidgetRectangle::ContextPaneWidgetRectangle(QWidget *parent)
borderButtons->addButton(m_borderSolid);
borderButtons->addButton(m_borderNone);
using namespace Utils::Layouting;
using namespace Layouting;
Grid {
m_gradientLabel, m_gradientLine, br,
Tr::tr("Color"), Row { m_colorColorButton, m_colorSolid, m_colorGradient, m_colorNone, st, }, br,

View File

@@ -145,7 +145,7 @@ EasingContextPane::EasingContextPane(QWidget *parent)
spinBox->setMaximum(999999.9);
}
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Row { m_graphicsView, m_playButton, },
Row {

View File

@@ -30,7 +30,7 @@
#include <QSpinBox>
#include <QTextEdit>
using namespace Utils::Layouting;
using namespace Layouting;
namespace Utils {
namespace Internal {

View File

@@ -21,16 +21,16 @@ class QGroupBox;
class QSettings;
QT_END_NAMESPACE
namespace Utils {
class AspectContainer;
class BoolAspect;
namespace Layouting {
class LayoutBuilder;
class LayoutItem;
} // Layouting
namespace Utils {
class AspectContainer;
class BoolAspect;
namespace Internal {
class AspectContainerPrivate;
class BaseAspectPrivate;

View File

@@ -16,7 +16,7 @@
#include <QStyle>
#include <QTabWidget>
namespace Utils::Layouting {
namespace Layouting {
/*!
\enum Utils::LayoutBuilder::LayoutType
@@ -464,7 +464,7 @@ TabWidget::TabWidget(QTabWidget *tabWidget, std::initializer_list<Tab> tabs)
// "Properties"
LayoutItem::Setter title(const QString &title, BoolAspect *checker)
LayoutItem::Setter title(const QString &title, Utils::BoolAspect *checker)
{
return [title, checker](QObject *target) {
if (auto groupBox = qobject_cast<QGroupBox *>(target)) {
@@ -528,4 +528,4 @@ Stretch st;
Space empty(0);
HorizontalRule hr;
} // Utils::Layouting
} // Layouting

View File

@@ -3,14 +3,19 @@
#pragma once
#include "utils_global.h"
#include <QList>
#include <QString>
#include <QVariant>
#include <QtGlobal>
#include <optional>
#if defined(UTILS_LIBRARY)
# define QTCREATOR_UTILS_EXPORT Q_DECL_EXPORT
#else
# define QTCREATOR_UTILS_EXPORT Q_DECL_IMPORT
#endif
QT_BEGIN_NAMESPACE
class QLayout;
class QSplitter;
@@ -20,7 +25,7 @@ QT_END_NAMESPACE
namespace Utils { class BoolAspect; }
namespace Utils::Layouting {
namespace Layouting {
enum AttachType {
WithMargins,
@@ -180,7 +185,7 @@ QTCREATOR_UTILS_EXPORT extern HorizontalRule hr;
// "Properties"
QTCREATOR_UTILS_EXPORT LayoutItem::Setter title(const QString &title,
BoolAspect *checker = nullptr);
Utils::BoolAspect *checker = nullptr);
QTCREATOR_UTILS_EXPORT LayoutItem::Setter text(const QString &text);
QTCREATOR_UTILS_EXPORT LayoutItem::Setter tooltip(const QString &toolTip);
@@ -289,4 +294,4 @@ public:
Stack(std::initializer_list<LayoutItem> items) : LayoutBuilder(StackLayout, items) {}
};
} // Utils::Layouting
} // Layouting

View File

@@ -125,7 +125,7 @@ CTestSettingsPage::CTestSettingsPage(CTestSettings *settings, Utils::Id settings
setLayouter([settings](QWidget *widget) {
CTestSettings &s = *settings;
using namespace Utils::Layouting;
using namespace Layouting;
Form form {
Row {s.outputOnFail}, br,

View File

@@ -49,7 +49,7 @@ public:
emailLineEdit = new QLineEdit;
fixedBugsLineEdit = new QLineEdit;
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {
title(Tr::tr("General Information")),

View File

@@ -286,7 +286,7 @@ public:
dryRunBtn->setToolTip(Tr::tr("Test the outcome of removing the last committed revision, without actually removing anything."));
buttonBox->addButton(dryRunBtn, QDialogButtonBox::ApplyRole);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Form {
keepTagsCheckBox, br,

View File

@@ -72,7 +72,7 @@ PullOrPushDialog::PullOrPushDialog(Mode mode, QWidget *parent)
m_localCheckBox->setVisible(false);
}
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {
title(Tr::tr("Branch Location")),

View File

@@ -84,7 +84,7 @@ ArtisticStyleOptionsPageWidget::ArtisticStyleOptionsPageWidget(ArtisticStyleSett
Tr::tr(Constants::ARTISTICSTYLE_DISPLAY_NAME)));
m_command->setFilePath(m_settings->command());
using namespace Utils::Layouting;
using namespace Layouting;
Column {
m_useOtherFiles,

View File

@@ -86,7 +86,7 @@ ClangFormatOptionsPageWidget::ClangFormatOptionsPageWidget(ClangFormatSettings *
else
useCustomizedStyle->setChecked(true);
using namespace Utils::Layouting;
using namespace Layouting;
Form {
m_usePredefinedStyle, m_predefinedStyle, br,

View File

@@ -40,7 +40,7 @@ ConfigurationDialog::ConfigurationDialog(QWidget *parent)
m_buttonBox->setOrientation(Qt::Horizontal);
m_buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {

View File

@@ -26,7 +26,7 @@ ConfigurationPanel::ConfigurationPanel(QWidget *parent)
m_remove = new QPushButton(Tr::tr("Remove"));
auto add = new QPushButton(Tr::tr("Add"));
using namespace Utils::Layouting;
using namespace Layouting;
Row {
m_configurations,

View File

@@ -60,7 +60,7 @@ GeneralOptionsPageWidget::GeneralOptionsPageWidget(const QStringList &toolIds)
const int index = m_autoFormatTool->findText(settings->autoFormatTool());
m_autoFormatTool->setCurrentIndex(qMax(index, 0));
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {

View File

@@ -86,7 +86,7 @@ UncrustifyOptionsPageWidget::UncrustifyOptionsPageWidget(UncrustifySettings *set
auto options = new QGroupBox(Tr::tr("Options"));
using namespace Utils::Layouting;
using namespace Layouting;
Column {
m_useOtherFiles,

View File

@@ -68,7 +68,7 @@ ClangToolsProjectSettingsWidget::ClangToolsProjectSettingsWidget(ProjectExplorer
m_removeSelectedButton = new QPushButton(Tr::tr("Remove Selected"), this);
m_removeAllButton = new QPushButton(Tr::tr("Remove All"));
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Row { m_restoreGlobal, st, gotoClangTidyModeLabel, gotoClazyModeLabel },

View File

@@ -86,7 +86,7 @@ FilterDialog::FilterDialog(const Checks &checks, QWidget *parent)
m_view->setSelectionBehavior(QAbstractItemView::SelectRows);
m_view->setIndentation(0);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Tr::tr("Select the diagnostics to display."),

View File

@@ -48,7 +48,7 @@ CheckOutDialog::CheckOutDialog(const QString &fileName, bool isUcm, bool showCom
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
lblFileName,
@@ -67,7 +67,7 @@ CheckOutDialog::CheckOutDialog(const QString &fileName, bool isUcm, bool showCom
m_actSelector = new ActivitySelector(this);
m_verticalLayout->insertWidget(0, m_actSelector);
m_verticalLayout->insertWidget(1, Utils::Layouting::createHr());
m_verticalLayout->insertWidget(1, Layouting::createHr());
}
if (!showComment)

View File

@@ -69,7 +69,7 @@ void ClearCaseSubmitEditorWidget::addActivitySelector(bool isUcm)
m_actSelector = new ActivitySelector;
m_verticalLayout->insertWidget(0, m_actSelector);
m_verticalLayout->insertWidget(1, Utils::Layouting::createHr());
m_verticalLayout->insertWidget(1, Layouting::createHr());
}
QString ClearCaseSubmitEditorWidget::commitName() const

View File

@@ -51,7 +51,7 @@ VersionSelector::VersionSelector(const QString &fileName, const QString &message
"the changes (not supported by the plugin)")
+ "</b></p></body></html>");
using namespace Utils::Layouting;
using namespace Layouting;
Column {
headerLabel,

View File

@@ -59,7 +59,7 @@ CMakeFormatterOptionsPageWidget::CMakeFormatterOptionsPageWidget()
m_command->setPromptDialogTitle(Tr::tr("%1 Command").arg(Tr::tr("Formatter")));
m_command->setFilePath(settings->command());
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {

View File

@@ -49,7 +49,7 @@
using namespace ProjectExplorer;
using namespace Utils;
using namespace Utils::Layouting;
using namespace Layouting;
namespace CMakeProjectManager {

View File

@@ -22,7 +22,7 @@ namespace Copilot {
AuthWidget::AuthWidget(QWidget *parent)
: QWidget(parent)
{
using namespace Utils::Layouting;
using namespace Layouting;
m_button = new QPushButton(Tr::tr("Sign in"));
m_button->setEnabled(false);

View File

@@ -22,7 +22,7 @@ AddToVcsDialog::AddToVcsDialog(QWidget *parent,
const QString &vcsDisplayName)
: QDialog(parent)
{
using namespace Utils::Layouting;
using namespace Layouting;
resize(363, 375);
setMinimumSize({200, 200});

View File

@@ -25,7 +25,7 @@ OpenWithDialog::OpenWithDialog(const Utils::FilePath &filePath, QWidget *parent)
buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
using namespace Utils::Layouting;
using namespace Layouting;
// clang-format off
Column {
Tr::tr("Open file \"%1\" with:").arg(filePath.fileName()),

View File

@@ -59,7 +59,7 @@ SaveItemsDialog::SaveItemsDialog(QWidget *parent, const QList<IDocument *> &item
m_saveBeforeBuildCheckBox->setVisible(false);
using namespace Utils::Layouting;
using namespace Layouting;
// clang-format off
Column {
m_msgLabel,

View File

@@ -78,7 +78,7 @@ MimeTypeMagicDialog::MimeTypeMagicDialog(QWidget *parent) :
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Form {

View File

@@ -54,7 +54,7 @@ PasteSelectDialog::PasteSelectDialog(const QList<Protocol*> &protocols, QWidget
listFont.setStyleHint(QFont::TypeWriter);
m_listWidget->setFont(listFont);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Form {
Tr::tr("Protocol:"), m_protocolBox, br,

View File

@@ -100,7 +100,7 @@ PasteView::PasteView(const QList<Protocol *> &protocols,
m_uiPatchList->setSortingEnabled(false);
m_uiPatchList->setSortingEnabled(__sortingEnabled);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
m_uiPatchList,

View File

@@ -1484,7 +1484,7 @@ CppCodeModelInspectorDialog::CppCodeModelInspectorDialog(QWidget *parent)
Column {
Form { QString("Sn&apshot:"), m_snapshotSelector },
m_snapshotView,
}.emerge(Utils::Layouting::WithoutMargins),
}.emerge(Layouting::WithoutMargins),
m_docTab,
},
}

View File

@@ -103,7 +103,7 @@ CppCodeModelSettingsWidget::CppCodeModelSettingsWidget(CppCodeModelSettings *s)
m_ignorePchCheckBox->setChecked(m_settings->pchUsage() == CppCodeModelSettings::PchUse_None);
m_useBuiltinPreprocessorCheckBox->setChecked(m_settings->useBuiltinPreprocessor());
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {
@@ -401,7 +401,7 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD
else
Core::EditorManager::openEditor(Utils::FilePath::fromString(link));
});
layout->addWidget(Utils::Layouting::createHr());
layout->addWidget(Layouting::createHr());
layout->addWidget(configFilesHelpLabel);
layout->addStretch(1);

View File

@@ -175,7 +175,7 @@ public:
QObject::connect(m_tabSettingsWidget, &TabSettingsWidget::settingsChanged,
q, &CppCodeStylePreferencesWidget::slotTabSettingsChanged);
using namespace Utils::Layouting;
using namespace Layouting;
const Group contentGroup {
title(Tr::tr("Indent")),

View File

@@ -30,7 +30,7 @@ public:
void fromMap(const QVariantMap &map) override;
void toMap(QVariantMap &map) const override;
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override;
void addToLayout(Layouting::LayoutBuilder &builder) override;
QVariant volatileValue() const override;
void setVolatileValue(const QVariant &val) override;

View File

@@ -60,7 +60,7 @@ public:
}
private:
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override
void addToLayout(Layouting::LayoutBuilder &builder) override
{
addMutableAction(m_comboBox);
builder.addItem(m_comboBox);

View File

@@ -66,7 +66,7 @@ NewClassWidget::NewClassWidget(QWidget *parent) :
setNamesDelimiter(QLatin1String("::"));
using namespace Utils::Layouting;
using namespace Layouting;
Form {
Tr::tr("&Class name:"), d->m_classLineEdit, br,
Tr::tr("&Header file:"), d->m_headerFileLineEdit, br,

View File

@@ -67,7 +67,7 @@ ConfigureDialog::ConfigureDialog(QWidget *parent) : QDialog(parent),
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {
title(Tr::tr("Repository User")),

View File

@@ -1094,7 +1094,7 @@ RevertDialog::RevertDialog(const QString &title, QWidget *parent)
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting;
using namespace Layouting;
Form {
Tr::tr("Revision"), m_revisionLineEdit, br,
}.attachTo(groupBox);

View File

@@ -52,7 +52,7 @@ PullOrPushDialog::PullOrPushDialog(Mode mode, QWidget *parent)
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {
title(Tr::tr("Remote Location")),

View File

@@ -125,7 +125,7 @@ BranchAddDialog::BranchAddDialog(const QStringList &localBranches, Type type, QW
break;
}
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Row { branchNameLabel, m_branchNameEdit },

View File

@@ -45,7 +45,7 @@ BranchCheckoutDialog::BranchCheckoutDialog(QWidget *parent,
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
m_makeStashRadioButton,

View File

@@ -136,7 +136,7 @@ GerritPushDialog::GerritPushDialog(const Utils::FilePath &workingDir, const QStr
connect(m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting;
using namespace Layouting;
Grid {
::Git::Tr::tr("Push:"), workingDir.toUserOutput(), m_localBranchComboBox, br,

View File

@@ -181,7 +181,7 @@ GitLabOptionsWidget::GitLabOptionsWidget(GitLabOptionsPage *page, GitLabParamete
m_add = new QPushButton(Tr::tr("Add..."), this);
m_add->setToolTip(Tr::tr("Add new GitLab server configuration."));
using namespace Utils::Layouting;
using namespace Layouting;
Grid {
Form {

View File

@@ -23,7 +23,7 @@ public:
QString fullCommandFlag(bool keepJobNum) const;
private:
void addToLayout(Utils::Layouting::LayoutBuilder &builder) final;
void addToLayout(Layouting::LayoutBuilder &builder) final;
void fromMap(const QVariantMap &map) final;
void toMap(QVariantMap &map) const final;

View File

@@ -32,7 +32,7 @@ CreateSimulatorDialog::CreateSimulatorDialog(QWidget *parent)
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Form {

View File

@@ -27,7 +27,7 @@ public:
void fromMap(const QVariantMap &map) override;
void toMap(QVariantMap &map) const override;
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override;
void addToLayout(Layouting::LayoutBuilder &builder) override;
IosDeviceType deviceType() const;
void setDeviceType(const IosDeviceType &deviceType);

View File

@@ -94,7 +94,7 @@ IosSettingsWidget::IosSettingsWidget()
m_pathWidget->addButton(Tr::tr("Screenshot"), this,
std::bind(&IosSettingsWidget::onScreenshot, this));
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {
title(Tr::tr("Devices")),

View File

@@ -40,7 +40,7 @@ SimulatorOperationDialog::SimulatorOperationDialog(QWidget *parent) :
m_formatter = new Utils::OutputFormatter;
m_formatter->setPlainTextEdit(messageEdit);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
messageEdit,

View File

@@ -49,7 +49,7 @@ MacroOptionsWidget::MacroOptionsWidget()
m_macroGroup = new QGroupBox(Tr::tr("Macro"), this);
using namespace Utils::Layouting;
using namespace Layouting;
Row {
Tr::tr("Description:"), m_description

View File

@@ -22,7 +22,7 @@ public:
void makeReadOnly() override {}
void refresh() override {}
void addToLayout(Utils::Layouting::LayoutBuilder &) override {}
void addToLayout(Layouting::LayoutBuilder &) override {}
};
} // anonymous namespace

View File

@@ -24,7 +24,7 @@ AuthenticationDialog::AuthenticationDialog(const QString &username, const QStrin
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Form {

View File

@@ -101,7 +101,7 @@ public:
m_authorLineEdit = new QLineEdit;
m_emailLineEdit = new QLineEdit;
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {
@@ -120,7 +120,7 @@ public:
},
}
}
}.attachTo(this, Utils::Layouting::WithoutMargins);
}.attachTo(this, Layouting::WithoutMargins);
}
QLabel *m_repositoryLabel;

View File

@@ -45,7 +45,7 @@ GeneralSettingsPage::GeneralSettingsPage()
setLayouter([](QWidget *widget) {
Settings &s = *Settings::instance();
using namespace Utils::Layouting;
using namespace Layouting;
Column {
s.autorunMeson,

View File

@@ -36,7 +36,7 @@ private:
void makeReadOnly() override { m_toolsComboBox->setEnabled(false); }
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override
void addToLayout(Layouting::LayoutBuilder &builder) override
{
addMutableAction(m_toolsComboBox);
builder.addItem(m_toolsComboBox);

View File

@@ -37,7 +37,7 @@ NimCodeStylePreferencesWidget::NimCodeStylePreferencesWidget(ICodeStylePreferenc
m_previewTextEdit = new SnippetEditorWidget;
m_previewTextEdit->setPlainText(Nim::Constants::C_NIMCODESTYLEPREVIEWSNIPPET);
using namespace Utils::Layouting;
using namespace Layouting;
Row {
Column {
tabPreferencesWidget,

View File

@@ -27,7 +27,7 @@ ChangeNumberDialog::ChangeNumberDialog(QWidget *parent)
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Row { Tr::tr("Change number:"), m_lineEdit },

View File

@@ -48,7 +48,7 @@ PendingChangesDialog::PendingChangesDialog(const QString &data, QWidget *parent)
submitButton->setEnabled(false);
}
using namespace Utils::Layouting;
using namespace Layouting;
Column {
m_listWidget,

View File

@@ -41,7 +41,7 @@ PerfTracePointDialog::PerfTracePointDialog()
m_privilegesChooser->addItems({ELEVATE_METHOD_NA, ELEVATE_METHOD_PKEXEC, ELEVATE_METHOD_SUDO});
m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
m_label,
m_textEdit,

View File

@@ -23,7 +23,7 @@ public:
bool isShadowBuild() const;
void setProblem(const QString &description);
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override;
void addToLayout(Layouting::LayoutBuilder &builder) override;
static Utils::FilePath fixupDir(const Utils::FilePath &dir);

View File

@@ -48,7 +48,7 @@ CodeStyleSettingsWidget::CodeStyleSettingsWidget(Project *project)
connect(languageComboBox, &QComboBox::currentIndexChanged,
stackedWidget, &QStackedWidget::setCurrentIndex);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Row { new QLabel(Tr::tr("Language:")), languageComboBox, st },

View File

@@ -101,7 +101,7 @@ CustomParserConfigDialog::CustomParserConfigDialog(QWidget *parent)
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting;
using namespace Layouting;
auto tabWarning = new QWidget;
Column {

View File

@@ -24,7 +24,7 @@ DeviceFactorySelectionDialog::DeviceFactorySelectionDialog(QWidget *parent) :
m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
m_buttonBox->button(QDialogButtonBox::Ok)->setText(Tr::tr("Start Wizard"));
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Tr::tr("Available device types:"),
m_listWidget,

View File

@@ -143,7 +143,7 @@ void DeviceSettingsWidget::initGui()
scrollArea->setWidgetResizable(true);
scrollArea->setWidget(scrollAreaWidget);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
m_generalGroupBox,
m_osSpecificGroupBox,

View File

@@ -43,7 +43,7 @@ DeviceTestDialog::DeviceTestDialog(const IDevice::Ptr &deviceConfiguration,
d->textEdit->setReadOnly(true);
d->buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
d->textEdit,
d->buttonBox,

View File

@@ -48,7 +48,7 @@ EditorSettingsWidget::EditorSettingsWidget(Project *project) : m_project(project
m_behaviorSettings = new TextEditor::BehaviorSettingsWidget(this);
using namespace Utils::Layouting;
using namespace Layouting;
Row {
m_showWrapColumn,

View File

@@ -34,7 +34,7 @@
#include <QVBoxLayout>
using namespace Utils;
using namespace Utils::Layouting;
using namespace Layouting;
namespace ProjectExplorer {

View File

@@ -117,7 +117,7 @@ ProjectExplorerSettingsWidget::ProjectExplorerSettingsWidget(QWidget *parent) :
"Disable it if you experience problems with your builds.");
jomLabel->setWordWrap(true);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {
title(Tr::tr("Projects Directory")),

View File

@@ -288,7 +288,7 @@ ProjectWizardPage::ProjectWizardPage(QWidget *parent)
scrollArea->setWidgetResizable(true);
scrollArea->setWidget(m_filesLabel);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Form {
m_projectLabel, m_projectComboBox, br,

View File

@@ -33,7 +33,7 @@
#include <QPushButton>
using namespace Utils;
using namespace Utils::Layouting;
using namespace Layouting;
namespace ProjectExplorer {

View File

@@ -29,7 +29,7 @@ class PROJECTEXPLORER_EXPORT TerminalAspect : public Utils::BaseAspect
public:
TerminalAspect();
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override;
void addToLayout(Layouting::LayoutBuilder &builder) override;
bool useTerminal() const;
void setUseTerminalHint(bool useTerminal);
@@ -62,7 +62,7 @@ public:
explicit WorkingDirectoryAspect(const Utils::MacroExpander *expander,
EnvironmentAspect *envAspect);
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override;
void addToLayout(Layouting::LayoutBuilder &builder) override;
Utils::FilePath workingDirectory() const;
Utils::FilePath defaultWorkingDirectory() const;
@@ -91,7 +91,7 @@ class PROJECTEXPLORER_EXPORT ArgumentsAspect : public Utils::BaseAspect
public:
explicit ArgumentsAspect(const Utils::MacroExpander *macroExpander);
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override;
void addToLayout(Layouting::LayoutBuilder &builder) override;
QString arguments() const;
QString unexpandedArguments() const;
@@ -163,7 +163,7 @@ public:
void setSettingsKey(const QString &key);
void makeOverridable(const QString &overridingKey, const QString &useOverridableKey);
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override;
void addToLayout(Layouting::LayoutBuilder &builder) override;
void setLabelText(const QString &labelText);
void setPlaceHolderText(const QString &placeHolderText);
void setHistoryCompleter(const QString &historyCompleterKey);
@@ -235,7 +235,7 @@ public:
void fromMap(const QVariantMap &) override;
void toMap(QVariantMap &) const override;
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override;
void addToLayout(Layouting::LayoutBuilder &builder) override;
struct Data : Utils::BaseAspect::Data { Interpreter interpreter; };

View File

@@ -77,7 +77,7 @@ SessionNameInputDialog::SessionNameInputDialog(QWidget *parent)
m_usedSwitchTo = true;
});
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Tr::tr("Enter the name of the session:"),
m_newSessionLineEdit,
@@ -150,7 +150,7 @@ SessionDialog::SessionDialog(QWidget *parent) : QDialog(parent)
"What is a Session?</a>"));
whatsASessionLabel->setOpenExternalLinks(true);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Row {

View File

@@ -85,7 +85,7 @@ bool PythonWizardPageFactory::validateData(Id typeId, const QVariant &data, QStr
PythonWizardPage::PythonWizardPage(const QList<QPair<QString, QVariant>> &pySideAndData,
const int defaultPyside)
{
using namespace Utils::Layouting;
using namespace Layouting;
m_interpreter.setSettingsDialogId(Constants::C_PYTHONOPTIONS_PAGE_ID);
connect(PythonSettings::instance(),
&PythonSettings::interpretersChanged,

View File

@@ -43,7 +43,7 @@ CustomQbsPropertiesDialog::CustomQbsPropertiesDialog(const QVariantMap &properti
m_removeButton = new QPushButton(Tr::tr("&Remove"));
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Row {
m_propertiesTable,

View File

@@ -35,7 +35,7 @@ private:
void makeReadOnly() override { m_changeButton->setEnabled(false); }
void refresh() override { m_contentLabel->setText(QbsKitAspect::representation(kit())); }
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override
void addToLayout(Layouting::LayoutBuilder &builder) override
{
addMutableAction(m_contentLabel);
builder.addItem(m_contentLabel);

View File

@@ -120,7 +120,7 @@ QbsProfilesSettingsWidget::QbsProfilesSettingsWidget()
m_profileValueLabel = new QLabel;
m_propertiesView = new QTreeView;
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Form {
Tr::tr("Kit:"), m_kitsComboBox, br,

View File

@@ -21,7 +21,7 @@ ClassDefinition::ClassDefinition(QWidget *parent) :
QTabWidget(parent),
m_domXmlChanged(false)
{
using namespace Utils::Layouting;
using namespace Layouting;
// "Sources" tab
auto sourceTab = new QWidget;

View File

@@ -34,7 +34,7 @@ CustomWidgetPluginWizardPage::CustomWidgetPluginWizardPage(QWidget *parent) :
m_pluginNameEdit = new QLineEdit;
m_resourceFileEdit = new QLineEdit(Tr::tr("icons.qrc"));
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Tr::tr("Specify the properties of the plugin library and the collection class."),
Space(10),

View File

@@ -39,7 +39,7 @@ CustomWidgetWidgetsWizardPage::CustomWidgetWidgetsWizardPage(QWidget *parent) :
dummy->setEnabled(false);
m_tabStackLayout->addWidget(dummy);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Tr::tr("Specify the list of custom widgets and their properties."),
Space(10),

View File

@@ -30,7 +30,7 @@ OpenUiQmlFileDialog::OpenUiQmlFileDialog(QWidget *parent) :
m_listWidget = new QListWidget;
using namespace Utils::Layouting;
using namespace Layouting;
Column {
tr("You are opening a .qml file in the designer. Do you want to open a .ui.qml file instead?"),

View File

@@ -196,7 +196,7 @@ SettingsPageWidget::SettingsPageWidget(ExternalDependencies &externalDependencie
m_debugPuppetComboBox = new QComboBox;
using namespace Utils::Layouting;
using namespace Layouting;
Column {
m_useDefaultPuppetRadioButton,

View File

@@ -34,7 +34,7 @@ ComponentNameDialog::ComponentNameDialog(QWidget *parent) :
m_checkBox = new QCheckBox(Tr::tr("ui.qml file"));
m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Form {
Tr::tr("Component name:"), m_componentNameEdit, br,

View File

@@ -246,7 +246,7 @@ public:
QObject::connect(useQmlls, &QCheckBox::stateChanged, this, [this](int checked) {
useLatestQmlls->setEnabled(checked != Qt::Unchecked);
});
using namespace Utils::Layouting;
using namespace Layouting;
// clang-format off
const auto formattingGroup =
Group {

View File

@@ -46,7 +46,7 @@ QmlJSCodeStylePreferencesWidget::QmlJSCodeStylePreferencesWidget(
decorateEditor(TextEditorSettings::fontSettings());
using namespace Utils::Layouting;
using namespace Layouting;
Row {
Column {
m_tabPreferencesWidget,

View File

@@ -19,7 +19,7 @@ QmlJSCodeStyleSettingsWidget::QmlJSCodeStyleSettingsWidget(QWidget *parent)
m_lineLengthSpinBox->setMinimum(0);
m_lineLengthSpinBox->setMaximum(999);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Group {
title(Tr::tr("Qml JS Code Style")),

View File

@@ -42,7 +42,7 @@ public:
Utils::FilePath currentFile;
};
void addToLayout(Utils::Layouting::LayoutBuilder &builder) final;
void addToLayout(Layouting::LayoutBuilder &builder) final;
void toMap(QVariantMap &map) const final;
void fromMap(const QVariantMap &map) final;

View File

@@ -44,7 +44,7 @@ CodeGenSettingsPageWidget::CodeGenSettingsPageWidget()
CodeGenSettings parameters;
parameters.fromSettings(Core::ICore::settings());
using namespace Utils::Layouting;
using namespace Layouting;
m_ptrAggregationRadioButton = new QRadioButton(Tr::tr("Aggregation as a pointer member"));
m_ptrAggregationRadioButton->setChecked

View File

@@ -18,7 +18,7 @@ class QTSUPPORT_EXPORT QmlDebuggingAspect : public Utils::TriStateAspect
public:
explicit QmlDebuggingAspect(ProjectExplorer::BuildConfiguration *buildConfig);
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override;
void addToLayout(Layouting::LayoutBuilder &builder) override;
private:
const ProjectExplorer::BuildConfiguration *m_buildConfig = nullptr;
@@ -32,7 +32,7 @@ public:
QtQuickCompilerAspect(ProjectExplorer::BuildConfiguration *buildConfig);
private:
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override;
void addToLayout(Layouting::LayoutBuilder &builder) override;
const ProjectExplorer::BuildConfiguration *m_buildConfig = nullptr;
};

View File

@@ -261,7 +261,7 @@ QtOptionsPageWidget::QtOptionsPageWidget()
m_errorLabel = new QLabel;
using namespace Utils::Layouting;
using namespace Layouting;
auto versionInfoWidget = new QWidget;
// clang-format off

View File

@@ -43,7 +43,7 @@ QrcEditor::QrcEditor(RelativeResourceModel *model, QWidget *parent)
m_languageLabel = new QLabel(Tr::tr("Language:"));
m_languageText = new QLineEdit;
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Row {
addPrefixButton,

View File

@@ -34,7 +34,7 @@ ColorPicker::ColorPicker(const QString &key, QWidget *parent)
m_lastUsedColorContainer = new QHBoxLayout(lastUsedColorContainer);
m_lastUsedColorContainer->setContentsMargins(0, 0, 0, 0);
using namespace Utils::Layouting;
using namespace Layouting;
Grid colorGrid;
for (int i = 0; i < colors.count(); ++i) {
QWidget *button = createButton(colors[i]);

View File

@@ -36,7 +36,7 @@ ColorSettings::ColorSettings(QWidget *parent)
s->value(Constants::C_SETTINGS_COLORSETTINGS_CURRENTCOLORTHEME).toString());
selectTheme(m_comboColorThemes->currentIndex());
using namespace Utils::Layouting;
using namespace Layouting;
Column {
Row {
m_comboColorThemes,

View File

@@ -21,7 +21,7 @@ ColorThemeDialog::ColorThemeDialog(QWidget *parent)
QDialogButtonBox::Cancel |
QDialogButtonBox::Apply);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
m_colorSettings,
buttonBox,

View File

@@ -29,7 +29,7 @@ NavigatorSlider::NavigatorSlider(QWidget *parent)
btn->setAutoRepeatInterval(10);
}
using namespace Utils::Layouting;
using namespace Layouting;
Row {
zoomOut,
m_slider,

View File

@@ -45,7 +45,7 @@ Search::Search(QWidget *parent)
m_searchView->setModel(m_proxyModel);
m_searchView->setFrameShape(QFrame::NoFrame);
using namespace Utils::Layouting;
using namespace Layouting;
Column {
m_searchEdit,
m_searchView,

Some files were not shown because too many files have changed in this diff Show More