Skip to content
Permalink
Browse files

Attribute edit widgets LongLong support

Fix #9145
  • Loading branch information
m-kuhn committed Dec 6, 2013
1 parent 3b81b1a commit b92e1243399ec5df9ea173d65e7a6509085a1111
Showing with 9 additions and 5 deletions.
  1. +8 −4 src/app/qgsattributetypedialog.cpp
  2. +1 −1 src/gui/qgsattributeeditor.cpp
@@ -472,7 +472,8 @@ void QgsAttributeTypeDialog::setIndex( int index, QgsVectorLayer::EditType editT

QString text;
//calculate min and max for range for this field
if ( mLayer->pendingFields()[index].type() == QVariant::Int )
if ( mLayer->pendingFields()[index].type() == QVariant::Int
|| mLayer->pendingFields()[index].type() == QVariant::LongLong )
{
rangeWidget->clear();
rangeWidget->addItems( QStringList() << tr( "Editable" ) << tr( "Slider" ) << tr( "Dial" ) );
@@ -553,7 +554,8 @@ void QgsAttributeTypeDialog::setIndex( int index, QgsVectorLayer::EditType editT
case QgsVectorLayer::SliderRange:
case QgsVectorLayer::DialRange:
{
if ( mLayer->pendingFields()[mIndex].type() != QVariant::Int )
if ( mLayer->pendingFields()[mIndex].type() != QVariant::Int
|| mLayer->pendingFields()[mIndex].type() != QVariant::LongLong )
{
minimumSpinBox->setValue( mRangeData.mMin.toInt() );
maximumSpinBox->setValue( mRangeData.mMax.toInt() );
@@ -635,7 +637,8 @@ void QgsAttributeTypeDialog::setStackPage( int index )
{
case 2:
if ( mLayer->pendingFields()[mIndex].type() != QVariant::Double &&
mLayer->pendingFields()[mIndex].type() != QVariant::Int )
mLayer->pendingFields()[mIndex].type() != QVariant::Int &&
mLayer->pendingFields()[mIndex].type() != QVariant::LongLong )
{
okDisabled = true;
}
@@ -742,7 +745,8 @@ void QgsAttributeTypeDialog::accept()
break;
case 2:
//store range data
if ( mLayer->pendingFields()[mIndex].type() == QVariant::Int )
if ( mLayer->pendingFields()[mIndex].type() == QVariant::Int
|| mLayer->pendingFields()[mIndex].type() == QVariant::LongLong )
{
mRangeData = QgsVectorLayer::RangeData( minimumSpinBox->value(),
maximumSpinBox->value(),
@@ -510,7 +510,7 @@ QWidget* QgsAttributeEditor::createAttributeEditor( QWidget* parent, QWidget* ed
case QgsVectorLayer::SliderRange:
case QgsVectorLayer::EditRange:
{
if ( myFieldType == QVariant::Int )
if ( myFieldType == QVariant::Int || myFieldType == QVariant::LongLong )
{
int min = vl->range( idx ).mMin.toInt();
int max = vl->range( idx ).mMax.toInt();

0 comments on commit b92e124

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