@@ -44,6 +44,16 @@ QgsCustomProjectionDialog::QgsCustomProjectionDialog(QWidget *parent, Qt::WFlags
4444{
4545 setupUi (this );
4646
47+ QString myThemePath = QgsApplication::themePath ();
48+ pbnFirst->setPixmap (QPixmap (myThemePath+" mIconFirst.png" ));
49+ QString myString = " Setting first button to : " + myThemePath+" mIconFirst.png" ;
50+ qDebug (myString.toLocal8Bit ());
51+ pbnPrevious->setPixmap (QPixmap (myThemePath+" mIconPrevious.png" ));
52+ pbnNext->setPixmap (QPixmap (myThemePath+" mIconNext.png" ));
53+ pbnLast->setPixmap (QPixmap (myThemePath+" mIconLast.png" ));
54+ pbnNew->setPixmap (QPixmap (myThemePath+" mIconNew.png" ));
55+ pbnSave->setPixmap (QPixmap (myThemePath+" mActionFileSave.png" ));
56+ pbnDelete->setPixmap (QPixmap (myThemePath+" mIconDelete.png" ));
4757 // user database is created at QGIS startup in QgisApp::createDB
4858 // we just check whether there is our database [MD]
4959 QFileInfo myFileInfo;
@@ -414,18 +424,18 @@ void QgsCustomProjectionDialog::on_pbnFirst_clicked()
414424 // XXX Need to free memory from the error msg if one is set
415425 if (myResult == SQLITE_OK)
416426 {
417- if (sqlite3_step (myPreparedStatement) == SQLITE_ROW)
418- {
419- mCurrentRecordId = QString::fromUtf8 ((char *)sqlite3_column_text (myPreparedStatement,0 ));
420- leName->setText (QString::fromUtf8 ((char *)sqlite3_column_text (myPreparedStatement,1 )));
421- // QString myProjectionFamilyId = QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,2));
422- // cboProjectionFamily->setCurrentText(getProjectionFamilyName(myProjectionFamilyId));
423- // QString myEllipsoidId = QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,3));
424- // cboEllipsoid->setCurrentText(getEllipsoidName(myEllipsoidId));
425- leParameters->setText (QString::fromUtf8 ((char *)sqlite3_column_text (myPreparedStatement,4 )));
426- mCurrentRecordLong =1 ;
427- lblRecordNo->setText (QString::number (mCurrentRecordLong ) + " of " + QString::number (mRecordCountLong ));
428- }
427+ if (sqlite3_step (myPreparedStatement) == SQLITE_ROW)
428+ {
429+ mCurrentRecordId = QString::fromUtf8 ((char *)sqlite3_column_text (myPreparedStatement,0 ));
430+ leName->setText (QString::fromUtf8 ((char *)sqlite3_column_text (myPreparedStatement,1 )));
431+ // QString myProjectionFamilyId = QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,2));
432+ // cboProjectionFamily->setCurrentText(getProjectionFamilyName(myProjectionFamilyId));
433+ // QString myEllipsoidId = QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,3));
434+ // cboEllipsoid->setCurrentText(getEllipsoidName(myEllipsoidId));
435+ leParameters->setText (QString::fromUtf8 ((char *)sqlite3_column_text (myPreparedStatement,4 )));
436+ mCurrentRecordLong =1 ;
437+ lblRecordNo->setText (QString::number (mCurrentRecordLong ) + " of " + QString::number (mRecordCountLong ));
438+ }
429439 }
430440 else
431441 {
@@ -450,13 +460,13 @@ void QgsCustomProjectionDialog::on_pbnFirst_clicked()
450460 {
451461 pbnNext->setEnabled (false );
452462 pbnLast->setEnabled (false );
453- pbnDelete->setEnabled (false );
463+ pbnDelete->setEnabled (true );
454464 }
455465 else
456466 {
457467 pbnNext->setEnabled (true );
458468 pbnLast->setEnabled (true );
459- pbnDelete->setEnabled (false );
469+ pbnDelete->setEnabled (true );
460470 }
461471}
462472
@@ -688,23 +698,16 @@ void QgsCustomProjectionDialog::on_pbnLast_clicked()
688698
689699void QgsCustomProjectionDialog::on_pbnNew_clicked ()
690700{
691- #ifdef QGISDEBUG
692- if (pbnNew->text ()==tr (" Abort" ))
693- {
694- std::cout << " QgsCustomProjectionDialog::on_pbnNew_clicked() - abort requested" << std::endl;
695- }
696- else
697- {
698- std::cout << " QgsCustomProjectionDialog::on_pbnNew_clicked() - new requested" << std::endl;
699- }
700- #endif
701701 if (pbnNew->text ()==tr (" Abort" ))
702702 {
703703 // if we get here, user has aborted add record
704+ QString myThemePath = QgsApplication::themePath ();
705+ pbnNew->setPixmap (QPixmap (myThemePath+" mIconNew.png" ));
706+ // next line needed for new/abort logic
704707 pbnNew->setText (tr (" New" ));
705708 // get back to the last used record before insert was pressed
706- if (mCurrentRecordId .isEmpty ())
707- {
709+ if (mCurrentRecordId .isEmpty ())
710+ {
708711 on_pbnFirst_clicked ();
709712 }
710713 else
@@ -721,6 +724,9 @@ void QgsCustomProjectionDialog::on_pbnNew_clicked()
721724 pbnNext->setEnabled (false );
722725 pbnLast->setEnabled (false );
723726 pbnDelete->setEnabled (false );
727+ QString myThemePath = QgsApplication::themePath ();
728+ pbnNew->setPixmap (QPixmap (myThemePath+" mIconNew.png" ));
729+ // next line needed for new/abort logic
724730 pbnNew->setText (tr (" Abort" ));
725731 // clear the controls
726732 leName->setText (" " );
0 commit comments