summaryrefslogtreecommitdiffstats
path: root/ksysguard/gui/KSGAppletSettings.cc
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /ksysguard/gui/KSGAppletSettings.cc
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksysguard/gui/KSGAppletSettings.cc')
-rw-r--r--ksysguard/gui/KSGAppletSettings.cc106
1 files changed, 106 insertions, 0 deletions
diff --git a/ksysguard/gui/KSGAppletSettings.cc b/ksysguard/gui/KSGAppletSettings.cc
new file mode 100644
index 000000000..df4748cb8
--- /dev/null
+++ b/ksysguard/gui/KSGAppletSettings.cc
@@ -0,0 +1,106 @@
+/*
+ This file is part of KSysGuard.
+ Copyright ( C ) 2002 Nadeem Hasan ( [email protected] )
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or ( at your option ) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qspinbox.h>
+
+#include <kaccelmanager.h>
+#include <klocale.h>
+
+#include "KSGAppletSettings.h"
+
+KSGAppletSettings::KSGAppletSettings( QWidget *parent, const char *name )
+ : KDialogBase( parent, name, false, QString::null, Ok|Apply|Cancel,
+ Ok, true )
+{
+ setCaption( i18n( "System Guard Settings" ) );
+
+ QWidget *page = new QWidget( this );
+ setMainWidget( page );
+
+ QGridLayout *topLayout = new QGridLayout( page, 3, 2, KDialog::marginHint(),
+ KDialog::spacingHint() );
+
+ QLabel *label = new QLabel( i18n( "Number of displays:" ), page );
+ topLayout->addWidget( label, 0, 0 );
+
+ mNumDisplay = new QSpinBox( 1, 32, 1, page );
+ mNumDisplay->setValue(2);
+ topLayout->addWidget( mNumDisplay, 0, 1 );
+ label->setBuddy( mNumDisplay );
+
+ label = new QLabel( i18n( "Size ratio:" ), page );
+ topLayout->addWidget( label, 1, 0 );
+
+ mSizeRatio = new QSpinBox( 50, 500, 50, page );
+ mSizeRatio->setSuffix( i18n( "%" ) );
+ mSizeRatio->setValue(100);
+ topLayout->addWidget( mSizeRatio, 1, 1 );
+ label->setBuddy( mSizeRatio );
+
+ label = new QLabel( i18n( "Update interval:" ), page );
+ topLayout->addWidget( label, 2, 0 );
+
+ mInterval = new QSpinBox( 1, 300, 1, page );
+ mInterval->setValue(2);
+ mInterval->setSuffix( i18n( " sec" ) );
+ topLayout->addWidget( mInterval, 2, 1 );
+ label->setBuddy( mInterval );
+
+ resize( QSize( 250, 130 ).expandedTo( minimumSizeHint() ) );
+
+ KAcceleratorManager::manage( page );
+}
+
+KSGAppletSettings::~KSGAppletSettings()
+{
+}
+
+int KSGAppletSettings::numDisplay() const
+{
+ return mNumDisplay->value();
+}
+
+void KSGAppletSettings::setNumDisplay( int value )
+{
+ mNumDisplay->setValue( value );
+}
+
+int KSGAppletSettings::sizeRatio() const
+{
+ return mSizeRatio->value();
+}
+
+void KSGAppletSettings::setSizeRatio( int value )
+{
+ mSizeRatio->setValue( value );
+}
+
+int KSGAppletSettings::updateInterval() const
+{
+ return mInterval->value();
+}
+
+void KSGAppletSettings::setUpdateInterval( int value )
+{
+ mInterval->setValue( value );
+}
+