From f1aedef42ab32cd9c614963442e798064a9365e8 Mon Sep 17 00:00:00 2001 From: aquiles Date: Mon, 6 Dec 2010 20:11:39 +0100 Subject: [PATCH] Changed: #1206 logPlugin is now in view and toggleable --- .../src/plugins/log/log_plugin.cpp | 16 ++++------------ .../src/plugins/log/log_plugin.h | 3 --- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp index 40fb0588e..601db3c73 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp @@ -73,15 +73,9 @@ bool CLogPlugin::initialize(NLQT::IPluginManager *pluginManager, QString *errorS void CLogPlugin::extensionsInitialized() { - QMenu *helpMenu = qobject_cast(objectByName("ovqt.Menu.Help")); + QMenu *helpMenu = qobject_cast(objectByName("ovqt.Menu.View")); helpMenu->addSeparator(); - QAction *newAction = helpMenu->addAction("LogPlugin"); - connect(newAction, SIGNAL(triggered()), this, SLOT(createLogDock())); -} - -void CLogPlugin::createLogDock() -{ NLMISC::ErrorLog->addDisplayer(_displayer); NLMISC::WarningLog->addDisplayer(_displayer); NLMISC::DebugLog->addDisplayer(_displayer); @@ -89,11 +83,9 @@ void CLogPlugin::createLogDock() NLMISC::InfoLog->addDisplayer(_displayer); QMainWindow *wnd = qobject_cast(objectByName("CMainWindow")); - - // create log dock widget wnd->addDockWidget(Qt::RightDockWidgetArea, this); - - + hide(); + helpMenu->addAction(this->toggleViewAction()); } void CLogPlugin::setNelContext(NLMISC::INelContext *nelContext) @@ -112,7 +104,7 @@ QString CLogPlugin::name() const QString CLogPlugin::version() const { - return "0.1"; + return "1.0"; } QString CLogPlugin::vendor() const diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.h index 5b9cf962e..c7661342c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.h @@ -65,9 +65,6 @@ namespace Plugin QObject *objectByName(const QString &name) const; NLQT::IPluginSpec *pluginByName(const QString &name) const; - private Q_SLOTS: - void createLogDock(); - protected: NLMISC::CLibraryContext *_LibContext;