One-Line Calculator
Plasma 4 Extensions
Description:

One-Line Calculator for KDE4 is my first plasma applet.

It's calculator, consisting of one lineedit widget: you enter expression, press enter and it calculates it.

Calculating implemented through QScriptEngine using ECMAScript.

You may find source code at github: http://github.com/alno/plasma-widget-onelinecalc/tree/master

PPA for Karmic available: https://launchpad.net/~alexey-noskov/+archive/kde

Changelog:

7 years ago

0.3
* Fixed KDE 4.2 installation

0.2
* Configuration dialog added with ability to define an initialization script.

It's used to define following functions:
abs, acos, asin, atan, atan2, ceil, cos, exp, floor, log, max, min, pow, random, round, sin, sqrt, tan

But using configuration dialog, you may define your own set of functions, using ECMAScript.

For example, see definition of cool function in configuration dialog.

7 years ago

ShadowKyogre

On KDE 4.3, the inputbox appears to be extremely squished.

Report

7 years ago

alno

Fixed, see 0.3 version.

Report

7 years ago

lukeluke

Hello, i have Opensuse 11.0 con KDE 4.2, when i do:

cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`


This is the output:

-- Found Qt-Version 4.5.1 (using /usr/bin/qmake)
-- Found X11: /usr/lib/libX11.so
-- Phonon Version: 4.3.0
-- Found KDE 4.2 include dir: /usr/include
-- Found KDE 4.2 library dir: /usr/lib
-- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
CMake Error at /usr/share/kde4/apps/cmake/modules/FindPlasma.cmake:13 (message):
FindPlasma.cmake is deprecated. Now with KDE 4.2 Plasma is part of kdelibs
and automatically found using find_package(KDE4) instead.

Replace the variables previously coming from FindPlasma.cmake as follows:

PLASMA_OPENGL_FOUND -> KDE4_PLASMA_OPENGL_FOUND

PLASMA_LIBS -> KDE4_PLASMA_LIBS

PLASMA_INCLUDE_DIR -> KDE4_INCLUDE_DIR or KDE4_INCLUDES, should be already
set anyway

PLASMA_FOUND -> nothing, it's always there if KDE4, version 4.2 or newer
has been found.

If you see this error message in a module within KDE/, update it from svn,
it has been fixed already.

Call Stack (most recent call first):
CMakeLists.txt:7 (find_package)


WATH CAN I DO ??? I LOVE THIS APPLET!!!

THANKS A LOT

Report

7 years ago

alno

Fixed in 0.3

Report

8 years ago

devel0per

Thank you, tool is very usefull.

Ebuild for Gentoo users is here - http://sonylaptoptools.sourceforge.net/ebuilds/onelinecalc-0.1.ebuild

alno, whats about some a bit difficult fuctions, such as - sqrt, pow, etc..

Report

8 years ago

alno

Good idea! I try implement it very soon.

Report

8 years ago

alno

I made it, you may try new version.
And even more: now you can define your own functions in configuration dialog =)

Report

8 years ago

devel0per

thank you mate!

new ebuild is here - http://sonylaptoptools.sourceforge.net/ebuilds/onelinecalc-0.2.ebuild

I'm fall in love because "random" function is build-in ! :))

Report

8 years ago

devel0per

Ebuild with kde-4.2 build patch is pushed into gentoo overlay - kde-testing.

http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commitdiff;h=443a9e8a4ac9e6b917b6799840699da131abe711

Report

8 years ago

destroyer661

I don't want to be negative about your app, because it may well be useful for some. I just want to know what separates (or makes it better/different) it from the qalculate plasmoid?

Report

8 years ago

alno

Ok, good question.

Some time before i tried to use a qualculate plasmoid. But i have some troubles:
1) I cann't select and copy result from Qalculate, because it draws result at background.
2) Big numbers are rendered in scientific notation, which isn't acceptable in some cases. For example, when i want to insert calculated number in code, or configuration file.
3) Big numbers are calculated not so preciously as i need. For example: try 12345678*12345 in Qalculate and my plasmoid.

These problems i tried to solve with my plasmoid.

And there is one another difference between Qualculate and One-Line Calculator:
4) One-Line Calculator is much simpler and doesn't depend on any third-party libraries.

Report

8 years ago

destroyer661

Thanks for replying! Those are very good reasons for switching, I'll be using yours from now on.

Report

7 years ago

matteo81

Actually the Qalculate plasmoid yields exactly the same result if you switch to 'combined' or 'fractional' number format in the settings

Report

Supporters

Recent Donations

Be the first to donate
Filename Version Description Filetype Packagetype License Downloads Date Filesize Install
Score 75%
75.00 Likes
25 Dislikes

0 Supporters for One-Line Calculator:

Recent Donations:

Be the first to donate
show all
Details
version
0.3
updated Dec 28 2009
added Sep 17 2008
downloads
page views 335
support alno
For The Product
One-Line Calculator
5 - 10 - 25 - 50 - 100 - 200 - 500