Skip to content
Permalink
Browse files

adding initial cache support

  • Loading branch information
mbernasocchi authored and pka committed Dec 9, 2010
1 parent 43e4ea1 commit 9564033cdb6a8332e344683cbb813f1c8739126c
@@ -276,10 +276,17 @@ void QgsGlobePluginDialog::readElevationDatasources()
QgsProject::instance()->readEntry("Globe-Plugin", "/elevationDatasources/L"+iNum+"/type"));
QTableWidgetItem *uri = new QTableWidgetItem(
QgsProject::instance()->readEntry("Globe-Plugin", "/elevationDatasources/L"+iNum+"/uri"));
bool cache = QgsProject::instance()->readBoolEntry("Globe-Plugin", "/elevationDatasources/L"+iNum+"/cache");

elevationDatasourcesWidget->setRowCount(1+i);
elevationDatasourcesWidget->setItem(i, 0, type);
elevationDatasourcesWidget->setItem(i, 1, uri);
QCheckBox *cacheCheckbox= new QCheckBox();
elevationDatasourcesWidget->setCellWidget(i, 2, cacheCheckbox);
if(cache)
{
cacheCheckbox->setChecked(true);
}
}
}

@@ -290,7 +297,10 @@ void QgsGlobePluginDialog::saveElevationDatasources()
{
QString type = elevationDatasourcesWidget->item(i, 0)->text();
QString uri = elevationDatasourcesWidget->item(i, 1)->text();
bool cache = true; //elevationDatasourcesWidget->item(i, 1)->isChecked();
//TODO
QCheckBox *cacheCheckbox = qobject_cast<QCheckBox*>(elevationDatasourcesWidget->cellWidget(i, 2));
bool cache = cacheCheckbox->isChecked();

QString iNum;
iNum.setNum(i);

@@ -21,6 +21,7 @@
#include <ui_globe_plugin_dialog_guibase.h>
#include <QDialog>
#include <QSettings>
#include <QCheckBox>
#include "qgscontexthelp.h"
#include <qgsproject.h>

@@ -35,6 +36,7 @@ class QgsGlobePluginDialog:public QDialog, private Ui::QgsGlobePluginDialogGuiBa

private:
QSettings settings;
QCheckBox cacheCheckbox;
QString openFile();
void updateStereoDialog();
void restartGlobe();
@@ -280,6 +280,17 @@
</font>
</property>
</column>
<column>
<property name="text">
<string>Cache</string>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
</column>
</widget>
</item>
</layout>

0 comments on commit 9564033

Please sign in to comment.
You can’t perform that action at this time.