def helpButtonClicked(self): instructionsWidget = QtGui.QDialog(self) instructionsWidget.setModal(True) instructionsWidget.setWindowTitle("Plugin Manager Help") instructionsLayout = QtGui.QVBoxLayout() instructionsWidget.setLayout(instructionsLayout) instructionsTextEdit = QtGui.QTextEdit() instructionsTextEdit.setAlignment(Qt.Qt.AlignJustify) instructionsTextEdit.setReadOnly(True) instructionsLayout.addWidget(instructionsTextEdit) instructionsWidget.resize(750, 500) instructionsTextEdit.setPlainText(""" Welcome to Plugin Manager! Introduction: - Plugin manager is the client front-end for a enumeration of local plugins and retrieval of remote plugins - Remote plugins on a server, in a location specified by a URL - All plugin URLs of an organization are listed in a repository index file on a server, in a location indicated by a repo URL - Repository URLs of different organization are listed in a repository list on a knossos server, in a location indicated by the repo list URL - In addition to remote plugins, local plugins can be developed independently of any repository Operation: - The plugin GUI includes a plugin table, metadata table, log table and options - Upon startup of knossos, a default plugin directory is used. This can be reconfigured by "Plugin Dir" - The default knossos repo list URL is used. Chnage it by editing "Repo List URL" - Press "Refresh" to enumerate local plugins and retrieve remote repository indices - Check "Offline" to avoid remote listing: local plugins would be enumerated, no remote plugins would be listed, hence no updates would be available - Press "Update All" to to retrieve all updated remote plugins, or "Update Selected" for those plugins selected in the table - Python files (.py extension) are defined as Knossos plugins by metadata lines of format #KNOSSOS_PLUGIN\\t<Key>\\t<Value> - Mandatory metadata fields are Version and Description. Absence of any disqualifies the file as plugin - All metadata fields are shown at the metadata table when a plugin is clicked - Double-click a plugin in the table to open the local version, if available - Press "Defaults" to restore default plugin dir, repo list URL and other options - Repo index and repo list file format is a header line of <First Field Name>\\t<Second Field Name>\\t<Third Field Name> etc., while the rest of the files is lines of <First Field>\\t<Second Field>\\t<Third Field> etc. Mandatory fields for repo index - URL,Version,Description ; for repo list - Name,URL Notes: - The plugin directory requires refreshing every time a local or remote plugin is added or removed, in order for knossos to correctly reflect available local and remote plugins in the plugin menu - Version numbers are compared from major to minor, using . as hierarchy separator: 3 > 2.2 > 2.1.9 > 1.10 > 1.9 Each version component has to be the pythonic string representation of a number. For example, 1.02 is not supported, use 1.2 instead. - Check "Overwrite Same Version" to overwrite local with remote even when version number is identical - Check "Quiet" to skip errors and make default choices for questions - Press "Save Log" to save the current log into a tab-separated text file - Press "Clear Log" to clear the log """) instructionsWidget.show() return
def __init__(self): self.textEdit = QtGui.QTextEdit() self.textEdit.setWindowTitle('Output console') self.textEdit.readOnly = True self.scrollBar = self.textEdit.verticalScrollBar()