Add button for adding expression columns in Edit Index dialog

Add a button for adding new expression columns to the Edit Index dialog.

Allow the user to edit the 'name' of existing expression columns in the
Edit Index dialog.
This commit is contained in:
Martin Kleusberg
2017-05-14 21:37:11 +02:00
parent 6321d14dd6
commit 8cc3154c72
3 changed files with 76 additions and 8 deletions
+31 -3
View File
@@ -166,6 +166,17 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="buttonAddExpressionColumn">
<property name="toolTip">
<string>Add a new expression column to the index. Expression columns contain SQL expression rather than column names.</string>
</property>
<property name="icon">
<iconset resource="icons/icons.qrc">
<normaloff>:/icons/cog_go.png</normaloff>:/icons/cog_go.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
@@ -196,7 +207,7 @@
</size>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
<set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
@@ -427,7 +438,7 @@
<hints>
<hint type="sourcelabel">
<x>406</x>
<y>266</y>
<y>247</y>
</hint>
<hint type="destinationlabel">
<x>385</x>
@@ -443,7 +454,7 @@
<hints>
<hint type="sourcelabel">
<x>406</x>
<y>304</y>
<y>285</y>
</hint>
<hint type="destinationlabel">
<x>350</x>
@@ -531,6 +542,22 @@
</hint>
</hints>
</connection>
<connection>
<sender>buttonAddExpressionColumn</sender>
<signal>clicked()</signal>
<receiver>EditIndexDialog</receiver>
<slot>addExpressionColumn()</slot>
<hints>
<hint type="sourcelabel">
<x>398</x>
<y>311</y>
</hint>
<hint type="destinationlabel">
<x>379</x>
<y>500</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>tableChanged(QString)</slot>
@@ -541,5 +568,6 @@
<slot>removeFromIndex(QModelIndex)</slot>
<slot>moveColumnUp()</slot>
<slot>moveColumnDown()</slot>
<slot>addExpressionColumn()</slot>
</slots>
</ui>