source: src-qt4/pc-sysmanager/longProc.h @ 8f95077

releng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1releng/10.1.1
Last change on this file since 8f95077 was 8f95077, checked in by Ken Moore <ken@…>, 14 months ago

Large update to the new GIT usage for the system manager. It should be almost finished, it still just needs the proper branch detection for source checkouts (and maybe ports checkouts, but I think we always want the master branch for ports by default).

  • Property mode set to 100644
File size: 1.1 KB
Line 
1#ifndef _LONG_PROGRESS_H
2#define _LONG_PROGRESS_H
3
4#include <QObject>
5#include <QProcess>
6#include <QFile>
7#include <QString>
8#include <QStringList>
9#include <QCoreApplication>
10#include <QDebug>
11#include <QTimer>
12
13class LongProc : public QObject{
14        Q_OBJECT
15public:
16       
17        LongProc();
18        ~LongProc();
19       
20        //Quick-start functions for specific tasks
21        bool startCMDs(QStringList cmds, QStringList dirs, QStringList info);
22        void stopProc();
23
24        //Information functions
25        bool isRunning(){ return running; } //so you can double check whether it is still running
26       
27        //Quick function to run a command and return success/failure
28        static bool quickCMD(QString dir, QString cmd, QStringList args = QStringList()); 
29
30private:
31        QProcess *process;
32        bool running, stopped;
33        QStringList cmdList, infoList, dirList;
34        int currentItem;
35        QTimer *timer;
36
37private slots:
38        void parseUpdate(); //New process message from internal worker
39        void procDone(); //internal worker finished
40        void procTimeout(); //internal timeout signal
41
42signals:
43        void ProcMessage(QString); //a new message while it is running
44        void ProcFinished();
45};
46#endif
Note: See TracBrowser for help on using the repository browser.