QGIS API Documentation  2.4.0-Chugiak
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
QgsAttributeTypeLoadDialog Class Reference

#include <qgsattributetypeloaddialog.h>

Inheritance diagram for QgsAttributeTypeLoadDialog:
Inheritance graph
[legend]
Collaboration diagram for QgsAttributeTypeLoadDialog:
Collaboration graph
[legend]

Public Member Functions

 QgsAttributeTypeLoadDialog (QgsVectorLayer *vl)
 
 ~QgsAttributeTypeLoadDialog ()
 
void accept ()
 Overloaded accept method which will write the feature field values, then delegate to QDialog::accept() More...
 
void setVectorLayer (QgsVectorLayer *layer)
 Sets predefined vector layer for selection of data. More...
 
QMap< QString, QVariant > & valueMap ()
 Getter to value map which is currently active. More...
 
bool insertNull ()
 Returns true if the "Add NULL value" checkbox has been checked. More...
 

Private Slots

void fillComboBoxes (int layerIndex)
 Slot which reacts to change of selected layer to fill other two comboboxes with correct data. More...
 
void createPreview (int fieldIndex, bool full=false)
 Slot to react to button push or change of selected column for display of preview. More...
 
void previewButtonPushed ()
 Slot to react to value Preview button pushed. More...
 

Private Member Functions

void fillLayerList ()
 Internal function to fill the list of layers. More...
 
void loadDataToValueMap ()
 Function to transfer data from layer to value map used in editing. More...
 

Private Attributes

QgsVectorLayermLayer
 
int mIndex
 
QMap< QString, QVariant > mValueMap
 
QgsVectorLayer::EditType mEditType
 

Detailed Description

Definition at line 31 of file qgsattributetypeloaddialog.h.

Constructor & Destructor Documentation

QgsAttributeTypeLoadDialog::QgsAttributeTypeLoadDialog ( QgsVectorLayer vl)
QgsAttributeTypeLoadDialog::~QgsAttributeTypeLoadDialog ( )

Definition at line 52 of file qgsattributetypeloaddialog.cpp.

Member Function Documentation

void QgsAttributeTypeLoadDialog::accept ( )

Overloaded accept method which will write the feature field values, then delegate to QDialog::accept()

Definition at line 201 of file qgsattributetypeloaddialog.cpp.

References loadDataToValueMap().

void QgsAttributeTypeLoadDialog::createPreview ( int  fieldIndex,
bool  full = false 
)
privateslot

Slot to react to button push or change of selected column for display of preview.

Parameters
fieldIndexindexOfChangedField
fullflag if all values should be displayed or just preview of first 10

Definition at line 108 of file qgsattributetypeloaddialog.cpp.

References QgsFeature::attribute(), QgsVectorLayer::getFeatures(), QgsMapLayerRegistry::instance(), QgsMapLayerRegistry::mapLayer(), QgsFeatureIterator::nextFeature(), QgsFeatureRequest::NoGeometry, and valueMap().

Referenced by previewButtonPushed(), and QgsAttributeTypeLoadDialog().

void QgsAttributeTypeLoadDialog::fillComboBoxes ( int  layerIndex)
privateslot

Slot which reacts to change of selected layer to fill other two comboboxes with correct data.

Parameters
layerIndexindex of layer which was selected

Definition at line 81 of file qgsattributetypeloaddialog.cpp.

References QgsVectorLayer::dataProvider(), QgsVectorDataProvider::fieldNameMap(), QgsMapLayerRegistry::instance(), and QgsMapLayerRegistry::mapLayer().

Referenced by QgsAttributeTypeLoadDialog().

void QgsAttributeTypeLoadDialog::fillLayerList ( )
private

Internal function to fill the list of layers.

Definition at line 70 of file qgsattributetypeloaddialog.cpp.

References QgsMapLayer::id(), QgsMapLayerRegistry::instance(), and QgsMapLayer::name().

Referenced by QgsAttributeTypeLoadDialog().

bool QgsAttributeTypeLoadDialog::insertNull ( )

Returns true if the "Add NULL value" checkbox has been checked.

Returns
true if the "Add NULL value" checkbox has been checked.

Definition at line 165 of file qgsattributetypeloaddialog.cpp.

void QgsAttributeTypeLoadDialog::loadDataToValueMap ( )
private
void QgsAttributeTypeLoadDialog::previewButtonPushed ( )
privateslot

Slot to react to value Preview button pushed.

Definition at line 65 of file qgsattributetypeloaddialog.cpp.

References createPreview().

Referenced by QgsAttributeTypeLoadDialog().

void QgsAttributeTypeLoadDialog::setVectorLayer ( QgsVectorLayer layer)

Sets predefined vector layer for selection of data.

Parameters
layerVector layer which is to be set as predefined one

Definition at line 58 of file qgsattributetypeloaddialog.cpp.

References mLayer.

QMap< QString, QVariant > & QgsAttributeTypeLoadDialog::valueMap ( )

Getter to value map which is currently active.

Returns
value map of vlues selected from layer

Definition at line 160 of file qgsattributetypeloaddialog.cpp.

References mValueMap.

Referenced by createPreview().

Member Data Documentation

QgsVectorLayer::EditType QgsAttributeTypeLoadDialog::mEditType
private

Definition at line 101 of file qgsattributetypeloaddialog.h.

int QgsAttributeTypeLoadDialog::mIndex
private

Definition at line 97 of file qgsattributetypeloaddialog.h.

QgsVectorLayer* QgsAttributeTypeLoadDialog::mLayer
private

Definition at line 96 of file qgsattributetypeloaddialog.h.

Referenced by setVectorLayer().

QMap<QString, QVariant> QgsAttributeTypeLoadDialog::mValueMap
private

Definition at line 100 of file qgsattributetypeloaddialog.h.

Referenced by loadDataToValueMap(), and valueMap().


The documentation for this class was generated from the following files: