QgsVirtualLayerSourceSelect::QgsVirtualLayerSourceSelect( QWidget* parent, Qt::WindowFlags fl )
    : QDialog( parent, fl )
{
    setupUi( this );

    QObject::connect( mAddSourceBtn, SIGNAL(clicked()), this, SLOT(onAddSource()) );
    QObject::connect( mRemoveSourceBtn, SIGNAL(clicked()), this, SLOT(onRemoveSource()) );
    QObject::connect( mBrowseBtn, SIGNAL(clicked()), this, SLOT(onBrowse()) );
}
Exemplo n.º 2
0
void prefDialog::connectSlots()
{
	connect(ui.okPushButton, SIGNAL(clicked()), this, SLOT(onOK()) );
	connect(ui.cancelPushButton, SIGNAL(clicked()), this, SLOT(onCancel()) );
	connect(ui.selectsoundPushButton, SIGNAL(clicked()), this, SLOT(onSound()) );
	connect(ui.selectPlayerPushButton, SIGNAL(clicked()), this, SLOT(onPlayer()) );
	connect(ui.choosehttpPushButton, SIGNAL(clicked()), this, SLOT(onHttp()) );
	connect(ui.browsePushButton, SIGNAL(clicked()), this, SLOT(onBrowse()) );
	connect(ui.imagePushButton, SIGNAL(clicked()), this, SLOT(onImage()) );
	connect(ui.poolPushButton, SIGNAL(clicked()), this, SLOT(onPool()) );
	connect(ui.resetPushButton, SIGNAL(clicked()), this, SLOT(onReset()) );
}
Exemplo n.º 3
0
FilePicker::FilePicker(mcrl2::gui::qt::PersistentFileDialog* fileDialog, QWidget *parent, bool save) :
  QWidget(parent),
  m_fileDialog(fileDialog)
{
  m_ui.setupUi(this);

  m_save=save;

  connect(m_ui.btnBrowse, SIGNAL(clicked()), this, SLOT(onBrowse()));
  connect(m_ui.value, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged(QString)));

}
Exemplo n.º 4
0
PathChangerDialog::PathChangerDialog(const QString & _path) : QDialog()
{
    UiPathDialog::setupUi(this);
    ui_inputPath->setText(_path);

    connect(ui_pathBrowse, SIGNAL(clicked()),
            this,          SLOT(onBrowse()));

    connect(ui_promptValidator, SIGNAL(accepted()),
            this,               SLOT(onAccepted()));

    connect(ui_promptValidator, SIGNAL(rejected()),
            this,               SLOT(onRejected()));
}
Exemplo n.º 5
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.º 6
0
AddPluginDialog::AddPluginDialog(QWidget * parent) : QDialog(parent),
    ui_(new Ui::UiAddPluginDialog)
{
    ui_->setupUi(this);

    setWindowModality(Qt::WindowModal);

    auto disableLocalGroupBox = [this](bool enable) { ui_->localGroupbox->setChecked(!enable); };
    auto disableWebGroupBox   = [this](bool enable) { ui_->webGroupbox->setChecked(!enable);   };

    QObject::connect(ui_->webGroupbox, &QGroupBox::toggled, disableLocalGroupBox);
    QObject::connect(ui_->localGroupbox, &QGroupBox::toggled, disableWebGroupBox);

    QObject::connect(ui_->localBrowse, &QPushButton::clicked, [this] { onBrowse(); });

    QObject::connect(&DynamicImageEngine::instance(), 
                     &DynamicImageEngine::maskChanged,
                     this, &AddPluginDialog::updateIcons,
                     Qt::QueuedConnection);
    updateIcons();
}
Exemplo n.º 7
0
LASOpenDlg::LASOpenDlg(QWidget* parent)
	: QDialog(parent)
	, Ui::OpenLASFileDialog()
	, m_autoSkip(false)
{
	setupUi(this);

	clearEVLRs();

	connect(applyAllButton, SIGNAL(clicked()), this, SLOT(onApplyAll()));
	connect(browseToolButton, SIGNAL(clicked()), this, SLOT(onBrowse()));
	connect(tileGroupBox, SIGNAL(toggled(bool)), applyAllButton, SLOT(setDisabled(bool)));

	//can't use the 'Apply all' button if tiling mode is enabled
	applyAllButton->setEnabled(!tileGroupBox->isChecked());

	if (tileGroupBox->isChecked())
	{
		tabWidget->setCurrentIndex(2);
	}
}
//-----------------------------------------------------------------------------
// Function: GeneratorConfigurationDialog::GeneratorConfigurationDialog()
//-----------------------------------------------------------------------------
GeneratorConfigurationDialog::GeneratorConfigurationDialog(QSharedPointer<GeneratorConfiguration> configuration, 
    QWidget *parent)
    : QDialog(parent), configuration_(), addToFileset_(new QCheckBox(this)), 
    viewSelection_(new QComboBox(this)), pathEditor_(new QLineEdit(this))
{    
    setWindowTitle(tr("Configure file generation"));

    QFormLayout* filesetLayout = new QFormLayout();
    filesetLayout->addRow(tr("Add file to fileset"), addToFileset_);

    filesetLayout->addRow(tr("Select view"), viewSelection_);

    QHBoxLayout* pathSelectionLayout = new QHBoxLayout();
    pathSelectionLayout->addWidget(new QLabel(tr("Select output file")));
    pathSelectionLayout->addWidget(pathEditor_);
   
    QPushButton* browseButton = new QPushButton(tr("Browse"), this);
    pathSelectionLayout->addWidget(browseButton);

    QDialogButtonBox* dialogButtons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, 
        Qt::Horizontal, this);

    QVBoxLayout* topLayout = new QVBoxLayout(this);
    topLayout->addLayout(filesetLayout);
    topLayout->addLayout(pathSelectionLayout);
    topLayout->addStretch(1);
    topLayout->addWidget(dialogButtons);

    loadConfiguration(configuration);

    connect(addToFileset_, SIGNAL(stateChanged(int)), 
        this, SLOT(onFileSetStateChanged(int)), Qt::UniqueConnection);
    connect(viewSelection_, SIGNAL(currentIndexChanged(QString const&)),
        this, SLOT(onViewChanged(QString const&)), Qt::UniqueConnection);
    connect(pathEditor_, SIGNAL(editingFinished()), this, SLOT(onPathEdited()), Qt::UniqueConnection);
    connect(browseButton, SIGNAL(clicked(bool)), this, SLOT(onBrowse()), Qt::UniqueConnection);
    connect(dialogButtons, SIGNAL(accepted()), this, SLOT(accept()), Qt::UniqueConnection);
    connect(dialogButtons, SIGNAL(rejected()), this, SLOT(reject()), Qt::UniqueConnection);
}
Exemplo n.º 9
0
IconSelectDialog::IconSelectDialog(const QString &defaultIcon, QWidget *parent)
    : QDialog(parent)
    , m_iconList(new QListWidget(this))
    , m_selectedIcon(defaultIcon)
{
    setWindowTitle( tr("CopyQ Select Icon") );

    m_iconList->setViewMode(QListView::IconMode);
    connect( m_iconList, SIGNAL(activated(QModelIndex)),
             this, SLOT(onIconListItemActivated(QModelIndex)) );

    QFontMetrics fm( iconFont() );

    const int gridSize = iconFontSizePixels() + 8;
    const QSize size(gridSize, gridSize);
    m_iconList->setFont( iconFont() );
    m_iconList->setGridSize(size);
    m_iconList->setResizeMode(QListView::Adjust);
    m_iconList->setSelectionMode(QAbstractItemView::SingleSelection);
    m_iconList->setDragDropMode(QAbstractItemView::NoDragDrop);

    m_iconList->addItem( QString("") );
    m_iconList->item(0)->setSizeHint(size);

    for (ushort i = IconFirst; i <= IconLast; ++i) {
        QChar c(i);
        if ( fm.inFont(c) ) {
            const QString icon(c);
            QListWidgetItem *item = new QListWidgetItem(icon, m_iconList);
            item->setSizeHint(size);
            if (defaultIcon == icon)
                m_iconList->setCurrentRow(m_iconList->count() - 1);
        }
    }

    QPushButton *browseButton = new QPushButton(tr("Browse..."), this);
    if ( m_selectedIcon.size() > 2 )
        browseButton->setIcon(QIcon(m_selectedIcon));
    connect( browseButton, SIGNAL(clicked()),
             this, SLOT(onBrowse()) );

    QDialogButtonBox *buttonBox = new QDialogButtonBox(
                QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
    connect( buttonBox, SIGNAL(rejected()),
             this, SLOT(reject()) );
    connect( buttonBox, SIGNAL(accepted()),
             this, SLOT(onAcceptCurrent()) );

    QVBoxLayout *layout = new QVBoxLayout(this);
    layout->addWidget(m_iconList);

    QHBoxLayout *buttonLayout = new QHBoxLayout;
    layout->addLayout(buttonLayout);
    buttonLayout->addWidget(browseButton);
    buttonLayout->addWidget(buttonBox);

    m_iconList->setFocus();

    // Restore previous geometry.
    restoreWindowGeometry(this, false);
}