| 248 | } |
| 249 | |
| 250 | BasicCodeViewerWindow::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 | |
| 269 | void BasicCodeViewerWindow::setVariableName(const QString &name) { |
| 270 | m_variableName = name; |
nothing calls this directly
no test coverage detected