• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setAcceptHoverEvents函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: m_view

EPGItem::EPGItem( vlc_epg_event_t *data, EPGView *view )
    : m_view( view )
{
    setData( data );
    m_current = false;
    m_boundingRect.setHeight( TRACKS_HEIGHT );
    setFlags( QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsFocusable);
    setAcceptHoverEvents( true );
}
开发者ID:0xheart0,项目名称:vlc,代码行数:9,代码来源:EPGItem.cpp


示例17: setAcceptHoverEvents

void GpxBlock::unsetCursor()
{
  for (int i = 0; i < _inPorts.size(); i++) 
    _inPorts.at(i)->unsetCursor();
  for (int i = 0; i < _outPorts.size(); i++) 
    _outPorts.at(i)->unsetCursor();
  QGraphicsItem::unsetCursor();
  setAcceptHoverEvents(false);
}
开发者ID:lucciano,项目名称:powerdevs,代码行数:9,代码来源:gpx_block.cpp


示例18: QGraphicsItem

LabelOverlayButton::LabelOverlayButton( QGraphicsItem *parent )
    : QGraphicsItem( parent ),
    m_iconEffect( 0 ),
    m_size( 8 )
{
    setAcceptHoverEvents( true );

    m_iconEffect = new KIconEffect();
}
开发者ID:cancamilo,项目名称:amarok,代码行数:9,代码来源:LabelOverlayButton.cpp


示例19: m_size

ItemBase::ItemBase(int size, int x, int y) : m_size(size), m_isResizing(false)
{
    setFlag(QGraphicsItem::ItemIsMovable, true);
    setFlag(QGraphicsItem::ItemIsSelectable, true);
    setFlag(QGraphicsItem::ItemIsFocusable, true);
    setAcceptHoverEvents(true);
    setPos(x, y);
    m_startTime = QTime::currentTime();
}
开发者ID:maxxant,项目名称:qt,代码行数:9,代码来源:qtbox.cpp


示例20: QGraphicsPathItem

QNEConnection::QNEConnection(QGraphicsItem *parent) : QGraphicsPathItem(parent)
{
    setPen(QPen(QColor(QRgb(0x2c3e50)), 3));
    setBrush(Qt::NoBrush);
    setZValue(-1);

    setAcceptHoverEvents(true);
    setAcceptTouchEvents(true);
}
开发者ID:ggggamer,项目名称:silkopter,代码行数:9,代码来源:qneconnection.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setAcceptedMouseButtons函数代码示例发布时间:2022-05-30
下一篇:
C++ setAcceptDrops函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap