Add option for showing the rowid column

See issue #408.

This isn't working reliably yet on my system: If you enable the fix
restoring the previous settings when going back to a table doesn't work
and if you disable it that very way is the only way to change the
option. Don't know what's going on there :(
This commit is contained in:
Martin Kleusberg
2015-09-11 13:30:24 +02:00
parent b22a9cfcf6
commit 1ebecbbc9d
5 changed files with 90 additions and 30 deletions
+51 -23
View File
@@ -324,8 +324,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>509</width>
<height>458</height>
<width>514</width>
<height>579</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
@@ -810,7 +810,7 @@
<x>0</x>
<y>0</y>
<width>1037</width>
<height>19</height>
<height>29</height>
</rect>
</property>
<widget class="QMenu" name="fileMenu">
@@ -908,7 +908,7 @@
<set>QDockWidget::AllDockWidgetFeatures</set>
</property>
<property name="windowTitle">
<string>SQL Log</string>
<string>SQL &amp;Log</string>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
@@ -920,7 +920,7 @@
<item>
<widget class="QLabel" name="labelLogSubmittedBy">
<property name="text">
<string>&amp;Show SQL submitted by</string>
<string>Show S&amp;QL submitted by</string>
</property>
<property name="buddy">
<cstring>comboLogSubmittedBy</cstring>
@@ -1000,7 +1000,7 @@
<set>QDockWidget::AllDockWidgetFeatures</set>
</property>
<property name="windowTitle">
<string>Plot</string>
<string>&amp;Plot</string>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
@@ -1254,7 +1254,7 @@
</widget>
<widget class="QDockWidget" name="dockSchema">
<property name="windowTitle">
<string>DB Schema</string>
<string>DB Sche&amp;ma</string>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
@@ -1339,7 +1339,7 @@
<normaloff>:/icons/db_revert</normaloff>:/icons/db_revert</iconset>
</property>
<property name="text">
<string>Revert Changes</string>
<string>&amp;Revert Changes</string>
</property>
<property name="toolTip">
<string>Revert database to last saved state</string>
@@ -1357,7 +1357,7 @@
<normaloff>:/icons/db_save</normaloff>:/icons/db_save</iconset>
</property>
<property name="text">
<string>Write Changes</string>
<string>&amp;Write Changes</string>
</property>
<property name="toolTip">
<string>Write changes to the database file</string>
@@ -1374,7 +1374,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>Compact Database</string>
<string>Compact &amp;Database</string>
</property>
<property name="toolTip">
<string>Compact the database file, removing space wasted by deleted records</string>
@@ -1399,7 +1399,7 @@
</action>
<action name="fileImportSQLAction">
<property name="text">
<string>Database from SQL file...</string>
<string>&amp;Database from SQL file...</string>
</property>
<property name="toolTip">
<string>Import data from an .sql dump text file into a new or existing database.</string>
@@ -1410,7 +1410,7 @@
</action>
<action name="fileImportCSVAction">
<property name="text">
<string>Table from CSV file...</string>
<string>&amp;Table from CSV file...</string>
</property>
<property name="toolTip">
<string>Open a wizard that lets you import data from a comma separated text file into a database table.</string>
@@ -1421,7 +1421,7 @@
</action>
<action name="fileExportSQLAction">
<property name="text">
<string>Database to SQL file...</string>
<string>&amp;Database to SQL file...</string>
</property>
<property name="toolTip">
<string>Export a database to a .sql dump text file.</string>
@@ -1432,7 +1432,7 @@
</action>
<action name="fileExportCSVAction">
<property name="text">
<string>Table(s) as CSV file...</string>
<string>&amp;Table(s) as CSV file...</string>
</property>
<property name="toolTip">
<string>Export a database table as a comma separated text file.</string>
@@ -1450,7 +1450,7 @@
<normaloff>:/icons/table_create</normaloff>:/icons/table_create</iconset>
</property>
<property name="text">
<string>Create Table...</string>
<string>&amp;Create Table...</string>
</property>
<property name="whatsThis">
<string>Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database</string>
@@ -1465,7 +1465,7 @@
<normaloff>:/icons/table_delete</normaloff>:/icons/table_delete</iconset>
</property>
<property name="text">
<string>Delete Table...</string>
<string>&amp;Delete Table...</string>
</property>
<property name="toolTip">
<string>Delete Table</string>
@@ -1483,7 +1483,7 @@
<normaloff>:/icons/table_modify</normaloff>:/icons/table_modify</iconset>
</property>
<property name="text">
<string>Modify Table...</string>
<string>&amp;Modify Table...</string>
</property>
<property name="whatsThis">
<string>Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types.</string>
@@ -1498,7 +1498,7 @@
<normaloff>:/icons/index_create</normaloff>:/icons/index_create</iconset>
</property>
<property name="text">
<string>Create Index...</string>
<string>Create &amp;Index...</string>
</property>
<property name="whatsThis">
<string>Open the Create Index wizard, where it is possible to define a new index on an existing database table.</string>
@@ -1539,7 +1539,7 @@
<normaloff>:/icons/whatis</normaloff>:/icons/whatis</iconset>
</property>
<property name="text">
<string>What's This?</string>
<string>W&amp;hat's This?</string>
</property>
<property name="shortcut">
<string>Shift+F1</string>
@@ -1612,7 +1612,7 @@
<normaloff>:/icons/load_extension</normaloff>:/icons/load_extension</iconset>
</property>
<property name="text">
<string>Load extension</string>
<string>&amp;Load extension</string>
</property>
</action>
<action name="actionSqlExecuteLine">
@@ -1674,7 +1674,7 @@
<normaloff>:/icons/project_save</normaloff>:/icons/project_save</iconset>
</property>
<property name="text">
<string>Save Project</string>
<string>Sa&amp;ve Project</string>
</property>
<property name="toolTip">
<string>Save the current session to a file</string>
@@ -1689,7 +1689,7 @@
<normaloff>:/icons/project_open</normaloff>:/icons/project_open</iconset>
</property>
<property name="text">
<string>Open Project</string>
<string>Open &amp;Project</string>
</property>
<property name="toolTip">
<string>Load a working session from a file</string>
@@ -1712,7 +1712,7 @@
<normaloff>:/icons/encryption</normaloff>:/icons/encryption</iconset>
</property>
<property name="text">
<string>Set Encryption</string>
<string>&amp;Set Encryption</string>
</property>
</action>
<action name="actionSqlSaveFileAs">
@@ -1768,6 +1768,17 @@
<string>Edit the display format of the data in this column</string>
</property>
</action>
<action name="actionShowRowidColumn">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Show rowid column</string>
</property>
<property name="toolTip">
<string>Toggle the visibility of the rowid column</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
@@ -2707,6 +2718,22 @@
</hint>
</hints>
</connection>
<connection>
<sender>actionShowRowidColumn</sender>
<signal>triggered(bool)</signal>
<receiver>MainWindow</receiver>
<slot>showRowidColumn(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>518</x>
<y>314</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>fileOpen()</slot>
@@ -2764,5 +2791,6 @@
<slot>copyCurrentCreateStatement()</slot>
<slot>jumpToRow(QString,QString,QByteArray)</slot>
<slot>editDataColumnDisplayFormat()</slot>
<slot>showRowidColumn(bool)</slot>
</slots>
</ui>