GH-925 add scroll to bottom button to LogPage

This commit is contained in:
Petr Mrázek 2015-04-29 01:28:58 +02:00
parent f8650e3965
commit 75dfbc61fc
3 changed files with 49 additions and 16 deletions

View File

@ -69,6 +69,11 @@ void LogPage::on_btnClear_clicked()
ui->text->clear();
}
void LogPage::on_btnBottom_clicked()
{
ui->text->verticalScrollBar()->setSliderPosition(ui->text->verticalScrollBar()->maximum());
}
void LogPage::on_trackLogCheckbox_clicked(bool checked)
{
m_write_active = checked;

View File

@ -65,6 +65,7 @@ private slots:
void on_btnPaste_clicked();
void on_btnCopy_clicked();
void on_btnClear_clicked();
void on_btnBottom_clicked();
void on_trackLogCheckbox_clicked(bool checked);

View File

@ -36,21 +36,7 @@
<string>Tab 1</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Search:</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="findButton">
<property name="text">
<string>Find</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<item row="1" column="0" colspan="5">
<widget class="QPlainTextEdit" name="text">
<property name="undoRedoEnabled">
<bool>false</bool>
@ -69,7 +55,7 @@
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<item row="0" column="0" colspan="5">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="trackLogCheckbox">
@ -126,15 +112,56 @@
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Search:</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="findButton">
<property name="text">
<string>Find</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="searchBar"/>
</item>
<item row="2" column="4">
<widget class="QPushButton" name="btnBottom">
<property name="toolTip">
<string>Scroll all the way to bottom</string>
</property>
<property name="text">
<string>Bottom</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>trackLogCheckbox</tabstop>
<tabstop>btnCopy</tabstop>
<tabstop>btnPaste</tabstop>
<tabstop>btnClear</tabstop>
<tabstop>text</tabstop>
<tabstop>searchBar</tabstop>
<tabstop>findButton</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>