[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeutils/kcalc
From: Scott Wheeler <wheeler () kde ! org>
Date: 2003-10-29 1:32:06
[Download RAW message or body]
CVS commit by wheeler:
Save and restore the list of button groups that are visible (i.e. don't
throw away what the user selects.) Also default to hiding the button groups
-- simpler is better for most users.
M +20 -2 kcalc.cpp 1.120
M +1 -5 kcalc.h 1.68
M +16 -0 kcalc.kcfg 1.3
M +1 -0 kcalc_settings.kcfgc 1.3
--- kdeutils/kcalc/kcalc.cpp #1.119:1.120
@@ -1,5 +1,3 @@
/*
- $Id$
-
kCalculator, a simple scientific calculator for KDE
@@ -460,8 +458,23 @@ KCalculator::KCalculator(QWidget *parent
UpdateDisplay(true);
+
+ // Read and set button groups
+
+ actionStatshow->setChecked(KCalcSettings::showStat());
+ slotStatshow(KCalcSettings::showStat());
+
+ actionExpLogshow->setChecked(KCalcSettings::showExpLog());
+ slotExpLogshow(KCalcSettings::showExpLog());
+
+ actionTrigshow->setChecked(KCalcSettings::showTrig());
+ slotTrigshow(KCalcSettings::showTrig());
+
+ actionLogicshow->setChecked(KCalcSettings::showLogic());
+ slotLogicshow(KCalcSettings::showLogic());
}
KCalculator::~KCalculator()
{
+ KCalcSettings::writeConfig();
delete calc_display;
}
@@ -1505,4 +1519,5 @@ void KCalculator::slotStatshow(bool togg
adjustSize();
setFixedSize(sizeHint());
+ KCalcSettings::setShowStat(toggled);
}
@@ -1531,4 +1546,5 @@ void KCalculator::slotTrigshow(bool togg
adjustSize();
setFixedSize(sizeHint());
+ KCalcSettings::setShowTrig(toggled);
}
@@ -1547,4 +1563,5 @@ void KCalculator::slotExpLogshow(bool to
adjustSize();
setFixedSize(sizeHint());
+ KCalcSettings::setShowExpLog(toggled);
}
@@ -1583,4 +1600,5 @@ void KCalculator::slotLogicshow(bool tog
adjustSize();
setFixedSize(sizeHint());
+ KCalcSettings::setShowLogic(toggled);
}
--- kdeutils/kcalc/kcalc.h #1.67:1.68
@@ -1,5 +1,3 @@
/*
- $id: kcalc.h,v 1.47 2003/03/19 01:35:11 bmeyer Exp $
-
KCalc, a scientific calculator for the X window system using the
Qt widget libraries, available at no cost at http://www.troll.no
@@ -52,7 +50,5 @@ class DispLogic;
*/
-#ifdef HAVE_CONFIG_H
- #include "../config.h"
-#endif
+#include "config.h"
// IMPORTANT this has to come after ../config.h
--- kdeutils/kcalc/kcalc.kcfg #1.2:1.3
@@ -77,4 +77,20 @@
<default>false</default>
</entry>
+ <entry name="ShowStat" type="Bool">
+ <label>Whether to show statistical buttons.</label>
+ <default>false</default>
+ </entry>
+ <entry name="ShowExpLog" type="Bool">
+ <label>Whether to show Exp/Log buttons.</label>
+ <default>false</default>
+ </entry>
+ <entry name="ShowTrig" type="Bool">
+ <label>Whether to show trigonometric buttons.</label>
+ <default>false</default>
+ </entry>
+ <entry name="ShowLogic" type="Bool">
+ <label>Whether to show logic buttons.</label>
+ <default>false</default>
+ </entry>
</group>
</kcfg>
--- kdeutils/kcalc/kcalc_settings.kcfgc #1.2:1.3
@@ -3,4 +3,5 @@
ClassName=KCalcSettings
Singleton=true
+Mutators=ShowStat,ShowExpLog,ShowTrig,ShowLogic
# Inherits=KConfigSkeleton
# IncludeFiles=libkdepim/kpimprefs.h
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic