Index: src/gui/qgsoptions.cpp
===================================================================
--- src/gui/qgsoptions.cpp (revision 6267)
+++ src/gui/qgsoptions.cpp (working copy)
@@ -122,6 +122,12 @@
myGreen = settings.value("/qgis/default_canvas_color_green",255).toInt();
myBlue = settings.value("/qgis/default_canvas_color_blue",255).toInt();
pbnCanvasColor->setColor( QColor(myRed,myGreen,myBlue) );
+
+ // set the default color for the measure tool
+ myRed = settings.value("/qgis/default_measure_color_red",180).toInt();
+ myGreen = settings.value("/qgis/default_measure_color_green",180).toInt();
+ myBlue = settings.value("/qgis/default_measure_color_blue",180).toInt();
+ pbnMeasureColour->setColor( QColor(myRed,myGreen,myBlue) );
capitaliseCheckBox->setChecked(settings.value("qgis/capitaliseLayerName", QVariant(false)).toBool());
@@ -151,6 +157,16 @@
pbnCanvasColor->setColor(color);
}
}
+
+void QgsOptions::on_pbnMeasureColour_clicked()
+{
+ QColor color = QColorDialog::getColor(pbnMeasureColour->color(), this);
+ if (color.isValid())
+ {
+ pbnMeasureColour->setColor(color);
+ }
+}
+
void QgsOptions::themeChanged(const QString &newThemeName)
{
// Slot to change the theme as user scrolls through the choices
@@ -214,6 +230,12 @@
myGreen = settings.writeEntry("/qgis/default_canvas_color_green",myColor.green());
myBlue = settings.writeEntry("/qgis/default_canvas_color_blue",myColor.blue());
+ //set the default color for the measure tool
+ myColor = pbnMeasureColour->color();
+ myRed = settings.writeEntry("/qgis/default_measure_color_red",myColor.red());
+ myGreen = settings.writeEntry("/qgis/default_measure_color_green",myColor.green());
+ myBlue = settings.writeEntry("/qgis/default_measure_color_blue",myColor.blue());
+
settings.writeEntry("/qgis/wheel_action", cmbWheelAction->currentIndex());
settings.writeEntry("/qgis/zoom_factor", spinZoomFactor->value());
Index: src/gui/qgsoptions.h
===================================================================
--- src/gui/qgsoptions.h (revision 6267)
+++ src/gui/qgsoptions.h (working copy)
@@ -69,6 +69,11 @@
void on_pbnSelectionColour_clicked();
/*!
+ * Slot to select the default measure tool colour
+ */
+ void on_pbnMeasureColour_clicked();
+
+ /*!
* Slot to select the default map selection colour
*/
void on_pbnCanvasColor_clicked();
Index: src/gui/qgsmeasure.cpp
===================================================================
--- src/gui/qgsmeasure.cpp (revision 6267)
+++ src/gui/qgsmeasure.cpp (working copy)
@@ -57,8 +57,15 @@
connect( mMapCanvas, SIGNAL(renderComplete(QPainter*)), this, SLOT(mapCanvasChanged()) );
mCalc = new QgsDistanceArea;
+
+ // read color settings
+ QSettings settings;
+ int myRed = settings.readNumEntry("/qgis/default_measure_color_red", 180);
+ int myGreen = settings.readNumEntry("/qgis/default_measure_color_green", 180);
+ int myBlue = settings.readNumEntry("/qgis/default_measure_color_blue", 180);
mRubberBand = new QgsRubberBand(mMapCanvas, mMeasureArea);
+ mRubberBand->setColor(QColor(myRed, myGreen, myBlue));
mCanvas->setCursor(Qt::CrossCursor);
@@ -104,6 +111,13 @@
mRubberBand->reset(mMeasureArea);
+ // re-read color settings
+ QSettings settings;
+ int myRed = settings.readNumEntry("/qgis/default_measure_color_red", 180);
+ int myGreen = settings.readNumEntry("/qgis/default_measure_color_green", 180);
+ int myBlue = settings.readNumEntry("/qgis/default_measure_color_blue", 180);
+ mRubberBand->setColor(QColor(myRed, myGreen, myBlue));
+
mRightMouseClicked = false;
}
Index: src/ui/qgsoptionsbase.ui
===================================================================
--- src/ui/qgsoptionsbase.ui (revision 6267)
+++ src/ui/qgsoptionsbase.ui (working copy)
@@ -28,7 +28,7 @@
-
- 0
+ 2
@@ -149,7 +149,7 @@
Selection Color:
- pbnSelectionColour
+ pbnMeasureColour
@@ -405,23 +405,10 @@
6
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
-
+
-
+
- Search radius
+ Panning and zooming
@@ -430,43 +417,49 @@
6
-
-
-
+
-
+
+
-
+
+ Zoom
+
+
+ -
+
+ Zoom and recenter
+
+
+ -
+
+ Nothing
+
+
+
+
+ -
+
- <html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Note:</span> Specify the search radius as a percentage of the map width.</p>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html>
+ Zoom factor:
-
- true
-
-
-
+
- Search Radius for Identifying Features
+ Mouse wheel action:
-
- spinBoxIdentifyValue
-
- -
-
-
- %
+
-
+
+
+ 1
-
- 100.000000000000000
+
+ 1.100000000000000
-
- 0.010000000000000
-
- 5.000000000000000
+ 2.000000000000000
@@ -485,6 +478,45 @@
6
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 191
+ 20
+
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ Rubberband color:
+
+
+ cmbEllipsoid
+
+
+
-
@@ -495,16 +527,13 @@
- -
-
-
- -
-
+
-
+
- Panning and zooming
+ Search radius
@@ -513,55 +542,62 @@
6
-
-
-
-
-
-
- Zoom
-
-
- -
-
- Zoom and recenter
-
-
- -
-
- Nothing
-
-
-
-
- -
-
+
-
+
- Zoom factor:
+ <html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Note:</span> Specify the search radius as a percentage of the map width.</p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html>
+
+ true
+
-
-
+
- Mouse wheel action:
+ Search Radius for Identifying Features
+
+ spinBoxIdentifyValue
+
- -
-
-
- 1
+
-
+
+
+ %
-
- 1.100000000000000
+
+ 100.000000000000000
+
+ 0.010000000000000
+
- 2.000000000000000
+ 5.000000000000000
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+