def __init__(self, package, parent = None, name = None, showExternalImports = False):
     """
     Constructor
     
     @param package name of a python package to show the import 
         relationships (string)
     @param parent parent widget of the view (QWidget)
     @param name name of the view widget (QString or string)
     @keyparam showExternalImports flag indicating to show exports from outside
         the package (boolean)
     """
     self.showExternalImports = showExternalImports
     self.packagePath = Utilities.normabspath(package)
     self.package = os.path.splitdrive(self.packagePath)[1].replace(os.sep, '.')[1:]
     hasInit = True
     ppath = self.packagePath
     while hasInit:
         ppath = os.path.dirname(ppath)
         hasInit = len(glob.glob(os.path.join(ppath, '__init__.*'))) > 0
     self.shortPackage = self.packagePath.replace(ppath, '').replace(os.sep, '.')[1:]
     
     UMLDialog.__init__(self, self.packagePath, parent)
     
     if not name:
         self.setObjectName("ImportsDiagram")
     else:
         self.setObjectName(name)
     
     self.connect(self.umlView, SIGNAL("relayout()"), self.relayout)
Exemple #2
0
    def __init__(self, project, parent=None, name=None, noModules=False):
        """
        Constructor
        
        @param project reference to the project object
        @param parent parent widget of the view (QWidget)
        @param name name of the view widget (QString or string)
        @keyparam noModules flag indicating, that no module names should be 
            shown (boolean)
        """
        self.project = project
        self.noModules = noModules

        UMLDialog.__init__(self, self.project.ppath, parent)

        if not name:
            self.setObjectName("ApplicationDiagram")
        else:
            self.setObjectName(name)

        self.connect(self.umlView, SIGNAL("relayout()"), self.relayout)
 def __init__(self, package, parent = None, name = None, noAttrs = False):
     """
     Constructor
     
     @param package name of a python package to be shown (string)
     @param parent parent widget of the view (QWidget)
     @param name name of the view widget (QString or string)
     @keyparam noAttrs flag indicating, that no attributes should be shown (boolean)
     """
     self.package = Utilities.normabspath(package)
     self.allClasses = {}
     self.noAttrs = noAttrs
     
     UMLDialog.__init__(self, self.package, parent)
     
     if not name:
         self.setObjectName("PackageDiagram")
     else:
         self.setObjectName(name)
     
     self.connect(self.umlView, SIGNAL("relayout()"), self.relayout)
 def __init__(self, file, parent = None, name = None, noAttrs = False):
     """
     Constructor
     
     @param file filename of a python module to be shown (string)
     @param parent parent widget of the view (QWidget)
     @param name name of the view widget (QString or string)
     @keyparam noAttrs flag indicating, that no attributes should be shown (boolean)
     """
     self.file = file
     self.noAttrs = noAttrs
     
     UMLDialog.__init__(self, self.file, parent)
     
     if not name:
         self.setObjectName("UMLClassDiagram")
     else:
         self.setObjectName(name)
     
     self.allClasses = {}
     self.allModules = {}
     
     self.connect(self.umlView, SIGNAL("relayout()"), self.relayout)
 def show(self):
     """
     Overriden method to show the dialog.
     """
     self.__buildImports()
     UMLDialog.show(self)
Exemple #6
0
 def show(self):
     """
     Overriden method to show the dialog.
     """
     self.__buildPackages()
     UMLDialog.show(self)