MCPcopy Create free account
hub / github.com/Kitware/ParaView / printString

Method printString

Qt/Python/pqPythonShell.cxx:285–303  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

283
284//-----------------------------------------------------------------------------
285void pqPythonShell::printString(const QString& text, pqPythonShell::PrintMode mode)
286{
287 pqConsoleWidget* consoleWidget = this->Internals->Ui.consoleWidget;
288 const QString& string = text;
289 if (!string.isEmpty())
290 {
291 QTextCharFormat format = consoleWidget->getFormat();
292 format.setForeground(this->Internals->foregroundColor(mode));
293 consoleWidget->setFormat(format);
294 consoleWidget->printString(string);
295 format.setForeground(QApplication::palette().windowText().color());
296 consoleWidget->setFormat(format);
297
298 this->Prompted = false;
299
300 // printString by itself should never affect the Prompt, just whether it
301 // needs to be shown.
302 }
303}
304//-----------------------------------------------------------------------------
305void pqPythonShell::setPreamble(const QStringList& statements)
306{

Callers 11

printMessageMethod · 0.95
DisplayTextMethod · 0.45
DisplayErrorTextMethod · 0.45
resetMethod · 0.45
initializeInterpreterMethod · 0.45
destroyInterpretorMethod · 0.45
printStderrMethod · 0.45
printStdoutMethod · 0.45
printMessageMethod · 0.45

Calls 5

getFormatMethod · 0.80
isEmptyMethod · 0.45
foregroundColorMethod · 0.45
setFormatMethod · 0.45
colorMethod · 0.45

Tested by

no test coverage detected