[QGIS Commit] r15482 - in trunk/qgis/src: app app/postgres app/spatialite plugins/wfs ui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Mar 14 17:27:27 EDT 2011


Author: jef
Date: 2011-03-14 14:27:27 -0700 (Mon, 14 Mar 2011)
New Revision: 15482

Modified:
   trunk/qgis/src/app/postgres/qgspgsourceselect.cpp
   trunk/qgis/src/app/postgres/qgspgsourceselect.h
   trunk/qgis/src/app/qgswmssourceselect.cpp
   trunk/qgis/src/app/qgswmssourceselect.h
   trunk/qgis/src/app/spatialite/qgsspatialitesourceselect.cpp
   trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp
   trunk/qgis/src/plugins/wfs/qgswfssourceselect.h
   trunk/qgis/src/plugins/wfs/qgswfssourceselectbase.ui
   trunk/qgis/src/ui/qgsdbsourceselectbase.ui
   trunk/qgis/src/ui/qgswmssourceselectbase.ui
Log:
fix #3617

Modified: trunk/qgis/src/app/postgres/qgspgsourceselect.cpp
===================================================================
--- trunk/qgis/src/app/postgres/qgspgsourceselect.cpp	2011-03-14 20:42:20 UTC (rev 15481)
+++ trunk/qgis/src/app/postgres/qgspgsourceselect.cpp	2011-03-14 21:27:27 UTC (rev 15482)
@@ -61,17 +61,6 @@
   connect( mBuildQueryButton, SIGNAL( clicked() ), this, SLOT( buildQuery() ) );
   mBuildQueryButton->setDisabled( true );
 
-  QPushButton *pb;
-  pb = new QPushButton( tr( "&Save" ) );
-  pb->setToolTip( tr( "Save connections" ) );
-  buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
-  connect( pb, SIGNAL( clicked() ), this, SLOT( saveClicked() ) );
-
-  pb = new QPushButton( tr( "&Load" ) );
-  pb->setToolTip( tr( "Load connections" ) );
-  buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
-  connect( pb, SIGNAL( clicked() ), this, SLOT( loadClicked() ) );
-
   mAddButton->setEnabled( false );
   populateConnectionList();
 
@@ -166,13 +155,13 @@
   populateConnectionList();
 }
 
-void QgsPgSourceSelect::saveClicked()
+void QgsPgSourceSelect::on_btnSave_clicked()
 {
   QgsManageConnectionsDialog dlg( this, QgsManageConnectionsDialog::Export, QgsManageConnectionsDialog::PostGIS );
   dlg.exec();
 }
 
-void QgsPgSourceSelect::loadClicked()
+void QgsPgSourceSelect::on_btnLoad_clicked()
 {
   QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
                      tr( "XML files (*.xml *XML)" ) );

Modified: trunk/qgis/src/app/postgres/qgspgsourceselect.h
===================================================================
--- trunk/qgis/src/app/postgres/qgspgsourceselect.h	2011-03-14 20:42:20 UTC (rev 15481)
+++ trunk/qgis/src/app/postgres/qgspgsourceselect.h	2011-03-14 21:27:27 UTC (rev 15482)
@@ -133,9 +133,9 @@
     //! Deletes the selected connection
     void on_btnDelete_clicked();
     //! Saves the selected connections to file
-    void saveClicked();
+    void on_btnSave_clicked();
     //! Loads the selected connections from file
-    void loadClicked();
+    void on_btnLoad_clicked();
     void on_mSearchTableEdit_textChanged( const QString & text );
     void on_mSearchColumnComboBox_currentIndexChanged( const QString & text );
     void on_mSearchModeComboBox_currentIndexChanged( const QString & text );

Modified: trunk/qgis/src/app/qgswmssourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgswmssourceselect.cpp	2011-03-14 20:42:20 UTC (rev 15481)
+++ trunk/qgis/src/app/qgswmssourceselect.cpp	2011-03-14 21:27:27 UTC (rev 15482)
@@ -62,16 +62,6 @@
   buttonBox->addButton( mAddButton, QDialogButtonBox::ActionRole );
   connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addClicked() ) );
 
-  QPushButton *pb = new QPushButton( tr( "&Save" ) );
-  pb->setToolTip( tr( "Save WMS server connections to file" ) );
-  buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
-  connect( pb, SIGNAL( clicked() ), this, SLOT( saveClicked() ) );
-
-  pb = new QPushButton( tr( "&Load" ) );
-  pb->setToolTip( tr( "Load WMS server connections from file" ) );
-  buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
-  connect( pb, SIGNAL( clicked() ), this, SLOT( loadClicked() ) );
-
   mLayerUpButton->setIcon( QgisApp::getThemeIcon( "/mActionArrowUp.png" ) );
   mLayerDownButton->setIcon( QgisApp::getThemeIcon( "/mActionArrowDown.png" ) );
 
@@ -244,13 +234,13 @@
   }
 }
 
-void QgsWMSSourceSelect::saveClicked()
+void QgsWMSSourceSelect::on_btnSave_clicked()
 {
   QgsManageConnectionsDialog dlg( this, QgsManageConnectionsDialog::Export, QgsManageConnectionsDialog::WMS );
   dlg.exec();
 }
 
-void QgsWMSSourceSelect::loadClicked()
+void QgsWMSSourceSelect::on_btnLoad_clicked()
 {
   QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
                      tr( "XML files (*.xml *XML)" ) );

Modified: trunk/qgis/src/app/qgswmssourceselect.h
===================================================================
--- trunk/qgis/src/app/qgswmssourceselect.h	2011-03-14 20:42:20 UTC (rev 15481)
+++ trunk/qgis/src/app/qgswmssourceselect.h	2011-03-14 21:27:27 UTC (rev 15482)
@@ -60,9 +60,9 @@
     //! Deletes the selected connection
     void on_btnDelete_clicked();
     //! Saves connections to the file
-    void saveClicked();
+    void on_btnSave_clicked();
     //! Loads connections from the file
