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.

95 lines
2.0 KiB

#include "viewModel/MainViewModel.h"
#include <QtMvvmCore/SettingsViewModel>
#include "model/Console.h"
#include "UdpDataSender.h"
#define CONNECT_LED(NAME) \
connect(panel, SIGNAL(NAME ## LedChanged(char)), this, SLOT(NAME ## LedHandle(char)));
MainViewModel::MainViewModel(QObject* parent) :
ViewModel(parent)
{
panel = new Console;
//Top Left
CONNECT_LED(patient)
CONNECT_LED(utils)
CONNECT_LED(dvd)
CONNECT_LED(report)
CONNECT_LED(probe)
CONNECT_LED(archive)
CONNECT_LED(end)
//TopRight
CONNECT_LED(xtd)
CONNECT_LED(bf)
CONNECT_LED(p5)
CONNECT_LED(p6)
//BottomRight
CONNECT_LED(dual)
CONNECT_LED(quad)
CONNECT_LED(single)
CONNECT_LED(p1)
CONNECT_LED(p2)
CONNECT_LED(p3)
CONNECT_LED(p4)
//CurveButtons
CONNECT_LED(exit)
CONNECT_LED(freeze)
CONNECT_LED(pointer)
CONNECT_LED(autoSet)
CONNECT_LED(abc)
CONNECT_LED(fourD)
CONNECT_LED(clear)
CONNECT_LED(threeD)
CONNECT_LED(measure)
CONNECT_LED(bodyMark)
//TrackballGroup
CONNECT_LED(trackballLeft)
CONNECT_LED(trackballRight)
CONNECT_LED(trackballTop)
CONNECT_LED(trackballBottom)
CONNECT_LED(trackballTopLeft)
CONNECT_LED(trackballTopRight)
CONNECT_LED(trackballBottomLeft)
CONNECT_LED(trackballBottomRight)
//Encoders
CONNECT_LED(modeM)
CONNECT_LED(modePd)
CONNECT_LED(modeC)
CONNECT_LED(modeB)
CONNECT_LED(modePwCenter)
CONNECT_LED(modeMCenter)
CONNECT_LED(modePdCenter)
CONNECT_LED(modeCCenter)
CONNECT_LED(modeBCenter)
//JoystickCouple
CONNECT_LED(focus)
CONNECT_LED(depthCenter)
CONNECT_LED(focusCenter)
CONNECT_LED(depthBottom)
CONNECT_LED(focusBottom)
//Turn some LEDs on
panel->depthCenterLedChanged(0);
panel->depthBottomLedChanged(1);
panel->focusLedChanged(1);
panel->focusCenterLedChanged(2);
panel->focusBottomLedChanged(3);
panel->modePwCenterLedChanged(1);
panel->modePdCenterLedChanged(1);
panel->modeCCenterLedChanged(1);
panel->modeMCenterLedChanged(1);
panel->modeBCenterLedChanged(2);
}