Commit 58ed59d5 authored by Pierre Kraemer's avatar Pierre Kraemer

Merge branch 'develop' into 'develop'

Develop

See merge request !51
parents 880aec67 717b0a34
......@@ -139,7 +139,7 @@ TARGET_LINK_LIBRARIES( SCHNApps
${EXT_LIBS}
)
qt_use_modules(SCHNApps Core Gui OpenGL Xml Svg Designer)
qt_use_modules(SCHNApps Core Gui OpenGL Xml Svg)
IF(IS_DIRECTORY ${SCHNApps_ROOT_DIR}/../../Plugins)
ADD_SUBDIRECTORY(${SCHNApps_ROOT_DIR}/../../Plugins ExtPlugins)
......
......@@ -94,4 +94,4 @@ TARGET_LINK_LIBRARIES( SCHNAppsLib
${EXT_LIBS}
)
qt_use_modules(SCHNAppsLib Core Gui OpenGL Xml Svg Designer)
qt_use_modules(SCHNAppsLib Core Gui OpenGL Xml Svg)
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>246</width>
<width>240</width>
<height>600</height>
</rect>
</property>
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>337</width>
<width>230</width>
<height>600</height>
</rect>
</property>
......@@ -14,17 +14,17 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0" colspan="3">
<widget class="QCheckBox" name="check_drawPhi1">
<property name="text">
<string>draw phi1</string>
<item row="7" column="2">
<widget class="QSlider" name="slider_edgesScaleFactor">
<property name="value">
<number>50</number>
</property>
<property name="checked">
<bool>true</bool>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0" colspan="4">
<item row="3" column="0" colspan="3">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -37,81 +37,56 @@
</property>
</spacer>
</item>
<item row="2" column="3">
<widget class="ColorComboBox" name="combo_phi1Color"/>
</item>
<item row="3" column="3">
<item row="2" column="2">
<widget class="ColorComboBox" name="combo_phi2Color"/>
</item>
<item row="1" column="3">
<widget class="ColorComboBox" name="combo_dartsColor"/>
<item row="8" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>explod faces :</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QCheckBox" name="check_drawPhi2">
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="check_drawPhi1">
<property name="text">
<string>draw phi2</string>
<string>draw phi1</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="13" column="0" colspan="2">
<widget class="QLabel" name="label_3">
<item row="5" column="0" colspan="3">
<widget class="QLabel" name="label_map_param">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>explod faces</string>
<string>Per map parameters</string>
</property>
</widget>
</item>
<item row="13" column="2" colspan="2">
<widget class="QSlider" name="slider_facesScaleFactor">
<property name="value">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<item row="0" column="2">
<widget class="ColorComboBox" name="combo_dartsColor"/>
</item>
<item row="10" column="2" colspan="2">
<widget class="QComboBox" name="combo_positionAttribute">
<item row="6" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>- select attribute -</string>
</property>
</item>
</widget>
</item>
<item row="12" column="2" colspan="2">
<widget class="QSlider" name="slider_edgesScaleFactor">
<property name="value">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
<property name="text">
<string>Position :</string>
</property>
</widget>
</item>
<item row="15" column="0" colspan="4">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>156</width>
<height>161</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="0" colspan="3">
<item row="4" column="0" colspan="3">
<widget class="Line" name="line_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
......@@ -130,7 +105,27 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<item row="7" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>explod edges :</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="ColorComboBox" name="combo_phi1Color"/>
</item>
<item row="8" column="2">
<widget class="QSlider" name="slider_facesScaleFactor">
<property name="value">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="check_drawDarts">
<property name="text">
<string>draw darts</string>
......@@ -140,38 +135,43 @@
</property>
</widget>
</item>
<item row="12" column="0" colspan="2">
<widget class="QLabel" name="label">
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="check_drawPhi2">
<property name="text">
<string>explod edges</string>
<string>draw phi2</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<item row="6" column="1" colspan="2">
<widget class="QComboBox" name="combo_positionAttribute">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Position :</string>
</property>
<item>
<property name="text">
<string>- select attribute -</string>
</property>
</item>
</widget>
</item>
<item row="7" column="0" colspan="4">
<widget class="QLabel" name="label_map_param">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
<item row="9" column="0" colspan="3">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="text">
<string>Per map parameters</string>
<property name="sizeHint" stdset="0">
<size>
<width>156</width>
<height>161</height>
</size>
</property>
</widget>
</spacer>
</item>
</layout>
</widget>
......
......@@ -92,7 +92,7 @@
</property>
</widget>
</item>
<item row="6" column="1">
<item row="6" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>218</width>
<width>220</width>
<height>673</height>
</rect>
</property>
......@@ -84,7 +84,7 @@
</size>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="dartInfo">
<attribute name="title">
......@@ -519,103 +519,103 @@
<string>W</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="label_volumeNbOrbits">
<property name="text">
<string>0</string>
<item row="4" column="2">
<widget class="QPushButton" name="button_volumeAddSelector">
<property name="minimumSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<property name="maximumSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<item row="0" column="2" colspan="2">
<widget class="QLabel" name="label_volumeOrbits">
<property name="text">
<string>orbits</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_volumeNbCells">
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<item row="5" column="0" colspan="4">
<widget class="QListWidget" name="list_volumeSelectors">
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_volumeCells">
<item row="4" column="3">
<widget class="QPushButton" name="button_volumeRemoveSelector">
<property name="minimumSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="text">
<string>cells</string>
<string>-</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_volumeAttributes">
<item row="4" column="0">
<widget class="QLabel" name="label_volumeSelectors">
<property name="text">
<string>Attributes :</string>
<string>Selectors :</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<item row="3" column="0" colspan="4">
<widget class="QListWidget" name="list_volumeAttributes">
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_volumeSelectors">
<item row="2" column="0">
<widget class="QLabel" name="label_volumeAttributes">
<property name="text">
<string>Selectors :</string>
<string>Attributes :</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="button_volumeAddSelector">
<property name="minimumSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<item row="1" column="2" colspan="2">
<widget class="QLabel" name="label_volumeCells">
<property name="text">
<string>+</string>
<string>cells</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="button_volumeRemoveSelector">
<property name="minimumSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>25</width>
<height>25</height>
</size>
</property>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_volumeNbOrbits">
<property name="text">
<string>-</string>
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="5" column="0" colspan="3">
<widget class="QListWidget" name="list_volumeSelectors">
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="label_volumeNbCells">
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>222</width>
<width>200</width>
<height>621</height>
</rect>
</property>
......
......@@ -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();
......
......@@ -51,6 +51,7 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt
m_controlDock = new QDockWidget("Control Dock", this);
m_controlDock->setAllowedAreas(Qt::LeftDockWidgetArea);
m_controlDock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetClosable);
m_controlDock->setMaximumWidth(250);
m_controlDockTabWidget = new QTabWidget(m_controlDock);
m_controlDockTabWidget->setObjectName("ControlDockTabWidget");
......@@ -69,8 +70,6 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt
m_controlPluginTab = new ControlDock_PluginTab(this);
m_controlDockTabWidget->addTab(m_controlPluginTab, m_controlPluginTab->title());
// m_controlDockTabWidget->setMaximumWidth(m_controlCameraTab->width());
connect(action_ShowHideControlDock, SIGNAL(triggered()), this, SLOT(showHideControlDock()));
// create & setup plugin dock
......@@ -798,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