forked from qt-creator/qt-creator
Utils: Add "Layouting::HorizontalRule" LayoutItem
We have many horizontal separator lines in the UI, which are each time repetitively created from a QFrame with some flags set. With the .ui inlining, we will have more of these separators coming. This change intoduces a Layouting::HorizontalRule LayoutItem and replaces various existing QFarme separators with it. Change-Id: I60bad89e2a2b777fbd2f9d0cf872af81e41dcfd7 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -472,6 +472,12 @@ PushButton::PushButton(std::initializer_list<LayoutBuilder::LayoutItem> items)
|
|||||||
applyItems(widget, items);
|
applyItems(widget, items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HorizontalRule::HorizontalRule(std::initializer_list<LayoutItem> items)
|
||||||
|
{
|
||||||
|
widget = createHr();
|
||||||
|
applyItems(widget, items);
|
||||||
|
}
|
||||||
|
|
||||||
// "Properties"
|
// "Properties"
|
||||||
|
|
||||||
LayoutBuilder::Setter title(const QString &title, BoolAspect *checker)
|
LayoutBuilder::Setter title(const QString &title, BoolAspect *checker)
|
||||||
@@ -524,6 +530,14 @@ LayoutBuilder::Setter tooltip(const QString &toolTip)
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QWidget *createHr(QWidget *parent)
|
||||||
|
{
|
||||||
|
auto frame = new QFrame(parent);
|
||||||
|
frame->setFrameShape(QFrame::HLine);
|
||||||
|
frame->setFrameShadow(QFrame::Sunken);
|
||||||
|
return frame;
|
||||||
|
}
|
||||||
|
|
||||||
LayoutBuilder::Break br;
|
LayoutBuilder::Break br;
|
||||||
LayoutBuilder::Stretch st;
|
LayoutBuilder::Stretch st;
|
||||||
LayoutBuilder::Space empty(0);
|
LayoutBuilder::Space empty(0);
|
||||||
|
@@ -159,6 +159,7 @@ QTCREATOR_UTILS_EXPORT LayoutBuilder::Setter text(const QString &text);
|
|||||||
QTCREATOR_UTILS_EXPORT LayoutBuilder::Setter tooltip(const QString &toolTip);
|
QTCREATOR_UTILS_EXPORT LayoutBuilder::Setter tooltip(const QString &toolTip);
|
||||||
QTCREATOR_UTILS_EXPORT LayoutBuilder::Setter onClicked(const std::function<void()> &func,
|
QTCREATOR_UTILS_EXPORT LayoutBuilder::Setter onClicked(const std::function<void()> &func,
|
||||||
QObject *guard = nullptr);
|
QObject *guard = nullptr);
|
||||||
|
QTCREATOR_UTILS_EXPORT QWidget *createHr(QWidget *parent = nullptr);
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT Group : public LayoutBuilder::LayoutItem
|
class QTCREATOR_UTILS_EXPORT Group : public LayoutBuilder::LayoutItem
|
||||||
{
|
{
|
||||||
@@ -172,6 +173,12 @@ public:
|
|||||||
PushButton(std::initializer_list<LayoutItem> items);
|
PushButton(std::initializer_list<LayoutItem> items);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class QTCREATOR_UTILS_EXPORT HorizontalRule : public LayoutBuilder::LayoutItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HorizontalRule(std::initializer_list<LayoutItem> items);
|
||||||
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT Column : public LayoutBuilder
|
class QTCREATOR_UTILS_EXPORT Column : public LayoutBuilder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
#include <utils/layoutbuilder.h>
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/outputformatter.h>
|
#include <utils/outputformatter.h>
|
||||||
#include <utils/runextensions.h>
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/runextensions.h>
|
||||||
#include <utils/utilsicons.h>
|
#include <utils/utilsicons.h>
|
||||||
|
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
@@ -76,10 +76,6 @@ AndroidSdkManagerWidget::AndroidSdkManagerWidget(AndroidConfig &config,
|
|||||||
|
|
||||||
auto obsoleteCheckBox = new QCheckBox(tr("Include obsolete"));
|
auto obsoleteCheckBox = new QCheckBox(tr("Include obsolete"));
|
||||||
|
|
||||||
auto line = new QFrame;
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
|
||||||
|
|
||||||
auto showAvailableRadio = new QRadioButton(tr("Available"));
|
auto showAvailableRadio = new QRadioButton(tr("Available"));
|
||||||
auto showInstalledRadio = new QRadioButton(tr("Installed"));
|
auto showInstalledRadio = new QRadioButton(tr("Installed"));
|
||||||
auto showAllRadio = new QRadioButton(tr("All"));
|
auto showAllRadio = new QRadioButton(tr("All"));
|
||||||
@@ -141,7 +137,7 @@ AndroidSdkManagerWidget::AndroidSdkManagerWidget(AndroidConfig &config,
|
|||||||
Column {
|
Column {
|
||||||
Row { tr("Channel:"), channelCheckbox },
|
Row { tr("Channel:"), channelCheckbox },
|
||||||
obsoleteCheckBox,
|
obsoleteCheckBox,
|
||||||
line,
|
HorizontalRule {},
|
||||||
showAvailableRadio,
|
showAvailableRadio,
|
||||||
showInstalledRadio,
|
showInstalledRadio,
|
||||||
showAllRadio,
|
showAllRadio,
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/outputformat.h>
|
#include <utils/outputformat.h>
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
|
|
||||||
@@ -820,14 +821,6 @@ void TestRunner::reportResult(ResultType type, const QString &description)
|
|||||||
|
|
||||||
/*************************************************************************************************/
|
/*************************************************************************************************/
|
||||||
|
|
||||||
static QFrame *createLine(QWidget *parent)
|
|
||||||
{
|
|
||||||
QFrame *line = new QFrame(parent);
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
|
||||||
return line;
|
|
||||||
}
|
|
||||||
|
|
||||||
RunConfigurationSelectionDialog::RunConfigurationSelectionDialog(const QString &buildTargetKey,
|
RunConfigurationSelectionDialog::RunConfigurationSelectionDialog(const QString &buildTargetKey,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
@@ -853,7 +846,7 @@ RunConfigurationSelectionDialog::RunConfigurationSelectionDialog(const QString &
|
|||||||
formLayout->addRow(m_details);
|
formLayout->addRow(m_details);
|
||||||
formLayout->addRow(Tr::tr("Run Configuration:"), m_rcCombo);
|
formLayout->addRow(Tr::tr("Run Configuration:"), m_rcCombo);
|
||||||
formLayout->addRow(m_rememberCB);
|
formLayout->addRow(m_rememberCB);
|
||||||
formLayout->addRow(createLine(this));
|
formLayout->addRow(Layouting::createHr(this));
|
||||||
formLayout->addRow(Tr::tr("Executable:"), m_executable);
|
formLayout->addRow(Tr::tr("Executable:"), m_executable);
|
||||||
formLayout->addRow(Tr::tr("Arguments:"), m_arguments);
|
formLayout->addRow(Tr::tr("Arguments:"), m_arguments);
|
||||||
formLayout->addRow(Tr::tr("Working Directory:"), m_workingDir);
|
formLayout->addRow(Tr::tr("Working Directory:"), m_workingDir);
|
||||||
@@ -861,7 +854,7 @@ RunConfigurationSelectionDialog::RunConfigurationSelectionDialog(const QString &
|
|||||||
auto vboxLayout = new QVBoxLayout(this);
|
auto vboxLayout = new QVBoxLayout(this);
|
||||||
vboxLayout->addLayout(formLayout);
|
vboxLayout->addLayout(formLayout);
|
||||||
vboxLayout->addStretch();
|
vboxLayout->addStretch();
|
||||||
vboxLayout->addWidget(createLine(this));
|
vboxLayout->addWidget(Layouting::createHr(this));
|
||||||
vboxLayout->addWidget(m_buttonBox);
|
vboxLayout->addWidget(m_buttonBox);
|
||||||
|
|
||||||
connect(m_rcCombo, &QComboBox::currentTextChanged,
|
connect(m_rcCombo, &QComboBox::currentTextChanged,
|
||||||
|
@@ -6,6 +6,8 @@
|
|||||||
#include "activityselector.h"
|
#include "activityselector.h"
|
||||||
#include "ui_checkoutdialog.h"
|
#include "ui_checkoutdialog.h"
|
||||||
|
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
|
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
namespace ClearCase {
|
namespace ClearCase {
|
||||||
@@ -22,12 +24,7 @@ CheckOutDialog::CheckOutDialog(const QString &fileName, bool isUcm, bool showCom
|
|||||||
m_actSelector = new ActivitySelector(this);
|
m_actSelector = new ActivitySelector(this);
|
||||||
|
|
||||||
ui->verticalLayout->insertWidget(0, m_actSelector);
|
ui->verticalLayout->insertWidget(0, m_actSelector);
|
||||||
|
ui->verticalLayout->insertWidget(1, Utils::Layouting::createHr());
|
||||||
auto line = new QFrame(this);
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
|
||||||
|
|
||||||
ui->verticalLayout->insertWidget(1, line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!showComment)
|
if (!showComment)
|
||||||
|
@@ -5,8 +5,9 @@
|
|||||||
|
|
||||||
#include "activityselector.h"
|
#include "activityselector.h"
|
||||||
|
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QFrame>
|
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
using namespace ClearCase::Internal;
|
using namespace ClearCase::Internal;
|
||||||
@@ -67,11 +68,7 @@ void ClearCaseSubmitEditorWidget::addActivitySelector(bool isUcm)
|
|||||||
|
|
||||||
m_actSelector = new ActivitySelector;
|
m_actSelector = new ActivitySelector;
|
||||||
m_verticalLayout->insertWidget(0, m_actSelector);
|
m_verticalLayout->insertWidget(0, m_actSelector);
|
||||||
|
m_verticalLayout->insertWidget(1, Utils::Layouting::createHr());
|
||||||
auto line = new QFrame;
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
|
||||||
m_verticalLayout->insertWidget(1, line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ClearCaseSubmitEditorWidget::commitName() const
|
QString ClearCaseSubmitEditorWidget::commitName() const
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include <utils/infobar.h>
|
#include <utils/infobar.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/theme/theme.h>
|
#include <utils/theme/theme.h>
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/link.h>
|
#include <utils/link.h>
|
||||||
#include <utils/utilsicons.h>
|
#include <utils/utilsicons.h>
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ EditorView::EditorView(SplitterOrView *parentSplitterOrView, QWidget *parent) :
|
|||||||
m_toolBar(new EditorToolBar(this)),
|
m_toolBar(new EditorToolBar(this)),
|
||||||
m_container(new QStackedWidget(this)),
|
m_container(new QStackedWidget(this)),
|
||||||
m_infoBarDisplay(new InfoBarDisplay(this)),
|
m_infoBarDisplay(new InfoBarDisplay(this)),
|
||||||
m_statusHLine(new QFrame(this)),
|
m_statusHLine(Layouting::createHr(this)),
|
||||||
m_statusWidget(new QFrame(this))
|
m_statusWidget(new QFrame(this))
|
||||||
{
|
{
|
||||||
auto tl = new QVBoxLayout(this);
|
auto tl = new QVBoxLayout(this);
|
||||||
@@ -79,8 +80,6 @@ EditorView::EditorView(SplitterOrView *parentSplitterOrView, QWidget *parent) :
|
|||||||
tl->addWidget(new FindToolBarPlaceHolder(this));
|
tl->addWidget(new FindToolBarPlaceHolder(this));
|
||||||
|
|
||||||
{
|
{
|
||||||
m_statusHLine->setFrameStyle(QFrame::HLine);
|
|
||||||
|
|
||||||
m_statusWidget->setFrameStyle(QFrame::NoFrame);
|
m_statusWidget->setFrameStyle(QFrame::NoFrame);
|
||||||
m_statusWidget->setLineWidth(0);
|
m_statusWidget->setLineWidth(0);
|
||||||
m_statusWidget->setAutoFillBackground(true);
|
m_statusWidget->setAutoFillBackground(true);
|
||||||
|
@@ -113,7 +113,7 @@ private:
|
|||||||
QStackedWidget *m_container;
|
QStackedWidget *m_container;
|
||||||
Utils::InfoBarDisplay *m_infoBarDisplay;
|
Utils::InfoBarDisplay *m_infoBarDisplay;
|
||||||
QString m_statusWidgetId;
|
QString m_statusWidgetId;
|
||||||
QFrame *m_statusHLine;
|
QWidget *m_statusHLine;
|
||||||
QFrame *m_statusWidget;
|
QFrame *m_statusWidget;
|
||||||
QLabel *m_statusWidgetLabel;
|
QLabel *m_statusWidgetLabel;
|
||||||
QToolButton *m_statusWidgetButton;
|
QToolButton *m_statusWidgetButton;
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#include <utils/filepath.h>
|
#include <utils/filepath.h>
|
||||||
#include <utils/fsengine/fileiconprovider.h>
|
#include <utils/fsengine/fileiconprovider.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/navigationtreeview.h>
|
#include <utils/navigationtreeview.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/removefiledialog.h>
|
#include <utils/removefiledialog.h>
|
||||||
@@ -85,13 +86,6 @@ FolderNavigationWidgetFactory *FolderNavigationWidgetFactory::instance()
|
|||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
static QWidget *createHLine()
|
|
||||||
{
|
|
||||||
auto widget = new QFrame;
|
|
||||||
widget->setFrameStyle(QFrame::Plain | QFrame::HLine);
|
|
||||||
return widget;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Call delayLayoutOnce to delay reporting the new heightForWidget by the double-click interval.
|
// Call delayLayoutOnce to delay reporting the new heightForWidget by the double-click interval.
|
||||||
// Call setScrollBarOnce to set a scroll bar's value once during layouting (where heightForWidget
|
// Call setScrollBarOnce to set a scroll bar's value once during layouting (where heightForWidget
|
||||||
// is called).
|
// is called).
|
||||||
@@ -318,7 +312,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
|
|||||||
crumbLayout->setContentsMargins(4, 4, 4, 4);
|
crumbLayout->setContentsMargins(4, 4, 4, 4);
|
||||||
crumbLayout->addWidget(m_crumbLabel);
|
crumbLayout->addWidget(m_crumbLabel);
|
||||||
crumbContainerLayout->addLayout(crumbLayout);
|
crumbContainerLayout->addLayout(crumbLayout);
|
||||||
crumbContainerLayout->addWidget(createHLine());
|
crumbContainerLayout->addWidget(Layouting::createHr(this));
|
||||||
m_crumbLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
m_crumbLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
||||||
|
|
||||||
auto layout = new QVBoxLayout();
|
auto layout = new QVBoxLayout();
|
||||||
|
@@ -322,9 +322,7 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD
|
|||||||
else
|
else
|
||||||
Core::EditorManager::openEditor(Utils::FilePath::fromString(link));
|
Core::EditorManager::openEditor(Utils::FilePath::fromString(link));
|
||||||
});
|
});
|
||||||
const auto separator = new QFrame;
|
layout->addWidget(Utils::Layouting::createHr());
|
||||||
separator->setFrameShape(QFrame::HLine);
|
|
||||||
layout->addWidget(separator);
|
|
||||||
layout->addWidget(configFilesHelpLabel);
|
layout->addWidget(configFilesHelpLabel);
|
||||||
|
|
||||||
layout->addStretch(1);
|
layout->addStretch(1);
|
||||||
|
@@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/basetreeview.h>
|
#include <utils/basetreeview.h>
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/fancylineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -3152,9 +3153,7 @@ public:
|
|||||||
defaultImplTargetComboBox->setCurrentIndex(implTargetStrings.size() - 1);
|
defaultImplTargetComboBox->setCurrentIndex(implTargetStrings.size() - 1);
|
||||||
const auto mainLayout = new QVBoxLayout(this);
|
const auto mainLayout = new QVBoxLayout(this);
|
||||||
mainLayout->addLayout(defaultImplTargetLayout);
|
mainLayout->addLayout(defaultImplTargetLayout);
|
||||||
const auto separator = new QFrame();
|
mainLayout->addWidget(Utils::Layouting::createHr(this));
|
||||||
separator->setFrameShape(QFrame::HLine);
|
|
||||||
mainLayout->addWidget(separator);
|
|
||||||
mainLayout->addLayout(candidatesLayout);
|
mainLayout->addLayout(candidatesLayout);
|
||||||
mainLayout->addWidget(buttonBox);
|
mainLayout->addWidget(buttonBox);
|
||||||
}
|
}
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
|
|
||||||
#include <utils/fancylineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
@@ -262,14 +263,6 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
|
|||||||
"If empty, $SYSROOT/usr/lib/debug will be chosen."));
|
"If empty, $SYSROOT/usr/lib/debug will be chosen."));
|
||||||
d->debuginfoPathChooser->setHistoryCompleter("Debugger.DebugLocation.History");
|
d->debuginfoPathChooser->setHistoryCompleter("Debugger.DebugLocation.History");
|
||||||
|
|
||||||
auto line = new QFrame(this);
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
|
||||||
|
|
||||||
auto line2 = new QFrame(this);
|
|
||||||
line2->setFrameShape(QFrame::HLine);
|
|
||||||
line2->setFrameShadow(QFrame::Sunken);
|
|
||||||
|
|
||||||
d->historyComboBox = new QComboBox(this);
|
d->historyComboBox = new QComboBox(this);
|
||||||
|
|
||||||
d->buttonBox = new QDialogButtonBox(this);
|
d->buttonBox = new QDialogButtonBox(this);
|
||||||
@@ -292,13 +285,13 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
|
|||||||
formLayout->addRow(Tr::tr("Debug &information:"), d->debuginfoPathChooser);
|
formLayout->addRow(Tr::tr("Debug &information:"), d->debuginfoPathChooser);
|
||||||
formLayout->addRow(d->channelOverrideHintLabel);
|
formLayout->addRow(d->channelOverrideHintLabel);
|
||||||
formLayout->addRow(d->channelOverrideLabel, d->channelOverrideEdit);
|
formLayout->addRow(d->channelOverrideLabel, d->channelOverrideEdit);
|
||||||
formLayout->addRow(line2);
|
formLayout->addRow(Layouting::createHr());
|
||||||
formLayout->addRow(Tr::tr("&Recent:"), d->historyComboBox);
|
formLayout->addRow(Tr::tr("&Recent:"), d->historyComboBox);
|
||||||
|
|
||||||
auto verticalLayout = new QVBoxLayout(this);
|
auto verticalLayout = new QVBoxLayout(this);
|
||||||
verticalLayout->addLayout(formLayout);
|
verticalLayout->addLayout(formLayout);
|
||||||
verticalLayout->addStretch();
|
verticalLayout->addStretch();
|
||||||
verticalLayout->addWidget(line);
|
verticalLayout->addWidget(Layouting::createHr());
|
||||||
verticalLayout->addWidget(d->buttonBox);
|
verticalLayout->addWidget(d->buttonBox);
|
||||||
|
|
||||||
connect(d->localExecutablePathChooser, &PathChooser::rawPathChanged,
|
connect(d->localExecutablePathChooser, &PathChooser::rawPathChanged,
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
#include <projectexplorer/kitchooser.h>
|
#include <projectexplorer/kitchooser.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
|
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
#include <utils/processinterface.h>
|
#include <utils/processinterface.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -258,17 +259,12 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
|
|||||||
formLayout->addRow(Tr::tr("&Executable or symbol file:"), d->symbolFileName);
|
formLayout->addRow(Tr::tr("&Executable or symbol file:"), d->symbolFileName);
|
||||||
formLayout->addRow(Tr::tr("Override &start script:"), d->overrideStartScriptFileName);
|
formLayout->addRow(Tr::tr("Override &start script:"), d->overrideStartScriptFileName);
|
||||||
formLayout->addRow(Tr::tr("Override S&ysRoot:"), d->sysRootDirectory);
|
formLayout->addRow(Tr::tr("Override S&ysRoot:"), d->sysRootDirectory);
|
||||||
|
|
||||||
auto line = new QFrame(this);
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
|
||||||
|
|
||||||
formLayout->addRow(d->buttonBox);
|
formLayout->addRow(d->buttonBox);
|
||||||
|
|
||||||
auto vboxLayout = new QVBoxLayout(this);
|
auto vboxLayout = new QVBoxLayout(this);
|
||||||
vboxLayout->addLayout(formLayout);
|
vboxLayout->addLayout(formLayout);
|
||||||
vboxLayout->addStretch();
|
vboxLayout->addStretch();
|
||||||
vboxLayout->addWidget(line);
|
vboxLayout->addWidget(Layouting::createHr());
|
||||||
vboxLayout->addWidget(d->buttonBox);
|
vboxLayout->addWidget(d->buttonBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QFrame>
|
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
@@ -71,10 +70,6 @@ IosSettingsWidget::IosSettingsWidget()
|
|||||||
m_resetButton->setEnabled(false);
|
m_resetButton->setEnabled(false);
|
||||||
m_resetButton->setToolTip(tr("Reset contents and settings of simulator devices."));
|
m_resetButton->setToolTip(tr("Reset contents and settings of simulator devices."));
|
||||||
|
|
||||||
auto line = new QFrame;
|
|
||||||
line->setFrameShadow(QFrame::Raised);
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
|
|
||||||
auto createButton = new QPushButton(tr("Create"));
|
auto createButton = new QPushButton(tr("Create"));
|
||||||
createButton->setToolTip(tr("Create a new simulator device."));
|
createButton->setToolTip(tr("Create a new simulator device."));
|
||||||
|
|
||||||
@@ -121,7 +116,7 @@ IosSettingsWidget::IosSettingsWidget()
|
|||||||
st
|
st
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
line,
|
HorizontalRule {},
|
||||||
Row { tr("Screenshot directory:"), m_pathWidget }
|
Row { tr("Screenshot directory:"), m_pathWidget }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -55,6 +55,7 @@
|
|||||||
#include <coreplugin/actionmanager/commandbutton.h>
|
#include <coreplugin/actionmanager/commandbutton.h>
|
||||||
#include <utils/fadingindicator.h>
|
#include <utils/fadingindicator.h>
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/styledbar.h>
|
#include <utils/styledbar.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
@@ -1120,9 +1121,7 @@ void ModelEditor::initToolbars()
|
|||||||
}
|
}
|
||||||
case qmt::Toolbar::TooltypeSeparator:
|
case qmt::Toolbar::TooltypeSeparator:
|
||||||
{
|
{
|
||||||
auto horizLine1 = new QFrame(d->leftToolBox);
|
toolBarLayout->addWidget(Layouting::createHr(d->leftToolBox));
|
||||||
horizLine1->setFrameShape(QFrame::HLine);
|
|
||||||
toolBarLayout->addWidget(horizLine1);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1155,9 +1154,7 @@ void ModelEditor::initToolbars()
|
|||||||
new DragTool(QIcon(":/modelinglib/48x48/item.png"),
|
new DragTool(QIcon(":/modelinglib/48x48/item.png"),
|
||||||
tr("Item"), tr("New Item"), QLatin1String(qmt::ELEMENT_TYPE_ITEM),
|
tr("Item"), tr("New Item"), QLatin1String(qmt::ELEMENT_TYPE_ITEM),
|
||||||
QString(), toolBar));
|
QString(), toolBar));
|
||||||
auto horizLine1 = new QFrame(d->leftToolBox);
|
toolBarLayout->addWidget(Layouting::createHr(d->leftToolBox));
|
||||||
horizLine1->setFrameShape(QFrame::HLine);
|
|
||||||
toolBarLayout->addWidget(horizLine1);
|
|
||||||
toolBarLayout->addWidget(
|
toolBarLayout->addWidget(
|
||||||
new DragTool(QIcon(":/modelinglib/48x48/annotation.png"),
|
new DragTool(QIcon(":/modelinglib/48x48/annotation.png"),
|
||||||
tr("Annotation"), QString(), QLatin1String(qmt::ELEMENT_TYPE_ANNOTATION),
|
tr("Annotation"), QString(), QLatin1String(qmt::ELEMENT_TYPE_ANNOTATION),
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
#include <utils/layoutbuilder.h>
|
#include <utils/layoutbuilder.h>
|
||||||
|
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QFrame>
|
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
@@ -46,10 +45,6 @@ PerfLoadDialog::PerfLoadDialog(QWidget *parent)
|
|||||||
m_kitChooser = new ProjectExplorer::KitChooser(this);
|
m_kitChooser = new ProjectExplorer::KitChooser(this);
|
||||||
m_kitChooser->populate();
|
m_kitChooser->populate();
|
||||||
|
|
||||||
auto line = new QFrame(this);
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
|
||||||
|
|
||||||
auto buttonBox = new QDialogButtonBox(this);
|
auto buttonBox = new QDialogButtonBox(this);
|
||||||
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
||||||
|
|
||||||
@@ -62,7 +57,7 @@ PerfLoadDialog::PerfLoadDialog(QWidget *parent)
|
|||||||
label3, Span(2, m_kitChooser)
|
label3, Span(2, m_kitChooser)
|
||||||
},
|
},
|
||||||
st,
|
st,
|
||||||
line,
|
HorizontalRule {},
|
||||||
buttonBox
|
buttonBox
|
||||||
}.attachTo(this);
|
}.attachTo(this);
|
||||||
|
|
||||||
|
@@ -156,10 +156,6 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
|
|||||||
mainLayout->addWidget(errorText);
|
mainLayout->addWidget(errorText);
|
||||||
mainLayout->addWidget(buttonBox);
|
mainLayout->addWidget(buttonBox);
|
||||||
|
|
||||||
// QFrame *line = new QFrame(this);
|
|
||||||
// line->setFrameShape(QFrame::HLine);
|
|
||||||
// line->setFrameShadow(QFrame::Sunken);
|
|
||||||
|
|
||||||
proxyModel.setFilterRegularExpression(processFilterLineEdit->text());
|
proxyModel.setFilterRegularExpression(processFilterLineEdit->text());
|
||||||
|
|
||||||
connect(processFilterLineEdit, &FancyLineEdit::textChanged,
|
connect(processFilterLineEdit, &FancyLineEdit::textChanged,
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
#include "panelswidget.h"
|
#include "panelswidget.h"
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/styledbar.h>
|
#include <utils/styledbar.h>
|
||||||
#include <utils/stylehelper.h>
|
#include <utils/stylehelper.h>
|
||||||
@@ -103,13 +104,7 @@ void PanelsWidget::addPropertiesPanel(const QString &displayName)
|
|||||||
f.setPointSizeF(f.pointSizeF() * 1.6);
|
f.setPointSizeF(f.pointSizeF() * 1.6);
|
||||||
nameLabel->setFont(f);
|
nameLabel->setFont(f);
|
||||||
m_layout->addWidget(nameLabel);
|
m_layout->addWidget(nameLabel);
|
||||||
|
m_layout->addWidget(Layouting::createHr());
|
||||||
// line:
|
|
||||||
auto line = new QFrame(m_root);
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
line->setForegroundRole(QPalette::Midlight);
|
|
||||||
line->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
|
||||||
m_layout->addWidget(line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PanelsWidget::addWidget(QWidget *widget)
|
void PanelsWidget::addWidget(QWidget *widget)
|
||||||
@@ -160,10 +155,7 @@ void PanelsWidget::addGlobalSettingsProperties(ProjectSettingsWidget *widget)
|
|||||||
}
|
}
|
||||||
horizontalLayout->addStretch(1);
|
horizontalLayout->addStretch(1);
|
||||||
m_layout->addLayout(horizontalLayout);
|
m_layout->addLayout(horizontalLayout);
|
||||||
|
m_layout->addWidget(Layouting::createHr());
|
||||||
auto separator = new QFrame(m_root);
|
|
||||||
separator->setFrameShape(QFrame::HLine);
|
|
||||||
m_layout->addWidget(separator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ProjectExplorer
|
} // ProjectExplorer
|
||||||
|
@@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QFrame>
|
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
@@ -127,10 +126,6 @@ SessionDialog::SessionDialog(QWidget *parent) : QDialog(parent)
|
|||||||
|
|
||||||
m_autoLoadCheckBox = new QCheckBox(tr("Restore last session on startup"));
|
m_autoLoadCheckBox = new QCheckBox(tr("Restore last session on startup"));
|
||||||
|
|
||||||
auto line = new QFrame(this);
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
|
||||||
|
|
||||||
auto buttonBox = new QDialogButtonBox(this);
|
auto buttonBox = new QDialogButtonBox(this);
|
||||||
buttonBox->setStandardButtons(QDialogButtonBox::Close);
|
buttonBox->setStandardButtons(QDialogButtonBox::Close);
|
||||||
|
|
||||||
@@ -157,7 +152,7 @@ SessionDialog::SessionDialog(QWidget *parent) : QDialog(parent)
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
m_autoLoadCheckBox,
|
m_autoLoadCheckBox,
|
||||||
line,
|
HorizontalRule {},
|
||||||
Row { whatsASessionLabel, buttonBox },
|
Row { whatsASessionLabel, buttonBox },
|
||||||
}.attachTo(this);
|
}.attachTo(this);
|
||||||
|
|
||||||
|
@@ -134,17 +134,13 @@ QbsProfilesSettingsWidget::QbsProfilesSettingsWidget()
|
|||||||
m_profileValueLabel = new QLabel;
|
m_profileValueLabel = new QLabel;
|
||||||
m_propertiesView = new QTreeView;
|
m_propertiesView = new QTreeView;
|
||||||
|
|
||||||
auto line = new QFrame;
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
|
||||||
|
|
||||||
using namespace Utils::Layouting;
|
using namespace Utils::Layouting;
|
||||||
Column {
|
Column {
|
||||||
Form {
|
Form {
|
||||||
tr("Kit:"), m_kitsComboBox, br,
|
tr("Kit:"), m_kitsComboBox, br,
|
||||||
tr("Associated profile:"), m_profileValueLabel, br,
|
tr("Associated profile:"), m_profileValueLabel, br,
|
||||||
},
|
},
|
||||||
line,
|
HorizontalRule {},
|
||||||
tr("Profile properties:"),
|
tr("Profile properties:"),
|
||||||
Row {
|
Row {
|
||||||
m_propertiesView,
|
m_propertiesView,
|
||||||
|
@@ -60,10 +60,6 @@ BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title,
|
|||||||
|
|
||||||
m_toolButton = new QToolButton;
|
m_toolButton = new QToolButton;
|
||||||
m_toolButton->setFixedSize(24, 24);
|
m_toolButton->setFixedSize(24, 24);
|
||||||
auto line = new QFrame;
|
|
||||||
line->setFrameShape(QFrame::HLine);
|
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
|
||||||
line->setForegroundRole(QPalette::Midlight);
|
|
||||||
|
|
||||||
m_treeView = new QTreeView;
|
m_treeView = new QTreeView;
|
||||||
m_treeView->setModel(proxyModel);
|
m_treeView->setModel(proxyModel);
|
||||||
@@ -83,7 +79,7 @@ BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title,
|
|||||||
tr("Bookmark:"), m_bookmarkEdit, br,
|
tr("Bookmark:"), m_bookmarkEdit, br,
|
||||||
tr("Add in folder:"), m_bookmarkFolders, br,
|
tr("Add in folder:"), m_bookmarkFolders, br,
|
||||||
},
|
},
|
||||||
Row { m_toolButton, line, },
|
Row { m_toolButton, HorizontalRule {}, },
|
||||||
m_treeView,
|
m_treeView,
|
||||||
Row { m_newFolderButton, m_buttonBox, }
|
Row { m_newFolderButton, m_buttonBox, }
|
||||||
}.attachTo(this);
|
}.attachTo(this);
|
||||||
|
Reference in New Issue
Block a user