##// END OF EJS Templates
Added Python Console and some Wrappers....
Added Python Console and some Wrappers. More code cleaning, WIP.

File last commit:

r5:92e4585e8fab default
r5:92e4585e8fab default
Show More
qlopplots.cpp
69 lines | 1.4 KiB | text/x-c | CppLexer
#include "qlopplots.h"
QLopPlots* QLopPlots::_self=NULL;
SocExplorerPlot* QLopPlots::m_SocExplorerPlot=NULL;
QDockWidget* QLopPlots::m_gui=NULL;
#define _INIT() if(Q_UNLIKELY(_self==NULL)){init();}
QLopPlots::QLopPlots(bool noGUI,QObject *parent)
{
m_noGui = noGUI;
m_serviceName = "QLopPlots";
}
QLopPlots::~QLopPlots()
{
}
void QLopPlots::init(bool noGUI, QObject *parent)
{
if(Q_UNLIKELY(_self==NULL))
{
_self=new QLopPlots(noGUI,parent);
}
}
QLopPlots *QLopPlots::self()
{
_INIT();
return _self;
}
SocExplorerPlot *QLopPlots::getPlot()
{
_INIT();
if(!_self->m_noGui && (m_gui==NULL))
{
m_gui=new QDockWidget("Plots");
m_SocExplorerPlot = new SocExplorerPlot();
m_gui->setWidget(m_SocExplorerPlot);
m_gui->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
}
return m_SocExplorerPlot;
}
QDockWidget *QLopPlots::getGUI()
{
if(!m_noGui && (m_gui==NULL))
{
m_gui=new QDockWidget("Plots");
m_SocExplorerPlot = new SocExplorerPlot();
m_gui->setWidget(m_SocExplorerPlot);
m_gui->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
}
return m_gui;
}
const QString &QLopPlots::serviceName()
{
return m_serviceName;
}
SocExplorerPlot *QLopPlots::get_plot()
{
return getPlot();
}