Can hide history box

If it bothers you, it is possible to hide the history box.
This commit is contained in:
Salvo 'LtWorf' Tomaselli 2016-01-02 16:11:20 +01:00
parent 6315bebc61
commit 746ae6af09
2 changed files with 33 additions and 0 deletions

View File

@ -123,6 +123,12 @@ class relForm(QtWidgets.QMainWindow):
QtWidgets.QMessageBox.information(
self, QtWidgets.QApplication.translate("Form", "Version"), r)
def setHistoryShown(self, history_shown):
self.history_shown = history_shown
self.settings.setValue('history_shown', history_shown)
self.ui.lstHistory.setVisible(history_shown)
self.ui.actionShow_history.setChecked(history_shown)
def setMultiline(self, multiline):
self.multiline = multiline
self.settings.setValue('multiline', multiline)
@ -336,6 +342,7 @@ class relForm(QtWidgets.QMainWindow):
self.updateRelations()
self.setMultiline(self.settings.value('multiline', 'false') == 'true')
self.setHistoryShown(self.settings.value('history_shown', 'true') == 'true')
self.ui.txtMultiQuery.setPlainText(
self.settings.value('multiline/query', ''))
try:

View File

@ -378,6 +378,7 @@
<string>Setti&amp;ngs</string>
</property>
<addaction name="actionMulti_line_mode"/>
<addaction name="actionShow_history"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuRelations"/>
@ -1123,6 +1124,14 @@
<string>Ctrl+L</string>
</property>
</action>
<action name="actionShow_history">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Show history</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>table</tabstop>
@ -1808,6 +1817,22 @@
</hint>
</hints>
</connection>
<connection>
<sender>actionShow_history</sender>
<signal>toggled(bool)</signal>
<receiver>MainWindow</receiver>
<slot>setHistoryShown(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>318</x>
<y>247</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>execute()</slot>
@ -1844,5 +1869,6 @@
<slot>saveSessionAs()</slot>
<slot>manageSessions()</slot>
<slot>setMultiline(bool)</slot>
<slot>setHistoryShown(bool)</slot>
</slots>
</ui>