kcalc suggestions
Raphael Kubo da Costa
kubito at gmail.com
Wed Apr 21 05:06:10 CEST 2010
You need not send the patch gzipped -- next time, please just attach it to
your message.
On Monday 19 April 2010 14:34:58 Eike Krumbacher wrote:
> Hi!
>
> Eike Krumbacher schrieb:
> > IMHO, kcalc should have exact modes:
> The attached patch introduces "modes". Actually, modes are just sets of
> mutually exclusive button-sets.
>
> There is some fine-tuning missing in that way, that "easy mode" and
> "base mode" contain too many buttons as this patch uses the old button
> sets. The modes are saved using KConfig as the button sets did before.
> The modes are accessible through the settings menu.
>
> Please note, that you need to update "kcalc.kcfg", which can be done by
> just using "cmakekde" in the source dir.
Index: kcalc.kcfg
===================================================================
--- kcalc.kcfg (Revision 1116343)
+++ kcalc.kcfg (Arbeitskopie)
Coding style nitpick: the XML file uses 2 spaces for indentation, and you're
using 4 in your lines.
+ <choice name="base">
+ <label>Base Calculator Mode</label>
+ <whatsthis>Easy Mode with logic buttons and selectable base.
Optional bit edit avalable.</whatsthis>
+ </choice>
Base isn't easy to understand when you first look at it. Isn't it better to
use Logic Mode or something like that?
Index: kcalc.cpp
===================================================================
--- kcalc.cpp (Revision 1116343)
+++ kcalc.cpp (Arbeitskopie)
@@ -34,6 +34,7 @@
#include <QKeyEvent>
#include <QShortcut>
#include <QStyle>
+class QActionGroup;
#include <kaboutdata.h>
#include <kacceleratormanager.h>
Please put the forward declarations after the #include's.
+ const QString calcmode = KCalcSettings::calcMode();
I'd rather have an enum here instead of a QString.
+ if ( calcmode == "science" ) {
+ actionConstantsShow->setChecked( KCalcSettings::showConstants() );
Don't you need to check the Scientific Mode action here?
+ } else if ( calcmode == "statistics" ) {
+ actionModeStatistic->setChecked( true );
+ } else if ( calcmode == "base" ) {
+ actionModeBase->setChecked( true );
+ } else {
+ actionModeEasy->setChecked( true );
+ }
+ showSciencebuttons( false );
+ showStatbuttons( false );
+ showLogicbuttons( false );
buttons -> Buttons?
Index: kcalcui.rc
===================================================================
--- kcalcui.rc (Revision 1116343)
+++ kcalcui.rc (Arbeitskopie)
@@ -2,15 +2,14 @@
<kpartgui name="kcalc" version="19">
I think you should update the version here since you've changed the XML file.
More information about the Kde-utils-devel
mailing list