当前位置: 首页>>代码示例>>C++>>正文


C++ QButtonGroup类代码示例

本文整理汇总了C++中QButtonGroup的典型用法代码示例。如果您正苦于以下问题:C++ QButtonGroup类的具体用法?C++ QButtonGroup怎么用?C++ QButtonGroup使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QButtonGroup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QWidget

TimeAnalysisWidget::TimeAnalysisWidget(QWidget *parent) :
    QWidget(parent),
    _ui(new Ui::TimeAnalysisWidget)
{
    _ui->setupUi(this);
    _ui->legendGroupBox->setLayout(new QFormLayout);

    // read data
    loadLowAndHighData(std::string(DATA_DIR) + "perDay.low");
    //
    initTransitionGraphs();

    //
    _ui->projectionWidget->setMainUI(this);
    _ui->projectionWidget->setRadiusFactor(_ui->radiusSlider->value());
    _ui->projectionWidget->setOpacity(_ui->opacitySlider->value());

    // Autoexclude the Selection Modes
    QButtonGroup *buttonGroup = new QButtonGroup;
    buttonGroup->addButton(_ui->singleSelection, 0);
    buttonGroup->addButton(_ui->groupSelection, 1);
    connect(buttonGroup, SIGNAL(buttonClicked(int)), this, SLOT(selectionModeChanges(int)));

    //
    fillScalarComboBox();
    _selectedScalar = _scalars[0];
    _ui->colorByComboBox->setCurrentIndex(_selectedScalar->index());

    connect(_ui->colorByComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(changeSelectedScalar(int)));
    connect(_ui->projectionWidget,SIGNAL(selectionChanged(QList<int>)), _ui->calendarWidget,SLOT(updateSelectedDays(QList<int>)));
    connect(_ui->projectionWidget,SIGNAL(selectionChanged(QList<int>)), _ui->graphWidget,SLOT(updateSelectedDays(QList<int>)));
    connect(_ui->calendarWidget, SIGNAL(changedSelectedDays(QList<int>)), _ui->projectionWidget, SLOT(updateSelectedPoints(QList<int>)));

    updateLegend();
}
开发者ID:Rambo2015,项目名称:TaxiVis,代码行数:35,代码来源:timeanalysiswidget.cpp

示例2: QWidget

HistorySizeWidget::HistorySizeWidget(QWidget* parent)
    : QWidget(parent)
{
    _ui = new Ui::HistorySizeWidget();
    _ui->setupUi(this);

    _ui->unlimitedWarningWidget->setVisible(false);
    _ui->unlimitedWarningWidget->setWordWrap(true);
    _ui->unlimitedWarningWidget->setCloseButtonVisible(false);
    _ui->unlimitedWarningWidget->setMessageType(KMessageWidget::Information);
    _ui->unlimitedWarningWidget->setText(i18nc("@info:status",
        "When using this option, the scrollback data will be written "
        "unencrypted to temporary files. Those temporary files will be "
        "deleted automatically when Konsole is closed in a normal manner.\n"
        "Use Settings->Configure Konsole->File Location to select the "
        "location of the temporary files."));

    // focus and select the spinner automatically when appropriate
    _ui->fixedSizeHistoryButton->setFocusProxy(_ui->historyLineSpinner);
    connect(_ui->fixedSizeHistoryButton , &QRadioButton::clicked , _ui->historyLineSpinner , &KPluralHandlingSpinBox::selectAll);

    QButtonGroup* modeGroup = new QButtonGroup(this);
    modeGroup->addButton(_ui->noHistoryButton);
    modeGroup->addButton(_ui->fixedSizeHistoryButton);
    modeGroup->addButton(_ui->unlimitedHistoryButton);
    connect(modeGroup, static_cast<void(QButtonGroup::*)(QAbstractButton*)>(&QButtonGroup::buttonClicked), this, &Konsole::HistorySizeWidget::buttonClicked);

    _ui->historyLineSpinner->setSuffix(ki18ncp("Unit of scrollback", " line", " lines"));
    this->setLineCount(HistorySizeWidget::DefaultLineCount);

    connect(_ui->historyLineSpinner, static_cast<void(KPluralHandlingSpinBox::*)(int)>(&KPluralHandlingSpinBox::valueChanged), this, &Konsole::HistorySizeWidget::historySizeChanged);
}
开发者ID:Tasssadar,项目名称:konsole,代码行数:32,代码来源:HistorySizeWidget.cpp

