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 #include <KGenericFactory>
00023
00024 #include <plasma/abstractrunner.h>
00025
00026 class QWidget;
00027
00031 class CalculatorRunner : public Plasma::AbstractRunner
00032 {
00033 Q_OBJECT
00034
00035 public:
00036 CalculatorRunner(QObject* parent, const QVariantList &args);
00037 ~CalculatorRunner();
00038
00039 void match(Plasma::RunnerContext &context);
00040
00041 private:
00042 QString calculate(const QString& term);
00043 void userFriendlySubstitutions(QString& cmd);
00044 void powSubstitutions(QString& cmd);
00045 void hexSubstitutions(QString& cmd);
00046 };
00047
00048 K_EXPORT_PLASMA_RUNNER(calculatorrunner, CalculatorRunner)
00049
00050 #endif