Changed: #1206 logPlugin is now in view and toggleable

This commit is contained in:
aquiles 2010-12-06 20:11:39 +01:00
parent 0e4d15c5de
commit 6e658e67fc
2 changed files with 4 additions and 15 deletions

View file

@ -73,15 +73,9 @@ bool CLogPlugin::initialize(NLQT::IPluginManager *pluginManager, QString *errorS
void CLogPlugin::extensionsInitialized() void CLogPlugin::extensionsInitialized()
{ {
QMenu *helpMenu = qobject_cast<QMenu *>(objectByName("ovqt.Menu.Help")); QMenu *helpMenu = qobject_cast<QMenu *>(objectByName("ovqt.Menu.View"));
helpMenu->addSeparator(); helpMenu->addSeparator();
QAction *newAction = helpMenu->addAction("LogPlugin");
connect(newAction, SIGNAL(triggered()), this, SLOT(createLogDock()));
}
void CLogPlugin::createLogDock()
{
NLMISC::ErrorLog->addDisplayer(_displayer); NLMISC::ErrorLog->addDisplayer(_displayer);
NLMISC::WarningLog->addDisplayer(_displayer); NLMISC::WarningLog->addDisplayer(_displayer);
NLMISC::DebugLog->addDisplayer(_displayer); NLMISC::DebugLog->addDisplayer(_displayer);
@ -89,11 +83,9 @@ void CLogPlugin::createLogDock()
NLMISC::InfoLog->addDisplayer(_displayer); NLMISC::InfoLog->addDisplayer(_displayer);
QMainWindow *wnd = qobject_cast<QMainWindow *>(objectByName("CMainWindow")); QMainWindow *wnd = qobject_cast<QMainWindow *>(objectByName("CMainWindow"));
// create log dock widget
wnd->addDockWidget(Qt::RightDockWidgetArea, this); wnd->addDockWidget(Qt::RightDockWidgetArea, this);
hide();
helpMenu->addAction(this->toggleViewAction());
} }
void CLogPlugin::setNelContext(NLMISC::INelContext *nelContext) void CLogPlugin::setNelContext(NLMISC::INelContext *nelContext)
@ -112,7 +104,7 @@ QString CLogPlugin::name() const
QString CLogPlugin::version() const QString CLogPlugin::version() const
{ {
return "0.1"; return "1.0";
} }
QString CLogPlugin::vendor() const QString CLogPlugin::vendor() const

View file

@ -65,9 +65,6 @@ namespace Plugin
QObject *objectByName(const QString &name) const; QObject *objectByName(const QString &name) const;
NLQT::IPluginSpec *pluginByName(const QString &name) const; NLQT::IPluginSpec *pluginByName(const QString &name) const;
private Q_SLOTS:
void createLogDock();
protected: protected:
NLMISC::CLibraryContext *_LibContext; NLMISC::CLibraryContext *_LibContext;