示例3: formWindow

QList<QAction*> ButtonTaskMenu::taskActions() const
{
    ButtonTaskMenu *ncThis = const_cast<ButtonTaskMenu*>(this);
    QButtonGroup *buttonGroup = 0;

    QDesignerFormWindowInterface *fw = formWindow();
    const SelectionType st = selectionType(fw->cursor(), &buttonGroup);

    m_groupMenu.initialize(fw, buttonGroup, button());
    const bool hasAssignOptions = ncThis->refreshAssignMenu(fw, fw->cursor()->selectedWidgetCount(), st, buttonGroup);
    m_assignToGroupSubMenuAction->setVisible(hasAssignOptions);
    // add/remove
    switch (st) {
    case UngroupedButtonSelection:
    case OtherSelection:
        m_currentGroupSubMenuAction->setVisible(false);
        break;
    case GroupedButtonSelection:
        m_currentGroupSubMenuAction->setText(tr("Button group '%1'").arg(buttonGroup->objectName()));
        m_currentGroupSubMenuAction->setVisible(true);
        break;
    }

    return m_taskActions + QDesignerTaskMenu::taskActions();
}
开发者ID:hkahn,项目名称:qt5-qttools-nacl,代码行数:25,代码来源:button_taskmenu.cpp

示例4: setWindowTitle

void DkTifDialog::init() {

	isOk = false;
	setWindowTitle("TIF compression");
	//setFixedSize(270, 146);
	setLayout(new QVBoxLayout(this));

	//QWidget* buttonWidget = new QWidget(this);
	QGroupBox* buttonWidget = new QGroupBox(tr("TIF compression"), this);
	QVBoxLayout* vBox = new QVBoxLayout(buttonWidget);
	QButtonGroup* bGroup = new QButtonGroup(buttonWidget);
	noCompressionButton = new QRadioButton( tr("&no compression"), this);
	compressionButton = new QRadioButton(tr("&LZW compression (lossless)"), this);
	compressionButton->setChecked(true);
	bGroup->addButton(noCompressionButton);
	bGroup->addButton(compressionButton);

	vBox->addWidget(noCompressionButton);
	vBox->addWidget(compressionButton);

	// mButtons
	QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
	buttons->button(QDialogButtonBox::Ok)->setText(tr("&OK"));
	buttons->button(QDialogButtonBox::Cancel)->setText(tr("&Cancel"));
	connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
	connect(buttons, SIGNAL(rejected()), this, SLOT(reject()));

	layout()->addWidget(buttonWidget);
	layout()->addWidget(buttons);
}
开发者ID:007durgesh219,项目名称:nomacs,代码行数:30,代码来源:DkSaveDialog.cpp

示例5: QGroupBox

void ExportDialog::makeTimeGroupBox(){
  timeOutGb=new QGroupBox("Time Output");
  radioSingle=new QRadioButton(tr("Single"));
  radioAll=new QRadioButton(tr("All frames:  0  to  "));
  radioRange=new QRadioButton(tr("Range:"));
  minBox=new QSpinBox;
  maxBox=new QSpinBox;
  QLabel *toLb=new QLabel(tr(" to "));
  QButtonGroup buttonGroup;
  buttonGroup.addButton(radioSingle);
  buttonGroup.addButton(radioAll);
  buttonGroup.addButton(radioRange);
  radioSingle->setChecked(true);
  QHBoxLayout *hLayout=new QHBoxLayout;
  hLayout->addWidget(radioRange);
  hLayout->addWidget(minBox);
  hLayout->addWidget(toLb);
  hLayout->addWidget(maxBox);
  hLayout->addStretch(1);
  QVBoxLayout *vLayout=new QVBoxLayout;
  vLayout->addWidget(radioSingle);
  vLayout->addWidget(radioAll);
  vLayout->addLayout(hLayout);
  timeOutGb->setLayout(vLayout);
}
开发者ID:nfaralli,项目名称:BPV,代码行数:25,代码来源:exportdialog.cpp

示例6: QDialog

