implement running LAMMPS asynchonously in a separate thread

This commit is contained in:
Axel Kohlmeyer
2023-07-27 02:56:07 -04:00
parent a62d1be3e6
commit da0669d988
8 changed files with 279 additions and 77 deletions

View File

@ -16,7 +16,6 @@
#include <QMainWindow>
#include <QString>
#include <QLabel>
// forward declarations
@ -26,6 +25,11 @@ class LammpsGui;
}
QT_END_NAMESPACE
class QLabel;
class QPlainTextEdit;
class QProgressBar;
class QTimer;
class Highlighter;
class StdCapture;
@ -40,6 +44,7 @@ protected:
void open_file(const QString &filename);
void write_file(const QString &filename);
void start_lammps();
void run_done();
private slots:
void new_document();
@ -55,17 +60,22 @@ private slots:
void clear();
void run_buffer();
void about();
void logupdate();
private:
Ui::LammpsGui *ui;
Highlighter *highlighter;
StdCapture *capturer;
QLabel *status;
QPlainTextEdit *logwindow;
QTimer *logupdater;
QProgressBar *progress;
QString current_file;
QString current_dir;
void *lammps_handle;
void *plugin_handle;
bool is_running;
};
#endif // LAMMPSGUI_H