Skip to content
Permalink
Browse files

remove Qt 4.5 dependency

git-svn-id: http://svn.osgeo.org/qgis/trunk@13371 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Apr 24, 2010
1 parent 4e637e8 commit 62defb7be63f82fdfb17da48c87663107ec40d63
Showing with 20 additions and 0 deletions.
  1. +20 −0 src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp
@@ -126,9 +126,19 @@ void QgsVectorGradientColorRampV2Dialog::stopDoubleClicked( QTreeWidgetItem* ite
bool ok;
double key = item->data( 0, StopOffsetRole ).toDouble();
int val = ( int )( key * 100 );
#if QT_VERSION >= 0x40500
val = QInputDialog::getInt( this, tr( "Offset of the stop" ),
tr( "Please enter offset in percents (%) of the new stop" ),
val, 0, 100, 1, &ok );
#else
QString res = QInputDialog::getText( this, tr( "Offset of the stop" ),
tr( "Please enter offset in percents (%) of the new stop" ),
QLineEdit::Normal, QString::number( val ), &ok );
if ( ok )
val = res.toInt( &ok );
if ( ok )
ok = val >= 0 && val <= 100;
#endif
if ( !ok )
return;

@@ -149,9 +159,19 @@ void QgsVectorGradientColorRampV2Dialog::addStop()

bool ok;
int val = 50;
#if QT_VERSION >= 0x40500
val = QInputDialog::getInt( this, tr( "Offset of the stop" ),
tr( "Please enter offset in percents (%) of the new stop" ),
val, 0, 100, 1, &ok );
#else
QString res = QInputDialog::getText( this, tr( "Offset of the stop" ),
tr( "Please enter offset in percents (%) of the new stop" ),
QLineEdit::Normal, QString::number( val ), &ok );
if ( ok )
val = res.toInt( &ok );
if ( ok )
ok = val >= 0 && val <= 100;
#endif
if ( !ok )
return;

0 comments on commit 62defb7

Please sign in to comment.
You can’t perform that action at this time.