QgsLayoutItemPropertiesDialog::QgsLayoutItemPropertiesDialog( QWidget *parent, Qt::WindowFlags flags )
  : QDialog( parent, flags )
{
  setupUi( this );

  QgsGui::instance()->enableAutoGeometryRestore( this );

  //make button exclusive
  QButtonGroup *buttonGroup = new QButtonGroup( this );
  buttonGroup->addButton( mUpperLeftRadioButton );
  buttonGroup->addButton( mUpperMiddleRadioButton );
  buttonGroup->addButton( mUpperRightRadioButton );
  buttonGroup->addButton( mMiddleLeftRadioButton );
  buttonGroup->addButton( mMiddleRadioButton );
  buttonGroup->addButton( mMiddleRightRadioButton );
  buttonGroup->addButton( mLowerLeftRadioButton );
  buttonGroup->addButton( mLowerMiddleRadioButton );
  buttonGroup->addButton( mLowerRightRadioButton );
  buttonGroup->setExclusive( true );

  QgsSettings settings;
  double lastWidth = settings.value( QStringLiteral( "LayoutDesigner/lastItemWidth" ), QStringLiteral( "50" ) ).toDouble();
  double lastHeight = settings.value( QStringLiteral( "LayoutDesigner/lastItemHeight" ), QStringLiteral( "50" ) ).toDouble();
  QgsUnitTypes::LayoutUnit lastSizeUnit = settings.enumValue( QStringLiteral( "LayoutDesigner/lastSizeUnit" ), QgsUnitTypes::LayoutMillimeters );
  setItemSize( QgsLayoutSize( lastWidth, lastHeight, lastSizeUnit ) );

  mPosUnitsComboBox->linkToWidget( mXPosSpin );
  mPosUnitsComboBox->linkToWidget( mYPosSpin );
  mSizeUnitsComboBox->linkToWidget( mWidthSpin );
  mSizeUnitsComboBox->linkToWidget( mHeightSpin );

  mLockAspectRatio->setWidthSpinBox( mWidthSpin );
  mLockAspectRatio->setHeightSpinBox( mHeightSpin );
}
开发者ID:CS-SI,项目名称:QGIS,代码行数:34,代码来源:qgslayoutnewitempropertiesdialog.cpp

示例7: QWidget

Window::Window(QWidget *parent)
    : QWidget(parent),
    m_iconSize(64, 64)
{
    m_ui.setupUi(this);
    QButtonGroup *buttonGroup = findChild<QButtonGroup *>();     // ### workaround for uic in 4.4
    m_ui.easingCurvePicker->setIconSize(m_iconSize);
    m_ui.easingCurvePicker->setMinimumHeight(m_iconSize.height() + 50);
    buttonGroup->setId(m_ui.lineRadio, 0);
    buttonGroup->setId(m_ui.circleRadio, 1);

    QEasingCurve dummy;
    m_ui.periodSpinBox->setValue(dummy.period());
    m_ui.amplitudeSpinBox->setValue(dummy.amplitude());
    m_ui.overshootSpinBox->setValue(dummy.overshoot());

    connect(m_ui.easingCurvePicker, SIGNAL(currentRowChanged(int)), this, SLOT(curveChanged(int)));
    connect(buttonGroup, SIGNAL(buttonClicked(int)), this, SLOT(pathChanged(int)));
    connect(m_ui.periodSpinBox, SIGNAL(valueChanged(double)), this, SLOT(periodChanged(double)));
    connect(m_ui.amplitudeSpinBox, SIGNAL(valueChanged(double)), this, SLOT(amplitudeChanged(double)));
    connect(m_ui.overshootSpinBox, SIGNAL(valueChanged(double)), this, SLOT(overshootChanged(double)));
    createCurveIcons();

    QPixmap pix(QLatin1String(":/images/qt-logo.png"));
    m_item = new PixmapItem(pix);
    m_scene.addItem(m_item);
    m_ui.graphicsView->setScene(&m_scene);

    m_anim = new Animation(m_item, "pos");
    m_anim->setEasingCurve(QEasingCurve::OutBounce);
    m_ui.easingCurvePicker->setCurrentRow(int(QEasingCurve::OutBounce));

    startAnimation();
}
开发者ID:ismaell,项目名称:android-qt5-qtbase,代码行数:34,代码来源:window.cpp

