Ejemplo n.º 1
0
    def _getCommands(self):
        _commands = self.commands()
        if _commands is None:
            _commands = dict([
                (name, 'DTL.pycis.commands')
                for name in self._findCommands(apiUtils.getMainDir())
            ])

            #Handle other pycis sub app commands

        self.setCommands(_commands)
        return _commands
Ejemplo n.º 2
0
 def loadUi(self, parent=None):
     if issubclass(self.__class__, QtGui.QWizard) :
         return
     try:
         path = Path(sys.modules[self.__module__].__file__)
     except:
         path = Path(apiUtils.getMainDir())
     
     if path :
         ui_file = path.dir().join('views','{0}.ui'.format(self.__class__.__name__))
         if ui_file.exists() :
             self = loadUi(ui_file, parent, self, self.customWidgets())
         else:
             print 'Unable to load ui file | {0}'.format(ui_file)
Ejemplo n.º 3
0
    def loadUi(self, parent=None):
        if issubclass(self.__class__, QtGui.QWizard):
            return
        try:
            path = Path(sys.modules[self.__module__].__file__)
        except:
            path = Path(apiUtils.getMainDir())

        if path:
            ui_file = path.dir().join('views',
                                      '{0}.ui'.format(self.__class__.__name__))
            if ui_file.exists():
                self = loadUi(ui_file, parent, self, self.customWidgets())
            else:
                print('Unable to load ui file | {0}'.format(ui_file))
Ejemplo n.º 4
0
 def _getCommands(self):
     _commands = self.commands()
     if _commands is None :
         _commands = dict([(name, 'DTL.pycis.commands') for name in self._findCommands(apiUtils.getMainDir())])
         
         #Handle other pycis sub app commands
     
     self.setCommands(_commands)
     return _commands