Beispiel #1
0
 def _showContentDocumentation(self, content, key):
     settings = QSettings()
     path = "plugins/%s" % PLUGIN_ID
     defaultDocumentationCache = os.path.normpath(
         unicode(QDir.homePath()) + "/.testerman/")
     documentationCache = os.path.normpath(
         unicode(
             settings.value('%s/cacheDir' % path,
                            QVariant(QString(
                                defaultDocumentationCache))).toString()) +
         "/docCache")
     cache = DocumentationCacheManager(documentationCache)
     transient = CommonWidgets.WTransientWindow("Doc Generator",
                                                self.parent())
     transient.showTextLabel("Generating documentation...")
     path = cache.generateDocumentation(content, key)
     transient.hide()
     transient.setParent(None)
     if path:
         view = WDocumentationView(path, "Documentation for %s" % key,
                                   self.parent())
         view.setWindowFlags(Qt.Window)
         view.resize(QSize(800, 600))
         view.show()
     else:
         CommonWidgets.systemError(
             parent,
             "Unable to generate documentation, please check stderr output.\nPlease check epydoc syntax and indentation"
         )