MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / BasicCodeViewerWindow

Method BasicCodeViewerWindow

gui/qt/basiccodeviewerwindow.cpp:250–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250BasicCodeViewerWindow::BasicCodeViewerWindow(QWidget *parent, bool doHighlight, bool doWrap, bool doFormat)
251 : QDialog{parent}, ui(new Ui::BasicCodeViewerWindow) {
252 ui->setupUi(this);
253
254 // Considering the default values...
255 if (!doHighlight) { m_showingHighlighted = false; ui->checkboxHighlighting->setCheckState(Qt::Unchecked); ui->basicEdit->toggleHighlight(); }
256 if (doWrap) { m_showingWrapped = true; ui->checkboxLineWrapping->setCheckState(Qt::Checked); }
257 if (doFormat) { m_showingFormatted = true; ui->checkboxReformatting->setCheckState(Qt::Checked); }
258
259 connect(ui->checkboxHighlighting, &QCheckBox::toggled, this, &BasicCodeViewerWindow::toggleHighlight);
260 connect(ui->checkboxLineWrapping, &QCheckBox::toggled, this, &BasicCodeViewerWindow::toggleWrap);
261 connect(ui->checkboxReformatting, &QCheckBox::toggled, this, &BasicCodeViewerWindow::toggleFormat);
262
263 ui->basicEdit->setWordWrapMode(m_showingWrapped ? QTextOption::WrapAtWordBoundaryOrAnywhere : QTextOption::NoWrap);
264
265 // Add special jacobly font
266 ui->basicEdit->setFont(QFont(QStringLiteral("TICELarge"), 11));
267}
268
269void BasicCodeViewerWindow::setVariableName(const QString &name) {
270 m_variableName = name;

Callers

nothing calls this directly

Calls 2

toggleHighlightMethod · 0.80
setFontMethod · 0.45

Tested by

no test coverage detected