Commit 18d52314 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Add GUI to alter profile setting handling Page Up/Down

This adds the GUI to setup the page up/down scrolling to either full
or half height.

The non-GUI code was in 3cd4d2e4

FEATURE: 280637
GUI:
parent b94fd289
......@@ -966,6 +966,17 @@ void EditProfileDialog::setupScrollingPage(const Profile::Ptr profile)
const int historySize = profile->historySize();
_ui->historySizeWidget->setLineCount(historySize);
// setup scrollpageamount type radio
int scrollFullPage = profile->property<int>(Profile::ScrollFullPage);
RadioOption pageamounts[] = {
{_ui->scrollHalfPage, Enum::ScrollPageHalf, SLOT(scrollHalfPage())},
{_ui->scrollFullPage, Enum::ScrollPageFull, SLOT(scrollFullPage())},
{0, 0, 0}
};
setupRadio(pageamounts, scrollFullPage);
// signals and slots
connect(_ui->historySizeWidget, SIGNAL(historySizeChanged(int)),
this, SLOT(historySizeChanged(int)));
......@@ -991,6 +1002,14 @@ void EditProfileDialog::showScrollBarRight()
{
updateTempProfileProperty(Profile::ScrollBarPosition, Enum::ScrollBarRight);
}
void EditProfileDialog::scrollFullPage()
{
updateTempProfileProperty(Profile::ScrollFullPage, Enum::ScrollPageFull);
}
void EditProfileDialog::scrollHalfPage()
{
updateTempProfileProperty(Profile::ScrollFullPage, Enum::ScrollPageHalf);
}
void EditProfileDialog::setupMousePage(const Profile::Ptr profile)
{
BooleanOption options[] = { {
......
......@@ -142,6 +142,9 @@ private slots:
void hideScrollBar();
void showScrollBarLeft();
void showScrollBarRight();
void scrollFullPage();
void scrollHalfPage();
// keyboard page
void editKeyBinding();
......
......@@ -460,17 +460,17 @@
</widget>
</item>
<item>
<widget class="KDoubleNumInput" name="fontSizeInput">
<property name="minimum">
<widget class="KDoubleNumInput" name="fontSizeInput" native="true">
<property name="minimum" stdset="0">
<double>4.000000000000000</double>
</property>
<property name="maximum">
<property name="maximum" stdset="0">
<double>999.000000000000000</double>
</property>
<property name="singleStep">
<property name="singleStep" stdset="0">
<double>1.000000000000000</double>
</property>
<property name="decimals">
<property name="decimals" stdset="0">
<number>1</number>
</property>
</widget>
......@@ -599,6 +599,38 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_15">
<property name="title">
<string>Scroll Page Up/Down Amount</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout4">
<item row="0" column="0">
<widget class="QRadioButton" name="scrollHalfPage">
<property name="toolTip">
<string>Scroll the page the half height of window</string>
</property>
<property name="text">
<string>Half Page Height</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="scrollFullPage">
<property name="toolTip">
<string>Scroll the page the full height of window</string>
</property>
<property name="text">
<string>Full Page Height</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
......
......@@ -64,6 +64,16 @@ public:
ScrollBarHidden = 2
};
/**
* This enum describes the amount that Page Up/Down scroll by.
*/
enum ScrollPageAmountEnum {
/** Scroll half page */
ScrollPageHalf = 0,
/** Scroll full page */
ScrollPageFull = 1,
};
/** This enum describes the shapes used to draw the cursor in terminal
* displays.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment