Add color lines button
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
parent
4ac6a0629b
commit
1ee1bab067
7 changed files with 55 additions and 2 deletions
|
@ -180,6 +180,13 @@ void LogPage::modelStateToUI()
|
|||
ui->text->setWordWrap(false);
|
||||
ui->wrapCheckbox->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
if (m_model->colorLines()) {
|
||||
ui->text->setColorLines(true);
|
||||
ui->colorCheckbox->setCheckState(Qt::Checked);
|
||||
} else {
|
||||
ui->text->setColorLines(false);
|
||||
ui->colorCheckbox->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
if (m_model->suspended()) {
|
||||
ui->trackLogCheckbox->setCheckState(Qt::Unchecked);
|
||||
} else {
|
||||
|
@ -193,6 +200,7 @@ void LogPage::UIToModelState()
|
|||
return;
|
||||
}
|
||||
m_model->setLineWrap(ui->wrapCheckbox->checkState() == Qt::Checked);
|
||||
m_model->setColorLines(ui->colorCheckbox->checkState() == Qt::Checked);
|
||||
m_model->suspend(ui->trackLogCheckbox->checkState() != Qt::Checked);
|
||||
}
|
||||
|
||||
|
@ -282,6 +290,14 @@ void LogPage::on_wrapCheckbox_clicked(bool checked)
|
|||
m_model->setLineWrap(checked);
|
||||
}
|
||||
|
||||
void LogPage::on_colorCheckbox_clicked(bool checked)
|
||||
{
|
||||
ui->text->setColorLines(checked);
|
||||
if (!m_model)
|
||||
return;
|
||||
m_model->setColorLines(checked);
|
||||
}
|
||||
|
||||
void LogPage::on_findButton_clicked()
|
||||
{
|
||||
auto modifiers = QApplication::keyboardModifiers();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue