Example #1
0
    def _start_operations(self):
        '''
        operaciones que se requieren para iniciar la ventana
        '''
        self.processEvents = QtGui.QApplication.processEvents
        centerOnScreen(self)
        setStyle(self)
        self.setValidators()
        self.btSave.setDefault(True)
        self.processEvents()
        if self.itemToEdit:
            self.btSave.setText(self.getMsgByLang('editTitle'))
            self.setWindowTitle(self.getMsgByLang('editTitle') + ' ' + self.singleTitle.lower())
            self._loadDataInWidgets()
            self.processEvents()
        else:
            self.setWindowTitle(self.getMsgByLang('newTitle') + ' ' + self.singleTitle.lower())

        QtGui.QShortcut( QtGui.QKeySequence( "F9" ), self, self.on_btSave_clicked )
        QtGui.QShortcut( QtGui.QKeySequence( QtCore.Qt.Key_Escape ), self, self.close )

        for item in self.ITEMLIST:
            widget = item.keys()[0]
            value = item.values()[0]
            if str(type(value)) == "<class 'storm.references.Reference'>" and\
                str(type(widget)) == "<class 'PyQt4.QtGui.QComboBox'>":
                try:
                    cls = value.__dict__['_remote_key'][0].__dict__['cls']
                except TypeError, e:
                    cls = value.__dict__['_remote_key'].__dict__['cls']
                self.references[value] = {'cls':cls, 'fnParser':None, 'objs':None}
Example #2
0
    def _start_operations(self):
        '''
        operaciones que se requieren para iniciar la ventana
        '''
        self.processEvents = QtGui.QApplication.processEvents
        centerOnScreen(self)
        setStyle(self)
        self.setValidators()
        self.btSave.setDefault(True)
        self.processEvents()
        if self.itemToEdit:
            self.btSave.setText(self.getMsgByLang('editTitle'))
            self.setWindowTitle(
                self.getMsgByLang('editTitle') + ' ' +
                self.singleTitle.lower())
            self._loadDataInWidgets()
            self.processEvents()
        else:
            self.setWindowTitle(
                self.getMsgByLang('newTitle') + ' ' + self.singleTitle.lower())

        QtGui.QShortcut(QtGui.QKeySequence("F9"), self, self.on_btSave_clicked)
        QtGui.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Escape), self,
                        self.close)

        for item in self.ITEMLIST:
            widget = item.keys()[0]
            value = item.values()[0]
            if str(type(value)) == "<class 'storm.references.Reference'>" and\
                str(type(widget)) == "<class 'PyQt4.QtGui.QComboBox'>":
                try:
                    cls = value.__dict__['_remote_key'][0].__dict__['cls']
                except TypeError, e:
                    cls = value.__dict__['_remote_key'].__dict__['cls']
                self.references[value] = {
                    'cls': cls,
                    'fnParser': None,
                    'objs': None
                }
Example #3
0
    def _start_operations( self ):
        '''Operations necessary to display the window'''
        self.processEvents = QtGui.QApplication.processEvents
        self.fullScreen = False
        self.lang = config().LANG
        self.translateWidgets()
        self.makeTable()
        self.processEvents()
        self.loadCombobox()
        self.loadTable()
        self.processEvents()
        self.loadShortcuts()
        centerOnScreen(self)
        setStyle(self)
        self.processEvents()
        if self.widgets['btEdit']:
            self.btEdit.setVisible(False)
        if self.widgets['btDelete']:
            self.btDelete.setVisible(False)

        # self.setWindowIcon( QtGui.QIcon( QtGui.QPixmap( join( abspath( dirname( __file__ ) ), self.ICONFILE ) ) ) )
        if self.widgets['lbTitle']:
            self.lbTitle.setText(self.pluralTitle)
        self.setWindowTitle(self.pluralTitle)
Example #4
0
    def _start_operations( self ):
        '''Operations necessary to display the window'''
        self.processEvents = QtGui.QApplication.processEvents
        self.fullScreen = False
        self.lang = config().LANG
        self.translateWidgets()
        self.makeTable()
        self.processEvents()
        self.loadCombobox()
        self.loadTable()
        self.processEvents()
        self.loadShortcuts()
        centerOnScreen(self)
        setStyle(self)
        self.processEvents()
        if self.widgets['btEdit']:
            self.btEdit.setVisible(False)
        if self.widgets['btDelete']:
            self.btDelete.setVisible(False)

        # self.setWindowIcon( QtGui.QIcon( QtGui.QPixmap( join( abspath( dirname( __file__ ) ), self.ICONFILE ) ) ) )
        if self.widgets['lbTitle']:
            self.lbTitle.setText(self.pluralTitle)
        self.setWindowTitle(self.pluralTitle)