mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
Move the log trigger menu item into it's own menu, and remove the menu when unloading the plugin.
--HG-- branch : gsoc2014-dfighter
This commit is contained in:
parent
d4ee31ed63
commit
a86605f8d8
2 changed files with 8 additions and 2 deletions
|
@ -45,6 +45,7 @@ namespace Plugin
|
|||
CLogPlugin::CLogPlugin(QWidget *parent): QDockWidget(parent)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
logMenu = NULL;
|
||||
}
|
||||
|
||||
CLogPlugin::~CLogPlugin()
|
||||
|
@ -63,6 +64,9 @@ namespace Plugin
|
|||
NLMISC::InfoLog->removeDisplayer(m_displayer);
|
||||
delete m_displayer;
|
||||
|
||||
delete logMenu;
|
||||
logMenu = NULL;
|
||||
|
||||
delete m_libContext;
|
||||
m_libContext = NULL;
|
||||
}
|
||||
|
@ -82,13 +86,13 @@ namespace Plugin
|
|||
|
||||
Core::ICore *core = Core::ICore::instance();
|
||||
Core::MenuManager *menuManager = core->menuManager();
|
||||
QMenu *viewMenu = menuManager->menu(Core::Constants::M_VIEW);
|
||||
|
||||
QMainWindow *wnd = Core::ICore::instance()->mainWindow();
|
||||
wnd->addDockWidget(Qt::RightDockWidgetArea, this);
|
||||
hide();
|
||||
|
||||
viewMenu->addAction(this->toggleViewAction());
|
||||
logMenu = menuManager->menuBar()->addMenu( "Log" );
|
||||
logMenu->addAction(toggleViewAction());
|
||||
}
|
||||
|
||||
void CLogPlugin::setNelContext(NLMISC::INelContext *nelContext)
|
||||
|
|
|
@ -85,6 +85,8 @@ namespace Plugin
|
|||
|
||||
NLQT::CQtDisplayer *m_displayer;
|
||||
|
||||
QMenu *logMenu;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Plugin
|
||||
|
|
Loading…
Reference in a new issue