NOISSUE add line wrapping checkbox to log page

This commit is contained in:
Petr Mrázek 2016-04-10 21:52:01 +02:00
parent c44e85c765
commit b795ad5209
3 changed files with 24 additions and 0 deletions

View File

@ -108,6 +108,18 @@ void LogPage::on_trackLogCheckbox_clicked(bool checked)
m_write_active = checked;
}
void LogPage::on_wrapCheckbox_clicked(bool checked)
{
if(checked)
{
ui->text->setWordWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
}
else
{
ui->text->setWordWrapMode(QTextOption::WrapMode::NoWrap);
}
}
void LogPage::on_findButton_clicked()
{
auto modifiers = QApplication::keyboardModifiers();

View File

@ -70,6 +70,7 @@ private slots:
void on_btnBottom_clicked();
void on_trackLogCheckbox_clicked(bool checked);
void on_wrapCheckbox_clicked(bool checked);
void on_findButton_clicked();
void findActivated();

View File

@ -64,6 +64,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="wrapCheckbox">
<property name="text">
<string>Wrap lines</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -152,6 +162,7 @@
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>trackLogCheckbox</tabstop>
<tabstop>wrapCheckbox</tabstop>
<tabstop>btnCopy</tabstop>
<tabstop>btnPaste</tabstop>
<tabstop>btnClear</tabstop>