mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-21 06:13:41 +00:00
Move project, add simple test
This commit is contained in:
parent
a58b705f08
commit
8d66770acf
751 changed files with 249345 additions and 0 deletions
58
Software/PC_Application/LibreVNA-GUI/modehandler.h
Normal file
58
Software/PC_Application/LibreVNA-GUI/modehandler.h
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
#ifndef MODEHANDLER_H
|
||||
#define MODEHANDLER_H
|
||||
|
||||
#include "mode.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <vector>
|
||||
#include <QObject>
|
||||
|
||||
class ModeHandler: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ModeHandler(AppWindow *window);
|
||||
~ModeHandler() = default;
|
||||
|
||||
void shutdown();
|
||||
int createMode(QString name, Mode::Type t);
|
||||
void closeMode(int index);
|
||||
void currentModeMoved(int from, int to);
|
||||
void closeModes();
|
||||
int getCurrentIndex();
|
||||
|
||||
Mode* getActiveMode();
|
||||
|
||||
void activate(Mode * mode);
|
||||
void deactivate(Mode* mode);
|
||||
|
||||
Mode* getMode(int index);
|
||||
std::vector<Mode*> getModes();
|
||||
|
||||
bool nameAllowed(const QString &name);
|
||||
int findIndex(Mode *targetMode);
|
||||
Mode* findFirstOfType(Mode::Type t);
|
||||
|
||||
signals:
|
||||
void StatusBarMessageChanged(const QString &msg);
|
||||
|
||||
void ModeCreated(int modeIndex);
|
||||
void ModeClosed(int modeIndex);
|
||||
void CurrentModeChanged(int modeIndex);
|
||||
|
||||
public slots:
|
||||
void setCurrentIndex(int modeIndex);
|
||||
|
||||
private:
|
||||
std::vector<Mode*> modes;
|
||||
int currentModeIndex;
|
||||
int createMode(Mode *mode);
|
||||
Mode *createNew(AppWindow *window, QString name, Mode::Type t);
|
||||
AppWindow *aw;
|
||||
Mode *activeMode = nullptr;
|
||||
|
||||
private slots:
|
||||
void setStatusBarMessageChanged(const QString &msg);
|
||||
};
|
||||
|
||||
#endif // MODEHANDLER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue