QgsAttributeTypeDialog::QgsAttributeTypeDialog( QgsVectorLayer *vl ) : QDialog() , mLayer( vl ) { setupUi( this ); tableWidget->insertRow( 0 ); connect( selectionListWidget, SIGNAL( currentRowChanged( int ) ), this, SLOT( setStackPage( int ) ) ); connect( removeSelectedButton, SIGNAL( clicked() ), this, SLOT( removeSelectedButtonPushed() ) ); connect( loadFromLayerButton, SIGNAL( clicked() ), this, SLOT( loadFromLayerButtonPushed() ) ); connect( loadFromCSVButton, SIGNAL( clicked() ), this, SLOT( loadFromCSVButtonPushed() ) ); connect( tableWidget, SIGNAL( cellChanged( int, int ) ), this, SLOT( vCellChanged( int, int ) ) ); connect( valueRelationEditExpression, SIGNAL( clicked() ), this, SLOT( editValueRelationExpression() ) ); QMapIterator<QString, QgsEditorWidgetFactory*> i( QgsEditorWidgetRegistry::instance()->factories() ); while ( i.hasNext() ) { i.next(); QListWidgetItem* item = new QListWidgetItem( selectionListWidget ); item->setText( i.value()->name() ); item->setData( Qt::UserRole, i.key() ); selectionListWidget->addItem( item ); } valueRelationLayer->clear(); foreach ( QgsMapLayer *l, QgsMapLayerRegistry::instance()->mapLayers() ) { QgsVectorLayer *vl = qobject_cast< QgsVectorLayer * >( l ); if ( vl ) valueRelationLayer->addItem( vl->name(), vl->id() ); }
QgsValueMapConfigDlg::QgsValueMapConfigDlg( QgsVectorLayer* vl, int fieldIdx, QWidget* parent ) : QgsEditorConfigWidget( vl, fieldIdx, parent ) { setupUi( this ); tableWidget->insertRow( 0 ); connect( removeSelectedButton, SIGNAL( clicked() ), this, SLOT( removeSelectedButtonPushed() ) ); connect( loadFromLayerButton, SIGNAL( clicked() ), this, SLOT( loadFromLayerButtonPushed() ) ); connect( loadFromCSVButton, SIGNAL( clicked() ), this, SLOT( loadFromCSVButtonPushed() ) ); connect( tableWidget, SIGNAL( cellChanged( int, int ) ), this, SLOT( vCellChanged( int, int ) ) ); }
QgsAttributeTypeDialog::QgsAttributeTypeDialog( QgsVectorLayer *vl ) : QDialog(), mLayer( vl ) { setupUi( this ); tableWidget->insertRow( 0 ); connect( selectionComboBox, SIGNAL( currentIndexChanged( int ) ), this, SLOT( setStackPage( int ) ) ); connect( removeSelectedButton, SIGNAL( pressed( ) ), this, SLOT( removeSelectedButtonPushed( ) ) ); connect( loadFromLayerButton, SIGNAL( pressed( ) ), this, SLOT( loadFromLayerButtonPushed( ) ) ); connect( loadFromCSVButton, SIGNAL( pressed( ) ), this, SLOT( loadFromCSVButtonPushed( ) ) ); connect( tableWidget, SIGNAL( cellChanged( int, int ) ), this, SLOT( vCellChanged( int, int ) ) ); }
QgsAttributeTypeDialog::QgsAttributeTypeDialog( QgsVectorLayer *vl ) : QDialog() , mLayer( vl ) { setupUi( this ); tableWidget->insertRow( 0 ); connect( selectionComboBox, SIGNAL( currentIndexChanged( int ) ), this, SLOT( setStackPage( int ) ) ); connect( removeSelectedButton, SIGNAL( clicked() ), this, SLOT( removeSelectedButtonPushed() ) ); connect( loadFromLayerButton, SIGNAL( clicked() ), this, SLOT( loadFromLayerButtonPushed() ) ); connect( loadFromCSVButton, SIGNAL( clicked() ), this, SLOT( loadFromCSVButtonPushed() ) ); connect( tableWidget, SIGNAL( cellChanged( int, int ) ), this, SLOT( vCellChanged( int, int ) ) ); valueRelationLayer->clear(); foreach( QgsMapLayer *l, QgsMapLayerRegistry::instance()->mapLayers() ) { QgsVectorLayer *vl = qobject_cast< QgsVectorLayer * >( l ); if ( vl ) valueRelationLayer->addItem( vl->name(), vl->id() ); }