From f731bb7e274ba764d7f86b9084002c2d1a5ec4b5 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 20 Feb 2009 17:52:36 +0100 Subject: winSettings: use QGridLayout. --- nephilim/winSettings.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/nephilim/winSettings.py b/nephilim/winSettings.py index a1994e4..4265918 100644 --- a/nephilim/winSettings.py +++ b/nephilim/winSettings.py @@ -2,7 +2,7 @@ from PyQt4 import QtGui, QtCore from PyQt4.QtCore import QVariant import os -from misc import ORGNAME, APPNAME, Button, appIcon, doEvents +from misc import ORGNAME, APPNAME, Button, appIcon import plugins @@ -95,14 +95,10 @@ class winSettings(QtGui.QWidget): tabWidget.addTab(self.settings_wg[-1], plugin.getName()) self.fillList() - self.setLayout(QtGui.QVBoxLayout()) - self.layout().addWidget(tabWidget) - - layoutButtons = QtGui.QHBoxLayout() - layoutButtons.addStretch() - layoutButtons.addWidget(self.btnSave) - layoutButtons.addWidget(self.btnClose) - self.layout().addLayout(layoutButtons) + self.setLayout(QtGui.QGridLayout()) + self.layout().addWidget(tabWidget, 0, 0, 1, 2) + self.layout().addWidget(self.btnSave, 1, 0) + self.layout().addWidget(self.btnClose, 1, 1) self.connect(self.lstPlugins, QtCore.SIGNAL('itemChanged (QListWidgetItem*)'), self.onlstPluginItemChanged) @@ -111,7 +107,6 @@ class winSettings(QtGui.QWidget): self.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.center() self.resize(800,400) - doEvents() def fillList(self): self.lstPlugins.clear() @@ -154,6 +149,5 @@ class winSettings(QtGui.QWidget): self.settings.setValue(name + '/load', QtCore.QVariant(toload)) def closeEvent(self, event): - map(lambda entry: entry[plugins.PLUGIN_INSTANCE] and entry[plugins.PLUGIN_INSTANCE].resetSettingCache(), self.winMain.plugins.listPlugins().values()) self.settings_wg = None self.winMain.wSettings=None -- cgit v1.2.3