示例8: printf

// Create new radio button
QtWidgetObject* AtenTreeGuiDialog::addRadioButton(TreeGuiWidget* widget, TreeGuiWidget* groupWidget, QString name, QString label, int id)
{
	// Cast QObject in groupWidget into QButtonGroup
	QtWidgetObject* wo = groupWidget->qtWidgetObject();
	if (wo == NULL)
	{
		printf("Internal Error: Can't add button to radiogroup widget since supplied widget doesn't have an associated QtWidgetObject.\n");
		return NULL;
	}
	QButtonGroup *group = static_cast<QButtonGroup*>(wo->qObject());
	if (!group)
	{
		printf("Internal Error: Couldn't cast QObject into QButtonGroup.\n");
		return NULL;
	}
	// Create new QtWidgetObject for page
	QRadioButton *radio = new QRadioButton(label, this);
	group->addButton(radio, id);
	QtWidgetObject* qtwo = widgetObjects_.add();
	qtwo->set(widget, radio);
	radio->setEnabled(widget->enabled());
	radio->setVisible(widget->visible());
	radio->setChecked(widget->valueI() == 1);
	radio->setMinimumHeight(WIDGETHEIGHT);
	radio->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
	// Connect signal to master slot
	QObject::connect(radio, SIGNAL(clicked(bool)), this, SLOT(radioButtonWidget_clicked(bool)));
	return qtwo;
}
开发者ID:alinelena,项目名称:aten,代码行数:30,代码来源:treegui_funcs.cpp

示例9: QGroupBox

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// MainWindow::createDisplayButtons:
//
// Create preview window groupbox.
//
QGroupBox*
MainWindow::createDisplayButtons()
{
	// init group box
	QGroupBox *groupBox = new QGroupBox("Display");

	// create radio buttons
	m_radioDisplay[0] = new QRadioButton("Input");
	m_radioDisplay[1] = new QRadioButton("Output");

	// create button group and add radio buttons to it
	QButtonGroup *bGroup = new QButtonGroup;
	for(int i = 0; i<2; ++i)
		bGroup->addButton(m_radioDisplay[i]);

	// set input radio button to be default
	m_radioDisplay[0]->setChecked(true);

	// assemble radio buttons into vertical widget
	QVBoxLayout *vbox = new QVBoxLayout;
	vbox->addWidget(m_radioDisplay[0]);
	vbox->addWidget(m_radioDisplay[1]);
	groupBox->setLayout(vbox);

	// init signal/slot connections
	connect(m_radioDisplay[0], SIGNAL(clicked()), this, SLOT(displayIn()));
	connect(m_radioDisplay[1], SIGNAL(clicked()), this, SLOT(displayOut()));

	return groupBox;
}
开发者ID:johanneschrist,项目名称:Image-Processing,代码行数:35,代码来源:MainWindow.cpp

示例10: DeviceSetting

DeviceSettingSartano::DeviceSettingSartano(Device *device, QWidget *parent)
 : DeviceSetting(device, parent)
{
	QVBoxLayout *layout = new QVBoxLayout(this);
	QGridLayout *gl = new QGridLayout;

	for( int i = 0; i < 10; ++i ) {
		QButtonGroup *g = new QButtonGroup(this);
		button1[i] = new QRadioButton(this);
		button0[i] = new QRadioButton(this);
		button0[i]->setChecked( true );
		g->addButton(button1[i]);
		g->addButton(button0[i]);

		gl->addWidget(button1[i], 1, i);
		gl->addWidget(button0[i], 0, i);
		QLabel *label = 0;
		if (i < 5) {
			label = new QLabel(QString::number(i+1), this);
		} else {
			label = new QLabel(QString('A'+i-5), this);
		}
		gl->addWidget( label, 2, i );
	}

	layout->addLayout( gl );
	layout->addStretch( 1 );

	this->setValue("code", device->parameter("code", "0000000000"));
}
开发者ID:Balex93,项目名称:telldus,代码行数:30,代码来源:devicesettingsartano.cpp

示例11: QLabel

