mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-11 09:49:05 +00:00
GUI Editor main window will now send the show/hide events to NelGUIWidget.
This commit is contained in:
parent
9b34be6683
commit
4c17c3f6be
4 changed files with 23 additions and 5 deletions
|
@ -340,6 +340,20 @@ namespace GUIEditor
|
||||||
addWidgetWidget->setupWidgetInfo( widgetInfoTree );
|
addWidgetWidget->setupWidgetInfo( widgetInfoTree );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void GUIEditorWindow::hideEvent( QHideEvent *evnt )
|
||||||
|
{
|
||||||
|
QWidget::hideEvent( evnt );
|
||||||
|
viewPort->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GUIEditorWindow::showEvent( QShowEvent *evnt )
|
||||||
|
{
|
||||||
|
QWidget::showEvent( evnt );
|
||||||
|
viewPort->show();
|
||||||
|
}
|
||||||
|
|
||||||
void GUIEditorWindow::createMenus()
|
void GUIEditorWindow::createMenus()
|
||||||
{
|
{
|
||||||
Core::MenuManager *mm = Core::ICore::instance()->menuManager();
|
Core::MenuManager *mm = Core::ICore::instance()->menuManager();
|
||||||
|
|
|
@ -66,6 +66,10 @@ private Q_SLOTS:
|
||||||
void onAddWidgetClicked();
|
void onAddWidgetClicked();
|
||||||
void onTreeChanged();
|
void onTreeChanged();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void hideEvent( QHideEvent *evnt );
|
||||||
|
void showEvent( QShowEvent *evnt );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createMenus();
|
void createMenus();
|
||||||
void removeMenus();
|
void removeMenus();
|
||||||
|
|
|
@ -159,13 +159,13 @@ namespace GUIEditor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NelGUIWidget::showEvent( QShowEvent *evnt )
|
void NelGUIWidget::show()
|
||||||
{
|
{
|
||||||
if( timerID == 0 )
|
if( timerID == 0 )
|
||||||
timerID = startTimer( 200 );
|
timerID = startTimer( 200 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void NelGUIWidget::hideEvent( QHideEvent *evnt )
|
void NelGUIWidget::hide()
|
||||||
{
|
{
|
||||||
if( timerID != 0 )
|
if( timerID != 0 )
|
||||||
killTimer( timerID );
|
killTimer( timerID );
|
||||||
|
|
|
@ -42,15 +42,15 @@ namespace GUIEditor
|
||||||
|
|
||||||
QWidget* getViewPort();
|
QWidget* getViewPort();
|
||||||
|
|
||||||
|
void show();
|
||||||
|
void hide();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void guiLoadComplete();
|
void guiLoadComplete();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent( QPaintEvent *evnt );
|
void paintEvent( QPaintEvent *evnt );
|
||||||
void timerEvent( QTimerEvent *evnt );
|
void timerEvent( QTimerEvent *evnt );
|
||||||
void showEvent( QShowEvent *evnt );
|
|
||||||
void hideEvent( QHideEvent *evnt );
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int timerID;
|
int timerID;
|
||||||
|
|
Loading…
Reference in a new issue