forked from qt-creator/qt-creator
Beautify general build configuration.
This commit is contained in:
@@ -138,6 +138,11 @@ void PathChooser::addButton(const QString &text, QObject *receiver, const char *
|
|||||||
m_d->m_hLayout->addWidget(button);
|
m_d->m_hLayout->addWidget(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QAbstractButton *PathChooser::buttonAtIndex(int index) const
|
||||||
|
{
|
||||||
|
return findChildren<QAbstractButton*>().at(index);
|
||||||
|
}
|
||||||
|
|
||||||
QString PathChooser::path() const
|
QString PathChooser::path() const
|
||||||
{
|
{
|
||||||
return m_d->m_lineEdit->text();
|
return m_d->m_lineEdit->text();
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include "utils_global.h"
|
#include "utils_global.h"
|
||||||
|
|
||||||
#include <QtGui/QWidget>
|
#include <QtGui/QWidget>
|
||||||
|
#include <QtGui/QAbstractButton>
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
@@ -91,6 +92,7 @@ public:
|
|||||||
static QString homePath();
|
static QString homePath();
|
||||||
|
|
||||||
void addButton(const QString &text, QObject *receiver, const char *slotFunc);
|
void addButton(const QString &text, QObject *receiver, const char *slotFunc);
|
||||||
|
QAbstractButton *buttonAtIndex(int index) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Returns overridden title or the one from <title>
|
// Returns overridden title or the one from <title>
|
||||||
|
|||||||
@@ -56,6 +56,19 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4Project *project)
|
|||||||
{
|
{
|
||||||
m_ui = new Ui::Qt4ProjectConfigWidget();
|
m_ui = new Ui::Qt4ProjectConfigWidget();
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
|
// fix the layout
|
||||||
|
QAbstractButton *browseButton = m_ui->shadowBuildDirEdit->buttonAtIndex(0);
|
||||||
|
m_ui->gridLayout->addWidget(browseButton, 4, 2);
|
||||||
|
int minimumHeight = qMax(m_ui->qtVersionComboBox->sizeHint().height(), m_ui->manageQtVersionPushButtons->sizeHint().height());
|
||||||
|
Qt::Alignment labelAlignment = Qt::Alignment(style()->styleHint(QStyle::SH_FormLayoutLabelAlignment));
|
||||||
|
for (int i = 0; i < m_ui->gridLayout->rowCount(); ++i) {
|
||||||
|
m_ui->gridLayout->setRowMinimumHeight(i, minimumHeight);
|
||||||
|
QLayoutItem *item = m_ui->gridLayout->itemAtPosition(i, 0);
|
||||||
|
if (item)
|
||||||
|
item->setAlignment(labelAlignment);
|
||||||
|
}
|
||||||
|
|
||||||
m_ui->shadowBuildDirEdit->setPromptDialogTitle(tr("Shadow Build Directory"));
|
m_ui->shadowBuildDirEdit->setPromptDialogTitle(tr("Shadow Build Directory"));
|
||||||
m_ui->shadowBuildDirEdit->setExpectedKind(Core::Utils::PathChooser::Directory);
|
m_ui->shadowBuildDirEdit->setExpectedKind(Core::Utils::PathChooser::Directory);
|
||||||
m_ui->invalidQtWarningLabel->setVisible(false);
|
m_ui->invalidQtWarningLabel->setVisible(false);
|
||||||
|
|||||||
@@ -10,11 +10,20 @@
|
|||||||
<height>247</height>
|
<height>247</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<property name="horizontalSpacing">
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<number>8</number>
|
||||||
<property name="fieldGrowthPolicy">
|
</property>
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<property name="verticalSpacing">
|
||||||
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="nameLabel">
|
<widget class="QLabel" name="nameLabel">
|
||||||
@@ -47,46 +56,52 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="qtVersionComboBox">
|
<widget class="QComboBox" name="qtVersionComboBox">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="manageQtVersionPushButtons">
|
|
||||||
<property name="text">
|
|
||||||
<string>Manage Qt Versions</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="invalidQtWarningLabel">
|
<widget class="QLabel" name="invalidQtWarningLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>This Qt-Version is invalid.</string>
|
<string>This Qt-Version is invalid.</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QPushButton" name="manageQtVersionPushButtons">
|
||||||
|
<property name="text">
|
||||||
|
<string>Manage</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Tool Chain:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="toolChainComboBox"/>
|
||||||
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -114,6 +129,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="Core::Utils::PathChooser" name="shadowBuildDirEdit">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QLabel" name="importLabel">
|
<widget class="QLabel" name="importLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -124,45 +149,9 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="Core::Utils::PathChooser" name="shadowBuildDirEdit" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="toolChainComboBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Tool Chain:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
|||||||
Reference in New Issue
Block a user