wip partial refactor
This commit is contained in:
parent
507dc37ad6
commit
e43e4c0569
7 changed files with 114 additions and 53 deletions
|
|
@ -63,7 +63,17 @@ EndpointWidget::EndpointWidget(EndpointHandler* eph, QWidget *parent) : QWidget(
|
|||
}
|
||||
|
||||
|
||||
MainWindow::MainWindow(std::vector<EndpointHandler*> *ephs, QWidget *parent) : QMainWindow(parent) {
|
||||
void EndpointWidget::setIndex(uint64_t idx){
|
||||
this.idx = idx;
|
||||
}
|
||||
|
||||
uint64_t EndpointWidget::getIndex(){
|
||||
return idx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
|
||||
// setWindowState(Qt::WindowFullScreen);
|
||||
// setCentralWidget(centralWidget);
|
||||
widget = new QWidget();
|
||||
|
|
@ -81,11 +91,10 @@ MainWindow::MainWindow(std::vector<EndpointHandler*> *ephs, QWidget *parent) : Q
|
|||
unsigned int i = 0;
|
||||
for (; i < ephs->size(); i++) {
|
||||
log_debugcpp("EPWidget creation");
|
||||
EndpointWidget *epw = new EndpointWidget(ephs->at(i), widget);
|
||||
EndpointWidget *epw = new EndpointWidget(osh->getEndpointHandlers().at(i), widget);
|
||||
ews.push_back(epw);
|
||||
layout->addWidget(epw, i, 0);
|
||||
}
|
||||
osh->setEndpointWidgets(ews);
|
||||
layout->addItem(new QSpacerItem(1, 1, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding), i, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ public:
|
|||
EndpointWidget(EndpointHandler* eph, QWidget *parent = nullptr);
|
||||
//TODO: get();
|
||||
EndpointHandler* eph;
|
||||
|
||||
void setIndex(uint64_t idx);
|
||||
void setVolume(int channel, float volume);
|
||||
|
||||
QPushButton *muteButton = nullptr;
|
||||
QLabel *mainLabel = nullptr, *leftChannelLabel = nullptr, *rightChannelLabel = nullptr;
|
||||
QSlider *mainSlider = nullptr;
|
||||
|
|
@ -33,7 +35,7 @@ public:
|
|||
//void setEndpointHandlers(std::vector<EndpointHandler*> *ephs);
|
||||
|
||||
private:
|
||||
|
||||
uint64_t idx;
|
||||
//std::vector<EndpointHandler*> *ephs;
|
||||
//std::vector<QSlider> *sliders;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue