Settings Layout Ok ish

This commit is contained in:
Tim Bentley 2011-04-13 05:55:00 +01:00
parent 20fbe4d28d
commit 6474c99a85
3 changed files with 36 additions and 10 deletions

View File

@ -37,8 +37,11 @@ class Ui_SettingsDialog(object):
build_icon(u':/system/system_settings.png'))
self.settingsLayout = QtGui.QGridLayout(settingsDialog)
self.settingsLayout.setObjectName(u'settingsLayout')
self.settingsLayout.setMargin(0)
self.settingListWidget = QtGui.QListWidget(settingsDialog)
self.settingListWidget.setIconSize(QtCore.QSize(32, 32))
self.settingListWidget.setMinimumSize(QtCore.QSize(150, 0))
self.settingListWidget.setHorizontalScrollBarPolicy(
QtCore.Qt.ScrollBarAlwaysOff)
self.settingListWidget.setObjectName(u'settingListWidget')
self.settingsLayout.addWidget(self.settingListWidget, 0, 0, 1, 1)
self.stackedLayout = QtGui.QStackedLayout()
@ -47,7 +50,6 @@ class Ui_SettingsDialog(object):
self.buttonBox = create_accept_reject_button_box(settingsDialog, True)
self.settingsLayout.addWidget(self.buttonBox, 1, 1, 1, 1)
self.retranslateUi(settingsDialog)
self.stackedLayout.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(settingsDialog)
QtCore.QObject.connect(self.settingListWidget,
QtCore.SIGNAL(u'currentRowChanged(int)'),

View File

@ -74,7 +74,6 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
if self.stackedLayout.widget(tabIndex):
if self.stackedLayout.widget(tabIndex).tabTitleVisible == \
tab.tabTitleVisible:
print tab.tabTitleVisible
self.stackedLayout.widget(tabIndex).setHidden(False)
match = True
break
@ -84,6 +83,8 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
icon = build_icon(tab.icon_path)
item_name.setIcon(icon)
self.settingListWidget.insertItem(14 + location, item_name)
self.stackedLayout.addWidget(tab)
self.stackedLayout.setCurrentIndex(0)
def removeTab(self, tab):
"""

View File

@ -17,26 +17,49 @@
<iconset>
<normaloff>:/icon/openlp.org-icon-32.bmp</normaloff>:/icon/openlp.org-icon-32.bmp</iconset>
</property>
<widget class="QWidget" name="">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>681</width>
<width>691</width>
<height>441</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QListWidget" name="settingListWidget"/>
</item>
<item row="0" column="1">
<widget class="QStackedWidget" name="tagStackedWidget">
<widget class="QWidget" name="page"/>
<property name="minimumSize">
<size>
<width>500</width>
<height>0</height>
</size>
</property>
<widget class="QWidget" name="page">
<widget class="QListWidget" name="settingListWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>211</width>
<height>409</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</widget>
<widget class="QWidget" name="page_2"/>
</widget>
</item>
<item row="1" column="1">
<item row="1" column="0">
<widget class="QDialogButtonBox" name="ButtonsBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">