Plasma
calculatorrunner.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CALCULATORRUNNER_H
00020 #define CALCULATORRUNNER_H
00021
00022
00023 #include <Plasma/AbstractRunner>
00024
00025
00029 class CalculatorRunner : public Plasma::AbstractRunner
00030 {
00031 Q_OBJECT
00032
00033 public:
00034 CalculatorRunner(QObject* parent, const QVariantList &args);
00035 ~CalculatorRunner();
00036
00037 void match(Plasma::RunnerContext &context);
00038
00039 private:
00040 QString calculate(const QString& term);
00041 void userFriendlySubstitutions(QString& cmd);
00042 void powSubstitutions(QString& cmd);
00043 void hexSubstitutions(QString& cmd);
00044 };
00045
00046 K_EXPORT_PLASMA_RUNNER(calculatorrunner, CalculatorRunner)
00047
00048 #endif