def setupUi(self): """ Метод настройки вида диалога. """ UiDlgTemplate.setupUi(self) # границы действия элементов диалога rangeBegin = (QTime(8, 0), QTime(23, 30)) rangeEnd = (QTime(8, 29), QTime(23, 59)) # назначение границ действия для элементов диалога self.set_timeedit(self.editBegin, self.sliderBegin, rangeBegin) self.set_timeedit(self.editEnd, self.sliderEnd, rangeEnd) self.set_slider(self.sliderBegin, self.editBegin, rangeBegin, 'begin') self.set_slider(self.sliderEnd, self.editEnd, rangeEnd, 'end') # время начала должно быть меньше времени завершения def tune_end_widget(t): new_time = datetime.combine(datetime.today(), t.toPyTime()) + timedelta(minutes=29) self.editEnd.setMinimumTime(QTime(new_time.time())) self.editBegin.timeChanged.connect(tune_end_widget) # заполнение выпадашек self.fill_combo_days() self.fill_combo_rooms() # подключение обработчиков событий self.connect(self.buttonOK, SIGNAL('clicked()'), self.apply_dialog) self.connect(self.buttonCancel, SIGNAL('clicked()'), self, SLOT('reject()'))
def setupUi(self): UiDlgTemplate.setupUi(self) self.tableCoaches.setSelectionBehavior(QAbstractItemView.SelectRows) self.connect(self.buttonApply, SIGNAL('clicked()'), self.apply) self.connect(self.buttonClose, SIGNAL('clicked()'), self, SLOT('reject()'))
def setupUi(self): UiDlgTemplate.setupUi(self) self.groupName = 'printer' self.defaults = { 'device_file': '/dev/usblp0', }
def setupUi(self): UiDlgTemplate.setupUi(self) self.tableVisitors.setSelectionBehavior(QAbstractItemView.SelectRows) self.tableVisitors.setContextMenuPolicy(Qt.CustomContextMenu) self.tableVisitors.customContextMenuRequested.connect(self.context_menu) self.connect(self.buttonClose, SIGNAL("clicked()"), self, SLOT("reject()"))
def setupUi(self): UiDlgTemplate.setupUi(self) self.labelText.setText(_('Put the RFID on the reader')) self.connect(self.buttonCancel, SIGNAL('clicked()'), self, SLOT('reject()')) self.reader = ThreadRFID(self) self.reader.start()
def setupUi(self): UiDlgTemplate.setupUi(self) self.labelText.setText(self.tr('Put the RFID on the reader')) self.connect(self.buttonCancel, SIGNAL('clicked()'), self, SLOT('reject()')) self.reader = ThreadRFID(self) self.reader.start()
def setupUi(self): UiDlgTemplate.setupUi(self) if self.connecting_to: self.editConnecting.setText(self.connecting_to) self.connect(self.buttonOk, SIGNAL('clicked()'), self.applyDialog) self.connect(self.buttonCancel, SIGNAL('clicked()'), self, SLOT('reject()'))
def setupUi(self): UiDlgTemplate.setupUi(self) self.tableVisitors.setSelectionBehavior(QAbstractItemView.SelectRows) self.tableVisitors.setContextMenuPolicy(Qt.CustomContextMenu) self.tableVisitors.customContextMenuRequested.connect( self.context_menu) self.connect(self.buttonClose, SIGNAL('clicked()'), self, SLOT('reject()'))
def setupUi(self): UiDlgTemplate.setupUi(self) self.tableUsers.setSelectionBehavior(QAbstractItemView.SelectRows) self.buttonApply.setText(self.apply_title) self.buttonApply.setDisabled(True) self.connect(self.buttonSearch, SIGNAL('clicked()'), self.searchFor) self.connect(self.buttonApply, SIGNAL('clicked()'), self.applyDialog) self.connect(self.buttonClose, SIGNAL('clicked()'), self, SLOT('reject()'))
def setupUi(self): UiDlgTemplate.setupUi(self) self.connect(self.buttonClose, SIGNAL('clicked()'), self.close) self.connect(self.buttonVisitors, SIGNAL('clicked()'), self.showVisitors) self.connect(self.buttonVisitRFID, SIGNAL('clicked()'), self.visitEventRFID) self.connect(self.buttonVisitManual, SIGNAL('clicked()'), self.visitEventManual) self.connect(self.buttonRemove, SIGNAL('clicked()'), self.removeEvent) self.connect(self.buttonFix, SIGNAL('clicked()'), self.fixEvent) self.connect(self.buttonChange, SIGNAL('clicked()'), self.changeCoaches) self.connect(self.comboFix, SIGNAL('currentIndexChanged(int)'), lambda: self.buttonFix.setDisabled(False))
def setupUi(self): UiDlgTemplate.setupUi(self) self.groupName = 'general' self.defaults = { 'borderWidth': 2, 'borderColor': '#ff0000', } self.connect(self.borderColor, SIGNAL('clicked()'), self.getBorderColor) self.borderWidth.setRange(0, 4)
def setupUi(self): UiDlgTemplate.setupUi(self) self.connect(self.buttonClose, SIGNAL('clicked()'), self.close) self.connect(self.buttonVisitors, SIGNAL('clicked()'), self.show_visitors) self.connect(self.buttonVisitRFID, SIGNAL('clicked()'), self.search_by_rfid) self.connect(self.buttonVisitManual, SIGNAL('clicked()'), self.search_by_name) self.connect(self.buttonRemove, SIGNAL('clicked()'), self.removeEvent) self.connect(self.buttonChange, SIGNAL('clicked()'), self.change_coaches) # временно отключим кнопку удаления self.buttonRemove.setDisabled(True) self.buttonChange.setDisabled(True)
def setupUi(self): UiDlgTemplate.setupUi(self) self.tableUsers.setSelectionBehavior(QAbstractItemView.SelectRows) header = self.tableUsers.horizontalHeader() header.setStretchLastSection(False) header.setResizeMode(QHeaderView.ResizeToContents) header.setResizeMode(0, QHeaderView.Stretch) self.buttonApply.setText(self.tr('Show')) self.buttonApply.setDisabled(True) self.connect(self.buttonSearch, SIGNAL('clicked()'), self.searchFor) self.connect(self.buttonApply, SIGNAL('clicked()'), self.applyDialog) self.connect(self.buttonClose, SIGNAL('clicked()'), self, SLOT('reject()'))
def setupUi(self): UiDlgTemplate.setupUi(self) self.tableHistory.setSelectionBehavior(QAbstractItemView.SelectRows) self.card_model = CardListModel(self) self.tableHistory.setModel(self.card_model) self.tableHistory.setContextMenuPolicy(Qt.CustomContextMenu) self.tableHistory.customContextMenuRequested.connect(self.context_menu) for i in self.static.get('discounts', list()): # see params title = u'%(title)s - %(percent)s%%' % i self.comboDiscount.addItem(title, QVariant(i['id'])) self.connect(self.buttonAssign, SIGNAL('clicked()'), self.assign_card) self.connect(self.buttonRFID, SIGNAL('clicked()'), self.assignRFID) self.connect(self.buttonApply, SIGNAL('clicked()'), self.applyDialog) self.connect(self.buttonClose, SIGNAL('clicked()'), self, SLOT('reject()'))
def setupUi(self): UiDlgTemplate.setupUi(self) # настраиваем отображение событий аренды self.model = RentEvent(self) self.tableItems.setModel(self.model) self.tableItems.setSelectionBehavior(QAbstractItemView.SelectRows) header = self.tableItems.horizontalHeader() header.setStretchLastSection(False) header.setResizeMode(QHeaderView.ResizeToContents) header.setResizeMode(0, QHeaderView.Stretch) self.connect(self.toolBegin, SIGNAL('clicked()'), lambda: self.show_calendar(self.dateBegin)) self.connect(self.toolEnd, SIGNAL('clicked()'), lambda: self.show_calendar(self.dateEnd)) self.connect(self.buttonToday, SIGNAL('clicked()'), self.set_date_today) self.connect(self.buttonAdd, SIGNAL('clicked()'), self.add_item) self.connect(self.buttonSave, SIGNAL('clicked()'), self.save_rent) self.connect(self.buttonClose, SIGNAL('clicked()'), self, SLOT('reject()'))
def setupUi(self, *args, **kwargs): UiDlgTemplate.setupUi(self) self.tableHistory.setSelectionBehavior(QAbstractItemView.SelectRows) self.tableHistory.setContextMenuPolicy(Qt.CustomContextMenu) self.tableHistory.customContextMenuRequested.connect(self.context_menu) # добавляем на диалог все зарегистрированные виды скидок discount_list = kwargs.get('discount', []) for index, item in enumerate(discount_list): checkbox = QCheckBox('%(title)s (%(percent)s%%)' % item) self.discounts_by_index[index] = (checkbox, item) self.discounts_by_uuid[item.get('uuid')] = (checkbox, item) self.discountLayout.addWidget(checkbox) self.discountLayout.addStretch(10) self.connect(self.buttonAssign, SIGNAL('clicked()'), self.assign_item) self.connect(self.buttonRFID, SIGNAL('clicked()'), self.assign_rfid) self.connect(self.buttonSave, SIGNAL('clicked()'), self.save_dialog) self.connect(self.buttonClose, SIGNAL('clicked()'), self, SLOT('reject()'))
def setupUi(self): UiDlgTemplate.setupUi(self) self.connect(self.buttonClose, SIGNAL('clicked()'), self, SLOT('reject()'))
def setupUi(self): UiDlgTemplate.setupUi(self) self.connect(self.borderColor, SIGNAL('clicked()'), self.getBorderColor) self.borderWidth.setRange(0, 4)