netparseprocess.h 491 B

12345678910111213141516171819202122232425262728
  1. #ifndef __NETPARSEPROCESS_H__
  2. #define __NETPARSEPROCESS_H__
  3. #include <QObject>
  4. #include <QProcess>
  5. #include <QTimer>
  6. class NetParseProcess : public QObject
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit NetParseProcess(QObject *parent = nullptr);
  11. ~NetParseProcess();
  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 // NETPARSEPROCESS_H