Skip to content

Commit 4e3e0e1

Browse files
committed
Settings dialog
1 parent c2c4848 commit 4e3e0e1

File tree

3 files changed

+241
-91
lines changed

3 files changed

+241
-91
lines changed

src/plugins/globe/globe_plugin_dialog.cpp

-25
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ QgsGlobePluginDialog::QgsGlobePluginDialog( QWidget* parent, Qt::WFlags fl )
4040
setupUi( this );
4141
stereoMode = settings.value( "/Plugin-Globe/stereoMode", "OFF" ).toString();
4242
comboStereoMode->setCurrentIndex( comboStereoMode->findText( stereoMode ) );
43-
44-
earthFile = settings.value( "/Plugin-Globe/earthFile", QgsApplication::pkgDataPath() + "/globe/globe.earth" ).toString();
45-
inputEarthFile->setText( earthFile );
4643
}
4744

4845
//destructor
@@ -89,11 +86,6 @@ void QgsGlobePluginDialog::setStereoMode()
8986
}
9087
}
9188

92-
void QgsGlobePluginDialog::setEarthFile()
93-
{
94-
showMessageBox("TODO: set earth file to " + earthFile);
95-
}
96-
9789
void QgsGlobePluginDialog::restartGlobe()
9890
{
9991
//showMessageBox("TODO: restart globe");
@@ -191,7 +183,6 @@ void QgsGlobePluginDialog::on_buttonBox_accepted()
191183
// Close dialog box
192184
*/
193185
setStereoMode();
194-
setEarthFile();
195186

196187
if ( globeRunning() )
197188
{
@@ -211,22 +202,6 @@ void QgsGlobePluginDialog::on_comboStereoMode_currentIndexChanged( QString mode
211202
settings.setValue( "/Plugin-Globe/stereoMode", stereoMode );
212203
}
213204

214-
void QgsGlobePluginDialog::on_buttonSelectEarthFile_clicked()
215-
{
216-
QString src;
217-
218-
src = openFile();
219-
220-
inputEarthFile->setText( src );
221-
222-
if ( !src.isEmpty() )
223-
{
224-
earthFile = src;
225-
settings.setValue( "/Plugin-Globe/earthFile", earthFile );
226-
}
227-
228-
}
229-
230205
void QgsGlobePluginDialog::showMessageBox( QString text )
231206
{
232207
QMessageBox msgBox;

src/plugins/globe/globe_plugin_dialog.h

-2
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@ class QgsGlobePluginDialog:public QDialog, private Ui::QgsGlobePluginDialogGuiBa
3737
QString openFile();
3838
QSettings settings;
3939
void setStereoMode();
40-
void setEarthFile();
4140
void restartGlobe();
4241
bool globeRunning();
4342
void showMessageBox( QString text);
4443

4544
private slots:
4645
void on_buttonBox_accepted();
4746
void on_buttonBox_rejected();
48-
void on_buttonSelectEarthFile_clicked();
4947
void on_comboStereoMode_currentIndexChanged( QString mode );
5048
};
5149

src/plugins/globe/globe_plugin_dialog_guibase.ui

+241-64
Original file line numberDiff line numberDiff line change
@@ -32,78 +32,258 @@
3232
</property>
3333
<layout class="QVBoxLayout" name="verticalLayout">
3434
<item>
35-
<widget class="QGroupBox" name="earthGroupBox">
36-
<property name="sizePolicy">
37-
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
38-
<horstretch>0</horstretch>
39-
<verstretch>0</verstretch>
40-
</sizepolicy>
35+
<widget class="QTabWidget" name="tabWidget">
36+
<property name="currentIndex">
37+
<number>0</number>
4138
</property>
42-
<property name="title">
43-
<string>Custom Earth file</string>
44-
</property>
45-
<layout class="QGridLayout" name="gridLayout_2">
46-
<item row="0" column="0">
47-
<widget class="QLineEdit" name="inputEarthFile">
48-
<property name="minimumSize">
49-
<size>
50-
<width>200</width>
51-
<height>25</height>
52-
</size>
53-
</property>
54-
</widget>
55-
</item>
56-
<item row="0" column="1">
57-
<widget class="QPushButton" name="buttonSelectEarthFile">
39+
<widget class="QWidget" name="elevation">
40+
<attribute name="title">
41+
<string>Elevation</string>
42+
</attribute>
43+
<widget class="QTableWidget" name="tableWidget">
44+
<property name="geometry">
45+
<rect>
46+
<x>0</x>
47+
<y>140</y>
48+
<width>461</width>
49+
<height>131</height>
50+
</rect>
51+
</property>
52+
<property name="rowCount">
53+
<number>1</number>
54+
</property>
55+
<property name="columnCount">
56+
<number>2</number>
57+
</property>
58+
<attribute name="horizontalHeaderVisible">
59+
<bool>true</bool>
60+
</attribute>
61+
<attribute name="horizontalHeaderStretchLastSection">
62+
<bool>true</bool>
63+
</attribute>
64+
<attribute name="verticalHeaderVisible">
65+
<bool>false</bool>
66+
</attribute>
67+
<row/>
68+
<column>
5869
<property name="text">
59-
<string>Browse</string>
70+
<string>Type</string>
6071
</property>
61-
</widget>
62-
</item>
63-
</layout>
64-
</widget>
65-
</item>
66-
<item>
67-
<widget class="QGroupBox" name="stereoGroupBox">
68-
<property name="sizePolicy">
69-
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
70-
<horstretch>0</horstretch>
71-
<verstretch>0</verstretch>
72-
</sizepolicy>
73-
</property>
74-
<property name="title">
75-
<string>Stereo 3D</string>
76-
</property>
77-
<layout class="QGridLayout" name="gridLayout_3">
78-
<item row="0" column="0" colspan="2">
79-
<widget class="QComboBox" name="comboStereoMode">
80-
<property name="minimumSize">
81-
<size>
82-
<width>300</width>
83-
<height>25</height>
84-
</size>
72+
</column>
73+
<column>
74+
<property name="text">
75+
<string>Address</string>
8576
</property>
86-
<property name="maxCount">
87-
<number>200</number>
77+
</column>
78+
<item row="0" column="0">
79+
<property name="text">
80+
<string>Worldwind</string>
8881
</property>
89-
<item>
82+
</item>
83+
</widget>
84+
<widget class="QGroupBox" name="groupBox">
85+
<property name="geometry">
86+
<rect>
87+
<x>0</x>
88+
<y>0</y>
89+
<width>461</width>
90+
<height>101</height>
91+
</rect>
92+
</property>
93+
<property name="title">
94+
<string>Elevation Layer</string>
95+
</property>
96+
<layout class="QGridLayout" name="gridLayout_2">
97+
<item row="0" column="0">
98+
<widget class="QLabel" name="label_9">
99+
<property name="text">
100+
<string>Type</string>
101+
</property>
102+
</widget>
103+
</item>
104+
<item row="0" column="1">
105+
<widget class="QComboBox" name="comboBox">
106+
<item>
107+
<property name="text">
108+
<string>TMS</string>
109+
</property>
110+
</item>
111+
<item>
112+
<property name="text">
113+
<string>Raster</string>
114+
</property>
115+
</item>
116+
<item>
117+
<property name="text">
118+
<string>Worldwind</string>
119+
</property>
120+
</item>
121+
</widget>
122+
</item>
123+
<item row="1" column="0">
124+
<widget class="QLabel" name="label_10">
125+
<property name="text">
126+
<string>URL/File</string>
127+
</property>
128+
</widget>
129+
</item>
130+
<item row="1" column="1">
131+
<widget class="QLineEdit" name="lineEdit"/>
132+
</item>
133+
</layout>
134+
</widget>
135+
<widget class="QPushButton" name="pushButton">
136+
<property name="geometry">
137+
<rect>
138+
<x>130</x>
139+
<y>100</y>
140+
<width>92</width>
141+
<height>24</height>
142+
</rect>
143+
</property>
144+
<property name="text">
145+
<string>Add</string>
146+
</property>
147+
</widget>
148+
<widget class="QPushButton" name="pushButton_2">
149+
<property name="geometry">
150+
<rect>
151+
<x>240</x>
152+
<y>100</y>
153+
<width>92</width>
154+
<height>24</height>
155+
</rect>
156+
</property>
157+
<property name="text">
158+
<string>Remove</string>
159+
</property>
160+
</widget>
161+
</widget>
162+
<widget class="QWidget" name="stereo">
163+
<attribute name="title">
164+
<string>Stereo</string>
165+
</attribute>
166+
<layout class="QGridLayout" name="gridLayout">
167+
<item row="0" column="0">
168+
<widget class="QLabel" name="label_2">
90169
<property name="text">
91-
<string>OFF</string>
170+
<string>Stereo Mode</string>
92171
</property>
93-
</item>
94-
<item>
172+
</widget>
173+
</item>
174+
<item row="0" column="1" colspan="2">
175+
<widget class="QComboBox" name="comboStereoMode">
176+
<property name="minimumSize">
177+
<size>
178+
<width>300</width>
179+
<height>25</height>
180+
</size>
181+
</property>
182+
<property name="maxCount">
183+
<number>200</number>
184+
</property>
185+
<item>
186+
<property name="text">
187+
<string>OFF</string>
188+
</property>
189+
</item>
190+
<item>
191+
<property name="text">
192+
<string>ANAGLYPHIC</string>
193+
</property>
194+
</item>
195+
<item>
196+
<property name="text">
197+
<string>QUAD_BUFFFER</string>
198+
</property>
199+
</item>
200+
<item>
201+
<property name="text">
202+
<string>HORIZONTAL_SPLIT</string>
203+
</property>
204+
</item>
205+
<item>
206+
<property name="text">
207+
<string>VERTICAL_SPLIT</string>
208+
</property>
209+
</item>
210+
</widget>
211+
</item>
212+
<item row="1" column="0">
213+
<widget class="QLabel" name="label">
95214
<property name="text">
96-
<string>ANAGLYPHIC</string>
215+
<string>SCREEN_DISTANCE</string>
97216
</property>
98-
</item>
99-
<item>
217+
<property name="buddy">
218+
<cstring>xxxx</cstring>
219+
</property>
220+
</widget>
221+
</item>
222+
<item row="1" column="2">
223+
<widget class="QDoubleSpinBox" name="xxxx"/>
224+
</item>
225+
<item row="2" column="0">
226+
<widget class="QLabel" name="label_3">
100227
<property name="text">
101-
<string>VERTICAL_SPLIT</string>
228+
<string>SCREEN_WIDTH </string>
102229
</property>
103-
</item>
104-
</widget>
105-
</item>
106-
</layout>
230+
</widget>
231+
</item>
232+
<item row="2" column="2">
233+
<widget class="QDoubleSpinBox" name="xxxx_2"/>
234+
</item>
235+
<item row="3" column="0">
236+
<widget class="QLabel" name="label_4">
237+
<property name="text">
238+
<string>EYE_SEPARATION </string>
239+
</property>
240+
</widget>
241+
</item>
242+
<item row="3" column="2">
243+
<widget class="QDoubleSpinBox" name="xxxx_3"/>
244+
</item>
245+
<item row="4" column="0" colspan="2">
246+
<widget class="QLabel" name="label_5">
247+
<property name="text">
248+
<string>SPLIT_STEREO_HORIZONTAL_SEPARATION</string>
249+
</property>
250+
</widget>
251+
</item>
252+
<item row="4" column="2">
253+
<widget class="QDoubleSpinBox" name="xxxx_4"/>
254+
</item>
255+
<item row="5" column="0" colspan="2">
256+
<widget class="QLabel" name="label_6">
257+
<property name="text">
258+
<string>SPLIT_STEREO_HORIZONTAL_EYE_MAPPING</string>
259+
</property>
260+
</widget>
261+
</item>
262+
<item row="5" column="2">
263+
<widget class="QDoubleSpinBox" name="xxxx_5"/>
264+
</item>
265+
<item row="6" column="0" colspan="2">
266+
<widget class="QLabel" name="label_7">
267+
<property name="text">
268+
<string>SPLIT_STEREO_VERTICAL_SEPARATION </string>
269+
</property>
270+
</widget>
271+
</item>
272+
<item row="6" column="2">
273+
<widget class="QDoubleSpinBox" name="xxxx_6"/>
274+
</item>
275+
<item row="7" column="0" colspan="2">
276+
<widget class="QLabel" name="label_8">
277+
<property name="text">
278+
<string>SPLIT_STEREO_VERTICAL_EYE_MAPPING</string>
279+
</property>
280+
</widget>
281+
</item>
282+
<item row="7" column="2">
283+
<widget class="QDoubleSpinBox" name="xxxx_7"/>
284+
</item>
285+
</layout>
286+
</widget>
107287
</widget>
108288
</item>
109289
<item>
@@ -117,9 +297,6 @@
117297
</widget>
118298
<layoutdefault spacing="6" margin="11"/>
119299
<tabstops>
120-
<tabstop>inputEarthFile</tabstop>
121-
<tabstop>buttonSelectEarthFile</tabstop>
122-
<tabstop>comboStereoMode</tabstop>
123300
<tabstop>buttonBox</tabstop>
124301
</tabstops>
125302
<resources/>

0 commit comments

Comments
 (0)