You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
2.8 KiB
97 lines
2.8 KiB
4 years ago
|
#ifndef MAINVIEWMODEL_H
|
||
|
#define MAINVIEWMODEL_H
|
||
|
|
||
|
#include <QtMvvmCore/ViewModel>
|
||
|
#include <QTimer>
|
||
|
#include <QPixmap>
|
||
|
|
||
|
#include "utils/ColorImageProvider.h"
|
||
|
#include "model/ultrasoundModule/UsEventSender.h"
|
||
|
#include "model/ultrasoundModule/UsEventReceiver.h"
|
||
|
#include "viewModel/utils/AutoProperty.h"
|
||
|
|
||
|
#include "viewModel/probe/ProbeViewModel.h"
|
||
|
|
||
|
#include "viewModel/bMode/display/BModeDisplayViewModel.h"
|
||
|
#include "viewModel/bMode/setting/BModeSettingViewModel.h"
|
||
|
|
||
|
#include "viewModel/mMode/display/MModeDisplayViewModel.h"
|
||
|
#include "viewModel/mMode/setting/MModeSettingViewModel.h"
|
||
|
|
||
|
#include "viewModel/cine/display/CineDisplayViewModel.h"
|
||
|
#include "viewModel/cine/setting/CineSettingViewModel.h"
|
||
|
|
||
|
#include "viewModel/tgc/TgcViewModel.h"
|
||
|
#include "viewModel/simulation/SimulationViewModel.h"
|
||
|
|
||
|
#include "viewModel/trackball/TrackballViewModel.h"
|
||
|
|
||
|
#include "viewModel/image/ImageViewModel.h"
|
||
|
|
||
|
#include "viewModel/user/UserViewModel.h"
|
||
|
|
||
|
class MainViewModel : public QtMvvm::ViewModel
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
US_EVENT_SENDER(private)
|
||
|
US_EVENT_RECEIVER(private)
|
||
|
|
||
|
private:
|
||
|
static MainViewModel* _instance;
|
||
|
|
||
|
void init();
|
||
|
void start();
|
||
|
/**************************************************************************/
|
||
|
|
||
|
//ViewModel
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(ProbeViewModel*, probeViewModel,
|
||
|
ProbeViewModel::getInstance())
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(BModeDisplayViewModel*, bModeDisplayViewModel,
|
||
|
BModeDisplayViewModel::getInstance())
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(BModeSettingViewModel*, bModeSettingViewModel,
|
||
|
BModeSettingViewModel::getInstance())
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(CineDisplayViewModel*, cineDisplayViewModel,
|
||
|
CineDisplayViewModel::getInstance())
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(CineSettingViewModel*, cineSettingViewModel,
|
||
|
CineSettingViewModel::getInstance())
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(TgcViewModel*, tgcViewModel,
|
||
|
TgcViewModel::getInstance())
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(SimulationViewModel*, simulationViewModel,
|
||
|
SimulationViewModel::getInstance())
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(TrackballViewModel*, trackballViewModel,
|
||
|
TrackballViewModel::getInstance())
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(ImageViewModel*, imageViewModel,
|
||
|
ImageViewModel::getInstance())
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(MModeDisplayViewModel*, mModeDisplayViewModel,
|
||
|
MModeDisplayViewModel::getInstance())
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(MModeSettingViewModel*, mModeSettingViewModel,
|
||
|
MModeSettingViewModel::getInstance())
|
||
|
|
||
|
US_PROPERTY_VIEW_ONLY(UserViewModel*, userViewModel,
|
||
|
UserViewModel::getInstance())
|
||
|
|
||
|
public:
|
||
|
Q_INVOKABLE explicit MainViewModel(QObject* parent = nullptr);
|
||
|
|
||
|
Q_INVOKABLE void close();
|
||
|
|
||
|
static MainViewModel* getInstance();
|
||
|
//uncrustify off
|
||
|
private slots:
|
||
|
//uncrustify on
|
||
|
void newCommandRequest(const CommandRequest& request);
|
||
|
};
|
||
|
|
||
|
#endif //MAINVIEWMODEL_H
|