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


C++ setAcceptHoverEvents函数代码示例

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


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

示例1: QGraphicsWidget

ProgressLabel::ProgressLabel(QGraphicsWidget *parent)
    : QGraphicsWidget(parent),
    m_progress(0)
{
    setAcceptDrops(false);
    setAcceptHoverEvents(false);
    setAcceptedMouseButtons(false);
    init_paint_options();
}
开发者ID:holycheater,项目名称:plasma-widget-drop2imageshack,代码行数:9,代码来源:progresslabel.cpp

示例2: QGraphicsItem

IconBase::IconBase(QGraphicsItem * parent)
    : QGraphicsItem(parent),
      m_highlight(false),
      m_launchMode(DesktopPlugin::SingleClick)
{
    // not yet setFlag(QGraphicsItem::ItemIsMovable);
    setAcceptHoverEvents(true);
    setCursor(Qt::PointingHandCursor);
}
开发者ID:Boris-de,项目名称:razor-qt,代码行数:9,代码来源:desktopicon.cpp

示例3: setZValue

Chip::Chip(int x, int y)//新建“障碍物”item函数
{
    this->x = x;//确定新建item的坐标x
    this->y = y;//确定新建item的坐标y
    this->color = color;//选择颜色
    setZValue((x + y) % 2);//确定该item位于scene的层数
    setFlags(ItemIsSelectable | ItemIsMovable);//障碍物item可被选中和可移动
    setAcceptHoverEvents(true);//可以接受外部事件,例如鼠标点击
}
开发者ID:INGslh,项目名称:FireCtrl,代码行数:9,代码来源:chip.cpp

示例4: TextureRendererItem

VideoRendererItem::VideoRendererItem(QQuickItem *parent)
: TextureRendererItem(parent), d(new Data(this)) {
	setFlag(ItemAcceptsDrops, true);
	d->mposd = new MpOsdItem(this);
	d->letterbox = new LetterboxItem(this);
	setZ(-1);
	setAcceptHoverEvents(true);
	setAcceptedMouseButtons(Qt::AllButtons);
}
开发者ID:akhilo,项目名称:cmplayer,代码行数:9,代码来源:videorendereritem.cpp

示例5: Handle

 Handle(QGraphicsItem *parent = 0)
     : QGraphicsItem(parent)
     , mUnderMouse(false)
 {
     setFlags(QGraphicsItem::ItemIgnoresTransformations |
              QGraphicsItem::ItemIgnoresParentOpacity);
     setAcceptHoverEvents(true);
     setCursor(Qt::ArrowCursor);
 }
开发者ID:EdenIndustries,项目名称:tiled,代码行数:9,代码来源:objectselectiontool.cpp

示例6: setFlag

GraphicsWidgetBase::GraphicsWidgetBase() {
  setFlag(QGraphicsItem::ItemIsMovable, true);
  setFlag(QGraphicsItem::ItemIsSelectable, true);
  setFlag(QGraphicsItem::ItemIsFocusable, true);
  setAcceptHoverEvents(true);
#if(QT_VERSION >= QT_VERSION_CHECK(4,5,0))
  setOpacity(0.8);
#endif
}
开发者ID:kdbanman,项目名称:browseRDF,代码行数:9,代码来源:GraphicsWidgetBase.cpp

示例7: QQuickItem

