Skip to content
Permalink
Browse files

Added new edit type for attributes that are not recommended to change

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10949 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jun 18, 2009
1 parent 32ed67a commit 097b7c8f3f738085906d19dee2da8b0bd3a0c972
Showing with 8 additions and 1 deletion.
  1. +5 −0 src/app/qgsattributedialog.cpp
  2. +1 −0 src/app/qgsvectorlayerproperties.cpp
  3. +2 −1 src/core/qgsvectorlayer.h
@@ -238,10 +238,15 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat

case QgsVectorLayer::LineEdit:
case QgsVectorLayer::UniqueValuesEditable:
case QgsVectorLayer::Immutable:
default:
{
QLineEdit *le = new QLineEdit( myFieldValue.toString() );

if ( editType == QgsVectorLayer::Immutable)
{
le->setEnabled(false);
}
if ( editType == QgsVectorLayer::UniqueValuesEditable )
{
QList<QVariant> values;
@@ -189,6 +189,7 @@ void QgsVectorLayerProperties::setRow( int row, int idx, const QgsField &field )
cb->addItem( tr( "range (slider)" ), QgsVectorLayer::SliderRange );
cb->addItem( tr( "file name" ), QgsVectorLayer::FileName );
cb->addItem( tr( "enumeration" ), QgsVectorLayer::Enumeration);
cb->addItem( tr( "immutable" ), QgsVectorLayer::Immutable);
cb->setSizeAdjustPolicy( QComboBox::AdjustToContentsOnFirstShow );
cb->setCurrentIndex( layer->editType( idx ) );

@@ -74,7 +74,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
EditRange,
SliderRange,
FileName,
Enumeration
Enumeration,
Immutable /*The attribute value should not be changed in the attribute form*/
};

struct RangeData

0 comments on commit 097b7c8

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