[QGIS Commit] r8120 - trunk/qgis/src/plugins/grid_maker
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Feb 8 07:43:22 EST 2008
Author: timlinux
Date: 2008-02-08 07:43:21 -0500 (Fri, 08 Feb 2008)
New Revision: 8120
Modified:
trunk/qgis/src/plugins/grid_maker/plugingui.cpp
trunk/qgis/src/plugins/grid_maker/pluginguibase.ui
Log:
Allow large numbers to be entered (reverted to line edits)
Saved ui in qt4.2.x
Modified: trunk/qgis/src/plugins/grid_maker/plugingui.cpp
===================================================================
--- trunk/qgis/src/plugins/grid_maker/plugingui.cpp 2008-02-08 11:17:27 UTC (rev 8119)
+++ trunk/qgis/src/plugins/grid_maker/plugingui.cpp 2008-02-08 12:43:21 UTC (rev 8120)
@@ -39,12 +39,12 @@
//
QgsLogger::debug("GrativuleCreator called with: " +
leOutputShapeFile->text() + " " +
- spindblXInterval->text() + " " +
- spindblYInterval->text() + " " +
- QString::number(spindblMinX->value()) + " " +
- QString::number(spindblMinY->value()) + " " +
- QString::number(spindblMaxX->value()) + " " +
- QString::number(spindblMaxY->value()));
+ leXInterval->text() + " " +
+ leYInterval->text() + " " +
+ leXLowerLeft->text() + " " +
+ leYLowerLeft->text() + " " +
+ leXUpperRight->text() + " " +
+ leYUpperRight->text());
if (leOutputShapeFile->text().isEmpty())
{
@@ -54,36 +54,36 @@
}
- double myLongitudeInterval = spindblXInterval->value();
- double myLatitudeInterval = spindblYInterval->value();
- double myLongitudeOrigin = spindblMinX->value();
- double myLatitudeOrigin = spindblMinY->value();
- double myEndPointLongitude = spindblMaxX->value();
- double myEndPointLatitude = spindblMaxY->value();
+ double myXInterval = leXInterval->text().toDouble();
+ double myYInterval = leYInterval->text().toDouble();
+ double myXOrigin = leXLowerLeft->text().toDouble();
+ double myYOrigin = leYLowerLeft->text().toDouble();
+ double myEndPointX = leXUpperRight->text().toDouble();
+ double myEndPointY = leYUpperRight->text().toDouble();
if (radPoint->isChecked())
{
GraticuleCreator myGraticuleCreator ( leOutputShapeFile->text());
myGraticuleCreator.generatePointGraticule(
- myLongitudeInterval,
- myLatitudeInterval,
- myLongitudeOrigin,
- myLatitudeOrigin,
- myEndPointLongitude,
- myEndPointLatitude
+ myXInterval,
+ myYInterval,
+ myXOrigin,
+ myYOrigin,
+ myEndPointX,
+ myEndPointY
);
}
else
{
GraticuleCreator myGraticuleCreator ( leOutputShapeFile->text());
myGraticuleCreator.generatePolygonGraticule(
- myLongitudeInterval,
- myLatitudeInterval,
- myLongitudeOrigin,
- myLatitudeOrigin,
- myEndPointLongitude,
- myEndPointLatitude
+ myXInterval,
+ myYInterval,
+ myXOrigin,
+ myYOrigin,
+ myEndPointX,
+ myEndPointY
);
}
//
Modified: trunk/qgis/src/plugins/grid_maker/pluginguibase.ui
===================================================================
--- trunk/qgis/src/plugins/grid_maker/pluginguibase.ui 2008-02-08 11:17:27 UTC (rev 8119)
+++ trunk/qgis/src/plugins/grid_maker/pluginguibase.ui 2008-02-08 12:43:21 UTC (rev 8120)
@@ -16,112 +16,50 @@
<iconset/>
</property>
<layout class="QGridLayout" >
- <item row="0" column="0" colspan="2" >
- <widget class="QLabel" name="txtHeading" >
- <property name="font" >
- <font>
- <family>Sans Serif</family>
- <pointsize>24</pointsize>
- <weight>50</weight>
- <italic>false</italic>
- <bold>false</bold>
- <underline>false</underline>
- <strikeout>false</strikeout>
- </font>
- </property>
- <property name="text" >
- <string>Graticule Builder</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item rowspan="6" row="1" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string/>
- </property>
- <property name="pixmap" >
- <pixmap resource="gridmaker_plugin.qrc" >:/grid_pic2.png</pixmap>
- </property>
- <property name="scaledContents" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QTextEdit" name="textEdit" >
- <property name="readOnly" >
- <bool>true</bool>
- </property>
- <property name="html" >
- <string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:11pt;"><span style=" font-size:10pt;">This plugin will help you to build a graticule shapefile that you can use as an overlay within your qgis map viewer.</span></p>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:10pt;">Please enter all units in decimal degrees</p></body></html></string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QGroupBox" name="groupBox1" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="5" column="1" >
+ <widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
- <string>Type</string>
+ <string>Graticle size</string>
</property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QRadioButton" name="radPoint" >
- <property name="text" >
- <string>Point</string>
- </property>
- <property name="checked" >
- <bool>true</bool>
- </property>
- </widget>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="3" >
+ <widget class="QLineEdit" name="leYInterval" />
</item>
- <item>
- <widget class="QRadioButton" name="radPolygon" >
- <property name="text" >
- <string>Polygon</string>
- </property>
- </widget>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="leXInterval" />
</item>
- </layout>
- </widget>
- </item>
- <item row="3" column="1" >
- <widget class="QGroupBox" name="groupBox" >
- <property name="title" >
- <string>Origin (lower left)</string>
- </property>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="textLabel1" >
+ <item row="0" column="2" >
+ <widget class="QLabel" name="lblMinDistanceGap" >
<property name="text" >
- <string>X</string>
+ <string>Y Interval:</string>
</property>
<property name="buddy" >
- <cstring>spindblMinX</cstring>
+ <cstring>leYInterval</cstring>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QDoubleSpinBox" name="spindblMinX" />
- </item>
- <item row="0" column="2" >
- <widget class="QLabel" name="textLabel1_2" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="lblMinTimeGap" >
<property name="text" >
- <string>Y</string>
+ <string>X Interval:</string>
</property>
<property name="buddy" >
- <cstring>spindblMinY</cstring>
+ <cstring>leXInterval</cstring>
</property>
</widget>
</item>
- <item row="0" column="3" >
- <widget class="QDoubleSpinBox" name="spindblMinY" />
- </item>
</layout>
</widget>
</item>
@@ -131,18 +69,17 @@
<string>End point (upper right)</string>
</property>
<layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="textLabel1_3" >
- <property name="text" >
- <string>X</string>
- </property>
- <property name="buddy" >
- <cstring>spindblMaxX</cstring>
- </property>
- </widget>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="3" >
+ <widget class="QLineEdit" name="leYUpperRight" />
</item>
<item row="0" column="1" >
- <widget class="QDoubleSpinBox" name="spindblMaxX" />
+ <widget class="QLineEdit" name="leXUpperRight" />
</item>
<item row="0" column="2" >
<widget class="QLabel" name="textLabel1_2_2" >
@@ -150,57 +87,86 @@
<string>Y</string>
</property>
<property name="buddy" >
- <cstring>spindblMaxY</cstring>
+ <cstring>leYUpperRight</cstring>
</property>
</widget>
</item>
- <item row="0" column="3" >
- <widget class="QDoubleSpinBox" name="spindblMaxY" />
+ <item row="0" column="0" >
+ <widget class="QLabel" name="textLabel1_3" >
+ <property name="text" >
+ <string>X</string>
+ </property>
+ <property name="buddy" >
+ <cstring>leXUpperRight</cstring>
+ </property>
+ </widget>
</item>
</layout>
</widget>
</item>
- <item row="5" column="1" >
- <widget class="QGroupBox" name="groupBox_2" >
+ <item row="3" column="1" >
+ <widget class="QGroupBox" name="groupBox" >
<property name="title" >
- <string>Graticle size</string>
+ <string>Origin (lower left)</string>
</property>
<layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="lblMinTimeGap" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="3" >
+ <widget class="QLineEdit" name="leYLowerLeft" />
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="leXLowerLeft" />
+ </item>
+ <item row="0" column="2" >
+ <widget class="QLabel" name="textLabel1_2" >
<property name="text" >
- <string>X Interval:</string>
+ <string>Y</string>
</property>
<property name="buddy" >
- <cstring>spindblXInterval</cstring>
+ <cstring>leYLowerLeft</cstring>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QDoubleSpinBox" name="spindblXInterval" />
- </item>
- <item row="0" column="2" >
- <widget class="QLabel" name="lblMinDistanceGap" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="textLabel1" >
<property name="text" >
- <string>Y Interval:</string>
+ <string>X</string>
</property>
<property name="buddy" >
- <cstring>spindblYInterval</cstring>
+ <cstring>leXLowerLeft</cstring>
</property>
</widget>
</item>
- <item row="0" column="3" >
- <widget class="QDoubleSpinBox" name="spindblYInterval" />
- </item>
</layout>
</widget>
</item>
+ <item row="7" column="0" colspan="2" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
<item row="6" column="1" >
<widget class="QGroupBox" name="groupBox_4" >
<property name="title" >
<string>Output (shape) file</string>
</property>
<layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>11</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
<item>
<widget class="QLineEdit" name="leOutputShapeFile" />
</item>
@@ -214,31 +180,101 @@
</layout>
</widget>
</item>
- <item row="7" column="0" colspan="2" >
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
+ <item row="2" column="1" >
+ <widget class="QGroupBox" name="groupBox1" >
+ <property name="title" >
+ <string>Type</string>
</property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>11</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="radPoint" >
+ <property name="text" >
+ <string>Point</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radPolygon" >
+ <property name="text" >
+ <string>Polygon</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QTextEdit" name="textEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
</property>
+ <property name="html" >
+ <string><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:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:11pt;"><span style=" font-size:10pt;">This plugin will help you to build a graticule shapefile that you can use as an overlay within your qgis map viewer.</span></p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:10pt;">Please enter all units in decimal degrees</p></body></html></string>
+ </property>
</widget>
</item>
+ <item rowspan="6" row="1" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string/>
+ </property>
+ <property name="pixmap" >
+ <pixmap resource="gridmaker_plugin.qrc" >:/grid_pic2.png</pixmap>
+ </property>
+ <property name="scaledContents" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" colspan="2" >
+ <widget class="QLabel" name="txtHeading" >
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>24</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>Graticule Builder</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<tabstops>
- <tabstop>textEdit</tabstop>
<tabstop>radPoint</tabstop>
<tabstop>radPolygon</tabstop>
- <tabstop>spindblMinX</tabstop>
- <tabstop>spindblMinY</tabstop>
- <tabstop>spindblMaxX</tabstop>
- <tabstop>spindblMaxY</tabstop>
- <tabstop>spindblXInterval</tabstop>
- <tabstop>spindblYInterval</tabstop>
+ <tabstop>leXLowerLeft</tabstop>
+ <tabstop>leYLowerLeft</tabstop>
+ <tabstop>leXUpperRight</tabstop>
+ <tabstop>leYUpperRight</tabstop>
+ <tabstop>leXInterval</tabstop>
+ <tabstop>leYInterval</tabstop>
<tabstop>leOutputShapeFile</tabstop>
<tabstop>pbnSelectOutputFile</tabstop>
+ <tabstop>textEdit</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
More information about the QGIS-commit
mailing list