1er real; slider x ept ok no evts no map
This commit is contained in:
parent
cd2d0b5da8
commit
3ea2e739ae
10 changed files with 317 additions and 51 deletions
27
src/cont/contclasses.cpp
Normal file
27
src/cont/contclasses.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include "contclasses.h"
|
||||
|
||||
Overseer OverseerHandler::os;
|
||||
|
||||
EndpointHandler::EndpointHandler(Endpoint *ept, QObject *parent) : QObject(parent) {
|
||||
this->ept = ept;
|
||||
}
|
||||
|
||||
void EndpointHandler::setValue(int value){
|
||||
ept->setVolume((float)value / 100);
|
||||
}
|
||||
|
||||
Overseer OverseerHandler::getOverseer(){
|
||||
return os;
|
||||
}
|
||||
|
||||
OverseerHandler::OverseerHandler(QObject *parent) : QObject(parent) {
|
||||
|
||||
}
|
||||
|
||||
std::vector<EndpointHandler*>* OverseerHandler::getEndpointHandlers(){
|
||||
return endpointHandlers;
|
||||
}
|
||||
|
||||
void OverseerHandler::setEndpointHandlers(std::vector<EndpointHandler*> *ephs){
|
||||
this->endpointHandlers = ephs;
|
||||
}
|
||||
46
src/cont/contclasses.h
Normal file
46
src/cont/contclasses.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
#pragma once
|
||||
#include <QObject>
|
||||
#include "backlasses.h"
|
||||
|
||||
|
||||
class EndpointHandler : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EndpointHandler(Endpoint *ept, QObject *parent = nullptr);
|
||||
|
||||
|
||||
private:
|
||||
Endpoint *ept;
|
||||
//QSlider *slidy;
|
||||
|
||||
public slots:
|
||||
void setValue(int value);
|
||||
|
||||
|
||||
//signals:
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
class OverseerHandler : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
OverseerHandler(QObject *parent = nullptr);
|
||||
void setEndpointHandlers(std::vector<EndpointHandler*> *ephs);
|
||||
std::vector<EndpointHandler*>* getEndpointHandlers();
|
||||
static Overseer getOverseer();
|
||||
|
||||
private:
|
||||
static Overseer os;
|
||||
std::vector<EndpointHandler*> *endpointHandlers;
|
||||
//QSlider *slidy;
|
||||
|
||||
//public slots:
|
||||
//void setValue(int value);
|
||||
|
||||
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue