[QGIS Commit] r8506 - in trunk/qgis/src: app ui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri May 23 13:03:48 EDT 2008


Author: timlinux
Date: 2008-05-23 13:03:48 -0400 (Fri, 23 May 2008)
New Revision: 8506

Modified:
   trunk/qgis/src/app/qgscustomprojectiondialog.cpp
   trunk/qgis/src/ui/qgscustomprojectiondialogbase.ui
Log:
added missing icons for rec naviagation to the custom projection dialog

Modified: trunk/qgis/src/app/qgscustomprojectiondialog.cpp
===================================================================
--- trunk/qgis/src/app/qgscustomprojectiondialog.cpp	2008-05-23 17:02:47 UTC (rev 8505)
+++ trunk/qgis/src/app/qgscustomprojectiondialog.cpp	2008-05-23 17:03:48 UTC (rev 8506)
@@ -44,6 +44,16 @@
 {
   setupUi(this);
 
+  QString myThemePath = QgsApplication::themePath();
+  pbnFirst->setPixmap(QPixmap(myThemePath+"mIconFirst.png"));
+  QString myString = "Setting first button to : " + myThemePath+"mIconFirst.png";
+  qDebug(myString.toLocal8Bit());
+  pbnPrevious->setPixmap(QPixmap(myThemePath+"mIconPrevious.png"));
+  pbnNext->setPixmap(QPixmap(myThemePath+"mIconNext.png"));
+  pbnLast->setPixmap(QPixmap(myThemePath+"mIconLast.png"));
+  pbnNew->setPixmap(QPixmap(myThemePath+"mIconNew.png"));
+  pbnSave->setPixmap(QPixmap(myThemePath+"mActionFileSave.png"));
+  pbnDelete->setPixmap(QPixmap(myThemePath+"mIconDelete.png"));
   // user database is created at QGIS startup in QgisApp::createDB
   // we just check whether there is our database [MD]
   QFileInfo myFileInfo;
@@ -414,18 +424,18 @@
   // XXX Need to free memory from the error msg if one is set
   if(myResult == SQLITE_OK)
   {
-      if (sqlite3_step(myPreparedStatement) == SQLITE_ROW)
-      {
-	mCurrentRecordId = QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,0));
-	leName->setText(QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,1)));
-	//QString myProjectionFamilyId = QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,2));
-	//cboProjectionFamily->setCurrentText(getProjectionFamilyName(myProjectionFamilyId));
-	//QString myEllipsoidId = QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,3));
-	//cboEllipsoid->setCurrentText(getEllipsoidName(myEllipsoidId));
-	leParameters->setText(QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,4)));
-	mCurrentRecordLong=1; 
-	lblRecordNo->setText(QString::number(mCurrentRecordLong) + " of " + QString::number(mRecordCountLong));
-      }
+    if (sqlite3_step(myPreparedStatement) == SQLITE_ROW)
+    {
+      mCurrentRecordId = QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,0));
+      leName->setText(QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,1)));
+      //QString myProjectionFamilyId = QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,2));
+      //cboProjectionFamily->setCurrentText(getProjectionFamilyName(myProjectionFamilyId));
+      //QString myEllipsoidId = QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,3));
+      //cboEllipsoid->setCurrentText(getEllipsoidName(myEllipsoidId));
+      leParameters->setText(QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,4)));
+      mCurrentRecordLong=1; 
+      lblRecordNo->setText(QString::number(mCurrentRecordLong) + " of " + QString::number(mRecordCountLong));
+    }
   }
   else
   {
@@ -450,13 +460,13 @@
   {
     pbnNext->setEnabled(false);
     pbnLast->setEnabled(false);
-    pbnDelete->setEnabled(false);
+    pbnDelete->setEnabled(true);
   }
   else
   {
     pbnNext->setEnabled(true);
     pbnLast->setEnabled(true);
-    pbnDelete->setEnabled(false);
+    pbnDelete->setEnabled(true);
   }
 }
 
@@ -688,23 +698,16 @@
 
 void QgsCustomProjectionDialog::on_pbnNew_clicked()
 {
-#ifdef QGISDEBUG
   if (pbnNew->text()==tr("Abort")) 
   {
-    std::cout << "QgsCustomProjectionDialog::on_pbnNew_clicked() - abort requested" << std::endl;
-  }
-  else
-  {
-   std::cout << "QgsCustomProjectionDialog::on_pbnNew_clicked() - new requested" << std::endl;
-  }
-#endif
-  if (pbnNew->text()==tr("Abort")) 
-  {
     //if we get here, user has aborted add record
+    QString myThemePath = QgsApplication::themePath();
+    pbnNew->setPixmap(QPixmap(myThemePath+"mIconNew.png"));
+    //next line needed for new/abort logic
     pbnNew->setText(tr("New"));
     //get back to the last used record before insert was pressed
-   if (mCurrentRecordId.isEmpty())
-   {
+    if (mCurrentRecordId.isEmpty())
+    {
       on_pbnFirst_clicked();
     }
     else
@@ -721,6 +724,9 @@
     pbnNext->setEnabled(false);
     pbnLast->setEnabled(false);
     pbnDelete->setEnabled(false);
+    QString myThemePath = QgsApplication::themePath();
+    pbnNew->setPixmap(QPixmap(myThemePath+"mIconNew.png"));
+    //next line needed for new/abort logic
     pbnNew->setText(tr("Abort"));
     //clear the controls
     leName->setText("");

Modified: trunk/qgis/src/ui/qgscustomprojectiondialogbase.ui
===================================================================
--- trunk/qgis/src/ui/qgscustomprojectiondialogbase.ui	2008-05-23 17:02:47 UTC (rev 8505)
+++ trunk/qgis/src/ui/qgscustomprojectiondialogbase.ui	2008-05-23 17:03:48 UTC (rev 8506)
@@ -65,6 +65,9 @@
           <property name="text" >
            <string>|&lt;</string>
           </property>
+          <property name="icon" >
+           <iconset>../../images/themes/default/mIconFirst.png</iconset>
+          </property>
          </widget>
         </item>
         <item>
@@ -72,6 +75,9 @@
           <property name="text" >
            <string>&lt;</string>
           </property>
+          <property name="icon" >
+           <iconset>../../images/themes/default/mIconPrevious.png</iconset>
+          </property>
          </widget>
         </item>
         <item>
@@ -89,6 +95,9 @@
           <property name="text" >
            <string>></string>
           </property>
+          <property name="icon" >
+           <iconset>../../images/themes/default/mIconNext.png</iconset>
+          </property>
          </widget>
         </item>
         <item>
@@ -96,6 +105,9 @@
           <property name="text" >
            <string>>|</string>
           </property>
+          <property name="icon" >
+           <iconset>../../images/themes/default/mIconLast.png</iconset>
+          </property>
          </widget>
         </item>
         <item>
@@ -103,6 +115,9 @@
           <property name="text" >
            <string>*</string>
           </property>
+          <property name="icon" >
+           <iconset>../../images/themes/default/mIconNew.png</iconset>
+          </property>
          </widget>
         </item>
         <item>
@@ -110,6 +125,9 @@
           <property name="text" >
            <string>S</string>
           </property>
+          <property name="icon" >
+           <iconset>../../images/themes/default/mActionFileSave.png</iconset>
+          </property>
          </widget>
         </item>
         <item>
@@ -117,6 +135,9 @@
           <property name="text" >
            <string>X</string>
           </property>
+          <property name="icon" >
+           <iconset>../../images/themes/default/mIconDelete.png</iconset>
+          </property>
          </widget>
         </item>
        </layout>



More information about the QGIS-commit mailing list