Re: Calculator

2018-07-24 Thread Nate Graham
Hi Markus,
Please file a bugzilla ticket at bugs.kde.org to request this new feature. The 
product is "kdeplasma-addons"

FWIW, a slightly easier way to accomplish what you want to do today is to use 
KRunner, which has a built-in calculator that accepts pasted text at least.

Nate


  On Thu, 12 Jul 2018 01:30:06 -0700 Markus Döbele 
 wrote  
 > Hy Plasma Team,
 > I use the calculator mini program and I would like to suggest an 
 > improvement.It would be nice if I could copy numbers from e.g. a website to 
 > the calculator input fieldthen make a calculation and afterwards copy the 
 > resulting number form the calculator to e.g. an editor.
 > Thanks,Markus 




Re: Calculator

2010-04-11 Thread Matteo Agostinelli
On Thursday 01 April 2010 20:11:41 Aaron J. Seigo wrote:
 On April 1, 2010, you wrote:
  Hi,
  
  I am currently working on improving the calculator runner, by adding an
  optional dependency on libqalculate. If the library is found, the
  calculator runner will be built against libqalculate and it will support
  advanced operations (such as currency conversion, unit conversion,
  equation solving, ...). Otherwise it will fall back to the existing code
  that uses QtScript. I have tested the runner for some weeks now and it is
  stable.
 
 great; can you post a patch to review-board for this so we can triage it in
 asap?
 
  I would like to hear some opinions about these points:
  - currently there are two calculator plasmoids, with and without
  libqalculate support (btw I am the author of the qalculate one). I think
  that we could use a similar approach here as with the runner, i.e. have a
  unified calculator plasmoid that optionally depends on libqalculate.
 
 agreed
 
  - a Qalculate backend for Cantor is currently in playground (not
  developed by me). It is already quite stable and I think It would be
  nice to have it included in SC 4.5.
  
  - one problem is that the runner, applet and Cantor backend have some
  duplicate code (e.g. evaluation options, support for QString, ...). As
  Aaron suggested some time ago, maybe it is worth it to add a wrapper
  library for libqalculate use in KDE (something like libkdeqalculate, feel
  free to suggest a nicer name ;). Where should this library be placed?
  Would
  kdebase/workspace/libs be an appropriate place?
 
 only if it is used by things in kdebase-workspace alone. otherwise, i'd
 recommend kdesupport and ship it as a separate library.
 
  Of course I volunteer to take care of these tasks before 4.5 freeze ;)
 
 terrific :)
So, the proposed patch has been sitting in reviewboard for a couple of weeks 
now (http://reviewboard.kde.org/r/3483/). Did someone test it? I would 
appreciate some feedback before going on with the other points I mentioned.

Thanks,
Matteo


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Calculator

2010-04-03 Thread Richard Moore
On Thu, Apr 1, 2010 at 1:15 PM, Matteo Agostinelli
mat...@agostinelli.me wrote:
 I am currently working on improving the calculator runner, by adding an
 optional dependency on libqalculate. If the library is found, the calculator
 runner will be built against libqalculate and it will support advanced
 operations (such as currency conversion, unit conversion, equation solving,
 ...). Otherwise it will fall back to the existing code that uses QtScript. I
 have tested the runner for some weeks now and it is stable.

Is the qalculate syntax backwards compatible with the existing
calculator runner syntax? If not then perhaps there should be two
separate calculator runners.

Cheers

Rich.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Calculator

2010-04-03 Thread Matteo Agostinelli
Yes, it is backwards compatible. The runner is executued when you put
a '=' at the beginning or at the end of the expression. The syntax for
common math operations is the same.

Cheers,
Matteo

On Sat, Apr 3, 2010 at 17:35, Richard Moore richmoor...@gmail.com wrote:
 On Thu, Apr 1, 2010 at 1:15 PM, Matteo Agostinelli
 mat...@agostinelli.me wrote:
 I am currently working on improving the calculator runner, by adding an
 optional dependency on libqalculate. If the library is found, the calculator
 runner will be built against libqalculate and it will support advanced
 operations (such as currency conversion, unit conversion, equation solving,
 ...). Otherwise it will fall back to the existing code that uses QtScript. I
 have tested the runner for some weeks now and it is stable.

 Is the qalculate syntax backwards compatible with the existing
 calculator runner syntax? If not then perhaps there should be two
 separate calculator runners.

 Cheers

 Rich.
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Calculator

2010-04-01 Thread Aaron J. Seigo
On April 1, 2010, you wrote:
 Hi,
 
 I am currently working on improving the calculator runner, by adding an
 optional dependency on libqalculate. If the library is found, the
 calculator runner will be built against libqalculate and it will support
 advanced operations (such as currency conversion, unit conversion,
 equation solving, ...). Otherwise it will fall back to the existing code
 that uses QtScript. I have tested the runner for some weeks now and it is
 stable.

great; can you post a patch to review-board for this so we can triage it in 
asap?

 I would like to hear some opinions about these points:
 - currently there are two calculator plasmoids, with and without
 libqalculate support (btw I am the author of the qalculate one). I think
 that we could use a similar approach here as with the runner, i.e. have a
 unified calculator plasmoid that optionally depends on libqalculate.

agreed

 - a Qalculate backend for Cantor is currently in playground (not developed
 by me). It is already quite stable and I think It would be nice to have it
 included in SC 4.5.
 
 - one problem is that the runner, applet and Cantor backend have some
 duplicate code (e.g. evaluation options, support for QString, ...). As
 Aaron suggested some time ago, maybe it is worth it to add a wrapper
 library for libqalculate use in KDE (something like libkdeqalculate, feel
 free to suggest a nicer name ;). Where should this library be placed?
 Would
 kdebase/workspace/libs be an appropriate place?

only if it is used by things in kdebase-workspace alone. otherwise, i'd 
recommend kdesupport and ship it as a separate library.

 Of course I volunteer to take care of these tasks before 4.5 freeze ;)

