Exemplo n.º 1
0
InstallApplicationWizardPrivate::locateSetupPage::locateSetupPage(QWidget *parent)
	: QWizardPage(parent)
{
	setTitle(tr("Locate the installation executable"));
	setSubTitle(tr("Here you have to enter the file path to the setup.exe or"
			" install.exe file that will install your program."));

	QLabel *setupLabel = new QLabel(tr("File path of the installation executable"
					" (usually setup.exe or install.exe)"), this);
	QLineEdit *setupEdit = new QLineEdit(this);
	setupLabel->setBuddy(setupEdit);

	QToolButton *browseButton = new QToolButton(this);
	browseButton->setIcon(QIcon(":/icons/browse.png"));

	QHBoxLayout *hlay = new QHBoxLayout;
	hlay->addWidget(setupEdit);
	hlay->addWidget(browseButton);

	QVBoxLayout *vlay = new QVBoxLayout(this);
	vlay->addWidget(setupLabel);
	vlay->addLayout(hlay);

	registerField("setupExecutable*", setupEdit);
	connect(browseButton, SIGNAL(clicked()), SLOT(on_browseButton_clicked()) );
}
int MoodBox::ClipartWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = MovableWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: showPage((*reinterpret_cast< ClipartPage::ClipartPageEnum(*)>(_a[1]))); break;
        case 1: fillBackgrounds((*reinterpret_cast< const Palette(*)>(_a[1]))); break;
        case 2: on_browseButton_clicked(); break;
        default: ;
        }
        _id -= 3;
    }
    return _id;
}
Exemplo n.º 3
0
CaptureInterfacesDialog::CaptureInterfacesDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::CaptureInterfacesDialog)
{
    ui->setupUi(this);

    stat_timer_ = NULL;
    stat_cache_ = NULL;

    // XXX - Enable / disable as needed
    start_bt_ = ui->buttonBox->addButton(tr("Start"), QDialogButtonBox::YesRole);

    start_bt_->setEnabled((global_capture_opts.num_selected > 0)? true: false);
    connect(start_bt_, SIGNAL(clicked(bool)), this, SLOT(start_button_clicked()));

    ui->interfaceTree->sortByColumn(col_interface_, Qt::AscendingOrder);
    ui->interfaceTree->setItemDelegateForColumn(col_interface_, &interface_item_delegate_);
    ui->interfaceTree->setItemDelegateForColumn(col_traffic_, new SparkLineDelegate());
    ui->interfaceTree->setItemDelegateForColumn(col_link_, &interface_item_delegate_);
    ui->interfaceTree->setItemDelegateForColumn(col_pmode_, &interface_item_delegate_);
    ui->interfaceTree->setItemDelegateForColumn(col_snaplen_, &interface_item_delegate_);
#ifdef SHOW_BUFFER_COLUMN
    ui->interfaceTree->setItemDelegateForColumn(col_buffer_, &interface_item_delegate_);
#else
    ui->interfaceTree->setColumnHidden(col_buffer_, true);
#endif
#ifdef SHOW_MONITOR_COLUMN
    ui->interfaceTree->setItemDelegateForColumn(col_monitor_, &interface_item_delegate_);
#else
    ui->interfaceTree->setColumnHidden(col_monitor_, true);
#endif
    ui->interfaceTree->setItemDelegateForColumn(col_filter_, &interface_item_delegate_);

    connect(ui->interfaceTree,SIGNAL(itemClicked(QTreeWidgetItem*,int)),this,SLOT(interfaceClicked(QTreeWidgetItem*,int)));
    connect(ui->interfaceTree, SIGNAL(itemSelectionChanged()), this, SLOT(interfaceSelected()));
    connect(ui->allFilterComboBox, SIGNAL(captureFilterSyntaxChanged(bool)), this, SLOT(allFilterChanged()));
    connect(this, SIGNAL(interfacesChanged()), ui->allFilterComboBox, SIGNAL(interfacesChanged()));
    connect(this, SIGNAL(ifsChanged()), this, SLOT(refreshInterfaceList()));
    connect(wsApp, SIGNAL(localInterfaceListChanged()), this, SLOT(updateLocalInterfaces()));
    connect(ui->browseButton, SIGNAL(clicked()), this, SLOT(on_browseButton_clicked()));
}