MaskedMouseArea::MaskedMouseArea(QQuickItem *parent)
    : QQuickItem(parent),
      m_pressed(false),
      m_alphaThreshold(0.0),
      m_containsMouse(false)
{
    setAcceptHoverEvents(true);
    setAcceptedMouseButtons(Qt::LeftButton);
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:9,代码来源:maskedmousearea.cpp

示例8: GridSnap

Pinhead::Pinhead(QGraphicsItem *parent, QPoint p, int pointIndex, JunctionStyle style) :
	GridSnap(GS120), pointIndex(pointIndex), style(JunctionStyleUnknown)
{
	setParentItem(parent);
	setPos(p.x(), p.y());
	setJunction(style);
//	setFlags(ItemStacksBehindParent);
	setAcceptHoverEvents(true);
}
开发者ID:genuser,项目名称:freesch,代码行数:9,代码来源:pinhead.cpp

示例9: arrowSize_

Edge::Edge(NodeGui *src, NodeGui *tar)
    :srcN_(src),tarN_(tar), arrowSize_(5), fixedColor_(false), edgeColor_(Qt::black),lineStyle_(Qt::SolidLine)
{
    setCursor(Qt::ArrowCursor);
    setAcceptHoverEvents(true);
    src->addEdge(this);
    tar->addEdge(this);
    adjust();
}
开发者ID:dstoeckel,项目名称:causaltrail,代码行数:9,代码来源:edge.cpp

示例10: m_priv_ptr

DefaultTableComponent::DefaultTableComponent(const QRectF &a_rect,
                                             LayoutType type,
                                             QGraphicsItem *parent)
    : UIKit::TableViewItem(a_rect, parent),
      m_priv_ptr(new PrivateTableComponent) {
  m_priv_ptr->m_current_geometry = a_rect;
  m_priv_ptr->m_current_item_selection = false;
  m_priv_ptr->m_current_item_visibility = true;
  m_priv_ptr->m_current_layout_type = type;

  m_priv_ptr->m_layout_base = new QGraphicsWidget(this);
  m_priv_ptr->m_layout_base->setGeometry(a_rect);

  m_priv_ptr->m_linear_layout =
      new QGraphicsLinearLayout(m_priv_ptr->m_layout_base);

  m_priv_ptr->m_image_view_widget =
      new UIKit::ImageView(m_priv_ptr->m_layout_base);
  m_priv_ptr->m_image_view_widget->set_pixmap(
      UIKit::Theme::instance()->drawable("setup-wizard.png", "hdpi"));

  m_priv_ptr->m_label_widget = new UIKit::Label(m_priv_ptr->m_layout_base);

  m_priv_ptr->m_option_button = new UIKit::Button(m_priv_ptr->m_layout_base);

  connect(m_priv_ptr->m_image_view_widget, SIGNAL(clicked()), this,
          SLOT(onClicked()));
  connect(m_priv_ptr->m_label_widget, SIGNAL(clicked()), this,
          SLOT(onClicked()));
  connect(m_priv_ptr->m_option_button, SIGNAL(clicked()), this,
          SLOT(onClicked()));

  if (type == kGridLayout) {
    m_priv_ptr->m_linear_layout->setOrientation(Qt::Vertical);
    m_priv_ptr->m_linear_layout->addItem(m_priv_ptr->m_image_view_widget);
    m_priv_ptr->m_linear_layout->addItem(m_priv_ptr->m_label_widget);
    m_priv_ptr->m_linear_layout->addItem(m_priv_ptr->m_option_button);
    m_priv_ptr->m_label_widget->set_size(QSize(64, a_rect.height()));
    m_priv_ptr->m_option_button->hide();
  } else {
    m_priv_ptr->m_label_widget->set_size(QSize(150, a_rect.height()));
    // d->m_image_view_widget->setSize(QSizeF(48.0, 48.0));
    m_priv_ptr->m_linear_layout->setOrientation(Qt::Horizontal);
    m_priv_ptr->m_linear_layout->addItem(m_priv_ptr->m_image_view_widget);
    m_priv_ptr->m_linear_layout->addItem(m_priv_ptr->m_label_widget);
    m_priv_ptr->m_linear_layout->addItem(m_priv_ptr->m_option_button);
  }

  setAcceptedMouseButtons(Qt::LeftButton | Qt::RightButton);
  setFlag(QGraphicsItem::ItemIsMovable, false);
  setFlag(QGraphicsItem::ItemIsFocusable, true);
  setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);

  setFiltersChildEvents(false);
  setAcceptTouchEvents(true);
  setAcceptHoverEvents(true);
}
开发者ID:EvorzStudios,项目名称:plexydesk,代码行数:57,代码来源:default_table_component.cpp

示例11: QGraphicsItem

GraphicsEdgeItem::GraphicsEdgeItem(QGraphicsItem *parent)
	: QGraphicsItem(parent), Communicate()
	, mHaveBorder(true)
{
	setFlag(ItemSendsGeometryChanges);
	setCacheMode(NoCache);
	setAcceptHoverEvents(true);

}
开发者ID:wolfbing,项目名称:graduate-pro,代码行数:9,代码来源:graphicsedgeitem.cpp

示例12: _data

koregui::ShaderDataItem::ShaderDataItem(const kore::ShaderData* data,
                                        QGraphicsItem* parent)
                                      : _data(data),
                                        _mouseover(false),
                                        _op(NULL),
                                        QGraphicsItem(parent) {
  setAcceptHoverEvents(true);
  setCursor(QCursor(Qt::CursorShape::PointingHandCursor));
}
开发者ID:duglah,项目名称:KoRE,代码行数:9,代码来源:ShaderDataItem.cpp

示例13: ShapeAnnotation

PolygonAnnotation::PolygonAnnotation(GraphicsView *graphicsView, QGraphicsItem *pParent)
  : ShapeAnnotation(graphicsView, pParent)
{
  // initialize all fields with default values
  initializeFields();
  mIsCustomShape = true;
  setAcceptHoverEvents(true);
  connect(this, SIGNAL(updateShapeAnnotation()), mpGraphicsView, SLOT(addClassAnnotation()));
}
开发者ID:SemiSQ,项目名称:OpenModelica,代码行数:9,代码来源:PolygonAnnotation.cpp

示例14: QQuickItem

QQuickPinchArea::QQuickPinchArea(QQuickItem *parent)
  : QQuickItem(*(new QQuickPinchAreaPrivate), parent)
{
    Q_D(QQuickPinchArea);
    d->init();
#ifdef Q_OS_OSX
    setAcceptHoverEvents(true); // needed to enable touch events on mouse hover.
#endif
}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:9,代码来源:qquickpincharea.cpp

示例15: QGraphicsObject

QSanButton::QSanButton(QGraphicsItem *parent) : QGraphicsObject(parent)
{
    _m_state = S_STATE_UP;
    _m_style = S_STYLE_PUSH;
    _m_mouseEntered = false;
    setSize(QSize(0, 0));
    setAcceptHoverEvents(true);
    setAcceptedMouseButtons(Qt::LeftButton);
}
开发者ID:woodee,项目名称:QSanguosha-v2,代码行数:9,代码来源:qsanbutton.cpp


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