Rev 200 |
Rev 217 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#ifndef MANAGEMENT_H
#define MANAGEMENT_H
#include <QObject>
class Tree;
class QScriptEngine;
class Management : public QObject
{
Q_OBJECT
public:
Management();
~Management();
void run();
void loadScript(const QString &fileName);
QString scriptFile() const { return mScriptFile; }
QString executeScript(QString cmd="");
static QObject *scriptOutput;
public slots:
void remain(int number);
void kill(int number);
int kill(int pctfrom, int pctto, int number);
double percentile(int pct);
int load() { return load(QString()); } ///< load all trees
int load(QString filter); ///< load all trees passing the filter in a list
void sort(QString statement); ///< sort trees in the list according to a criterion
private:
QString mScriptFile;
QList<QPair<Tree*, double> > mTrees;
QScriptEngine *mEngine;
int mRemoved;
};
#endif // MANAGEMENT_H