Commit 717b0a34 authored by Pierre Kraemer's avatar Pierre Kraemer

SCHNApps: remove unused View constructor

parent 788c7b14
......@@ -40,7 +40,6 @@ class SCHNAPPS_API View : public QGLViewer
public:
static unsigned int viewCount;
View(const QString& name, SCHNApps* s);
View(const QString& name, SCHNApps* s, const QGLWidget* shareWidget);
~View();
......
......@@ -797,6 +797,7 @@ void SCHNApps::loadPythonScriptFromFileDialog()
void SCHNApps::closeEvent(QCloseEvent *event)
{
DEBUG_EMIT("schnappsClosing");
emit(schnappsClosing());
QMainWindow::closeEvent(event);
}
......
......@@ -21,8 +21,9 @@ namespace SCHNApps
{
unsigned int View::viewCount = 0;
View::View(const QString& name, SCHNApps* s) :
QGLViewer(),
View::View(const QString& name, SCHNApps* s, const QGLWidget* shareWidget) :
QGLViewer( NULL, shareWidget),
b_updatingUI(false),
m_name(name),
m_schnapps(s),
......@@ -49,13 +50,14 @@ View::View(const QString& name, SCHNApps* s) :
setSnapshotFileName(m_name);
setSnapshotQuality(100);
connect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)));
m_dialogMaps = new ListPopUp("Linked Maps");
m_dialogPlugins = new ListPopUp("Enabled Plugins");
m_dialogCameras = new ListPopUp("Cameras");
connect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
connect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
connect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)));
connect(m_dialogMaps->list(), SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(mapCheckStateChanged(QListWidgetItem*)));
foreach(MapHandlerGen* map, m_schnapps->getMapSet().values())
......@@ -82,66 +84,6 @@ View::View(const QString& name, SCHNApps* s) :
connect(m_schnapps, SIGNAL(schnappsClosing()), this, SLOT(closeDialogs()));
}
View::View(const QString& name, SCHNApps* s, const QGLWidget* shareWidget) :
QGLViewer( NULL, shareWidget),
b_updatingUI(false),
m_name(name),
m_schnapps(s),
m_currentCamera(NULL),
m_buttonArea(NULL),
m_closeButton(NULL),
m_VsplitButton(NULL),
m_HsplitButton(NULL),
m_buttonAreaLeft(NULL),
m_mapsButton(NULL),
m_pluginsButton(NULL),
m_camerasButton(NULL),
m_dialogMaps(NULL),
m_dialogPlugins(NULL),
m_dialogCameras(NULL),
m_frameDrawer(NULL),
m_textureWallpaper(NULL),
m_shaderWallpaper(NULL)
{
++viewCount;
setSnapshotFormat("BMP");
setSnapshotFileName(m_name);
setSnapshotQuality(100);
m_currentCamera = m_schnapps->addCamera();
m_currentCamera->linkView(this);
connect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)));
m_dialogMaps = new ListPopUp("Linked Maps");
m_dialogPlugins = new ListPopUp("Enabled Plugins");
m_dialogCameras = new ListPopUp("Cameras");
connect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
connect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
connect(m_dialogMaps->list(), SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(mapCheckStateChanged(QListWidgetItem*)));
foreach(MapHandlerGen* map, m_schnapps->getMapSet().values())
mapAdded(map);
connect(m_schnapps, SIGNAL(pluginEnabled(Plugin*)), this, SLOT(pluginEnabled(Plugin*)));
connect(m_schnapps, SIGNAL(pluginDisabled(Plugin*)), this, SLOT(pluginDisabled(Plugin*)));
connect(m_dialogPlugins->list(), SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(pluginCheckStateChanged(QListWidgetItem*)));
foreach(Plugin* plug, m_schnapps->getPluginSet().values())
pluginEnabled(plug);
connect(m_schnapps, SIGNAL(cameraAdded(Camera*)), this, SLOT(cameraAdded(Camera*)));
connect(m_schnapps, SIGNAL(cameraRemoved(Camera*)), this, SLOT(cameraRemoved(Camera*)));
connect(m_dialogCameras->list(), SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(cameraCheckStateChanged(QListWidgetItem*)));
foreach(Camera* cam, m_schnapps->getCameraSet().values())
cameraAdded(cam);
m_dialogCameras->check(m_currentCamera->getName(),Qt::Checked);
}
View::~View()
{
qglviewer::Camera* c = new qglviewer::Camera();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment