Use QLineEdit's built-in clear button instead of our own in SelectProductDialog.

- Clear button was introduced in Qt 5.2
This commit is contained in:
Jim Evins
2018-04-13 23:07:24 -04:00
parent b091e13307
commit 7a910ba14e
4 changed files with 13 additions and 56 deletions
-9
View File
@@ -130,15 +130,6 @@ namespace glabels
}
///
/// Search Entry Text Changed Slot
///
void SelectProductDialog::onSearchClearButtonClicked()
{
searchEntry->setText( "" );
}
///
/// Page Size Check Clicked Slot
///
-1
View File
@@ -57,7 +57,6 @@ namespace glabels
private slots:
void onModeTabChanged();
void onSearchEntryTextChanged();
void onSearchClearButtonClicked();
void onPageSizeCheckClicked();
void onCategoryRadioClicked();
void onCategoryCheckClicked();
+2 -35
View File
@@ -63,31 +63,14 @@
</property>
<property name="minimumSize">
<size>
<width>180</width>
<width>220</width>
<height>0</height>
</size>
</property>
<property name="placeholderText">
<string>Search</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="searchClearButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/16x16/actions/edit-clear.svg</normaloff>:/icons/16x16/actions/edit-clear.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="autoRaise">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
@@ -386,22 +369,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>searchClearButton</sender>
<signal>clicked()</signal>
<receiver>SelectProductDialog</receiver>
<slot>onSearchClearButtonClicked()</slot>
<hints>
<hint type="sourcelabel">
<x>231</x>
<y>103</y>
</hint>
<hint type="destinationlabel">
<x>190</x>
<y>7</y>
</hint>
</hints>
</connection>
<connection>
<sender>searchEntry</sender>
<signal>textChanged(QString)</signal>
+11 -11
View File
@@ -697,57 +697,57 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="115"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="98"/>
<source>Filter by paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="132"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="115"/>
<source>ISO sizes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="139"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="122"/>
<source>US sizes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="146"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="129"/>
<source>Other</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="158"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="141"/>
<source>Filter by category</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="167"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="150"/>
<source>All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="174"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="157"/>
<source>Selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="230"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="213"/>
<source>Search entire product database.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="241"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="224"/>
<source>Recent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="247"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="230"/>
<source>Select from recently used products.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../glabels/ui/SelectProductDialog.ui" line="304"/>
<location filename="../glabels/ui/SelectProductDialog.ui" line="287"/>
<source>&amp;Cancel</source>
<translation type="unfinished"></translation>
</message>