def __init__(self, option, path="", parent=None): QDialog.__init__(self, parent) self.__cancelRequest = False self.__inProgress = False self.__option = option self.__path = path # Avoid pylint complains self.includeClassesBox = None self.includeFuncsBox = None self.includeGlobsBox = None self.includeDocsBox = None self.includeConnTextBox = None self.options = ImportDiagramOptions() self.__createLayout() title = "Imports diagram settings for " if self.__option == self.SingleFile: title += os.path.basename(self.__path) elif self.__option == self.DirectoryFiles: title += "directory " + self.__path elif self.__option == self.ProjectFiles: title += "the whole project" else: title += "modified file " + os.path.basename(self.__path) self.setWindowTitle(title)
def __init__(self, path, parent=None): QDialog.__init__(self, parent) path = os.path.abspath(path) if not os.path.exists(path): raise Exception('Dead code analysis path must exist. ' 'The provide path "' + path + '" does not.') self.__path = path self.__cancelRequest = False self.__inProgress = False self.__infoLabel = None self.__foundLabel = None self.__found = 0 # Number of found self.__createLayout() if os.path.isdir(path): self.setWindowTitle('Dead code analysis for all project files') else: self.setWindowTitle('Dead code analysis for ' + os.path.basename(path)) self.__updateFoundLabel() QTimer.singleShot(0, self.__process)
def __init__(self, what, options, path="", buf="", parent=None): QDialog.__init__(self, parent) self.__cancelRequest = False self.__inProgress = False self.__what = what self.__options = options self.__path = path # could be a dir or a file self.__buf = buf # content in case of a modified file # Working process data self.__participantFiles = [] # Collected list of files self.__projectImportDirs = [] self.__projectImportsCache = {} # utils.settings -> /full/path/to.py self.__dirsToImportsCache = {} # /dir/path -> { my.mod: path.py, ... } self.dataModel = ImportDiagramModel() self.scene = QGraphicsScene() # Avoid pylint complains self.progressBar = None self.infoLabel = None self.__createLayout() self.setWindowTitle('Imports/dependencies diagram generator') QTimer.singleShot(0, self.__process)
def __init__(self, path, newSearch=True): QDialog.__init__(self, GlobalData().mainWindow) path = os.path.abspath(path) if not os.path.exists(path): raise Exception('Dead code analysis path must exist. ' 'The provide path "' + path + '" does not.') self.__path = path self.__newSearch = newSearch self.candidates = None self.__cancelRequest = False self.__inProgress = False self.__infoLabel = None self.__foundLabel = None self.__found = 0 # Number of found self.__createLayout() title = 'Dead code analysis for ' if os.path.isdir(path): project = GlobalData().project if project.isLoaded() and project.getProjectDir() == path: title += 'all project files' else: title += 'dir ' + os.path.basename(os.path.normpath(path)) else: title += os.path.basename(path) if not self.__newSearch: title += ' (do again)' self.setWindowTitle(title) self.__updateFoundLabel()
def __init__(self, where=None, what=None, dirPath=None, params=None): QDialog.__init__(self, GlobalData().mainWindow) # If parans is not None it means it is a repeated search mainWindow = GlobalData().mainWindow self.editorsManager = mainWindow.editorsManagerWidget.editorsManager self.__cancelRequest = False self.__inProgress = False self.searchRegexp = None self.searchResults = [] # Avoid pylint complains self.findCombo = None self.caseCheckBox = None self.wordCheckBox = None self.regexpCheckBox = None self.projectRButton = None self.openFilesRButton = None self.dirRButton = None self.dirEditCombo = None self.dirSelectButton = None self.filterCombo = None self.fileLabel = None self.progressBar = None self.findButton = None self.__createLayout() self.__maxEntries = Settings()['maxSearchEntries'] if params is None: self.__newSearch = True self.setWindowTitle("Find in files") # Restore the combo box values # [ {'term': ., 'dir': ., 'filters': ., # 'cbCase': ., 'cbWord': ., 'cbRegexp': ., # 'rbProject': ., 'rbOpen': ., 'rbDir': .}, ... ] self.__history = getFindInFilesHistory() self.__populateHistory() self.findCombo.setEditText('') self.dirEditCombo.setEditText('') self.filterCombo.setEditText('') if where == self.IN_PROJECT: self.setSearchInProject(what) elif where == self.IN_DIRECTORY: self.setSearchInDirectory(what, dirPath) else: self.setSearchInOpenFiles(what) else: self.__newSearch = False self.setWindowTitle("Find in files: search again") self.__populateSearchAgain(params)
def __init__(self, plugin, client, path, parent=None): QDialog.__init__(self, parent) self.__plugin = plugin self.__client = client self.__path = path self.__createLayout() self.setWindowTitle("SVN Properties of " + path) self.__populate() self.__propsView.setFocus()
def __init__(self, files, action, parent=None): QDialog.__init__(self, parent) count = len(files) if count >= 2: title = str(count) + " project files are modified and not saved" else: title = "1 project file modified and not saved" self.setWindowTitle(title) self.setWindowIcon(getIcon('warning.png')) self.__createLayout(action, title, files)
def __init__(self, value, parent=None): QDialog.__init__(self, parent) self.interval = value self.__createLayout() self.setWindowTitle("VCS file status update interval configuration") self.__intervalEdit.setText(str(self.interval)) self.__updateOKStatus() self.__intervalEdit.textChanged.connect(self.__updateOKStatus) self.__intervalEdit.setFocus()
def __init__(self, pluginManager, parent=None): QDialog.__init__(self, parent) self.setWindowTitle("Plugin Manager") self.__pluginManager = pluginManager self.__configFuncs = {} # int -> callable self.__createLayout() self.__populate() self.__pluginsView.setFocus() self.__inItemChange = False
def __init__(self, varName, varType, varValue, isGlobal, parent=None): QDialog.__init__(self, parent) if varName.endswith("."): varName = varName[:-1] if isGlobal: self.setWindowTitle("Global variable '" + varName + "'") self.setWindowIcon(getIcon("globvar.png")) else: self.setWindowTitle("Local variable '" + varName + "'") self.setWindowIcon(getIcon("locvar.png")) self.__createLayout(varName, varType, varValue, isGlobal)
def __init__(self, bpoint, parent=None): QDialog.__init__(self, parent) self.__origBpoint = bpoint self.setWindowTitle("Edit breakpoint properties") self.setWindowIcon(getIcon('bpprops.png')) self.__createLayout(bpoint) self.__OKButton.setEnabled(False) self.__conditionValue.lineEdit().textChanged.connect(self.__changed) self.__ignoreValue.valueChanged.connect(self.__changed) self.__enabled.stateChanged.connect(self.__changed) self.__tempCheckbox.stateChanged.connect(self.__changed)
def __init__(self, client, path, parent=None): QDialog.__init__(self, parent) self.__cancelRequest = False self.__inProcess = False self.__client = client self.__path = path # Transition data self.logInfo = None self.__createLayout() self.setWindowTitle("SVN Log") QTimer.singleShot(0, self.__process)
def __init__(self, windowTitle, cmlDocComment, fileName, parent): QDialog.__init__(self, parent) # Name of a file from which the doc link is created/edited self.__fileName = fileName self.setWindowTitle(windowTitle + ' documentation link and/or anchor') self.__createLayout() self.__invalidInputColor = GlobalData().skin['invalidInputPaper'] self.__validInputColor = self.linkEdit.palette().color( self.linkEdit.backgroundRole()) if cmlDocComment is not None: self.__populate(cmlDocComment)
def __init__(self, where, parent=None): QDialog.__init__(self, parent) self.__createLayout() self.setWindowTitle("Introspection plugin configuration") if where == IntrospectionPluginConfigDialog.LOG: self.__logRButton.setChecked(True) elif where == IntrospectionPluginConfigDialog.CONSOLE: self.__consoleRButton.setChecked(True) else: self.__newtabRButton.setChecked(True) self.__OKButton.setFocus()
def __init__(self, where, parent=None): QDialog.__init__(self, parent) self.__createLayout() self.setWindowTitle("Garbage collector plugin configuration") if where == GCPluginConfigDialog.SILENT: self.__silentRButton.setChecked(True) elif where == GCPluginConfigDialog.STATUS_BAR: self.__statusbarRButton.setChecked(True) else: self.__logtabRButton.setChecked(True) self.__OKButton.setFocus()
def __init__(self, bgcolor, fgcolor, bordercolor, parent=None): """colors are instances of QColor""" QDialog.__init__(self, parent) self.setWindowTitle('Custom colors') self.__createLayout() self.__bgColorButton.setColor(bgcolor) self.__bgColorButton.sigColorChanged.connect(self.__onColorChanged) self.__fgColorButton.setColor(fgcolor) self.__fgColorButton.sigColorChanged.connect(self.__onColorChanged) self.__borderColorButton.setColor(bordercolor) self.__borderColorButton.sigColorChanged.connect(self.__onColorChanged) QTimer.singleShot(1, self.__onColorChanged)
def __init__(self, plugin, client, path, recursively, rev, parent=None): QDialog.__init__(self, parent) self.__cancelRequest = False self.__inProcess = False self.__plugin = plugin self.__client = client self.__path = path self.__recursively = recursively self.__rev = rev self.__updatedPaths = [] self.__createLayout() self.setWindowTitle("SVN Update") QTimer.singleShot(0, self.__process)
def __init__(self, plugin, client, path, update, parent=None): QDialog.__init__(self, parent) self.__cancelRequest = False self.__inProcess = False self.__plugin = plugin self.__client = client self.__path = path self.__update = update # Transition data self.statusList = None self.__createLayout() self.setWindowTitle("SVN Status") QTimer.singleShot(0, self.__process)
def __init__(self, plugin, client, path, logInfo, parent=None): QDialog.__init__(self, parent) self.__plugin = plugin self.__client = client self.__path = path self.__logInfo = logInfo self.__lhsSelected = None self.__rhsSelected = None self.__createLayout() self.setWindowTitle("SVN Log") lastIndex = len(self.__logInfo) - 1 index = 0 for log in self.__logInfo: newItem = LogItem(log) self.__logView.addTopLevelItem(newItem) if index != lastIndex: rev = log.revision.number nextRev = self.__logInfo[index + 1].revision.number diffButton = self.__createDiffButton( log.revision, self.__logInfo[index + 1].revision) if rev is not None and nextRev is not None: diffButton.setToolTip( "Click to see diff to the older revision (r." + str(rev) + " to r." + str(nextRev) + ")") else: diffButton.setEnabled(False) diffButton.setToolTip( "Could not determine current or previous revision") else: diffButton = self.__createDiffButton(None, None) diffButton.setEnabled(False) diffButton.setToolTip( "Diff to previous revision is not avalable for the first revision" ) self.__logView.setItemWidget(newItem, DIFFTONEXT_COL, diffButton) index += 1 self.__resizeLogView() self.__sortLogView() self.__logView.setFocus()
def __init__(self, client, path, revStart, revEnd, revPeg, parent=None): QDialog.__init__(self, parent) self.__cancelRequest = False self.__inProcess = False self.__client = client self.__path = path self.__revStart = revStart self.__revEnd = revEnd self.__revPeg = revPeg # Transition data self.annotation = None self.revisionsInfo = None self.__createLayout() self.setWindowTitle("SVN Annotate") QTimer.singleShot(0, self.__process)
def __init__(self, plugin, pathsToCommit, pathsToIgnore, parent=None): QDialog.__init__(self, parent) self.__plugin = plugin self.__createLayout(pathsToCommit, pathsToIgnore) self.setWindowTitle("SVN commit") # Fill the lists for item in pathsToCommit: newItem = QTreeWidgetItem(["", item[0], STATUS[item[1]]]) newItem.setCheckState(CHECK_COL, Qt.Checked) newItem.setToolTip(PATH_COL, item[0]) newItem.setToolTip(STATUS_COL, STATUS[item[1]]) self.__pathToCommitView.addTopLevelItem(newItem) diffButton = self.__createDiffButton() diffButton.path = item[0] diffButton.status = item[1] if os.path.isdir(item[0]) or item[1] in [IND_REPLACED] \ or not isFileSearchable(item[0]): diffButton.setEnabled(False) diffButton.setToolTip("Diff is not available") else: diffButton.setEnabled(True) diffButton.setToolTip("Click to see diff") self.__pathToCommitView.setItemWidget(newItem, DIFF_COL, diffButton) self.__resizeCommitPaths() self.__sortCommitPaths() for item in pathsToIgnore: newItem = QTreeWidgetItem([item[0], STATUS[item[1]]]) newItem.setToolTip(0, item[0]) newItem.setToolTip(1, STATUS[item[1]]) self.__pathToIgnoreView.addTopLevelItem(newItem) self.__pathToIgnoreView.header().resizeSections( QHeaderView.ResizeToContents) self.__updateSelectAllStatus() self.__updateOKStatus() self.__message.setFocus()
def __init__(self, pathsToAdd, parent=None): QDialog.__init__(self, parent) self.addPaths = [] self.__createLayout(pathsToAdd) self.setWindowTitle("SVN add") # Fill the lists for item in pathsToAdd: newItem = QTreeWidgetItem(["", item]) newItem.setCheckState(CHECK_COL, Qt.Checked) newItem.setToolTip(PATH_COL, item[0]) self.__pathToAddView.addTopLevelItem(newItem) self.__resizeAddPaths() self.__sortAddPaths() self.__updateOKStatus()
def __init__(self, bgcolor, fgcolor, bordercolor, parent=None): """colors are instances of QColor""" QDialog.__init__(self, parent) self.setWindowTitle('Custom colors') self.__createLayout() self.__bgColorButton.setColor(bgcolor) self.__bgColorButton.sigColorChanged.connect(self.__onColorChanged) self.__fgColorButton.setColor(fgcolor) self.__fgColorButton.sigColorChanged.connect(self.__onColorChanged) if bordercolor is None: self.__borderColorButton.setEnabled(False) self.__borderColorButton.setToolTip( 'Border colors are not supported for docstrings') self.__borderColorButton.setIcon(getIcon('warning.png')) else: self.__borderColorButton.setColor(bordercolor) self.__borderColorButton.sigColorChanged.connect( self.__onColorChanged) QTimer.singleShot(1, self.__onColorChanged)
def __init__(self, statusList, parent=None): QDialog.__init__(self, parent) # Split statuses paths = [] ignoredPaths = [] for status in statusList: if status[1] == IND_IGNORED: ignoredPaths.append(status) else: paths.append(status) self.__createLayout(paths, ignoredPaths) self.setWindowTitle("SVN status") # Fill the lists for item in paths: message = "" if item[2]: message = item[2] newItem = QTreeWidgetItem(["", item[0], STATUS[item[1]], message]) pixmap = getIndicatorPixmap(item[1]) if pixmap: newItem.setIcon(0, QIcon(pixmap)) newItem.setToolTip(1, item[0]) newItem.setToolTip(2, STATUS[item[1]]) if message: newItem.setToolTip(3, message) self.__pathView.addTopLevelItem(newItem) self.__pathView.header().resizeSections(QHeaderView.ResizeToContents) self.__pathView.header().resizeSection(0, 20) self.__pathView.header().setResizeMode(QHeaderView.Fixed) for item in ignoredPaths: newItem = QTreeWidgetItem([item[0], STATUS[item[1]]]) newItem.setToolTip(0, item[0]) newItem.setToolTip(1, STATUS[item[1]]) self.__ignoredPathView.addTopLevelItem(newItem) self.__ignoredPathView.header().resizeSections(QHeaderView.ResizeToContents)
def __init__(self, what, sourceModel, parent=None): QDialog.__init__(self, parent) if what not in [self.Functions, self.Classes, self.Globals]: raise Exception("Unsupported unused analysis type: " + str(what)) self.__cancelRequest = False self.__inProgress = False self.__what = what # what is in source model self.__srcModel = sourceModel # source model of globals or # functions or classes # Avoid pylint complains self.__progressBar = None self.__infoLabel = None self.__foundLabel = None self.__found = 0 # Number of found self.__createLayout() self.setWindowTitle(self.__formTitle()) QTimer.singleShot(0, self.__process)
def __init__(self, ideWideSettings, projectSettings, parent=None): QDialog.__init__(self, parent) self.__projectLocalRButton = None self.__idewideUser = None self.__idewideLocalRButton = None self.__projectReposRButton = None self.__idewideAuthPasswdRButton = None self.__projectPasswd = None self.__projectUser = None self.__projectAuthExtRButton = None self.__idewidePasswd = None self.__idewideAuthExtRButton = None self.__projectAuthPasswdRButton = None self.__idewideReposRButton = None self.__createLayout() self.setWindowTitle("SVN plugin configuration") self.ideWideSettings = copy.deepcopy(ideWideSettings) if projectSettings is None: self.projectSettings = None else: self.projectSettings = copy.deepcopy(projectSettings) # Set the values self.__setIDEWideValues() if projectSettings is None: self.__tabWidget.setTabEnabled(1, False) else: self.__setProjectValues() self.__tabWidget.setCurrentIndex(1) self.__updateOKStatus() self.__idewideUser.textChanged.connect(self.__updateOKStatus) self.__projectUser.textChanged.connect(self.__updateOKStatus)
def __init__(self, pluginHomeDir, parent): QDialog.__init__(self, parent) self.__pluginHomeDir = pluginHomeDir self.__createLayout() self.setWindowTitle('Pylint plugin information')
def __init__(self, parent=None): QDialog.__init__(self, parent) self.setWindowTitle('Replace text') self.__createLayout()
def __init__(self, windowTitle, labelText, parent=None): QDialog.__init__(self, parent) self.setWindowTitle(windowTitle) self.__createLayout(labelText)