mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 01:06:19 +00:00
Remove GUI Editor menu when unloading the plugin.
This commit is contained in:
parent
c3084d5661
commit
356973a1bd
2 changed files with 16 additions and 0 deletions
|
@ -55,6 +55,7 @@ namespace GUIEditor
|
||||||
GUIEditorWindow::GUIEditorWindow(QWidget *parent) :
|
GUIEditorWindow::GUIEditorWindow(QWidget *parent) :
|
||||||
QMainWindow(parent)
|
QMainWindow(parent)
|
||||||
{
|
{
|
||||||
|
menu = NULL;
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
messageProcessor = new CEditorMessageProcessor;
|
messageProcessor = new CEditorMessageProcessor;
|
||||||
m_undoStack = new QUndoStack(this);
|
m_undoStack = new QUndoStack(this);
|
||||||
|
@ -112,6 +113,8 @@ namespace GUIEditor
|
||||||
{
|
{
|
||||||
writeSettings();
|
writeSettings();
|
||||||
|
|
||||||
|
removeMenus();
|
||||||
|
|
||||||
delete messageProcessor;
|
delete messageProcessor;
|
||||||
messageProcessor = NULL;
|
messageProcessor = NULL;
|
||||||
|
|
||||||
|
@ -382,9 +385,17 @@ namespace GUIEditor
|
||||||
a = new QAction( "Add Widget", this );
|
a = new QAction( "Add Widget", this );
|
||||||
connect( a, SIGNAL( triggered( bool ) ), this, SLOT( onAddWidgetClicked() ) );
|
connect( a, SIGNAL( triggered( bool ) ), this, SLOT( onAddWidgetClicked() ) );
|
||||||
m->addAction( a );
|
m->addAction( a );
|
||||||
|
|
||||||
|
menu = m;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GUIEditorWindow::removeMenus()
|
||||||
|
{
|
||||||
|
delete menu;
|
||||||
|
menu = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void GUIEditorWindow::readSettings()
|
void GUIEditorWindow::readSettings()
|
||||||
{
|
{
|
||||||
QSettings *settings = Core::ICore::instance()->settings();
|
QSettings *settings = Core::ICore::instance()->settings();
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
|
|
||||||
class QtTreePropertyBrowser;
|
class QtTreePropertyBrowser;
|
||||||
|
|
||||||
|
class QMenu;
|
||||||
|
|
||||||
namespace GUIEditor
|
namespace GUIEditor
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -66,6 +68,7 @@ private Q_SLOTS:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createMenus();
|
void createMenus();
|
||||||
|
void removeMenus();
|
||||||
|
|
||||||
void readSettings();
|
void readSettings();
|
||||||
|
|
||||||
|
@ -88,6 +91,8 @@ private:
|
||||||
CPropBrowserCtrl browserCtrl;
|
CPropBrowserCtrl browserCtrl;
|
||||||
QString currentProject;
|
QString currentProject;
|
||||||
QString currentProjectFile;
|
QString currentProjectFile;
|
||||||
|
|
||||||
|
QMenu *menu;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue