From ffb27864c92a33ed516f4ad9e97e9445f942dc62 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Thu, 5 May 2016 19:09:08 +0200 Subject: Set the prefs dialog box stretchable --- mageiaSync/mageiaSyncDBprefs.py | 90 +++++----- mageiaSync/mageiaSyncDBprefs.ui | 354 +++++++++++++++++++--------------------- 2 files changed, 215 insertions(+), 229 deletions(-) diff --git a/mageiaSync/mageiaSyncDBprefs.py b/mageiaSync/mageiaSyncDBprefs.py index ed1d582..c7c51b5 100644 --- a/mageiaSync/mageiaSyncDBprefs.py +++ b/mageiaSync/mageiaSyncDBprefs.py @@ -2,8 +2,7 @@ # Form implementation generated from reading ui file 'mageiaSyncDBprefs.ui' # -# Created: Mon Mar 30 21:56:57 2015 -# by: PyQt5 UI code generator 5.1.1 +# Created by: PyQt5 UI code generator 5.4.2 # # WARNING! All changes made in this file will be lost! @@ -12,78 +11,77 @@ from PyQt5 import QtCore, QtGui, QtWidgets class Ui_prefsDialog(object): def setupUi(self, prefsDialog): prefsDialog.setObjectName("prefsDialog") - prefsDialog.resize(544, 336) - self.buttonBox = QtWidgets.QDialogButtonBox(prefsDialog) - self.buttonBox.setGeometry(QtCore.QRect(0, 270, 521, 31)) - self.buttonBox.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setCenterButtons(True) - self.buttonBox.setObjectName("buttonBox") - self.formLayoutWidget = QtWidgets.QWidget(prefsDialog) - self.formLayoutWidget.setGeometry(QtCore.QRect(10, 30, 511, 241)) - self.formLayoutWidget.setObjectName("formLayoutWidget") - self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget) - self.formLayout.setContentsMargins(0, 0, 0, 0) - self.formLayout.setObjectName("formLayout") - self.label = QtWidgets.QLabel(self.formLayoutWidget) + prefsDialog.resize(544, 257) + self.gridLayout = QtWidgets.QGridLayout(prefsDialog) + self.gridLayout.setObjectName("gridLayout") + self.gridLayout_2 = QtWidgets.QGridLayout() + self.gridLayout_2.setObjectName("gridLayout_2") + self.label_7 = QtWidgets.QLabel(prefsDialog) + self.label_7.setObjectName("label_7") + self.gridLayout_2.addWidget(self.label_7, 0, 0, 1, 2) + self.label = QtWidgets.QLabel(prefsDialog) self.label.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.label.setObjectName("label") - self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label) - self.label_2 = QtWidgets.QLabel(self.formLayoutWidget) + self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1) + self.release = QtWidgets.QComboBox(prefsDialog) + self.release.setEditable(True) + self.release.setObjectName("release") + self.gridLayout_2.addWidget(self.release, 1, 1, 1, 1) + self.label_2 = QtWidgets.QLabel(prefsDialog) self.label_2.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.label_2.setObjectName("label_2") - self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_2) - self.user = QtWidgets.QLineEdit(self.formLayoutWidget) + self.gridLayout_2.addWidget(self.label_2, 2, 0, 1, 1) + self.user = QtWidgets.QLineEdit(prefsDialog) self.user.setToolTip("") self.user.setStatusTip("") self.user.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.user.setObjectName("user") - self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.user) - self.label_3 = QtWidgets.QLabel(self.formLayoutWidget) + self.gridLayout_2.addWidget(self.user, 2, 1, 1, 1) + self.label_3 = QtWidgets.QLabel(prefsDialog) self.label_3.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.label_3.setObjectName("label_3") - self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_3) - self.password = QtWidgets.QLineEdit(self.formLayoutWidget) + self.gridLayout_2.addWidget(self.label_3, 3, 0, 1, 1) + self.password = QtWidgets.QLineEdit(prefsDialog) self.password.setToolTip("") self.password.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.password.setObjectName("password") - self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.password) - self.label_4 = QtWidgets.QLabel(self.formLayoutWidget) + self.gridLayout_2.addWidget(self.password, 3, 1, 1, 1) + self.label_4 = QtWidgets.QLabel(prefsDialog) self.label_4.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.label_4.setObjectName("label_4") - self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_4) - self.location = QtWidgets.QLineEdit(self.formLayoutWidget) + self.gridLayout_2.addWidget(self.label_4, 4, 0, 1, 1) + self.location = QtWidgets.QLineEdit(prefsDialog) self.location.setToolTip("") self.location.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.location.setObjectName("location") - self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.location) - self.label_5 = QtWidgets.QLabel(self.formLayoutWidget) + self.gridLayout_2.addWidget(self.location, 4, 1, 1, 1) + self.label_5 = QtWidgets.QLabel(prefsDialog) self.label_5.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.label_5.setObjectName("label_5") - self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_5) - self.selectDest = QtWidgets.QPushButton(self.formLayoutWidget) + self.gridLayout_2.addWidget(self.label_5, 5, 0, 1, 1) + self.selectDest = QtWidgets.QPushButton(prefsDialog) self.selectDest.setToolTip("") self.selectDest.setText("PushButton") self.selectDest.setObjectName("selectDest") - self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.selectDest) - self.label_6 = QtWidgets.QLabel(self.formLayoutWidget) + self.gridLayout_2.addWidget(self.selectDest, 5, 1, 1, 1) + self.label_6 = QtWidgets.QLabel(prefsDialog) self.label_6.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.label_6.setObjectName("label_6") - self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label_6) - self.bwl = QtWidgets.QSpinBox(self.formLayoutWidget) + self.gridLayout_2.addWidget(self.label_6, 6, 0, 1, 1) + self.bwl = QtWidgets.QSpinBox(prefsDialog) self.bwl.setToolTip("") self.bwl.setMaximum(100000) self.bwl.setSingleStep(50) self.bwl.setObjectName("bwl") - self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.bwl) - self.label_7 = QtWidgets.QLabel(self.formLayoutWidget) - self.label_7.setObjectName("label_7") - self.formLayout.setWidget(0, QtWidgets.QFormLayout.SpanningRole, self.label_7) - self.release = QtWidgets.QComboBox(self.formLayoutWidget) - self.release.setEditable(True) - self.release.setObjectName("release") - self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.release) + self.gridLayout_2.addWidget(self.bwl, 6, 1, 1, 1) + self.gridLayout.addLayout(self.gridLayout_2, 0, 0, 1, 1) + self.buttonBox = QtWidgets.QDialogButtonBox(prefsDialog) + self.buttonBox.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) + self.buttonBox.setOrientation(QtCore.Qt.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) + self.buttonBox.setCenterButtons(True) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1) self.retranslateUi(prefsDialog) self.buttonBox.accepted.connect(prefsDialog.accept) @@ -93,6 +91,7 @@ class Ui_prefsDialog(object): def retranslateUi(self, prefsDialog): _translate = QtCore.QCoreApplication.translate prefsDialog.setWindowTitle(_translate("prefsDialog", "Preferences")) + self.label_7.setText(_translate("prefsDialog", "Define parameters which are stored and used for rsync")) self.label.setToolTip(_translate("prefsDialog", "Give the release name like \"mageia5-alpha2\"")) self.label.setText(_translate("prefsDialog", "Release:")) self.label_2.setToolTip(_translate("prefsDialog", "User name to access the repository. Only for testing repository.")) @@ -105,5 +104,4 @@ class Ui_prefsDialog(object): self.label_5.setText(_translate("prefsDialog", "Destination:")) self.label_6.setToolTip(_translate("prefsDialog", "Set to zero if you don\'t want apply limit.")) self.label_6.setText(_translate("prefsDialog", "Bandwith limit (kB/s):")) - self.label_7.setText(_translate("prefsDialog", "Define parameters which are stored and used for rsync")) diff --git a/mageiaSync/mageiaSyncDBprefs.ui b/mageiaSync/mageiaSyncDBprefs.ui index 4153934..2f6a05b 100644 --- a/mageiaSync/mageiaSyncDBprefs.ui +++ b/mageiaSync/mageiaSyncDBprefs.ui @@ -7,194 +7,182 @@ 0 0 544 - 336 + 257 Preferences - - - - 0 - 270 - 521 - 31 - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - true - - - - - - 10 - 30 - 511 - 241 - - - - - - - Give the release name like "mageia5-alpha2" - - - - - - Release: - - - - - - - User name to access the repository. Only for testing repository. - - - - - - User: - - - - - - - - - - - - - - - - - - - - Associated with user, if needed - - - - - - Password: - - - - - - - - - - - - - - - - - Source repository. Keep void to use the testing repo. - - - - - - Source: - - - - - - - - - - - - - - - - - The local directory where you store ISOs. Will sync your existent ISOs already present. - - - - - - Destination: - - - - - - - - - - PushButton - - - - - - - Set to zero if you don't want apply limit. - - - - - - Bandwith limit (kB/s): - - - - - - - - - - 100000 - - - 50 - - - - - - - Define parameters which are stored and used for rsync - - - - - - - true - - - - - + + + + + + + Define parameters which are stored and used for rsync + + + + + + + Give the release name like "mageia5-alpha2" + + + + + + Release: + + + + + + + true + + + + + + + User name to access the repository. Only for testing repository. + + + + + + User: + + + + + + + + + + + + + + + + + + + + Associated with user, if needed + + + + + + Password: + + + + + + + + + + + + + + + + + Source repository. Keep void to use the testing repo. + + + + + + Source: + + + + + + + + + + + + + + + + + The local directory where you store ISOs. Will sync your existent ISOs already present. + + + + + + Destination: + + + + + + + + + + PushButton + + + + + + + Set to zero if you don't want apply limit. + + + + + + Bandwith limit (kB/s): + + + + + + + + + + 100000 + + + 50 + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + true + + + + -- cgit v1.2.1