Пример #1
0
    def __init__(self, parent):
        QtGui.QFrame.__init__(self, parent, Qt.Popup)
        self.setupUi(self)
        self._parent = parent
        self._model = parent._model
        self._selectionModel = CRBSelectionModel(self._model)
        self.tblService.setModel(self._model)
        self._addNone = True
        self._staticFilter = None
        self._order = ''
        self.id = None
        self._filter = ''
        self.tblService.setSelectionModel(self._selectionModel)

        self.cmbSection.setTable('rbServiceSection')
        self.cmbSection.setFilter(order='id')
        self.cmbType.setTable('rbServiceType')
        self.cmbClass.setTable('rbServiceClass')
        self.table = QtGui.qApp.db.table('rbService')
        self.edtBegDate.canBeEmpty(True)
        self.edtEndDate.canBeEmpty(True)
        self.edtCode.setFocus(Qt.ShortcutFocusReason)
        self.resetEdits()
        self.cmbSection.installEventFilter(self)
        self.cmbType.installEventFilter(self)
        self.cmbClass.installEventFilter(self)
        self.edtCode.installEventFilter(self)
        self.edtName.installEventFilter(self)
        self.edtBegDate.installEventFilter(self)
        self.edtEndDate.installEventFilter(self)
        self.tblServiceSettings()
        self.updateTypesClasses()
        self.chkIsFilterServiceByCurrentCode.setVisible(
            False
        )  # Логика проверки кода изменена, данный чекбокс более не применим. Если не будет отката - удалить совсем после середины 2015 года.
Пример #2
0
    def __init__(self, parent=None):
        QtGui.QFrame.__init__(self, parent, QtCore.Qt.Popup)
        self.setupUi(self)
        self._parent = parent
        self._model = parent._model
        self._selectionModel = CRBSelectionModel(self._model)
        self.tblMorphology.setModel(self._model)

        self.tableModel = CTableModel(self, [
            CTextCol(u'Код', ['code'], 6),
            CTextCol(u'Наименование', ['name'], 40)
        ], 'MKB_Morphology')
        self.tableSelectionModel = QtGui.QItemSelectionModel(
            self.tableModel, self)
        self.tableSelectionModel.setObjectName('tableSelectionModel')
        self._addNone = True
        self._tableName = 'MKB_Morphology'
        self._filier = ''
        self._order = ''
        self.id = None
        self._searchString = ''
        self.tblMorphology.setSelectionModel(self._selectionModel)
        self.tblSearch.setModel(self.tableModel)
        self.tblSearch.setSelectionModel(self.tableSelectionModel)
        self._model.setTable(self._tableName, self._addNone, self._filier,
                             self._order)
        self.tblMorphology.hideColumn(2)
        self.lastMKBValue = ''
        self.edtSearch.installEventFilter(self)
        self.btnSearch.installEventFilter(self)
        self.tblSearch.installEventFilter(self)
Пример #3
0
 def __init__(self, parent):
     CQuotaTypeComboBox.__init__(self, parent)
     self._model = CRBModel(self)
     self._searchString = ''
     self._selectionModel = CRBSelectionModel(self._model)
     self.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength)
     self.prefferedWidth = None
     self.popupView = CQuotaTypeComboBoxPopup(self, 'QuotaType')
     self.setModel(self._model)
     self._clientId = None
     self.connect(self.popupView, QtCore.SIGNAL('quotaTypeSelected(int)'),
                  self.setValueByRow)
Пример #4
0
 def __init__(self,
              parent,
              filterByHospitalBedsProfile=False,
              additionalIdList=None):
     if not additionalIdList:
         additionalIdList = []
     QtGui.QComboBox.__init__(self, parent)
     self._model = CRBServiceComboBoxModel(self,
                                           filterByHospitalBedsProfile,
                                           additionalIdList)
     self._searchString = ''
     self._staticFilter = None
     self._selectionModel = CRBSelectionModel(self._model)
     self.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength)
     self.prefferedWidth = None
     self.popupView = CRBServiceComboBoxPopup(self)
     self.setModel(self._model)
     self.connect(self.popupView, SIGNAL('serviceSelected(int)'),
                  self.setValueByRow)
     self.setModelColumn(0)
Пример #5
0
 def __init__(self, parent):
     QtGui.QComboBox.__init__(self, parent)
     self._searchString = ''
     self.showFields = CRBComboBox.showName
     self._model = CMealComboBoxModel(self)
     self._selectionModel = CRBSelectionModel(self._model)
     self._tableName = ''
     self._addNone = True
     self._needCache = True
     self._filter = ''
     self._order = ''
     self._specialValues = None
     self.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength)
     self.prefferedWidth = None
     self.popupView = CRBPopupView(self)
     self.setShowFields(self.showFields)
     self.setView(self.popupView)
     self.setModel(self._model)
     self.popupView.setSelectionModel(self._selectionModel)
     self.popupView.setFrameShape(QtGui.QFrame.NoFrame)
     self._isRTF = False
Пример #6
0
    def __init__(self, parent, tableName=''):
        QtGui.QFrame.__init__(self, parent, QtCore.Qt.Popup)
        self._mapClassName2Class = {}
        self._clientId = None
        self.clientBegDate = None
        self.clientEegDate = None
        self._addNone = True
        self._tableName = tableName
        self._filier = ''
        self._order = ''
        self.id = None
        self.table = QtGui.qApp.db.table('QuotaType')

        self.setupUi(self)

        self._applyQuotaTypeClassCombobox()
        self._model = parent._model
        self._selectionModel = CRBSelectionModel(self._model)
        self.tblQuotaType.setModel(self._model)
        self.tblQuotaType.setSelectionModel(self._selectionModel)
        self.edtDate.setDate(QtCore.QDate().currentDate())
        self.buttonBox.button(QtGui.QDialogButtonBox.Apply).setShortcut(
            QtCore.Qt.Key_Return)