Exemplo n.º 1
0
QgsOSMExportDialog::QgsOSMExportDialog( QWidget *parent )
    : QDialog( parent )
    , mDatabase( new QgsOSMDatabase )
{
  setupUi( this );

  connect( btnBrowseDb, SIGNAL( clicked() ), this, SLOT( onBrowse() ) );
  connect( buttonBox, SIGNAL( accepted() ), this, SLOT( onOK() ) );
  connect( buttonBox, SIGNAL( rejected() ), this, SLOT( onClose() ) );
  connect( editDbFileName, SIGNAL( textChanged( QString ) ), this, SLOT( updateLayerName() ) );
  connect( radPoints, SIGNAL( clicked() ), this, SLOT( updateLayerName() ) );
  connect( radPolylines, SIGNAL( clicked() ), this, SLOT( updateLayerName() ) );
  connect( radPolygons, SIGNAL( clicked() ), this, SLOT( updateLayerName() ) );
  connect( btnLoadTags, SIGNAL( clicked() ), this, SLOT( onLoadTags() ) );
  connect( btnSelectAll, SIGNAL( clicked() ), this, SLOT( onSelectAll() ) );
  connect( btnUnselectAll, SIGNAL( clicked() ), this, SLOT( onUnselectAll() ) );

  mTagsModel = new QStandardItemModel( this );
  mTagsModel->setHorizontalHeaderLabels( QStringList() << tr( "Tag" ) << tr( "Count" ) << tr( "Not null" ) );
  viewTags->setModel( mTagsModel );
}
Exemplo n.º 2
0
void ConfigurationDialog::selectionChanged() {
    int index = ui->menuTree->indexOfTopLevelItem(ui->menuTree->selectedItems().at(0));
    if (index == -1) {
        index = ui->menuTree->indexOfTopLevelItem(ui->menuTree->selectedItems().at(0)->parent());
        if (index == 1) {
            ui->layerStack->setCurrentIndex(1);
            layerId = ui->menuTree->currentIndex().row();
            disconnect(ui->layerNameText,0,0,0);
            disconnect(ui->visibleCheckBox,0,0,0);
            Configuration *config = Configuration::getInstance();
            ui->layerNameText->setText(config->getLayers().value(layerId)->getName());
            ui->visibleCheckBox->setChecked(config->getLayers().value(layerId)->getVisible());
            connect(ui->layerNameText, SIGNAL(textChanged(QString)), this, SLOT(updateLayerName(QString)));
            connect(ui->visibleCheckBox, SIGNAL(clicked(bool)), this, SLOT(updateLayerEnabled(bool)));
        }