mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-21 06:13:41 +00:00
Refactoring: splitting mode logic into different classes
This commit is contained in:
parent
e266d37b96
commit
b7033a029e
32 changed files with 1200 additions and 1563 deletions
75
Software/PC_Application/appwindow.h
Normal file
75
Software/PC_Application/appwindow.h
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
#ifndef APPWINDOW_H
|
||||
#define APPWINDOW_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QMainWindow>
|
||||
#include <QGridLayout>
|
||||
#include <QComboBox>
|
||||
#include <QStackedWidget>
|
||||
#include "Device/device.h"
|
||||
#include "Traces/traceplot.h"
|
||||
#include "Calibration/calibration.h"
|
||||
#include <QProgressDialog>
|
||||
#include "Traces/tracemodel.h"
|
||||
#include "Traces/tracemarkermodel.h"
|
||||
#include "averaging.h"
|
||||
#include "Device/devicelog.h"
|
||||
#include "preferences.h"
|
||||
#include <QButtonGroup>
|
||||
#include <QCheckBox>
|
||||
#include <QLabel>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class AppWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AppWindow(QWidget *parent = nullptr);
|
||||
|
||||
|
||||
Ui::MainWindow *getUi() const;
|
||||
QStackedWidget *getCentral() const;
|
||||
Device *getDevice() const;
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
private slots:
|
||||
void ConnectToDevice(QString serial = QString());
|
||||
void DisconnectDevice();
|
||||
int UpdateDeviceList();
|
||||
void StartManualControl();
|
||||
void UpdateReference();
|
||||
|
||||
private:
|
||||
void DeviceConnectionLost();
|
||||
void CreateToolbars();
|
||||
|
||||
QStackedWidget *central;
|
||||
|
||||
struct {
|
||||
struct {
|
||||
QComboBox *type;
|
||||
QCheckBox *automatic;
|
||||
QCheckBox *outputEnabled;
|
||||
QComboBox *outFreq;
|
||||
} reference;
|
||||
} toolbars;
|
||||
|
||||
Preferences pref;
|
||||
|
||||
Device *device;
|
||||
DeviceLog deviceLog;
|
||||
QString deviceSerial;
|
||||
QActionGroup *deviceActionGroup;
|
||||
|
||||
// Status bar widgets
|
||||
QLabel lConnectionStatus;
|
||||
QLabel lDeviceInfo;
|
||||
|
||||
Ui::MainWindow *ui;
|
||||
};
|
||||
|
||||
#endif // VNA_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue