-
Notifications
You must be signed in to change notification settings - Fork 7
/
mainwindow.h
executable file
·62 lines (51 loc) · 1.56 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QList>
#include <QPair>
#include <QVector3D>
#include <QFuture>
#include "interpreter/gcodecommand.h"
#include "memory/memorymonitorobject.h"
#include "openhistorymanager.h"
namespace Ui {
class MainWindow;
}
class QProgressBar;
class QLabel;
class QListWidgetItem;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
protected:
void initStatusBar();
void initOpenHistoryMenu();
signals:
void addPointToTraceView(const QVector3D &pt, int traceIdx);
private slots:
void on_actionOpen_triggered();
void on_actionSaveMotionCommands_triggered();
void onMemoryMonitorUpdated(size_t curUsage, size_t maxUsage);
void onOpenHistoryActionGroupTriggered(QAction *action);
void on_actionOpenHistoryClear_triggered();
private:
void updateGCodeView(const QString &gcodes);
void updateTraceView(const QList<GCodeCommand> &list);
bool openGCodeFile(const QString &path);
void updateOpenHistoryActions(const QString &newOpenPath);
void saveAppSettings();
void loadAppSettings();
private:
Ui::MainWindow *ui;
QList<GCodeCommand> m_lastUsedCommandList;
MemoryMonitorObject m_memPollingObject;
QFuture<void> m_memoryMonitorFuture;
QProgressBar *m_memoryUsageProgressBar;
QLabel *m_memoryUsageLabel;
QList<QPair<int, int> > m_segmentList;
OpenHistoryManager *m_openHistoryManager;
};
#endif // MAINWINDOW_H