Browse Source

Add option to show/hide transport bar

tags/1.9.4
falkTX 11 years ago
parent
commit
579444bf44
2 changed files with 41 additions and 8 deletions
  1. +36
    -8
      resources/ui/carla.ui
  2. +5
    -0
      source/carla.py

+ 36
- 8
resources/ui/carla.ui View File

@@ -227,14 +227,6 @@
<addaction name="act_help_about"/>
<addaction name="act_help_about_qt"/>
</widget>
<widget class="QMenu" name="menu_Settings">
<property name="title">
<string>&amp;Settings</string>
</property>
<addaction name="act_settings_show_toolbar"/>
<addaction name="separator"/>
<addaction name="act_settings_configure"/>
</widget>
<widget class="QMenu" name="menu_Engine">
<property name="title">
<string>&amp;Engine</string>
@@ -244,6 +236,15 @@
<addaction name="separator"/>
<addaction name="act_engine_configure"/>
</widget>
<widget class="QMenu" name="menu_Settings">
<property name="title">
<string>&amp;Settings</string>
</property>
<addaction name="act_settings_show_toolbar"/>
<addaction name="act_settings_show_transport"/>
<addaction name="separator"/>
<addaction name="act_settings_configure"/>
</widget>
<addaction name="menu_File"/>
<addaction name="menu_Engine"/>
<addaction name="menu_Plugin"/>
@@ -402,6 +403,17 @@
<string>Configure Driver</string>
</property>
</action>
<action name="act_settings_show_transport">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Show Transport bar</string>
</property>
<property name="iconText">
<string>Show Transport bar</string>
</property>
</action>
</widget>
<resources>
<include location="../resources.qrc"/>
@@ -439,5 +451,21 @@
</hint>
</hints>
</connection>
<connection>
<sender>act_settings_show_transport</sender>
<signal>triggered(bool)</signal>
<receiver>frame_transport</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>377</x>
<y>65</y>
</hint>
</hints>
</connection>
</connections>
</ui>

+ 5
- 0
source/carla.py View File

@@ -1161,6 +1161,7 @@ class CarlaMainW(QMainWindow):
settings = QSettings()
settings.setValue("Geometry", self.saveGeometry())
settings.setValue("ShowToolbar", self.ui.toolBar.isVisible())
settings.setValue("ShowTransport", self.ui.frame_transport.isVisible())

def loadSettings(self, geometry):
settings = QSettings()
@@ -1172,6 +1173,10 @@ class CarlaMainW(QMainWindow):
self.ui.act_settings_show_toolbar.setChecked(showToolbar)
self.ui.toolBar.setVisible(showToolbar)

showTransport = settings.value("ShowTransport", True, type=bool)
self.ui.act_settings_show_transport.setChecked(showTransport)
self.ui.frame_transport.setVisible(showTransport)

self.fSavedSettings = {
"Main/DefaultProjectFolder": settings.value("Main/DefaultProjectFolder", HOME, type=str),
"Main/RefreshInterval": settings.value("Main/RefreshInterval", 50, type=int)


Loading…
Cancel
Save