Skip to content

Commit

Permalink
forgot this files in last checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Bernasocchi authored and pka committed Jul 5, 2011
1 parent 2e214cb commit db1b495
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/plugins/globe/globe_plugin.cpp
Expand Up @@ -163,7 +163,11 @@ void GlobePlugin::settings()
{
QgsGlobePluginDialog* settingsDialog = new QgsGlobePluginDialog( mQGisIface->mainWindow(), QgisGui::ModalDialogFlags );
settingsDialog->setAttribute( Qt::WA_DeleteOnClose );
settingsDialog->show();
settingsDialog->exec();

//QMessageBox msgBox;
//msgBox.setText(settingsDialog->stereoMode);
//msgBox.exec();
}

void GlobePlugin::setupMap()
Expand Down
14 changes: 12 additions & 2 deletions src/plugins/globe/globe_plugin_dialog.cpp
Expand Up @@ -17,6 +17,7 @@
***************************************************************************/

#include "globe_plugin_dialog.h"
#include "globe_plugin.h"

#include <qgsapplication.h>
#include <qgslogger.h>
Expand Down Expand Up @@ -59,6 +60,9 @@ QString QgsGlobePluginDialog::openFile()

void QgsGlobePluginDialog::setStereoMode()
{
//TODO: Call QgsGLWidgetAdapter::setStereoMode(QString stereoMode)
//from GlobePlugin::settings() instead of code duplication
settings.setValue( "/Plugin-Globe/stereoMode", stereoMode );
if("OFF" == stereoMode)
{
osg::DisplaySettings::instance()->setStereo( false );
Expand All @@ -79,6 +83,14 @@ void QgsGlobePluginDialog::setStereoMode()
{
osg::DisplaySettings::instance()->setStereoMode( osg::DisplaySettings::VERTICAL_SPLIT );
}
else if("HORIZONTAL_SPLIT" == stereoMode)
{
osg::DisplaySettings::instance()->setStereoMode( osg::DisplaySettings::HORIZONTAL_SPLIT );
}
else if("QUAD_BUFFER" == stereoMode)
{
osg::DisplaySettings::instance()->setStereoMode( osg::DisplaySettings::QUAD_BUFFER );
}
else
{
showMessageBox("This stereo mode has not been implemented yet. Defaulting to ANAGLYPHIC");
Expand Down Expand Up @@ -199,7 +211,6 @@ void QgsGlobePluginDialog::on_buttonBox_rejected()
void QgsGlobePluginDialog::on_comboStereoMode_currentIndexChanged( QString mode )
{
stereoMode = mode;
settings.setValue( "/Plugin-Globe/stereoMode", stereoMode );
}

void QgsGlobePluginDialog::showMessageBox( QString text )
Expand All @@ -208,4 +219,3 @@ void QgsGlobePluginDialog::showMessageBox( QString text )
msgBox.setText(text);
msgBox.exec();
}

8 changes: 4 additions & 4 deletions src/plugins/globe/globe_plugin_dialog_guibase.ui
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>491</width>
<height>337</height>
<height>359</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -34,7 +34,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="elevation">
<attribute name="title">
Expand All @@ -56,7 +56,7 @@
<number>2</number>
</property>
<attribute name="horizontalHeaderVisible">
<bool>true</bool>
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
Expand Down Expand Up @@ -194,7 +194,7 @@
</item>
<item>
<property name="text">
<string>QUAD_BUFFFER</string>
<string>QUAD_BUFFER</string>
</property>
</item>
<item>
Expand Down

0 comments on commit db1b495

Please sign in to comment.