|
|
@ -40,23 +40,21 @@ bool CorePlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QStr
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Q_UNUSED(errorString);
|
|
|
|
Q_UNUSED(errorString);
|
|
|
|
_plugMan = pluginManager;
|
|
|
|
_plugMan = pluginManager;
|
|
|
|
// for old ovqt
|
|
|
|
oldOVQT = false;
|
|
|
|
QMainWindow *wnd = qobject_cast<QMainWindow *>(objectByName("CMainWindow"));
|
|
|
|
|
|
|
|
if (!wnd)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
*errorString = tr("Not found QMainWindow Object Viewer Qt.");
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_plugMan->addObject(new CSearchPathsSettingsPage(wnd));
|
|
|
|
_plugMan->addObject(new CSearchPathsSettingsPage(this));
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CorePlugin::extensionsInitialized()
|
|
|
|
void CorePlugin::extensionsInitialized()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// for old ovqt
|
|
|
|
|
|
|
|
_pluginView = new ExtensionSystem::CPluginView(_plugMan);
|
|
|
|
_pluginView = new ExtensionSystem::CPluginView(_plugMan);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// for old ovqt
|
|
|
|
|
|
|
|
QMainWindow *wnd = qobject_cast<QMainWindow *>(objectByName("CMainWindow"));
|
|
|
|
|
|
|
|
if (wnd)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_pluginView = new ExtensionSystem::CPluginView(_plugMan);
|
|
|
|
QMenu *toolsMenu = qobject_cast<QMenu *>(objectByName("ovqt.Menu.Tools"));
|
|
|
|
QMenu *toolsMenu = qobject_cast<QMenu *>(objectByName("ovqt.Menu.Tools"));
|
|
|
|
QMenu *helpMenu = qobject_cast<QMenu *>(objectByName("ovqt.Menu.Help"));
|
|
|
|
QMenu *helpMenu = qobject_cast<QMenu *>(objectByName("ovqt.Menu.Help"));
|
|
|
|
nlassert(toolsMenu);
|
|
|
|
nlassert(toolsMenu);
|
|
|
@ -68,7 +66,10 @@ void CorePlugin::extensionsInitialized()
|
|
|
|
|
|
|
|
|
|
|
|
connect(newAction, SIGNAL(triggered()), this, SLOT(execSettings()));
|
|
|
|
connect(newAction, SIGNAL(triggered()), this, SLOT(execSettings()));
|
|
|
|
connect(newAction2, SIGNAL(triggered()), _pluginView, SLOT(show()));
|
|
|
|
connect(newAction2, SIGNAL(triggered()), _pluginView, SLOT(show()));
|
|
|
|
|
|
|
|
oldOVQT = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
_mainWindow = new CMainWindow(_plugMan);
|
|
|
|
_mainWindow = new CMainWindow(_plugMan);
|
|
|
|
#ifdef Q_WS_X11
|
|
|
|
#ifdef Q_WS_X11
|
|
|
|
_mainWindow->setAttribute(Qt::WA_TranslucentBackground);
|
|
|
|
_mainWindow->setAttribute(Qt::WA_TranslucentBackground);
|
|
|
@ -87,12 +88,16 @@ void CorePlugin::extensionsInitialized()
|
|
|
|
_mainWindow->setContentsMargins(0, 0, 0, 0);
|
|
|
|
_mainWindow->setContentsMargins(0, 0, 0, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_mainWindow->show();
|
|
|
|
_mainWindow->show();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CorePlugin::shutdown()
|
|
|
|
void CorePlugin::shutdown()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!oldOVQT)
|
|
|
|
|
|
|
|
{
|
|
|
|
delete _mainWindow;
|
|
|
|
delete _mainWindow;
|
|
|
|
delete _pluginView;
|
|
|
|
delete _pluginView;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CorePlugin::execSettings()
|
|
|
|
void CorePlugin::execSettings()
|
|
|
|