void ImportExport::MD5CheckPage::createRow( QGridLayout* layout, int& row, const QString& name, const QString& title, bool anyClashes, bool allowMerge )
{
    if ( row % 3 == 0 ) {
        QFrame* line = new QFrame;
        line->setFrameShape( QFrame::HLine );
        layout->addWidget( line, ++row, 0, 1, 4 );
    }

    QLabel* label = new QLabel( title );
    label->setEnabled( anyClashes );
    layout->addWidget( label, ++row, 0 );

    QButtonGroup* group = new QButtonGroup(this);
    m_groups[name]=group;

    for ( int i = 1; i<4;++i ) {
        if ( i == 3 && !allowMerge )
            continue;

        QRadioButton* rb = new QRadioButton;
        layout->addWidget( rb, row, i  );
        group->addButton( rb, i );
        rb->setEnabled( anyClashes );
        if (i == 1 )
            rb->setChecked(true);
    }
}
开发者ID:KDE,项目名称:kphotoalbum,代码行数:27,代码来源:MD5CheckPage.cpp

示例12: WeatherAbstractMoveDialog

WeatherMessageBox::WeatherMessageBox(QWidget *parent)
    : WeatherAbstractMoveDialog(parent),
    ui(new Ui::WeatherMessageBox)
{
    ui->setupUi(this);
    drawWindowRoundedRect(this);
    //set window radius

    m_status = 0;
    ui->background->setPixmap(QPixmap(":/image/background").scaled(size()));
    ////////////////////////////////////////////////
    ui->topTitleCloseButton->setIcon(QIcon(":/image/close1"));
    ui->topTitleCloseButton->setStyleSheet(WeatherUIObject::MToolButtonStyle01);
    ui->topTitleCloseButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->topTitleCloseButton->setToolTip(tr("Close"));

    ui->confirmButton->setStyleSheet(WeatherUIObject::MPushButtonStyle04);
    ui->cancelButton->setStyleSheet(WeatherUIObject::MPushButtonStyle04);
    ui->confirmButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->cancelButton->setCursor(QCursor(Qt::PointingHandCursor));

    QButtonGroup *groupButton = new QButtonGroup(this);
    groupButton->addButton(ui->topTitleCloseButton, 0);
    groupButton->addButton(ui->confirmButton, 1);
    groupButton->addButton(ui->cancelButton, 2);
    connect(groupButton, SIGNAL(buttonClicked(int)), SLOT(buttonClicked(int)));

}
开发者ID:Greedysky,项目名称:TTKWeather,代码行数:28,代码来源:weathermessagebox.cpp

示例13: QWidget

XYZTextEditor::XYZTextEditor(QWidget *parent) : QWidget(parent), m_ui(new Ui::XYZTextEditor) {
    m_ui->setupUi(this);
    setupTextActions();
    fontChanged(m_ui->textEdit->font());
    alignmentChanged(m_ui->textEdit->alignment());
    m_ui->textEdit->setFocus();
    textEdit = m_ui->textEdit;
    QButtonGroup *btnGroup = new QButtonGroup(this);
    btnGroup->addButton(m_ui->btnAlignCenter);
    btnGroup->addButton(m_ui->btnAlignJustify);
    btnGroup->addButton(m_ui->btnAlignLeft);
    btnGroup->addButton(m_ui->btnAlignRight);
    QObject::connect(m_ui->textEdit, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)),
            this, SLOT(currentCharFormatChanged(const QTextCharFormat &)));
    QObject::connect(m_ui->textEdit, SIGNAL(cursorPositionChanged()), this, SLOT(cursorPositionChanged()));
    QObject::connect(m_ui->btnCut, SIGNAL(clicked()), m_ui->textEdit, SLOT(cut()));
    QObject::connect(m_ui->btnCopy, SIGNAL(clicked()), m_ui->textEdit, SLOT(copy()));
    QObject::connect(m_ui->btnPaste, SIGNAL(clicked()), m_ui->textEdit, SLOT(paste()));
    QObject::connect(m_ui->btnTextDirection, SIGNAL(clicked()), this, SLOT(textDirection()));

//    m_ui->textEdit->document()->defaultTextOption().setTextDirection(QApplication::layoutDirection());
//    QTextCursor cursor = m_ui->textEdit->textCursor();
//    QTextBlockFormat blockFmt = cursor.blockFormat();
//    if (QApplication::layoutDirection() == Qt::RightToLeft) {
//        blockFmt.setLayoutDirection(Qt::RightToLeft);
//    } else {
//        blockFmt.setLayoutDirection(Qt::LeftToRight);
//    }
//    cursor.setBlockFormat(blockFmt);

