def __init__(self, parent): CStockMotionBaseDialog.__init__(self, parent) self.btnAddRecipe = QtGui.QPushButton(u'По рецепту', self) self.btnAddRecipe.setObjectName('btnAddRecipe') self.addModels('InItems', CItemsModel(self, False)) self.addModels('OutItems', CItemsModel(self, True)) self.setupUi(self) self.buttonBox.addButton(self.btnAddRecipe, QtGui.QDialogButtonBox.ActionRole) self.setWindowFlags(QtCore.Qt.Dialog | QtCore.Qt.WindowMaximizeButtonHint | QtCore.Qt.WindowCloseButtonHint) self.setupDirtyCather() self.tblInItems.setModel(self.modelInItems) self.prepareItemsPopupMenu(self.tblInItems) self.tblInItems.setSelectionMode( QtGui.QAbstractItemView.ExtendedSelection) self.tblInItems.setSelectionBehavior( QtGui.QAbstractItemView.SelectRows) self.tblOutItems.setModel(self.modelOutItems) self.prepareItemsPopupMenu(self.tblOutItems) self.tblOutItems.setSelectionMode( QtGui.QAbstractItemView.ExtendedSelection) self.tblOutItems.setSelectionBehavior( QtGui.QAbstractItemView.SelectRows)
def __init__(self, parent): CStockMotionBaseDialog.__init__(self, parent) self.addModels('Items', CItemsModel(self)) self.setupUi(self) self.setWindowFlags(QtCore.Qt.Dialog | QtCore.Qt.WindowMaximizeButtonHint | QtCore.Qt.WindowCloseButtonHint) self.setupDirtyCather() self.tblItems.setModel(self.modelItems) self.prepareItemsPopupMenu(self.tblItems) self.tblItems.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tblItems.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
def __init__(self, parent): CStockMotionBaseDialog.__init__(self, parent) self.addModels('Items', CItemsModel(self)) self.actDuplicate = QtGui.QAction(u'Дублировать', self) self.actDuplicate.setObjectName('actDuplicate') self.btnFill = QtGui.QPushButton(u'Заполнить', self) self.btnFill.setObjectName('btnFill') self.btnFill.setShortcut('F9') self.setupUi(self) self.setWindowFlags(QtCore.Qt.Dialog | QtCore.Qt.WindowMaximizeButtonHint | QtCore.Qt.WindowCloseButtonHint) self.setupDirtyCather() self.tblItems.setModel(self.modelItems) self.prepareItemsPopupMenu(self.tblItems) self.tblItems.setSelectionMode( QtGui.QAbstractItemView.ExtendedSelection) self.tblItems.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.buttonBox.addButton(self.btnFill, QtGui.QDialogButtonBox.ActionRole)