Skip to content

Commit db1b495

Browse files
Marco Bernasocchipka
Marco Bernasocchi
authored andcommitted
forgot this files in last checkout
1 parent 2e214cb commit db1b495

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

src/plugins/globe/globe_plugin.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ void GlobePlugin::settings()
163163
{
164164
QgsGlobePluginDialog* settingsDialog = new QgsGlobePluginDialog( mQGisIface->mainWindow(), QgisGui::ModalDialogFlags );
165165
settingsDialog->setAttribute( Qt::WA_DeleteOnClose );
166-
settingsDialog->show();
166+
settingsDialog->exec();
167+
168+
//QMessageBox msgBox;
169+
//msgBox.setText(settingsDialog->stereoMode);
170+
//msgBox.exec();
167171
}
168172

169173
void GlobePlugin::setupMap()

src/plugins/globe/globe_plugin_dialog.cpp

+12-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
***************************************************************************/
1818

1919
#include "globe_plugin_dialog.h"
20+
#include "globe_plugin.h"
2021

2122
#include <qgsapplication.h>
2223
#include <qgslogger.h>
@@ -59,6 +60,9 @@ QString QgsGlobePluginDialog::openFile()
5960

6061
void QgsGlobePluginDialog::setStereoMode()
6162
{
63+
//TODO: Call QgsGLWidgetAdapter::setStereoMode(QString stereoMode)
64+
//from GlobePlugin::settings() instead of code duplication
65+
settings.setValue( "/Plugin-Globe/stereoMode", stereoMode );
6266
if("OFF" == stereoMode)
6367
{
6468
osg::DisplaySettings::instance()->setStereo( false );
@@ -79,6 +83,14 @@ void QgsGlobePluginDialog::setStereoMode()
7983
{
8084
osg::DisplaySettings::instance()->setStereoMode( osg::DisplaySettings::VERTICAL_SPLIT );
8185
}
86+
else if("HORIZONTAL_SPLIT" == stereoMode)
87+
{
88+
osg::DisplaySettings::instance()->setStereoMode( osg::DisplaySettings::HORIZONTAL_SPLIT );
89+
}
90+
else if("QUAD_BUFFER" == stereoMode)
91+
{
92+
osg::DisplaySettings::instance()->setStereoMode( osg::DisplaySettings::QUAD_BUFFER );
93+
}
8294
else
8395
{
8496
showMessageBox("This stereo mode has not been implemented yet. Defaulting to ANAGLYPHIC");
@@ -199,7 +211,6 @@ void QgsGlobePluginDialog::on_buttonBox_rejected()
199211
void QgsGlobePluginDialog::on_comboStereoMode_currentIndexChanged( QString mode )
200212
{
201213
stereoMode = mode;
202-
settings.setValue( "/Plugin-Globe/stereoMode", stereoMode );
203214
}
204215

205216
void QgsGlobePluginDialog::showMessageBox( QString text )
@@ -208,4 +219,3 @@ void QgsGlobePluginDialog::showMessageBox( QString text )
208219
msgBox.setText(text);
209220
msgBox.exec();
210221
}
211-

src/plugins/globe/globe_plugin_dialog_guibase.ui

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>491</width>
10-
<height>337</height>
10+
<height>359</height>
1111
</rect>
1212
</property>
1313
<property name="sizePolicy">
@@ -34,7 +34,7 @@
3434
<item>
3535
<widget class="QTabWidget" name="tabWidget">
3636
<property name="currentIndex">
37-
<number>0</number>
37+
<number>1</number>
3838
</property>
3939
<widget class="QWidget" name="elevation">
4040
<attribute name="title">
@@ -56,7 +56,7 @@
5656
<number>2</number>
5757
</property>
5858
<attribute name="horizontalHeaderVisible">
59-
<bool>true</bool>
59+
<bool>false</bool>
6060
</attribute>
6161
<attribute name="horizontalHeaderStretchLastSection">
6262
<bool>true</bool>
@@ -194,7 +194,7 @@
194194
</item>
195195
<item>
196196
<property name="text">
197-
<string>QUAD_BUFFFER</string>
197+
<string>QUAD_BUFFER</string>
198198
</property>
199199
</item>
200200
<item>

0 commit comments

Comments
 (0)