//    qDebug()<<m_ui->textEdit->document()->defaultTextOption().textDirection();
//    qDebug()<<m_ui->textEdit->toHtml();
}
开发者ID:gamalielmendez,项目名称:BibliotecaImpresionSql,代码行数:33,代码来源:XYZ_TextEditor.cpp

示例14: XDialog

substituteList::substituteList(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
  : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  QButtonGroup * showByButtonGroup = new QButtonGroup(this);
  showByButtonGroup->addButton(_byLeadTime);
  showByButtonGroup->addButton(_byDays);
  showByButtonGroup->addButton(_byDate);

  // signals and slots connections
  connect(_byDays, SIGNAL(toggled(bool)), _days, SLOT(setEnabled(bool)));
  connect(_byDate, SIGNAL(toggled(bool)), _date, SLOT(setEnabled(bool)));
  connect(_subs, SIGNAL(valid(bool)), _select, SLOT(setEnabled(bool)));
  connect(_subs, SIGNAL(itemSelected(int)), _select, SLOT(animateClick()));
  connect(showByButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(sFillList()));
  connect(_close, SIGNAL(clicked()), this, SLOT(reject()));
  connect(_select, SIGNAL(clicked()), this, SLOT(sSelect()));
  connect(_item, SIGNAL(newId(int)), _warehouse, SLOT(findItemsites(int)));
  connect(_item, SIGNAL(warehouseIdChanged(int)), _warehouse, SLOT(setId(int)));

  _subs->addColumn(tr("Item Number"),  _itemColumn, Qt::AlignLeft,   true,  "item_number"  );
  _subs->addColumn(tr("Description"),  -1,          Qt::AlignLeft,   true,  "itemdescrip"  );
  _subs->addColumn(tr("QOH"),          _qtyColumn,  Qt::AlignRight,  true,  "qoh" );
  _subs->addColumn(tr("Norm. QOH"),    _qtyColumn,  Qt::AlignRight,  true,  "normqoh" );
  _subs->addColumn(tr("Availability"), _qtyColumn,  Qt::AlignRight,  true,  "available" );
  _subs->addColumn(tr("Norm. Avail."), _qtyColumn,  Qt::AlignRight,  true,  "normavailable" );

  //If not multi-warehouse hide whs control
  if (!_metrics->boolean("MultiWhs"))
  {
    _warehouseLit->hide();
    _warehouse->hide();
  }
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:35,代码来源:substituteList.cpp

示例15: InsertPeptideDialog

void InsertPeptideExtension::constructDialog()
{
    if (m_dialog == NULL) {
        m_dialog = new InsertPeptideDialog(m_widget);
        QButtonGroup* stereoGroup = new QButtonGroup(m_dialog);
        stereoGroup->addButton(m_dialog->dStereoButton, 0);
        stereoGroup->addButton(m_dialog->lStereoButton, 1);
        stereoGroup->setExclusive(true);

        connect(stereoGroup, SIGNAL(buttonClicked(int)),
                this, SLOT(setStereo(int)));

        connect(m_dialog->structureCombo, SIGNAL(currentIndexChanged(int)),
                this, SLOT(setStructureType(int)));
        connect(m_dialog->phiSpin, SIGNAL(valueChanged(double)),
                this, SLOT(setPhi(double)));
        connect(m_dialog->psiSpin, SIGNAL(valueChanged(double)),
                this, SLOT(setPsi(double)));
        connect(m_dialog->insertButton, SIGNAL(clicked()),
                this, SLOT(performInsert()));

        // Set the amino buttons to update the sequence
        foreach(const QToolButton *child, m_dialog->findChildren<QToolButton*>()) {
            connect(child, SIGNAL(clicked()), this, SLOT(updateText()));
        }
        connect(m_dialog, SIGNAL(destroyed()), this, SLOT(dialogDestroyed()));
    }
开发者ID:kbal,项目名称:avogadro,代码行数:27,代码来源:insertpeptideextension.cpp


注:本文中的QButtonGroup类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。