wip remove epw now working, xekboxs still funky
This commit is contained in:
parent
a15037c5f2
commit
6744a64fce
3 changed files with 8 additions and 7 deletions
|
|
@ -182,7 +182,7 @@ EndpointWidget::EndpointWidget(uint64_t idx, EndpointHandler* eph, QWidget *pare
|
|||
}
|
||||
|
||||
void MainWindow::customEvent(QEvent* ev) {
|
||||
if (ev->type() == (QEvent::Type)CustomQEvent::EndpointWidgetObsolete) {
|
||||
if (ev->type() == CustomQEvent::EndpointWidgetObsolete) {
|
||||
this->removeEndpointWidget((EndpointWidgetEvent*)ev);
|
||||
return;
|
||||
}
|
||||
|
|
@ -347,9 +347,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
|
|||
});
|
||||
|
||||
osh->setRemoveEndpointWidgetFunction([this](uint64_t index) {
|
||||
EndpointWidgetEvent removeObsoleteEndpointWidget((QEvent::Type)CustomQEvent::EndpointWidgetObsolete, index);
|
||||
removeObsoleteEndpointWidget.setAccepted(true);
|
||||
QCoreApplication::instance()->postEvent(this, &removeObsoleteEndpointWidget);
|
||||
EndpointWidgetEvent* removeObsoleteEndpointWidget = new EndpointWidgetEvent((QEvent::Type)CustomQEvent::EndpointWidgetObsolete, index);
|
||||
removeObsoleteEndpointWidget->setAccepted(true);
|
||||
QCoreApplication::instance()->postEvent(this, removeObsoleteEndpointWidget);
|
||||
});
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -61,12 +61,12 @@ enum CustomQEvent {
|
|||
};
|
||||
|
||||
class EndpointWidgetEvent : public QEvent {
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
public:
|
||||
EndpointWidgetEvent(QEvent::Type type, int idx);
|
||||
uint64_t idx;
|
||||
};
|
||||
//Q_DECLARE_METATYPE(EndpointWidgetEvent)
|
||||
|
||||
class ExtendedCheckBox : public QCheckBox {
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ int main (int argc, char* argv[]) {
|
|||
else exit(0);
|
||||
|
||||
osh = new OverseerHandler();
|
||||
|
||||
//qRegisterMetaType<EndpointWidgetEvent>();
|
||||
|
||||
//INIT CONT
|
||||
log_debugcpp("main init");
|
||||
osh->reloadEndpointHandlers();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue