patch_for_ticket_2932.diff

Expanded dialog for Overviews. Translate with 2 translatable messages. Version bump to 1.2.10. - dcarreira -, 2010-08-06 11:29 AM

Download (7.26 KB)

View differences:

python/plugins/GdalTools/__init__.py (working copy)
22 22
def description():
23 23
  return "Integrate gdal tools into qgis"
24 24
def version(): 
25
  return "Version 1.2.9" 
25
  return "Version 1.2.10" 
26 26
def qgisMinimumVersion():
27 27
  return "1.0"
28 28
def classFactory(iface): 
python/plugins/GdalTools/tools/doOverview.py (working copy)
32 32
          (self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
33 33
          ( self.algorithmCombo, SIGNAL( "currentIndexChanged( int )" ), self.algorithmCheck ),
34 34
          ( self.levelsEdit, SIGNAL( "textChanged( const QString & )" ) ),
35
          ( self.roModeCheck, SIGNAL( "stateChanged( int )" ) )
35
          ( self.roModeCheck, SIGNAL( "stateChanged( int )" ) ),
36
          ( self.rrdCheck, SIGNAL( "stateChanged(int)" ) ),
37
          ( self.jpegQualitySpin, SIGNAL( "valueChanged (int)" ), self.tiffjpegCheck),
38
          ( self.jpegQualityContainer, None, None, "1.7.0"),                        #only show for GDAL >=1.7.0
39
          ( self.cleanCheck, SIGNAL( "stateChanged(int)" ), None, "1.7.0" )         #only show for GDAL >=1.7.0
36 40
        ]
37 41
      )
38 42

  
......
96 100
        arguments << self.resampling_method[self.algorithmCombo.currentIndex()]
97 101
      if self.roModeCheck.isChecked():
98 102
        arguments << "-ro"
103
      if self.rrdCheck.isChecked():
104
        arguments << "--config" << "USE_RRD" << "YES"
105
      if self.tiffjpegCheck.isChecked():
106
        arguments << "--config" << "COMPRESS_OVERVIEW" << "JPEG" << "--config" << "PHOTOMETRIC_OVERVIEW" << "YCBCR" << "--config" << "INTERLEAVE_OVERVIEW" << "PIXEL"
107
        if self.jpegQualityContainer.isVisible():
108
            arguments << "--config" << "JPEG_QUALITY_OVERVIEW" << self.jpegQualitySpin.cleanText()
109
      if self.cleanCheck.isChecked():
110
          arguments << "-clean"
99 111
      if self.isBatchEnabled():
100 112
        return arguments
101 113

  
python/plugins/GdalTools/tools/doTranslate.py (working copy)
193 193
                      test = int(x)
194 194
              except ValueError:
195 195
                  #print "Coordinates must be integer numbers."
196
                  QMessageBox.critical(self, "Translate - srcwin", "Image coordinates (pixels) must be integer numbers.")
196
                  QMessageBox.critical(self, self.tr("Translate - srcwin"), self.tr("Image coordinates (pixels) must be integer numbers."))
197 197
              else:
198 198
                  arguments << "-srcwin"
199 199
                  for x in coordList:
......
207 207
                      test = float(x)
208 208
              except ValueError:
209 209
                  #print "Coordinates must be integer numbers."
210
                  QMessageBox.critical(self, "Translate - prjwin", "Image coordinates (geographic) must be numbers.")
210
                  QMessageBox.critical(self, self.tr("Translate - prjwin"), self.tr("Image coordinates (geographic) must be numbers."))
211 211
              else:
212 212
                  arguments << "-projwin"
213 213
                  for x in coordList:
python/plugins/GdalTools/tools/widgetOverview.ui (working copy)
6 6
   <rect>
7 7
    <x>0</x>
8 8
    <y>0</y>
9
    <width>376</width>
10
    <height>205</height>
9
    <width>391</width>
10
    <height>293</height>
11 11
   </rect>
12 12
  </property>
13 13
  <property name="sizePolicy">
14
   <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
14
   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
15 15
    <horstretch>0</horstretch>
16 16
    <verstretch>0</verstretch>
17 17
   </sizepolicy>
......
120 120
    </layout>
121 121
   </item>
122 122
   <item>
123
    <widget class="QCheckBox" name="cleanCheck">
124
     <property name="toolTip">
125
      <string>Remove all overviews.</string>
126
     </property>
127
     <property name="text">
128
      <string>Clean</string>
129
     </property>
130
    </widget>
131
   </item>
132
   <item>
123 133
    <widget class="QCheckBox" name="roModeCheck">
134
     <property name="toolTip">
135
      <string>In order to generate external overview (for GeoTIFF especially).</string>
136
     </property>
124 137
     <property name="text">
125 138
      <string>Open in read-only mode</string>
126 139
     </property>
127 140
    </widget>
128 141
   </item>
129 142
   <item>
143
    <widget class="QCheckBox" name="tiffjpegCheck">
144
     <property name="toolTip">
145
      <string>Create external overviews in TIFF format, compressed using JPEG.</string>
146
     </property>
147
     <property name="text">
148
      <string>Overviews in TIFF format with JPEG compression</string>
149
     </property>
150
    </widget>
151
   </item>
152
   <item>
153
    <widget class="QWidget" name="jpegQualityContainer" native="true">
154
     <property name="enabled">
155
      <bool>true</bool>
156
     </property>
157
     <property name="sizePolicy">
158
      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
159
       <horstretch>0</horstretch>
160
       <verstretch>0</verstretch>
161
      </sizepolicy>
162
     </property>
163
     <property name="minimumSize">
164
      <size>
165
       <width>0</width>
166
       <height>25</height>
167
      </size>
168
     </property>
169
     <widget class="QLabel" name="jpegQualityLabel">
170
      <property name="geometry">
171
       <rect>
172
        <x>42</x>
173
        <y>2</y>
174
        <width>131</width>
175
        <height>17</height>
176
       </rect>
177
      </property>
178
      <property name="toolTip">
179
       <string>For JPEG compressed external overviews, 
180
the JPEG quality can be set.</string>
181
      </property>
182
      <property name="text">
183
       <string>JPEG Quality (1-100):</string>
184
      </property>
185
     </widget>
186
     <widget class="QSpinBox" name="jpegQualitySpin">
187
      <property name="enabled">
188
       <bool>true</bool>
189
      </property>
190
      <property name="geometry">
191
       <rect>
192
        <x>170</x>
193
        <y>0</y>
194
        <width>50</width>
195
        <height>23</height>
196
       </rect>
197
      </property>
198
      <property name="toolTip">
199
       <string>For JPEG compressed external overviews, 
200
the JPEG quality can be set.</string>
201
      </property>
202
      <property name="maximum">
203
       <number>100</number>
204
      </property>
205
      <property name="value">
206
       <number>50</number>
207
      </property>
208
     </widget>
209
    </widget>
210
   </item>
211
   <item>
212
    <widget class="QCheckBox" name="rrdCheck">
213
     <property name="toolTip">
214
      <string>Alternate overview format using Erdas Imagine format, 
215
placing the overviews in an associated .aux file 
216
suitable for direct use with Imagine,ArcGIS, GDAL.</string>
217
     </property>
218
     <property name="text">
219
      <string>Use Imagine format (.aux file)</string>
220
     </property>
221
    </widget>
222
   </item>
223
   <item>
130 224
    <widget class="QProgressBar" name="progressBar"/>
131 225
   </item>
132 226
  </layout>