wip partial refactor

This commit is contained in:
Hane 2023-08-10 21:34:09 +02:00
commit bc82ec72ed
7 changed files with 114 additions and 53 deletions

View file

@ -1,48 +1,51 @@
#pragma once
#include <QObject>
#include "backlasses.h"
class EndpointHandler : public QObject {
Q_OBJECT
class EndpointHandler {
public:
EndpointHandler(Endpoint *ept, EndpointCallback *epc, QObject *parent = nullptr);
EndpointHandler(Endpoint *ept);
//TODO: get();
Endpoint *ep;
EndpointCallback *epc;
QString epName;
void setIndex(uint64_t idx);
void setVolume(int channel, float volume);
//todo qstrin????? idiota
QString getName();
float getVolume(int channel);
bool getMute();
void setValue(int channel, int value);
void setMute();
private:
uint64_t idx;
//QSlider *slidy;
public slots:
void setValue(int channel, int value);
void setMute();
//signals:
};
class OverseerHandler : public QObject {
Q_OBJECT
class OverseerHandler {
public:
OverseerHandler(QObject *parent = nullptr);
void setEndpointWidgets(std::vector<EndpointWidget*> ews);
std::vector<EndpointWidget*>* getEndpointWidgets();
//OverseerHandler();
void setEndpointHandlers(std::vector<EndpointHandler*> ews);
std::vector<EndpointHandler*>* getEndpointHandlers();
std::vector<Endpoint*> getPlaybackEndpoints();
uint64_t getPlaybackEndpointsCount();
void parseExternalEndpointCallback(EndpointCallback *epc, PAUDIO_VOLUME_NOTIFICATION_DATA pNotify);
static Overseer* getOverseer();
//static Overseer* getOverseer();
private:
static Overseer os;
std::vector<EndpointWidget*> endpointWidgets;
std::vector<EndpointHandler*> endpointHandlers;
//QSlider *slidy;
//public slots: