ccCameraParamEditDlg::ccCameraParamEditDlg(QWidget* parent)
	: ccOverlayDialog(parent)
	, Ui::CameraParamDlg()
{
	setupUi(this);

	//Slider中的值变化,则SpinBox的值也随之发生变化,同时更新透视矩阵
	connect(phiSlider,				SIGNAL(valueChanged(int)),		this,	SLOT(iPhiValueChanged(int)));
	connect(thetaSlider,			SIGNAL(valueChanged(int)),		this,	SLOT(iThetaValueChanged(int)));
	connect(psiSlider,				SIGNAL(valueChanged(int)),		this,	SLOT(iPsiValueChanged(int)));

	//SpinBox中的值发生变化,则Slider的值也随之发生变化,同时更新透视矩阵
	connect(phiSpinBox,				SIGNAL(valueChanged(double)),	this,	SLOT(dPhiValueChanged(double)));
	connect(thetaSpinBox,			SIGNAL(valueChanged(double)),	this,	SLOT(dThetaValueChanged(double)));
	connect(psiSpinBox,				SIGNAL(valueChanged(double)),	this,	SLOT(dPsiValueChanged(double)));

	//rotation center//旋转中心发生变化
	connect(rcxDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,	SLOT(pivotChanged()));
	connect(rcyDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,	SLOT(pivotChanged()));
	connect(rczDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,	SLOT(pivotChanged()));

	//camera center//相机中心发生变化
	connect(exDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,	SLOT(cameraCenterChanged()));
	connect(eyDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,	SLOT(cameraCenterChanged()));
	connect(ezDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,	SLOT(cameraCenterChanged()));

	//视角变化
	connect(fovDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,	SLOT(fovChanged(double)));

	//相机近平面发生变化
	connect(zNearHorizontalSlider,	SIGNAL(sliderMoved(int)),		this,	SLOT(zNearSliderMoved(int)));

	//设置视角
	connect(viewUpToolButton,		SIGNAL(clicked()),				this,	SLOT(setTopView()));
	connect(viewDownToolButton,		SIGNAL(clicked()),				this,	SLOT(setBottomView()));
	connect(viewFrontToolButton,	SIGNAL(clicked()),				this,	SLOT(setFrontView()));
	connect(viewBackToolButton,		SIGNAL(clicked()),				this,	SLOT(setBackView()));
	connect(viewLeftToolButton,		SIGNAL(clicked()),				this,	SLOT(setLeftView()));
	connect(viewRightToolButton,	SIGNAL(clicked()),				this,	SLOT(setRightView()));
	connect(viewIso1ToolButton,		SIGNAL(clicked()),				this,	SLOT(setIso1View()));
	connect(viewIso2ToolButton,		SIGNAL(clicked()),				this,	SLOT(setIso2View()));

	//保存当前矩阵
	connect(pushMatrixToolButton,	SIGNAL(clicked()),				this,	SLOT(pushCurrentMatrix()));
	connect(revertMatrixToolButton,	SIGNAL(clicked()),				this,	SLOT(revertToPushedMatrix()));

	//选择点作为旋转球中心
	connect(pivotPickingToolButton,	SIGNAL(clicked()),				this,	SLOT(pickPointAsPivot()));
}
Example #2
0
ccClippingBoxTool::ccClippingBoxTool(QWidget* parent)
	: ccOverlayDialog(parent)
	, Ui::ClippingBoxDlg()
	, m_clipBox(0)
{
	setupUi(this);

	setWindowFlags(Qt::FramelessWindowHint | Qt::Tool);

	connect(editBoxToolButton,				SIGNAL(clicked()), this, SLOT(editBox()));
	connect(extractContourToolButton,		SIGNAL(clicked()), this, SLOT(extractContour()));
	connect(removeLastContourToolButton,	SIGNAL(clicked()), this, SLOT(removeLastContour()));
	connect(exportButton,					SIGNAL(clicked()), this, SLOT(exportCloud()));
	connect(exportMultButton,				SIGNAL(clicked()), this, SLOT(exportMultCloud()));
	connect(resetButton,					SIGNAL(clicked()), this, SLOT(reset()));
	connect(closeButton,					SIGNAL(clicked()), this, SLOT(closeDialog()));

	connect(showInteractorsCheckBox, SIGNAL(toggled(bool)), this, SLOT(toggleInteractors(bool)));

	connect(thickXDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(thicknessChanged(double)));
	connect(thickYDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(thicknessChanged(double)));
	connect(thickZDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(thicknessChanged(double)));

	connect(minusXShiftToolButton,	SIGNAL(clicked()), this, SLOT(shiftXMinus()));
	connect(plusXShiftToolButton,	SIGNAL(clicked()), this, SLOT(shiftXPlus()));
	connect(minusYShiftToolButton,	SIGNAL(clicked()), this, SLOT(shiftYMinus()));
	connect(plusYShiftToolButton,	SIGNAL(clicked()), this, SLOT(shiftYPlus()));
	connect(minusZShiftToolButton,	SIGNAL(clicked()), this, SLOT(shiftZMinus()));
	connect(plusZShiftToolButton,	SIGNAL(clicked()), this, SLOT(shiftZPlus()));

	viewButtonsFrame->setEnabled(true);
    connect(viewUpToolButton,		SIGNAL(clicked()),	this,	SLOT(setTopView()));
    connect(viewDownToolButton,		SIGNAL(clicked()),	this,	SLOT(setBottomView()));
    connect(viewFrontToolButton,	SIGNAL(clicked()),	this,	SLOT(setFrontView()));
    connect(viewBackToolButton,		SIGNAL(clicked()),	this,	SLOT(setBackView()));
    connect(viewLeftToolButton,		SIGNAL(clicked()),	this,	SLOT(setLeftView()));
    connect(viewRightToolButton,	SIGNAL(clicked()),	this,	SLOT(setRightView()));

	s_maxEdgeLength = -1.0;
	//s_lastContourUniqueIDs.clear();
	removeLastContourToolButton->setEnabled(false);
}
ccCameraParamEditDlg::ccCameraParamEditDlg(QWidget* parent) : QDialog(parent), Ui::CameraParamDlg()
{
    setupUi(this);

    /*QDoubleValidator* validator = new QDoubleValidator(this);
    txLineEdit->setValidator(validator);
    tyLineEdit->setValidator(validator);
    tzLineEdit->setValidator(validator);
    //*/
    /*connect(txLineEdit,     SIGNAL(editingFinished()),  this,   SLOT(reflectParamChange()));
    connect(tyLineEdit,     SIGNAL(editingFinished()),  this,   SLOT(reflectParamChange()));
    connect(tzLineEdit,     SIGNAL(editingFinished()),  this,   SLOT(reflectParamChange()));
    //*/

    connect(phiSlider,      SIGNAL(valueChanged(int)),  this,   SLOT(iPhiValueChanged(int)));
    connect(thetaSlider,    SIGNAL(valueChanged(int)),  this,   SLOT(iThetaValueChanged(int)));
    connect(psiSlider,      SIGNAL(valueChanged(int)),  this,   SLOT(iPsiValueChanged(int)));
    connect(phiSpinBox,     SIGNAL(valueChanged(double)),  this,   SLOT(dPhiValueChanged(double)));
    connect(thetaSpinBox,   SIGNAL(valueChanged(double)),  this,   SLOT(dThetaValueChanged(double)));
    connect(psiSpinBox,     SIGNAL(valueChanged(double)),  this,   SLOT(dPsiValueChanged(double)));

    connect(txDoubleSpinBox,     SIGNAL(valueChanged(double)),  this,   SLOT(translationChanged(double)));
    connect(tyDoubleSpinBox,     SIGNAL(valueChanged(double)),  this,   SLOT(translationChanged(double)));
    connect(tzDoubleSpinBox,     SIGNAL(valueChanged(double)),  this,   SLOT(translationChanged(double)));

    connect(fovDoubleSpinBox,     SIGNAL(valueChanged(double)),  this,   SLOT(fovChanged(double)));

    connect(viewUpToolButton,       SIGNAL(clicked()),    this,       SLOT(setTopView()));
    connect(viewDownToolButton,     SIGNAL(clicked()),    this,       SLOT(setBottomView()));
    connect(viewFrontToolButton,    SIGNAL(clicked()),    this,       SLOT(setFrontView()));
    connect(viewBackToolButton,     SIGNAL(clicked()),    this,       SLOT(setBackView()));
    connect(viewLeftToolButton,     SIGNAL(clicked()),    this,       SLOT(setLeftView()));
    connect(viewRightToolButton,    SIGNAL(clicked()),    this,       SLOT(setRightView()));

    connect(pushMatrixToolButton,   SIGNAL(clicked()),    this,       SLOT(pushCurrentMatrix()));
    connect(revertMatrixToolButton, SIGNAL(clicked()),    this,       SLOT(revertToPushedMatrix()));

	connect(centerPointPickingToolButton, SIGNAL(clicked()),    this,       SLOT(pickPointAsPivot()));

    associatedWin = 0;
}
ccCameraParamEditDlg::ccCameraParamEditDlg(QWidget* parent)
	: ccOverlayDialog(parent)
	, Ui::CameraParamDlg()
{
    setupUi(this);

    connect(phiSlider,				SIGNAL(valueChanged(int)),		this,   SLOT(iPhiValueChanged(int)));
    connect(thetaSlider,			SIGNAL(valueChanged(int)),		this,   SLOT(iThetaValueChanged(int)));
    connect(psiSlider,				SIGNAL(valueChanged(int)),		this,   SLOT(iPsiValueChanged(int)));
    connect(phiSpinBox,				SIGNAL(valueChanged(double)),	this,   SLOT(dPhiValueChanged(double)));
    connect(thetaSpinBox,			SIGNAL(valueChanged(double)),	this,   SLOT(dThetaValueChanged(double)));
    connect(psiSpinBox,				SIGNAL(valueChanged(double)),	this,   SLOT(dPsiValueChanged(double)));

	//rotation center
    connect(rcxDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,   SLOT(pivotChanged()));
    connect(rcyDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,   SLOT(pivotChanged()));
    connect(rczDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,   SLOT(pivotChanged()));

	//camera center
    connect(exDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,   SLOT(cameraCenterChanged()));
    connect(eyDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,   SLOT(cameraCenterChanged()));
    connect(ezDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,   SLOT(cameraCenterChanged()));

    connect(fovDoubleSpinBox,		SIGNAL(valueChanged(double)),	this,	SLOT(fovChanged(double)));

    connect(viewUpToolButton,		SIGNAL(clicked()),				this,	SLOT(setTopView()));
    connect(viewDownToolButton,		SIGNAL(clicked()),				this,	SLOT(setBottomView()));
    connect(viewFrontToolButton,	SIGNAL(clicked()),				this,	SLOT(setFrontView()));
    connect(viewBackToolButton,		SIGNAL(clicked()),				this,	SLOT(setBackView()));
    connect(viewLeftToolButton,		SIGNAL(clicked()),				this,	SLOT(setLeftView()));
    connect(viewRightToolButton,	SIGNAL(clicked()),				this,	SLOT(setRightView()));
    connect(viewIso1ToolButton,		SIGNAL(clicked()),				this,	SLOT(setIso1View()));
    connect(viewIso2ToolButton,		SIGNAL(clicked()),				this,	SLOT(setIso2View()));

    connect(pushMatrixToolButton,	SIGNAL(clicked()),				this,	SLOT(pushCurrentMatrix()));
    connect(revertMatrixToolButton,	SIGNAL(clicked()),				this,	SLOT(revertToPushedMatrix()));

	connect(pivotPickingToolButton,	SIGNAL(clicked()),				this,	SLOT(pickPointAsPivot()));
}
Example #5
0
ccViewer::ccViewer(QWidget *parent, Qt::WindowFlags flags)
	: QMainWindow(parent, flags)
	, m_glWindow(0)
	, m_selectedObject(0)
	, m_3dMouseInput(0)
{
	ui.setupUi(this);

	//insert GL window in a vertical layout
	QVBoxLayout* verticalLayout_2 = new QVBoxLayout(ui.GLframe);
	verticalLayout_2->setSpacing(0);
	const int margin = 10;
    verticalLayout_2->setContentsMargins(margin,margin,margin,margin);
    QGLFormat format;
    format.setSwapInterval(0);
	m_glWindow = new ccGLWindow(ui.GLframe,format);
	verticalLayout_2->addWidget(m_glWindow);

	updateGLFrameGradient();

	m_glWindow->setRectangularPickingAllowed(false); //multiple entities picking not supported

	//UI/display synchronization
	ui.actionFullScreen->setChecked(false);
	ui.menuSelected->setEnabled(false);
	reflectLightsState();
	reflectPerspectiveState();
	reflectPivotVisibilityState();

#ifdef CC_3DXWARE_SUPPORT
	enable3DMouse(true,true);
#else
	ui.actionEnable3DMouse->setEnabled(false);
#endif

	//Signals & slots connection
	connect(m_glWindow,								SIGNAL(filesDropped(const QStringList&)),			this,		SLOT(addToDB(const QStringList&)));
	connect(m_glWindow,								SIGNAL(entitySelectionChanged(int)),				this,		SLOT(selectEntity(int)));
    //connect(m_glWindow,								SIGNAL(entitiesSelectionChanged(std::set<int>)),	this,		SLOT(selectEntities(std::set<int>))); //not supported!
	//connect(m_glWindow,								SIGNAL(newLabel(ccHObject*),					this,		SLOT(handleNewEntity(ccHObject*))); //nothing to do in ccViewer!

	//"Options" menu
	connect(ui.actionDisplayParameters,				SIGNAL(triggered()),						this,	SLOT(showDisplayParameters()));
    connect(ui.actionEditCamera,					SIGNAL(triggered()),    					this,	SLOT(doActionEditCamera()));
    //"Display > Standard views" menu
    connect(ui.actionSetViewTop,					SIGNAL(triggered()),						this,	SLOT(setTopView()));
    connect(ui.actionSetViewBottom,					SIGNAL(triggered()),						this,	SLOT(setBottomView()));
    connect(ui.actionSetViewFront,					SIGNAL(triggered()),						this,	SLOT(setFrontView()));
    connect(ui.actionSetViewBack,					SIGNAL(triggered()),						this,	SLOT(setBackView()));
    connect(ui.actionSetViewLeft,					SIGNAL(triggered()),						this,	SLOT(setLeftView()));
    connect(ui.actionSetViewRight,					SIGNAL(triggered()),						this,	SLOT(setRightView()));
    connect(ui.actionSetViewIso1,					SIGNAL(triggered()),						this,	SLOT(setIsoView1()));
    connect(ui.actionSetViewIso2,					SIGNAL(triggered()),						this,	SLOT(setIsoView2()));

	//"Options > Perspective" menu
	connect(ui.actionSetOrthoView,					SIGNAL(triggered()),						this,	SLOT(setOrthoView()));
	connect(ui.actionSetCenteredPerspectiveView,	SIGNAL(triggered()),						this,	SLOT(setCenteredPerspectiveView()));
	connect(ui.actionSetViewerPerspectiveView,		SIGNAL(triggered()),						this,	SLOT(setViewerPerspectiveView()));
	//"Options > Rotation symbol" menu
	connect(ui.actionSetPivotAlwaysOn,				SIGNAL(triggered()),						this,	SLOT(setPivotAlwaysOn()));
	connect(ui.actionSetPivotRotationOnly,			SIGNAL(triggered()),						this,	SLOT(setPivotRotationOnly()));
	connect(ui.actionSetPivotOff,					SIGNAL(triggered()),						this,	SLOT(setPivotOff()));
	//"Options > 3D mouse" menu
	connect(ui.actionEnable3DMouse,					SIGNAL(toggled(bool)),						this,	SLOT(setup3DMouse(bool)));
    //"Display > Lights & Materials" menu
    connect(ui.actionToggleSunLight,				SIGNAL(toggled(bool)),    					this,	SLOT(toggleSunLight(bool)));
    connect(ui.actionToggleCustomLight,				SIGNAL(toggled(bool)),    					this,	SLOT(toggleCustomLight(bool)));
	//"Options" menu
	connect(ui.actionGlobalZoom,					SIGNAL(triggered()),						this,	SLOT(setGlobalZoom()));
	connect(ui.actionFullScreen,					SIGNAL(toggled(bool)),						this,	SLOT(toggleFullScreen(bool)));

	//"Options > Selected" menu
	connect(ui.actionShowColors,					SIGNAL(toggled(bool)),    					this,	SLOT(toggleColorsShown(bool)));
	connect(ui.actionShowNormals,					SIGNAL(toggled(bool)),    					this,	SLOT(toggleNormalsShown(bool)));
	connect(ui.actionShowScalarField,				SIGNAL(toggled(bool)),    					this,	SLOT(toggleScalarShown(bool)));
	connect(ui.actionShowColorRamp,					SIGNAL(toggled(bool)),    					this,	SLOT(toggleColorbarShown(bool)));
	connect(ui.actionZoomOnSelectedEntity,			SIGNAL(triggered()),						this,	SLOT(zoomOnSelectedEntity()));
    connect(ui.actionDelete,						SIGNAL(triggered()),						this,	SLOT(doActionDeleteSelectedEntity()));

	//"Help" menu
    connect(ui.actionAbout,							SIGNAL(triggered()),						this,	SLOT(doActionAbout()));
    connect(ui.actionHelpShortctus,					SIGNAL(triggered()),						this,	SLOT(doActionDisplayShortcuts()));
}
Example #6
0
ccViewer::ccViewer(QWidget *parent, Qt::WindowFlags flags)
	: QMainWindow(parent, flags)
	, m_glWindow(0)
	, m_selectedObject(0)
{
	ui.setupUi(this);

	//insert GL window in a vertical layout
	QVBoxLayout* verticalLayout_2 = new QVBoxLayout(ui.GLframe);
	verticalLayout_2->setSpacing(0);
	const int margin = 10;
    verticalLayout_2->setContentsMargins(margin,margin,margin,margin);
    QGLFormat format;
    format.setSwapInterval(0);
	m_glWindow = new ccGLWindow(ui.GLframe,format);
	verticalLayout_2->addWidget(m_glWindow);

	updateGLFrameGradient();

	//UI/display synchronization
	ui.actionToggleSunLight->setChecked(m_glWindow->sunLightEnabled());
	ui.actionToggleCustomLight->setChecked(m_glWindow->customLightEnabled());
	bool perspective,centered;
	perspective = m_glWindow->getPerspectiveState(centered);
	ui.actionDisablePerspective->setChecked(!perspective);
	ui.actionToggleCenteredPerspective->setChecked(perspective && centered);
	ui.actionToggleViewerBasedPerspective->setChecked(perspective && !centered);
	ui.actionFullScreen->setChecked(false);

	ui.menuSelected->setEnabled(false);

	//Signals & slots connection
	connect(m_glWindow,								SIGNAL(filesDropped(const QStringList&)),	this,	SLOT(addToDB(const QStringList&)));
	connect(m_glWindow,								SIGNAL(entitySelectionChanged(int)),		this,	SLOT(selectEntity(int)));
	//connect(m_glWindow,								SIGNAL(newLabel(ccHObject*),				this,	SLOT(handleNewEntity(ccHObject*))); //nothing to do in ccViewer!

	//"Options" menu
	connect(ui.actionDisplayParameters,				SIGNAL(triggered()),						this,	SLOT(showDisplayParameters()));
    connect(ui.actionEditCamera,					SIGNAL(triggered()),    					this,	SLOT(doActionEditCamera()));
    //"Display > Standard views" menu
    connect(ui.actionSetViewTop,					SIGNAL(triggered()),						this,	SLOT(setTopView()));
    connect(ui.actionSetViewBottom,					SIGNAL(triggered()),						this,	SLOT(setBottomView()));
    connect(ui.actionSetViewFront,					SIGNAL(triggered()),						this,	SLOT(setFrontView()));
    connect(ui.actionSetViewBack,					SIGNAL(triggered()),						this,	SLOT(setBackView()));
    connect(ui.actionSetViewLeft,					SIGNAL(triggered()),						this,	SLOT(setLeftView()));
    connect(ui.actionSetViewRight,					SIGNAL(triggered()),						this,	SLOT(setRightView()));
    //"Display > Lights & Materials" menu
    connect(ui.actionToggleSunLight,				SIGNAL(toggled(bool)),    					this,	SLOT(toggleSunLight(bool)));
    connect(ui.actionToggleCustomLight,				SIGNAL(toggled(bool)),    					this,	SLOT(toggleCustomLight(bool)));
	//"Options > Selected" menu
	connect(ui.actionShowColors,					SIGNAL(toggled(bool)),    					this,	SLOT(toggleColorsShown(bool)));
	connect(ui.actionShowNormals,					SIGNAL(toggled(bool)),    					this,	SLOT(toggleNormalsShown(bool)));
	connect(ui.actionShowScalarField,				SIGNAL(toggled(bool)),    					this,	SLOT(toggleScalarShown(bool)));
	connect(ui.actionShowColorRamp,					SIGNAL(toggled(bool)),    					this,	SLOT(toggleColorbarShown(bool)));
    connect(ui.actionDelete,						SIGNAL(triggered()),						this,	SLOT(doActionDeleteSelectedEntity()));
	//"Options > Perspective" menu
    connect(ui.actionDisablePerspective,			SIGNAL(toggled(bool)),						this,	SLOT(togglePerspectiveOff(bool)));
    connect(ui.actionToggleCenteredPerspective,		SIGNAL(toggled(bool)),						this,	SLOT(toggleCenteredPerspective(bool)));
    connect(ui.actionToggleViewerBasedPerspective,	SIGNAL(toggled(bool)),						this,	SLOT(toggleViewerBasedPerspective(bool)));
	//"Options" menu
	connect(ui.actionFullScreen,					SIGNAL(toggled(bool)),						this,	SLOT(toggleFullScreen(bool)));

    //"Help" menu
    connect(ui.actionAbout,							SIGNAL(triggered()),						this,	SLOT(doActionAbout()));
    connect(ui.actionHelpShortctus,					SIGNAL(triggered()),						this,	SLOT(doActionDisplayShortcuts()));
}
Example #7
0
ccViewer::ccViewer(QWidget *parent, Qt::WindowFlags flags)
	: QMainWindow(parent, flags)
	, m_glWindow(0)
	, m_selectedObject(0)
	, m_3dMouseInput(0)
{
	ui.setupUi(this);

#ifdef Q_OS_LINUX
	 //we reset the whole stylesheet but we keep the StatusBar style
	setStyleSheet("");	
	setStyleSheet("QStatusBar{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 rgb(200,200,200), stop:1 rgb(255,255,255));}");
#endif
	
	setWindowTitle(QString("ccViewer V%1").arg(CC_VIEWER_VERSION.title));

	//insert GL window in a vertical layout
	{
		QVBoxLayout* verticalLayout = new QVBoxLayout(ui.GLframe);
		verticalLayout->setSpacing(0);
		const int margin = 10;
		verticalLayout->setContentsMargins(margin, margin, margin, margin);

		bool stereoMode = QSurfaceFormat::defaultFormat().stereo();

		QWidget* glWidget = 0;
		CreateGLWindow(m_glWindow, glWidget, stereoMode);
		assert(m_glWindow && glWidget);

		verticalLayout->addWidget(glWidget);
	}

	updateGLFrameGradient();

	m_glWindow->setRectangularPickingAllowed(false); //multiple entities picking not supported

	//UI/display synchronization
	ui.actionFullScreen->setChecked(false);
	ui.menuSelected->setEnabled(false);
	reflectLightsState();
	reflectPerspectiveState();
	reflectPivotVisibilityState();

#ifdef CC_3DXWARE_SUPPORT
	enable3DMouse(true);
#else
	ui.actionEnable3DMouse->setEnabled(false);
#endif

	//Signals & slots connection
	connect(m_glWindow,								SIGNAL(filesDropped(QStringList)),			this,		SLOT(addToDB(QStringList)));
	connect(m_glWindow,								SIGNAL(entitySelectionChanged(ccHObject*)),	this,		SLOT(selectEntity(ccHObject*)));
	connect(m_glWindow,								SIGNAL(exclusiveFullScreenToggled(bool)),	this,		SLOT(onExclusiveFullScreenToggled(bool)));
	//connect(m_glWindow,							SIGNAL(entitiesSelectionChanged(std::unordered_set<int>)),	this,		SLOT(selectEntities(std::unordered_set<int>))); //not supported!
	//connect(m_glWindow,							SIGNAL(newLabel(ccHObject*),						this,		SLOT(handleNewEntity(ccHObject*))); //nothing to do in ccViewer!

	//"Options" menu
	connect(ui.actionDisplayParameters,				SIGNAL(triggered()),						this,	SLOT(showDisplayParameters()));
	connect(ui.actionEditCamera,					SIGNAL(triggered()),						this,	SLOT(doActionEditCamera()));
	//"Display > Standard views" menu
	connect(ui.actionSetViewTop,					SIGNAL(triggered()),						this,	SLOT(setTopView()));
	connect(ui.actionSetViewBottom,					SIGNAL(triggered()),						this,	SLOT(setBottomView()));
	connect(ui.actionSetViewFront,					SIGNAL(triggered()),						this,	SLOT(setFrontView()));
	connect(ui.actionSetViewBack,					SIGNAL(triggered()),						this,	SLOT(setBackView()));
	connect(ui.actionSetViewLeft,					SIGNAL(triggered()),						this,	SLOT(setLeftView()));
	connect(ui.actionSetViewRight,					SIGNAL(triggered()),						this,	SLOT(setRightView()));
	connect(ui.actionSetViewIso1,					SIGNAL(triggered()),						this,	SLOT(setIsoView1()));
	connect(ui.actionSetViewIso2,					SIGNAL(triggered()),						this,	SLOT(setIsoView2()));

	//"Options > Perspective" menu
	connect(ui.actionSetOrthoView,					SIGNAL(triggered()),						this,	SLOT(setOrthoView()));
	connect(ui.actionSetCenteredPerspectiveView,	SIGNAL(triggered()),						this,	SLOT(setCenteredPerspectiveView()));
	connect(ui.actionSetViewerPerspectiveView,		SIGNAL(triggered()),						this,	SLOT(setViewerPerspectiveView()));
	//"Options > Rotation symbol" menu
	connect(ui.actionSetPivotAlwaysOn,				SIGNAL(triggered()),						this,	SLOT(setPivotAlwaysOn()));
	connect(ui.actionSetPivotRotationOnly,			SIGNAL(triggered()),						this,	SLOT(setPivotRotationOnly()));
	connect(ui.actionSetPivotOff,					SIGNAL(triggered()),						this,	SLOT(setPivotOff()));
	//"Options > 3D mouse" menu
	connect(ui.actionEnable3DMouse,					SIGNAL(toggled(bool)),						this,	SLOT(enable3DMouse(bool)));
	//"Display > Lights & Materials" menu
	connect(ui.actionToggleSunLight,				SIGNAL(toggled(bool)),						this,	SLOT(toggleSunLight(bool)));
	connect(ui.actionToggleCustomLight,				SIGNAL(toggled(bool)),						this,	SLOT(toggleCustomLight(bool)));
	//"Options" menu
	connect(ui.actionGlobalZoom,					SIGNAL(triggered()),						this,	SLOT(setGlobalZoom()));
	connect(ui.actionEnableStereo,					SIGNAL(toggled(bool)),						this,	SLOT(toggleStereoMode(bool)));
	connect(ui.actionFullScreen,					SIGNAL(toggled(bool)),						this,	SLOT(toggleFullScreen(bool)));
	connect(ui.actionLockRotationVertAxis,			SIGNAL(triggered()),						this,	SLOT(toggleRotationAboutVertAxis()));

	//"Options > Selected" menu
	connect(ui.actionShowColors,					SIGNAL(toggled(bool)),						this,	SLOT(toggleColorsShown(bool)));
	connect(ui.actionShowNormals,					SIGNAL(toggled(bool)),						this,	SLOT(toggleNormalsShown(bool)));
	connect(ui.actionShowMaterials,					SIGNAL(toggled(bool)),						this,	SLOT(toggleMaterialsShown(bool)));
	connect(ui.actionShowScalarField,				SIGNAL(toggled(bool)),						this,	SLOT(toggleScalarShown(bool)));
	connect(ui.actionShowColorRamp,					SIGNAL(toggled(bool)),						this,	SLOT(toggleColorbarShown(bool)));
	connect(ui.actionZoomOnSelectedEntity,			SIGNAL(triggered()),						this,	SLOT(zoomOnSelectedEntity()));
	connect(ui.actionDelete,						SIGNAL(triggered()),						this,	SLOT(doActionDeleteSelectedEntity()));


	//"Shaders" menu
	connect(ui.actionNoFilter,						SIGNAL(triggered()),						this,	SLOT(doDisableGLFilter()));

	//"Help" menu
	connect(ui.actionAbout,							SIGNAL(triggered()),						this,	SLOT(doActionAbout()));
	connect(ui.actionHelpShortctus,					SIGNAL(triggered()),						this,	SLOT(doActionDisplayShortcuts()));

	loadPlugins();
}