terrific :)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Calculator runner

2009-10-07 Thread Matteo Agostinelli
Yes, I am aware of the existence that runner, however I was not
entirely satisfied by its functionality.  First, instead of using
libqalculate it uses an external 'qalc' process and then reads the
result from standard output. Second, it is not easily configurable.
Then there were probably other reasons that I cannot remember :)
That's why I started writing my own runner in playground. Moreover,
the idea now is to have just a *single* calculator runner that
optionally uses libqalculate.

Matteo

On Tue, Oct 6, 2009 at 23:04, David Baron d_ba...@012.net.il wrote:
 On Tuesday 06 October 2009 22:36:52 Aaron J. Seigo wrote:
 On October 6, 2009, David Baron wrote:
  On Tuesday 06 October 2009 19:09:02 Matteo Agostinelli wrote:
   Hello,
  
   as suggested by Aaron in a previous discussion, I am having a look at
   the calculator runner with the purpose of extending the capabilities of
   the runner by using libqalculate when it is available...
 
  There already is such an animal.

 where?

 (i love it when people say such things but don't actually say where so we
  can all go on a merry hunt ;)

 i see the one in playground/base/plasma/runners/qalculate, but it's
  Matteo's runner. so i assume he's aware of it ;)

 is there another one somewhere?


 Sorry 'bout that. This is another thing that is not eye-candly on kde-look
 http://www.kde-look.org/content/show.php/Qalculator+Runner?content=106649

 Listed as a plasmoid binary but it is a runner. This apparanlty runs qalc
 (from libqalculate project). Mayb this is the source to teach me how to run
 recoll from a runner.
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Calculator runner

2009-10-06 Thread Aaron J. Seigo
On October 6, 2009, Aleix Pol wrote:
 You can use KAlgebra code which is inside kdeedu.

instead of libqalculate? besides creating an odd dependency, what would the 
benefits be?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Calculator runner

2009-10-06 Thread Matteo Agostinelli
In data martedì 6 ottobre 2009 20:57:00, Aleix Pol ha scritto:
:  Well, depends a lot on how odd it is, you could install it within kdeedu
  the same way we do with the kalgebra plasmoid. There's no odd dependency
  crossing here.
 
 Benefits, you would be using some maintained code inside KDE. Technically
 kalgebra still lacks some features though, but I'm working on it.
 
 Aleix
 
 On Tue, Oct 6, 2009 at 8:47 PM, Aaron J. Seigo ase...@kde.org wrote:
  On October 6, 2009, Aleix Pol wrote:
   You can use KAlgebra code which is inside kdeedu.
 
  instead of libqalculate? besides creating an odd dependency, what would
  the benefits be?
 
  --
  Aaron J. Seigo
  humru othro a kohnu se
  GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
 
  KDE core developer sponsored by Qt Development Frameworks
 
  ___
  Plasma-devel mailing list
  Plasma-devel@kde.org
  https://mail.kde.org/mailman/listinfo/plasma-devel
 
Well, ATM I would prefer to stick to libqalculate, since I already have some 
experience with it. I will have a look at the KAlgebra code anyway. Thanks for 
the suggestion.

Matteo
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Calculator runner

2009-10-06 Thread David Baron
On Tuesday 06 October 2009 19:09:02 Matteo Agostinelli wrote:
 Hello,
 
 as suggested by Aaron in a previous discussion, I am having a look at the
 calculator runner with the purpose of extending the capabilities of the
  runner by using libqalculate when it is available...

