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


C++ QToolButton::setAutoExclusive方法代码示例

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


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

示例1: QToolButton

QToolButton *StManagerStudyListComp::createToolButton ( const QIcon &icon, const char *member )
{
  QToolButton *toolButton = new QToolButton();

  toolButton->setCheckable( true );
  toolButton->setAutoExclusive( true );

  toolButton->setIconSize( QSize( 27, 27 ) );
  toolButton->setIcon( icon );

  connect( toolButton, SIGNAL(clicked()), this, member );

  return toolButton;
}
开发者ID:JanKolomaznik,项目名称:MedV4D,代码行数:14,代码来源:StManagerStudyListComp.cpp

示例2: getToolsFrame

QToolButton * AdvancedImageWidget::addToolButton(QString name, QIcon icon, bool checkable)
{
    QFrame* holder = getToolsFrame();
    QToolButton *toolButton = new QToolButton();
    toolButton->setIcon(icon);
    toolButton->setText(name);
    toolButton->setToolTip(name);
    toolButton->setIconSize(QSize(24,24));
    if (checkable)
    {
        toolButton->setAutoExclusive(true);
        toolButton->setCheckable(true);
        toolButton->setAutoRaise(true);
    }
    holder->layout()->addWidget(toolButton);

    connect(toolButton, SIGNAL(released()),&mToolMapper, SLOT(map()));
    mToolMapper.setMapping(toolButton, toolButton);
    //connect(toolButton, SIGNAL(released()), this, SLOT(toolButtonReleased()));
    return toolButton;
}
开发者ID:Aldrog,项目名称:corecvs,代码行数:21,代码来源:advancedImageWidget.cpp

示例3: setTitle

EditorTools::EditorTools(EditorWorkspace * parent)
  :QGroupBox((QWidget *)parent)
{
  editor = parent;
  setTitle(tr("Tools"));
  QGridLayout * layout = new QGridLayout(this);
  this->setLayout(layout);
  QSize iconSize = QSize(22,22);
  QToolButton * pointer = new QToolButton(this);
  pointer->setIcon(QIcon(":images/cursor_arrow.png"));
  pointer->setToolTip(tr("Drag/Scale Image\n(Shift to activate)"));
  pointer->setIconSize(iconSize);
  pointer->setCheckable(true);
  pointer->setAutoExclusive(true);
  if(editor->editorView()->editorMode() == ImageEditorView::EditorDefaultMode){
    pointer->setChecked(true);
  }
  connect(pointer,SIGNAL(clicked(bool)),this,SLOT(onPointerClicked()));
  layout->addWidget(pointer,0,0);
  QToolButton * bullseye = new QToolButton(this);
  bullseye->setIcon(QIcon(":images/bullseye.png"));
  bullseye->setToolTip(tr("Set Image Center"));
  bullseye->setIconSize(iconSize);
  bullseye->setCheckable(true);
  bullseye->setAutoExclusive(true);
  connect(bullseye,SIGNAL(toggled(bool)),this,SLOT(onBullseyeToggled(bool)));
  layout->addWidget(bullseye,0,1);
  QToolButton * drop = new QToolButton(this);
  drop->setIcon(QIcon(":images/water_drop.png"));
  drop->setToolTip(tr("Blur Image"));
  drop->setIconSize(iconSize);
  drop->setCheckable(true);
  drop->setAutoExclusive(true);
  if(editor->editorView()->editorMode() == ImageEditorView::EditorBlurMode){
    drop->setChecked(true);
  }
  connect(drop,SIGNAL(clicked(bool)),this,SLOT(onDropClicked()));
  layout->addWidget(drop,0,2);
  QToolButton * mathEdit = new QToolButton(this);
  mathEdit->setIcon(QIcon(":images/formula_pi.png"));
  mathEdit->setToolTip(tr("Evaluate Expression"));
  mathEdit->setIconSize(iconSize);
  connect(mathEdit,SIGNAL(clicked(bool)),this,SLOT(onMathEdit()));
  layout->addWidget(mathEdit,0,3);


  QToolButton * editMask = new QToolButton(this);
  editMask->setIcon(QIcon(":images/mask_happy.png"));
  editMask->setToolTip(tr("Edit image mask"));
  editMask->setIconSize(iconSize);
  editMask->setCheckable(true);
  editMask->setAutoExclusive(true);
  connect(editMask,SIGNAL(clicked(bool)),this,SLOT(onEditMaskClicked()));
  layout->addWidget(editMask,0,4);

  /*  QToolButton * filter = new QToolButton(this);
  filter->setIcon(QIcon(":images/optical_filter.png"));
  filter->setToolTip(tr("Filter Image"));
  filter->setIconSize(iconSize);
  filter->setCheckable(true);
  filter->setAutoExclusive(true);
  connect(filter,SIGNAL(clicked(bool)),this,SLOT(onFilterClicked()));
  layout->addWidget(filter,0,4);*/

  QToolButton * selection = new QToolButton(this);
  selection->setIcon(QIcon(":images/selection.png"));
  selection->setToolTip(tr("Select image section"));
  selection->setIconSize(iconSize);
  selection->setCheckable(true);
  selection->setAutoExclusive(true);
  connect(selection,SIGNAL(clicked(bool)),this,SLOT(onSelectionClicked()));
  layout->addWidget(selection,0,5);

  QToolButton * lineout = new QToolButton(this);
  lineout->setIcon(QIcon(":images/lineout_plot.png"));
  lineout->setToolTip(tr("Plot linear profile"));
  lineout->setIconSize(iconSize);
  lineout->setCheckable(true);
  lineout->setAutoExclusive(true);
  connect(lineout,SIGNAL(clicked(bool)),this,SLOT(onLineoutClicked()));
  layout->addWidget(lineout,0,6);

  QToolButton * undo = new QToolButton(this);
  undo->setIcon(QIcon(":images/undo.png"));
  undo->setToolTip(tr("Undo last edit"));
  undo->setIconSize(iconSize);
  undo->setEnabled(false);
  connect(undo,SIGNAL(clicked(bool)),this,SLOT(onUndoClicked()));
  layout->addWidget(undo,1,0);

  QToolButton * redo = new QToolButton(this);
  redo->setIcon(QIcon(":images/redo.png"));
  redo->setToolTip(tr("Redo last undone edit"));
  redo->setIconSize(iconSize);
  redo->setEnabled(false);
  connect(redo,SIGNAL(clicked(bool)),this,SLOT(onRedoClicked()));
  layout->addWidget(redo,1,1);

  QToolButton * removeElectronics = new QToolButton(this);
  removeElectronics->setIcon(QIcon(":images/hardware.png"));
//.........这里部分代码省略.........
开发者ID:FXIhub,项目名称:hawk,代码行数:101,代码来源:editortools.cpp


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