Added opened/closed signals to PanelWidget
This commit is contained in:
@@ -168,6 +168,32 @@ namespace Bloom
|
||||
&InsightWindow::refresh
|
||||
);
|
||||
|
||||
// Panel connections
|
||||
QObject::connect(
|
||||
this->leftPanel,
|
||||
&PanelWidget::opened,
|
||||
this,
|
||||
&InsightWindow::adjustMinimumSize
|
||||
);
|
||||
QObject::connect(
|
||||
this->leftPanel,
|
||||
&PanelWidget::closed,
|
||||
this,
|
||||
&InsightWindow::adjustMinimumSize
|
||||
);
|
||||
QObject::connect(
|
||||
this->bottomPanel,
|
||||
&PanelWidget::opened,
|
||||
this,
|
||||
&InsightWindow::adjustMinimumSize
|
||||
);
|
||||
QObject::connect(
|
||||
this->bottomPanel,
|
||||
&PanelWidget::closed,
|
||||
this,
|
||||
&InsightWindow::adjustMinimumSize
|
||||
);
|
||||
|
||||
// Panel button connections
|
||||
QObject::connect(
|
||||
this->targetRegistersButton,
|
||||
@@ -946,7 +972,6 @@ namespace Bloom
|
||||
|
||||
void InsightWindow::onRegistersPaneStateChanged() {
|
||||
this->targetRegistersButton->setChecked(this->targetRegistersSidePane->activated);
|
||||
this->adjustMinimumSize();
|
||||
}
|
||||
|
||||
void InsightWindow::onRamInspectionPaneStateChanged() {
|
||||
@@ -962,8 +987,6 @@ namespace Bloom
|
||||
// Both panes cannot be attached and activated at the same time.
|
||||
this->eepromInspectionPane->deactivate();
|
||||
}
|
||||
|
||||
this->adjustMinimumSize();
|
||||
}
|
||||
|
||||
void InsightWindow::onEepromInspectionPaneStateChanged() {
|
||||
@@ -979,8 +1002,6 @@ namespace Bloom
|
||||
// Both panes cannot be attached and activated at the same time.
|
||||
this->ramInspectionPane->deactivate();
|
||||
}
|
||||
|
||||
this->adjustMinimumSize();
|
||||
}
|
||||
|
||||
void InsightWindow::onProgrammingModeEnabled() {
|
||||
|
||||
@@ -84,6 +84,13 @@ namespace Bloom::Widgets
|
||||
}
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::Type::Close || event->type() == QEvent::Type::Hide) {
|
||||
emit this->closed();
|
||||
|
||||
} else if (event->type() == QEvent::Type::Show) {
|
||||
emit this->opened();
|
||||
}
|
||||
|
||||
return QFrame::event(event);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,10 @@ namespace Bloom::Widgets
|
||||
*/
|
||||
void updateVisibility();
|
||||
|
||||
signals:
|
||||
void closed();
|
||||
void opened();
|
||||
|
||||
protected:
|
||||
int handleSize = 10;
|
||||
int minimumResize = 10;
|
||||
|
||||
Reference in New Issue
Block a user