calprocess.h 461 B

12345678910111213141516171819202122232425262728
  1. #ifndef __CALPROCESS_H__
  2. #define __CALPROCESS_H__
  3. #include <QObject>
  4. #include <QProcess>
  5. #include <QTimer>
  6. class CalProcess : public QObject
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit CalProcess(QObject *parent = nullptr);
  11. ~CalProcess();
  12. void start(const QString &configure);
  13. void stop();
  14. void restart(const QString &configure = QString(""));
  15. bool isRunning();
  16. private:
  17. QProcess m_process;
  18. QTimer m_timer;
  19. };
  20. #endif // CALPROCESS_H