-    void loadClicked();
+    void on_btnLoad_clicked();
 
     /*! Connects to the database using the stored connection parameters.
     * Once connected, available layers are displayed.

Modified: trunk/qgis/src/app/spatialite/qgsspatialitesourceselect.cpp
===================================================================
--- trunk/qgis/src/app/spatialite/qgsspatialitesourceselect.cpp	2011-03-14 20:42:20 UTC (rev 15481)
+++ trunk/qgis/src/app/spatialite/qgsspatialitesourceselect.cpp	2011-03-14 21:27:27 UTC (rev 15482)
@@ -46,6 +46,8 @@
   setWindowTitle( tr( "Add SpatiaLite Table(s)" ) );
   connectionsGroupBox->setTitle( tr( "Databases" ) );
   btnEdit->hide();  // hide the edit button
+  btnSave->hide();
+  btnLoad->hide();
 
   mAddButton = new QPushButton( tr( "&Add" ) );
   buttonBox->addButton( mAddButton, QDialogButtonBox::ActionRole );

Modified: trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp
===================================================================
--- trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp	2011-03-14 20:42:20 UTC (rev 15481)
+++ trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp	2011-03-14 21:27:27 UTC (rev 15482)
@@ -46,16 +46,6 @@
   btnAdd = buttonBox->button( QDialogButtonBox::Ok );
   btnAdd->setEnabled( false );
 
-  QPushButton *pb = new QPushButton( tr( "&Save" ) );
-  pb->setToolTip( tr( "Save WFS server connections to file" ) );
-  buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
-  connect( pb, SIGNAL( clicked() ), this, SLOT( saveClicked() ) );
-
-  pb = new QPushButton( tr( "&Load" ) );
-  pb->setToolTip( tr( "Load WFS server connections from file" ) );
-  buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
-  connect( pb, SIGNAL( clicked() ), this, SLOT( loadClicked() ) );
-
   connect( buttonBox, SIGNAL( accepted() ), this, SLOT( addLayer() ) );
   connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
   connect( btnNew, SIGNAL( clicked() ), this, SLOT( addEntryToServerList() ) );
@@ -469,13 +459,13 @@
   s.setValue( "/Qgis/connections-wfs/selected", cmbConnections->currentText() );
 }
 
-void QgsWFSSourceSelect::saveClicked()
+void QgsWFSSourceSelect::on_btnSave_clicked()
 {
   QgsManageConnectionsDialog dlg( this, QgsManageConnectionsDialog::Export, QgsManageConnectionsDialog::WFS );
   dlg.exec();
 }
 
-void QgsWFSSourceSelect::loadClicked()
+void QgsWFSSourceSelect::on_btnLoad_clicked()
 {
   QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
                      tr( "XML files (*.xml *XML)" ) );

Modified: trunk/qgis/src/plugins/wfs/qgswfssourceselect.h
===================================================================
--- trunk/qgis/src/plugins/wfs/qgswfssourceselect.h	2011-03-14 20:42:20 UTC (rev 15481)
+++ trunk/qgis/src/plugins/wfs/qgswfssourceselect.h	2011-03-14 21:27:27 UTC (rev 15482)
@@ -66,10 +66,9 @@
     void on_cmbConnections_activated( int index );
     void capabilitiesReplyFinished();
     void capabilitiesReplyProgress( qint64, qint64 );
+    void on_btnSave_clicked();
+    void on_btnLoad_clicked();
 
-    void saveClicked();
-    void loadClicked();
-
     void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
 };
 

Modified: trunk/qgis/src/plugins/wfs/qgswfssourceselectbase.ui
===================================================================
--- trunk/qgis/src/plugins/wfs/qgswfssourceselectbase.ui	2011-03-14 20:42:20 UTC (rev 15481)
+++ trunk/qgis/src/plugins/wfs/qgswfssourceselectbase.ui	2011-03-14 21:27:27 UTC (rev 15482)
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>577</width>
+    <width>590</width>
     <height>503</height>
    </rect>
   </property>
@@ -19,69 +19,87 @@
      <property name="title">
       <string>Server connections</string>
      </property>
-     <layout class="QGridLayout">
-      <property name="margin">
-       <number>9</number>
-      </property>
-      <property name="spacing">
-       <number>6</number>
-      </property>
-      <item row="1" column="1">
-       <widget class="QPushButton" name="btnNew">
-        <property name="text">
-         <string>&amp;New</string>
-        </property>
-       </widget>
+     <layout class="QGridLayout" name="gridLayout_2">
+      <item row="0" column="0">
+       <widget class="QComboBox" name="cmbConnections"/>
       </item>
-      <item row="1" column="3">
-       <widget class="QPushButton" name="btnDelete">
-        <property name="enabled">
-         <bool>false</bool>
-        </property>
-        <property name="text">
-         <string>Delete</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="2">
-       <widget class="QPushButton" name="btnEdit">
-        <property name="enabled">
-         <bool>false</bool>
-        </property>
-        <property name="text">
-         <string>Edit</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="4">
-       <spacer>
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeType">
-         <enum>QSizePolicy::Expanding</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>171</width>
-          <height>30</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
       <item row="1" column="0">
-       <widget class="QPushButton" name="btnConnect">
-        <property name="enabled">
-         <bool>false</bool>
-        </property>
-        <property name="text">
-         <string>C&amp;onnect</string>
-        </property>
-       </widget>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QPushButton" name="btnConnect">
+          <property name="enabled">
+           <bool>false</bool>
+          </property>
+          <property name="text">
+           <string>C&amp;onnect</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="btnNew">
+          <property name="text">
+           <string>&amp;New</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="btnEdit">
+          <property name="enabled">
+           <bool>false</bool>
+          </property>
+          <property name="text">
+           <string>Edit</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="btnDelete">
+          <property name="enabled">
+           <bool>false</bool>
+          </property>
+          <property name="text">
+           <string>Delete</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer>
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeType">
+           <enum>QSizePolicy::Expanding</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>171</width>
+            <height>30</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QPushButton" name="btnLoad">
+          <property name="toolTip">
+           <string>Load connections from file</string>
+          </property>
+          <property name="text">
+           <string>Load</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="btnSave">
+          <property name="toolTip">
+           <string>Save connections to file</string>
+          </property>
+          <property name="text">
+           <string>Save</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
       </item>
-      <item row="0" column="0" colspan="5">
-       <widget class="QComboBox" name="cmbConnections"/>
-      </item>
      </layout>
     </widget>
    </item>

Modified: trunk/qgis/src/ui/qgsdbsourceselectbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsdbsourceselectbase.ui	2011-03-14 20:42:20 UTC (rev 15481)
+++ trunk/qgis/src/ui/qgsdbsourceselectbase.ui	2011-03-14 21:27:27 UTC (rev 15482)
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>406</width>
+    <width>586</width>
     <height>476</height>
    </rect>
   </property>
@@ -64,6 +64,36 @@
           </property>
          </widget>
         </item>
+        <item>
+         <spacer name="horizontalSpacer">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QPushButton" name="btnLoad">
+          <property name="text">
+           <string comment="Load connections from file">Load</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="btnSave">
+          <property name="toolTip">
+           <string>Save connections to file</string>
+          </property>
+          <property name="text">
+           <string>Save</string>
+          </property>
+         </widget>
+        </item>
        </layout>
       </item>
      </layout>

Modified: trunk/qgis/src/ui/qgswmssourceselectbase.ui
===================================================================
--- trunk/qgis/src/ui/qgswmssourceselectbase.ui	2011-03-14 20:42:20 UTC (rev 15481)
+++ trunk/qgis/src/ui/qgswmssourceselectbase.ui	2011-03-14 21:27:27 UTC (rev 15482)
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>564</width>
+    <width>767</width>
     <height>539</height>
    </rect>
   </property>
@@ -17,6 +17,9 @@
    <iconset>
     <normaloff>../../../../.designer/backup</normaloff>../../../../.designer/backup</iconset>
   </property>
+  <property name="toolTip">
+   <string>Save connections to file</string>
+  </property>
   <property name="sizeGripEnabled">
    <bool>true</bool>
   </property>
@@ -24,6 +27,29 @@
    <bool>true</bool>
   </property>
   <layout class="QGridLayout" name="gridLayout_2">
+   <item row="3" column="0">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0">
+    <widget class="QLabel" name="labelStatus">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Ignored" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Ready</string>
+     </property>
+     <property name="wordWrap">
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
    <item row="0" column="0">
     <widget class="QTabWidget" name="tabServers">
      <property name="enabled">
@@ -37,7 +63,7 @@
        <string>Layers</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout">
-       <item row="0" column="0" colspan="8">
+       <item row="0" column="0" colspan="12">
         <widget class="QComboBox" name="cmbConnections"/>
        </item>
        <item row="1" column="0" colspan="2">
@@ -77,7 +103,7 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="6">
+       <item row="1" column="7">
         <spacer name="horizontalSpacer_2">
          <property name="orientation">
           <enum>Qt::Horizontal</enum>
@@ -90,7 +116,7 @@
          </property>
         </spacer>
        </item>
-       <item row="1" column="7">
+       <item row="1" column="11">
         <widget class="QPushButton" name="btnAddDefault">
          <property name="statusTip">
           <string>Adds a few example WMS servers</string>
@@ -103,7 +129,7 @@
          </property>
         </widget>
        </item>
-       <item row="2" column="0" colspan="8">
+       <item row="2" column="0" colspan="12">
         <widget class="QTreeWidget" name="lstLayers">
          <property name="sizePolicy">
           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@@ -139,7 +165,7 @@
          </column>
         </widget>
        </item>
-       <item row="3" column="0" colspan="8">
+       <item row="3" column="0" colspan="12">
         <widget class="QGroupBox" name="btnGrpImageEncoding">
          <property name="sizePolicy">
           <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@@ -158,7 +184,7 @@
          </property>
         </widget>
        </item>
-       <item row="4" column="0" colspan="8">
+       <item row="4" column="0" colspan="12">
         <widget class="QGroupBox" name="gbCRS">
          <property name="title">
           <string>Options</string>
@@ -224,6 +250,23 @@
          </layout>
         </widget>
        </item>
+       <item row="1" column="9">
+        <widget class="QPushButton" name="btnSave">
+         <property name="text">
+          <string>Save</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="8">
+        <widget class="QPushButton" name="btnLoad">
+         <property name="toolTip">
+          <string>Load connections from file</string>
+         </property>
+         <property name="text">
+          <string>Load</string>
+         </property>
+        </widget>
+       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="tabLayerOrder">
@@ -299,9 +342,6 @@
          <attribute name="verticalHeaderVisible">
           <bool>false</bool>
          </attribute>
-         <attribute name="verticalHeaderVisible">
-          <bool>false</bool>
-         </attribute>
          <column>
           <property name="text">
            <string>Layers</string>
@@ -363,9 +403,6 @@
          <attribute name="verticalHeaderVisible">
           <bool>false</bool>
          </attribute>
-         <attribute name="verticalHeaderVisible">
-          <bool>false</bool>
-         </attribute>
          <column>
           <property name="text">
            <string>Title</string>
@@ -394,29 +431,6 @@
      </widget>
     </widget>
    </item>
-   <item row="3" column="0">
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="0">
-    <widget class="QLabel" name="labelStatus">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Ignored" vsizetype="Preferred">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="text">
-      <string>Ready</string>
-     </property>
-     <property name="wordWrap">
-      <bool>false</bool>
-     </property>
-    </widget>
-   </item>
   </layout>
  </widget>
  <layoutdefault spacing="6" margin="11"/>



More information about the QGIS-commit mailing list