Commit ae3b2ab0 authored by Leandro Melo's avatar Leandro Melo
Browse files

Still changes to our options dialog

We decided to have text-based buttons by default.
parent a5977bc8
......@@ -73,7 +73,6 @@ QWidget *CommandMappings::createPage(QWidget *parent)
m_page = new Ui_CommandMappings();
QWidget *w = new QWidget(parent);
m_page->setupUi(w);
m_page->resetButton->setIcon(QPixmap(Constants::ICON_RESET));
m_page->targetEdit->setAutoHideButton(Utils::FancyLineEdit::Right, true);
m_page->targetEdit->installEventFilter(this);
......
......@@ -59,8 +59,11 @@
<layout class="QHBoxLayout">
<item>
<widget class="QPushButton" name="defaultButton">
<property name="toolTip">
<string>Reset all to default</string>
</property>
<property name="text">
<string>Defaults</string>
<string>Reset All</string>
</property>
</widget>
</item>
......@@ -115,28 +118,18 @@
<widget class="Utils::FilterLineEdit" name="targetEdit"/>
</item>
<item>
<widget class="QToolButton" name="resetButton">
<widget class="QPushButton" name="resetButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>27</width>
<height>27</height>
</size>
</property>
<property name="toolTip">
<string>Reset</string>
<string>Reset to default</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../core.qrc">
<normaloff>:/core/images/reset.png</normaloff>:/core/images/reset.png</iconset>
<string>Reset</string>
</property>
<property name="iconSize">
<size>
......@@ -161,19 +154,12 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Utils::FancyLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">utils/fancylineedit.h</header>
</customwidget>
<customwidget>
<class>Utils::FilterLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">utils/filterlineedit.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../core.qrc"/>
</resources>
<resources/>
<connections/>
</ui>
......@@ -399,9 +399,6 @@ ExternalToolConfig::ExternalToolConfig(QWidget *parent) :
connect(ui->modifiesDocumentCheckbox, SIGNAL(clicked()), this, SLOT(updateCurrentItem()));
connect(ui->inputText, SIGNAL(textChanged()), this, SLOT(updateCurrentItem()));
ui->addButton->setIcon(QIcon(QLatin1String(Constants::ICON_PLUS)));
ui->removeButton->setIcon(QIcon(QLatin1String(Constants::ICON_MINUS)));
ui->revertButton->setIcon(QIcon(QLatin1String(Constants::ICON_RESET)));
connect(ui->revertButton, SIGNAL(clicked()), this, SLOT(revertCurrentItem()));
connect(ui->addButton, SIGNAL(clicked()), this, SLOT(add()));
connect(ui->removeButton, SIGNAL(clicked()), this, SLOT(removeTool()));
......
......@@ -35,33 +35,22 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QToolButton" name="addButton">
<widget class="QPushButton" name="addButton">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Add tool&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Add tool</string>
</property>
<property name="text">
<string>+</string>
</property>
<property name="popupMode">
<enum>QToolButton::MenuButtonPopup</enum>
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="removeButton">
<widget class="QPushButton" name="removeButton">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Remove tool&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Remove tool</string>
</property>
<property name="text">
<string>-</string>
<string>Remove</string>
</property>
</widget>
</item>
......@@ -79,16 +68,12 @@ p, li { white-space: pre-wrap; }
</spacer>
</item>
<item>
<widget class="QToolButton" name="revertButton">
<widget class="QPushButton" name="revertButton">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Revert tool to preset&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Revert tool to default</string>
</property>
<property name="text">
<string>...</string>
<string>Reset</string>
</property>
</widget>
</item>
......@@ -153,7 +138,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="3" column="1">
<widget class="Utils::PathChooser" name="workingDirectory"/>
<widget class="Utils::PathChooser" name="workingDirectory" native="true"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="outputLabel">
......
......@@ -76,16 +76,12 @@
</widget>
</item>
<item>
<widget class="QToolButton" name="resetButton">
<widget class="QPushButton" name="resetButton">
<property name="toolTip">
<string>Reset to default</string>
</property>
<property name="text">
<string>R</string>
</property>
<property name="icon">
<iconset resource="core.qrc">
<normaloff>:/core/images/reset.png</normaloff>:/core/images/reset.png</iconset>
<string>Reset</string>
</property>
</widget>
</item>
......@@ -130,20 +126,6 @@
<item row="0" column="1">
<widget class="QLineEdit" name="terminalEdit"/>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="resetTerminalButton">
<property name="toolTip">
<string>Reset to default</string>
</property>
<property name="text">
<string>R</string>
</property>
<property name="icon">
<iconset resource="core.qrc">
<normaloff>:/core/images/reset.png</normaloff>:/core/images/reset.png</iconset>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="externalFileBrowserLabel">
<property name="text">
......@@ -154,20 +136,6 @@
<item row="1" column="1">
<widget class="QLineEdit" name="externalFileBrowserEdit"/>
</item>
<item row="1" column="2">
<widget class="QToolButton" name="resetFileBrowserButton">
<property name="toolTip">
<string>Reset to default</string>
</property>
<property name="text">
<string>R</string>
</property>
<property name="icon">
<iconset resource="core.qrc">
<normaloff>:/core/images/reset.png</normaloff>:/core/images/reset.png</iconset>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QToolButton" name="helpExternalFileBrowserButton">
<property name="text">
......@@ -225,6 +193,26 @@
</item>
</layout>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="resetTerminalButton">
<property name="toolTip">
<string>Reset to default</string>
</property>
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="resetFileBrowserButton">
<property name="toolTip">
<string>Reset to default</string>
</property>
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
......@@ -97,10 +97,10 @@ QWidget *CodePasterSettingsPage::createPage(QWidget *parent)
connect(lineEdit, SIGNAL(textChanged(QString)), this, SLOT(serverChanged(QString)));
formLayout->addRow(tr("Server:"), lineEdit);
outerLayout->addLayout(formLayout);
outerLayout->addSpacerItem(new QSpacerItem(0, 30, QSizePolicy::Ignored, QSizePolicy::Fixed));
outerLayout->addSpacerItem(new QSpacerItem(0, 3, QSizePolicy::Ignored, QSizePolicy::Fixed));
QLabel *noteLabel = new QLabel(tr("Note: Specify the host name for the CodePaster service "
"without any protocol prepended (e.g. codepaster.mycompany.com)."));
QLabel *noteLabel = new QLabel(tr("<i>Note: Specify the host name for the CodePaster service "
"without any protocol prepended (e.g. codepaster.mycompany.com).</i>"));
noteLabel->setWordWrap(true);
outerLayout->addWidget(noteLabel);
......
......@@ -2,11 +2,48 @@
<ui version="4.0">
<class>CodePaster::FileShareProtocolSettingsWidget</class>
<widget class="QWidget" name="CodePaster::FileShareProtocolSettingsWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>438</width>
<height>101</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="helpLabel">
<property name="text">
<string>The fileshare-based paster protocol allows for sharing code snippets using simple files on a shared network drive. Files are never deleted.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>3</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QLabel" name="pathLabel">
<property name="text">
<string>&amp;Path:</string>
......@@ -16,10 +53,10 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Utils::PathChooser" name="pathChooser"/>
<item row="2" column="1">
<widget class="Utils::PathChooser" name="pathChooser" native="true"/>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="displayCountLabel">
<property name="text">
<string>&amp;Display:</string>
......@@ -29,7 +66,7 @@
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="QSpinBox" name="displayCountSpinBox">
<property name="suffix">
<string>entries</string>
......@@ -45,16 +82,6 @@
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="helpLabel">
<property name="text">
<string>The fileshare-based paster protocol allows for sharing code snippets using simple files on a shared network drive. Files are never deleted.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
......@@ -62,6 +89,11 @@
<class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
<slots>
<signal>editingFinished()</signal>
<signal>browsingFinished()</signal>
</slots>
</customwidget>
</customwidgets>
<resources/>
......
......@@ -6,14 +6,37 @@
<rect>
<x>0</x>
<y>0</y>
<width>549</width>
<height>330</height>
<width>570</width>
<height>129</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;a href=&quot;http://pastebin.com&quot;&gt;pastebin.com&lt;/a&gt; allows to send posts to custom subdomains (eg. creator.pastebin.com). Fill in the desired prefix.</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>3</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
......@@ -31,28 +54,10 @@
</item>
</layout>
</item>
<item>
<spacer name="explanatoryTextSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="explanatoryTextLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;&lt;a href=&quot;http://pastebin.com&quot;&gt;pastebin.com&lt;/a&gt; allows to send posts to custom subdomains (eg. creator.pastebin.com). Fill in the desired prefix.&lt;/p&gt;
&lt;p&gt;Note that the plugin will use this for posting as well as fetching.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;i&gt;Note: The plugin will use this for posting as well as fetching.&lt;/i&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
......
......@@ -246,7 +246,7 @@ CppFileSettingsWidget::CppFileSettingsWidget(QWidget *parent) :
foreach (const QString &suffix, headerMt.suffixes())
m_ui->headerSuffixComboBox->addItem(suffix);
m_ui->licenseTemplatePathChooser->setExpectedKind(Utils::PathChooser::File);
m_ui->licenseTemplatePathChooser->addButton(tr("Edit..."), this, SLOT(slotEdit()));
m_ui->licenseTemplatePathChooser->addButton(tr("Edit"), this, SLOT(slotEdit()));
}
CppFileSettingsWidget::~CppFileSettingsWidget()
......
......@@ -15,8 +15,7 @@
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;The debugging helper is only used to produce a nice display of objects of certain types like QString or std::map in the &amp;quot;Locals and Watchers&amp;quot; view.&lt;/p&gt;
&lt;p&gt; It is not strictly necessary for debugging with Qt Creator. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;p&gt;The debugging helper is only used to produce a nice display of objects of certain types like QString or std::map in the &amp;quot;Locals and Watchers&amp;quot; view. It is not strictly necessary for debugging with Qt Creator. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
......@@ -26,6 +25,22 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>3</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="debuggingHelperGroupBox">
<property name="title">
......
......@@ -41,7 +41,7 @@
<item>
<widget class="QPushButton" name="addButton">
<property name="text">
<string>Add...</string>
<string>Add</string>
</property>
</widget>
</item>
......
......@@ -265,8 +265,11 @@
</item>
<item>
<widget class="QPushButton" name="defaultPageButton">
<property name="toolTip">
<string>Reset to default</string>
</property>
<property name="text">
<string>Restore to Default</string>
<string>Reset</string>
</property>
</widget>
</item>
......
......@@ -65,7 +65,7 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QToolButton" name="add">
<widget class="QPushButton" name="add">
<property name="minimumSize">
<size>
<width>21</width>
......@@ -73,12 +73,12 @@
</size>
</property>
<property name="text">
<string>+</string>
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="remove">
<widget class="QPushButton" name="remove">
<property name="minimumSize">
<size>
<width>21</width>
......@@ -86,7 +86,7 @@
</size>
</property>
<property name="text">
<string>-</string>
<string>Remove</string>
</property>
</widget>
</item>
......
......@@ -85,14 +85,14 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
<item>
<widget class="QPushButton" name="addButton">
<property name="text">
<string>Add...</string>
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="editButton">
<property name="text">
<string>Edit...</string>
<string>Edit</string>
</property>
</widget>
</item>
......@@ -103,6 +103,19 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
......
......@@ -72,7 +72,6 @@ MacroOptionsWidget::MacroOptionsWidget(QWidget *parent) :
m_changingCurrent(false)
{
m_ui->setupUi(this);
m_ui->removeButton->setIcon(QIcon(Core::Constants::ICON_MINUS));
connect(m_ui->treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
this, SLOT(changeCurrentItem(QTreeWidgetItem*)));
......
......@@ -57,8 +57,21 @@
</column>
</widget>
</item>
<item row="1" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QToolButton" name="removeButton">
<widget class="QPushButton" name="removeButton">
<property name="enabled">
<bool>false</bool>
</property>
......@@ -69,23 +82,10 @@
</size>
</property>
<property name="text">
<string>-</string>
<string>Remove</string>
</property>