There already is such an animal.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Calculator runner

2009-10-06 Thread Aaron J. Seigo
On October 6, 2009, Aleix Pol wrote:
 Well, depends a lot on how odd it is, you could install it within kdeedu
  the same way we do with the kalgebra plasmoid. There's no odd dependency
  crossing here.

the problem would be that we would then have two calculation plugins: one in 
kdebase (because a calculator isn't really optional in krunner) and one in 
kdeedu. we'd either need to ship both together (which means kdebase) or we 
need to provide a way for one plugin to automatically deactivate another.

that would probably mean implementing a category system for specific types of 
functionality for which only one plugin should be active for (e.g. 
Calculator) and a ranking system as we have with KTrader (so the kalgebra 
runner could install at a higher rank than the default qscript one).

before we go through all that trouble: is is there a way we can use KAlgebra 
from multiple threads without problems? it's perfectly fine to instantiate 
some state object(s) in each call to AbstractRunner::match, but they need to 
either not have any shared data with other classes (which may contain code 
executed in a different thread) or be thread safe.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Calculator runner

2009-10-06 Thread Aaron J. Seigo
On October 6, 2009, David Baron wrote:
 On Tuesday 06 October 2009 19:09:02 Matteo Agostinelli wrote:
  Hello,
 
  as suggested by Aaron in a previous discussion, I am having a look at the
  calculator runner with the purpose of extending the capabilities of the
   runner by using libqalculate when it is available...
 
 There already is such an animal.

where?

(i love it when people say such things but don't actually say where so we can 
all go on a merry hunt ;)

i see the one in playground/base/plasma/runners/qalculate, but it's Matteo's 
runner. so i assume he's aware of it ;)

is there another one somewhere?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Calculator runner

2009-10-06 Thread David Baron
On Tuesday 06 October 2009 22:36:52 Aaron J. Seigo wrote:
 On October 6, 2009, David Baron wrote:
  On Tuesday 06 October 2009 19:09:02 Matteo Agostinelli wrote:
   Hello,
  
   as suggested by Aaron in a previous discussion, I am having a look at
   the calculator runner with the purpose of extending the capabilities of
   the runner by using libqalculate when it is available...
 
  There already is such an animal.
 
 where?
 
 (i love it when people say such things but don't actually say where so we
  can all go on a merry hunt ;)
 
 i see the one in playground/base/plasma/runners/qalculate, but it's
  Matteo's runner. so i assume he's aware of it ;)
 
 is there another one somewhere?
 

Sorry 'bout that. This is another thing that is not eye-candly on kde-look
http://www.kde-look.org/content/show.php/Qalculator+Runner?content=106649

Listed as a plasmoid binary but it is a runner. This apparanlty runs qalc 
(from libqalculate project). Mayb this is the source to teach me how to run 
recoll from a runner.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Calculator runner

2009-10-06 Thread Aleix Pol
On Tue, Oct 6, 2009 at 10:27 PM, Aaron J. Seigo ase...@kde.org wrote:

 On October 6, 2009, Aleix Pol wrote:
  Well, depends a lot on how odd it is, you could install it within kdeedu
   the same way we do with the kalgebra plasmoid. There's no odd dependency
   crossing here.

 the problem would be that we would then have two calculation plugins: one
 in
 kdebase (because a calculator isn't really optional in krunner) and one in
 kdeedu. we'd either need to ship both together (which means kdebase) or we
 need to provide a way for one plugin to automatically deactivate another.

 that would probably mean implementing a category system for specific types
 of
 functionality for which only one plugin should be active for (e.g.
 Calculator) and a ranking system as we have with KTrader (so the kalgebra
 runner could install at a higher rank than the default qscript one).

 before we go through all that trouble: is is there a way we can use
 KAlgebra
 from multiple threads without problems? it's perfectly fine to instantiate
 some state object(s) in each call to AbstractRunner::match, but they need
 to
 either not have any shared data with other classes (which may contain code
 executed in a different thread) or be thread safe.

 --
 Aaron J. Seigo
 humru othro a kohnu se
 GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

 KDE core developer sponsored by Qt Development Frameworks

 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel


As for thread safety, there should be not much of a problem, most of the
code is not very interdepent. I'm actually already calculating 3D graphs and
it simply works (there's an ugly hack to be able to use the same variable
set, but that will be solved in an upcoming patch).

Well anyway I planned to write the runner at some point, I just have a too
large todo list right now (as everyone else i guess). Maybe I'll come up
with it at some point before 4.5.

Aleix
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel