[kde-doc-english] [konsole] src: Add GUI to alter profile setting handling Page Up/Down
Kurt Hindenburg
kurt.hindenburg at gmail.com
Sat May 18 15:03:58 UTC 2013
Git commit 18d52314432eba37334b68be18173b2f14fe0ba7 by Kurt Hindenburg.
Committed on 18/05/2013 at 17:02.
Pushed by hindenburg into branch 'master'.
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 3cd4d2e44031cfbbb84e6cda2fbdebf5c02042d6
FEATURE: 280637
GUI:
M +19 -0 src/EditProfileDialog.cpp
M +3 -0 src/EditProfileDialog.h
M +37 -5 src/EditProfileDialog.ui
M +10 -0 src/Enumeration.h
http://commits.kde.org/konsole/18d52314432eba37334b68be18173b2f14fe0ba7
diff --git a/src/EditProfileDialog.cpp b/src/EditProfileDialog.cpp
index 74b0237..f30856d 100644
--- a/src/EditProfileDialog.cpp
+++ b/src/EditProfileDialog.cpp
@@ -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[] = { {
diff --git a/src/EditProfileDialog.h b/src/EditProfileDialog.h
index 33b3930..9f45200 100644
--- a/src/EditProfileDialog.h
+++ b/src/EditProfileDialog.h
@@ -142,6 +142,9 @@ private slots:
void hideScrollBar();
void showScrollBarLeft();
void showScrollBarRight();
+
+ void scrollFullPage();
+ void scrollHalfPage();
// keyboard page
void editKeyBinding();
diff --git a/src/EditProfileDialog.ui b/src/EditProfileDialog.ui
index 592370a..82298cf 100644
--- a/src/EditProfileDialog.ui
+++ b/src/EditProfileDialog.ui
@@ -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>
@@ -600,6 +600,38 @@
</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">
<enum>Qt::Vertical</enum>
diff --git a/src/Enumeration.h b/src/Enumeration.h
index 5190610..a9fab40 100644
--- a/src/Enumeration.h
+++ b/src/Enumeration.h
@@ -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.
*/
More information about the kde-doc-english
mailing list