예제 #1
0
파일: forms.py 프로젝트: d9pouces/qthelpers
 def __init__(self, initial=None, parent=None):
     QtGui.QGroupBox.__init__(self, p(parent))
     self._stacked_names = QtGui.QComboBox(p(self))
     # noinspection PyUnresolvedReferences
     self._stacked_names.currentIndexChanged.connect(self._change_widget)
     self._stacked_widget = QtGui.QStackedWidget(p(self))
     MultiForm.__init__(self, initial=initial)
     self.setTitle(str(self.verbose_name))
     self.setLayout(v_layout(self, self._stacked_names, self._stacked_widget))
예제 #2
0
 def __init__(self, message, parent=None):
     super().__init__(p(parent))
     widgets = []
     if application.splashscreen_icon:
         pixmap = get_pixmap(application.splashscreen_icon)
         label = QtGui.QLabel(p(self))
         label.setPixmap(pixmap)
         widgets.append(label)
         edit = QtGui.QTextEdit(message, self)
         edit.setReadOnly(True)
         widgets.append(edit)
     widgets.append(create_button(_('Close'), min_size=True, parent=self, connect=self.close))
     self.setLayout(v_layout(self, *widgets))
예제 #3
0
파일: docks.py 프로젝트: d9pouces/qthelpers
 def __init__(self, initial=None, parent=None):
     BaseForm.__init__(self, initial=initial)
     BaseDock.__init__(self, parent=p(parent))
     # widget creation
     widgets = []
     if self.description:
         widgets.append(QtGui.QLabel(self.description, p(self)))
     sub_layout = QtGui.QGridLayout(p(self))
     self._fill_grid_layout(layout=sub_layout)
     widgets.append(sub_layout)
     sub_widget = QtGui.QWidget(p(self))
     sub_widget.setLayout(v_layout(self, *widgets))
     self.setWidget(sub_widget)
예제 #4
0
파일: forms.py 프로젝트: d9pouces/qthelpers
 def __init__(self, initial=None, parent=None):
     QtGui.QDialog.__init__(self, p(parent))
     BaseForm.__init__(self, initial=initial)
     ThreadedCalls.__init__(self)
     # widget creation
     widgets = []
     if self.description:
         widgets.append(QtGui.QLabel(self.description, p(self)))
     sub_layout = QtGui.QFormLayout(self)
     self._fill_form_layout(layout=sub_layout)
     widgets.append(sub_layout)
     self._buttons = []
     if self.text_confirm:
         self._buttons.append(create_button(self.text_confirm, connect=self.accept, min_size=True))
     if self.text_cancel:
         self._buttons.append(create_button(self.text_cancel, connect=self.reject, min_size=True))
     if self._buttons:
         widgets.append(h_layout(self, *self._buttons, direction=QtGui.QBoxLayout.RightToLeft))
     self.setLayout(v_layout(self, *widgets))
     if self.verbose_name:
         self.setWindowTitle(str(self.verbose_name))
     self.raise_()