这篇教程C++ updateMask函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateMask函数的典型用法代码示例。如果您正苦于以下问题:C++ updateMask函数的具体用法?C++ updateMask怎么用?C++ updateMask使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateMask函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: transformvoid GrowingLimb::updateBoneTransform(sf::Vector2f pos, sf::Vector2f scale, sf::Vector2f origin, float angle){ // boneTransform() overrides anything done to the regular Enity transform pos += limbTransform.getPosition(); if (parent) { pos += je::lengthdir(scale.x * TreeSize * parent->length, -angle); } scale.x *= limbTransform.getScale().x; scale.y *= limbTransform.getScale().y; origin += limbTransform.getOrigin(); angle += limbTransform.getRotation(); transform().setPosition(pos); transform().setScale(scale); transform().setOrigin(origin); transform().setRotation(angle); updateMask(); for (GrowingLimb *child : children) { child->updateBoneTransform(pos, scale, origin, angle); }}
开发者ID:rooooooooob,项目名称:orcajam5,代码行数:25,
示例2: QMAXvoid QSlider::setTickInterval( int i ){ tickInt = QMAX( 0, i ); update(); if ( autoMask() ) updateMask();}
开发者ID:kthxbyte,项目名称:QT2-Linaro,代码行数:7,
示例3: rangeChange/*!/reimp*/void QSlider::resizeEvent( QResizeEvent * ){ rangeChange(); initTicks(); if ( autoMask() ) updateMask();}
开发者ID:kthxbyte,项目名称:QT2-Linaro,代码行数:9,
示例4: QPixmapvoid QButton::setPixmap( const QPixmap &pixmap ){ if ( bpixmap && bpixmap->serialNumber() == pixmap.serialNumber() ) return; bool newSize; if ( bpixmap ) { newSize = pixmap.width() != bpixmap->width() || pixmap.height() != bpixmap->height(); *bpixmap = pixmap; } else { newSize = TRUE; bpixmap = new QPixmap( pixmap ); CHECK_PTR( bpixmap ); } if ( bpixmap->depth() == 1 && !bpixmap->mask() ) bpixmap->setMask( *((QBitmap *)bpixmap) ); if ( !btext.isNull() ) btext = QString::null; if ( autoresize && newSize ) adjustSize(); setAccel( 0 ); if ( autoMask() ) updateMask(); update(); updateGeometry();}
开发者ID:kthxbyte,项目名称:QT2-Linaro,代码行数:27,
示例5: updateMaskvoid ThinSplitterHandle::resizeEvent(QResizeEvent *event){ updateMask(); if (event->size()!=size()) { QSplitterHandle::resizeEvent(event); }}
开发者ID:BinChengfei,项目名称:cantata,代码行数:7,
示例6: t/*! Set up the layout. */void QTabWidget::setUpLayout( bool onlyCheck ){ if ( onlyCheck && !d->dirty ) return; // nothing to do if ( !isVisible() ) { d->dirty = TRUE; return; // we'll do it later } QSize t( d->tabs->sizeHint() ); if ( t.width() > width() ) t.setWidth( width() ); int lw = d->stack->lineWidth(); if ( d->pos == Bottom ) { d->tabs->setGeometry( QMAX(0, lw-2), height() - t.height() - lw, t.width(), t.height() ); d->stack->setGeometry( 0, 0, width(), height()-t.height()+QMAX(0, lw-2) ); } else { // Top d->tabs->setGeometry( QMAX(0, lw-2), 0, t.width(), t.height() ); d->stack->setGeometry( 0, t.height()-lw, width(), height()-t.height()+QMAX(0, lw-2)); } d->dirty = FALSE; if ( !onlyCheck ) update(); if ( autoMask() ) updateMask();}
开发者ID:xufooo,项目名称:fbreader-e2-test,代码行数:31,
示例7: initTicksvoid QSlider::setTickmarks( TickSetting s ){ ticks = s; initTicks(); update(); if ( autoMask() ) updateMask();}
开发者ID:kthxbyte,项目名称:QT2-Linaro,代码行数:8,
示例8: TRUE/*! When set to TRUE (the default) the positioning of the indicator string follows the GUI style. When set to FALSE the indicator position is decided by the value of indicatorFollowsStyle(). /sa indicatorFollowsStyle(), centerIndicator(), setCenterIndicator(), setIndicator() */void QProgressBar::setIndicatorFollowsStyle( bool on ){ if ( on == auto_indicator ) return; auto_indicator = on; repaint( FALSE ); if ( autoMask() ) updateMask();}
开发者ID:opieproject,项目名称:qte-opie,代码行数:17,
示例9: QSplitterHandleThinSplitterHandle::ThinSplitterHandle(Qt::Orientation orientation, QSplitter *parent) : QSplitterHandle(orientation, parent) , highlightUnderMouse(false) , underMouse(false){ sz=Utils::scaleForDpi(4); updateMask(); setAttribute(Qt::WA_MouseNoMask, true);}
开发者ID:CDrummond,项目名称:cantata,代码行数:9,
示例10: updateMaskvoid Stack::setMargins(int footer, int header){ m_footer_margin = footer; m_header_margin = header; m_footer_visible = (m_footer_visible != 0) ? -m_footer_margin : 0; m_header_visible = (m_header_visible != 0) ? m_header_margin : 0; updateMask(); showHeader();}
开发者ID:vjandrea,项目名称:focuswriter,代码行数:9,
示例11: disconnect//// When we set an explicit time we don't want the timeout() slot to be// called anymore as this relies on currentTime()//void QTodoClock::setTime( const QTime & t ){ time = t; disconnect( internalTimer, SIGNAL(timeout()), this, SLOT(timeout()) ); if (autoMask()) updateMask(); else update();}
开发者ID:BackupTheBerlios,项目名称:qtodo-svn,代码行数:13,
示例12: setIndicatorvoid QProgressBar::reset(){ progress_val = -1; percentage = -1; setIndicator(progress_str, progress_val, total_steps); update(); if ( autoMask() ) updateMask();}
开发者ID:opieproject,项目名称:qte-opie,代码行数:9,
示例13: QColorvoid ToolButtonTip::resizeEvent( QResizeEvent * _re ){ const QColor color_frame = QColor( 48, 48, 48 ); m_bg = QImage( size(), QImage::Format_ARGB32 ); m_bg.fill( color_frame.rgba() ); QPainter p( &m_bg ); p.setRenderHint( QPainter::Antialiasing ); QPen pen( color_frame ); pen.setWidthF( 1.5 ); p.setPen( pen ); QLinearGradient grad( 0, 0, 0, height() ); const QColor color_top = palette().color( QPalette::Active, QPalette::Window ).light( 120 ); grad.setColorAt( 0, color_top ); grad.setColorAt( 1, palette().color( QPalette::Active, QPalette::Window ). light( 80 ) ); p.setBrush( grad ); p.drawRoundRect( 0, 0, width() - 1, height() - 1, ROUNDED / width(), ROUNDED / height() ); if( m_toolButton ) { QPoint pt = m_toolButton->mapToGlobal( QPoint( 0, 0 ) ); p.setPen( color_top ); p.setBrush( color_top ); p.setRenderHint( QPainter::Antialiasing, FALSE ); p.drawLine( pt.x() - x(), 0, pt.x() + m_toolButton->width() - x() - 2, 0 ); const int dx = pt.x() - x(); p.setRenderHint( QPainter::Antialiasing, TRUE ); if( dx < 10 && dx >= 0 ) { p.setPen( pen ); p.drawImage( dx+1, 0, m_bg.copy( 20, 0, 10-dx, 10 ) ); p.drawImage( dx, 0, m_bg.copy( 0, 10, 1, 10-dx*2 ) ); } } p.setPen( Qt::black ); p.drawImage( MARGIN, MARGIN, m_icon ); QFont f = p.font(); f.setBold( TRUE ); p.setFont( f ); const int title_x = MARGIN + m_icon.width() + MARGIN; const int title_y = MARGIN + fontMetrics().height() - 2; p.drawText( title_x, title_y, m_title ); f.setBold( FALSE ); p.setFont( f ); p.drawText( QRect( title_x, title_y + MARGIN, width() - MARGIN - title_x, height() - MARGIN - title_y ), Qt::TextWordWrap, m_description ); updateMask(); QWidget::resizeEvent( _re );}
开发者ID:EmebedQtsoft,项目名称:italc2,代码行数:57,
示例14: Q_UNUSEDvoid EditorMagnifierItem::paint(QPainter * painter, const QStyleOptionGraphicsItem *option, QWidget * widget){ Q_UNUSED(option); Q_UNUSED(widget); if ( !scene() ) return; QRectF rect = getRect(); EditorScene *scn = qobject_cast<EditorScene *>( scene() ); if (rect.isValid() && m_valid && scn) { updateMask(); painter->save(); // because clipping is active !! QPainterPath clipPath; clipPath.addEllipse(getRect().center(), getRect().width() / 2,getRect().width() / 2); painter->setClipPath(clipPath); painter->setClipping(true); // TODO add extracted image to a cache !!! QRectF extractRect( rect.translated( pos() - scn->getUnderlayOffset() ) ); int extractWidth = extractRect.width() / m_magnifyingFactor; extractRect.adjust(extractWidth,extractWidth,-extractWidth,-extractWidth); QRectF bgRect = scn->getUnderlayImage().rect(); QRectF croppedRect = extractRect.intersected(bgRect); if ( !croppedRect.isNull() ) { QImage background = scn->getUnderlayImage().copy( croppedRect.toRect() ); QImage mag = background.scaled(rect.size().toSize(),Qt::KeepAspectRatio,Qt::SmoothTransformation); painter->drawImage(rect,mag); } painter->drawPixmap(rect.topLeft(), m_imgMask); painter->restore(); } // draw a box if selected if( isSelected() ) { painter->save(); QPen pen; pen.setCosmetic(true); pen.setColor(Qt::black); pen.setWidth(1); pen.setStyle(Qt::DotLine); painter->setPen(pen); painter->drawRect(rect); painter->restore(); }}
开发者ID:shinsterneck,项目名称:hotshots,代码行数:57,
示例15: updateMaskvoidLauncherContextualMenu::resizeEvent(QResizeEvent* event){ QMenu::resizeEvent(event); /* If transparent windows are not available use the XShape extension */ if (!transparencyAvailable()) { updateMask(); }}
开发者ID:ManoharUpputuri,项目名称:unity-2d,代码行数:9,
示例16: updateMaskvoid AnalogClock::timeout(){ QTime old_time = time; time = QTime::currentTime(); if ( old_time.minute() != time.minute() || old_time.hour() != time.hour() ) { // minute or hour has changed if (autoMask()) updateMask(); else update(); }}
开发者ID:OS2World,项目名称:LIB-QT3_Toolkit_Vbox,代码行数:12,
示例17: Q_UNUSEDvoid ICMainWindow::paintEvent(QPaintEvent* event){ Q_UNUSED(event); updateMask(); QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); painter.setPen(QPen(QBrush(QColor(51, 153, 255)), 2.0)); painter.setBrush(QBrush(QColor(252, 252, 252))); painter.drawRoundedRect(rect().adjusted(2,1,-2,-1), 5, 5);}
开发者ID:hzzlzz,项目名称:InteractiveCourse,代码行数:12,
示例18: repaintvoid QProgressBar::setTotalSteps( int totalSteps ){ bool clear = totalSteps != total_steps; total_steps = totalSteps; if ( isVisible() ) { if ( setIndicator(progress_str, progress_val, total_steps) ) { repaint( clear ); if ( autoMask() ) updateMask(); } }}
开发者ID:opieproject,项目名称:qte-opie,代码行数:12,
示例19: rvoid QFrame::resizeEvent( QResizeEvent *e ){ if ( !frect.isNull() ) { QRect r( frect.x(), frect.y(), width() - (e->oldSize().width() - frect.width()), height() - (e->oldSize().height() - frect.height()) ); setFrameRect( r ); } if ( autoMask()) updateMask();}
开发者ID:kthxbyte,项目名称:QT2-Linaro,代码行数:12,
示例20: loopMaskvoidSimdLoopInst::execute (SimdBoolMask &mask, SimdXContext &xcontext) const{ SimdBoolMask loopMask (mask.isVarying()); if (loopMask.isVarying()) { for (int i = xcontext.regSize(); --i >= 0;) loopMask[i] = mask[i]; } else { loopMask[0] = mask[0]; } bool takeLoopPath; do { _conditionPath->executePath (loopMask, xcontext); takeLoopPath = false; const SimdReg &condition = xcontext.stack().regSpRelative (-1); if (condition.isVarying()) { loopMask.setVarying (true); for (int i = xcontext.regSize(); --i >= 0;) { loopMask[i] &= *(bool*)(condition[i]); takeLoopPath |= loopMask[i]; } tryToMakeUniform (loopMask, xcontext); } else { takeLoopPath = *(bool*)(condition[0]); } xcontext.stack().pop (1); if (takeLoopPath) { _loopPath->executePath (loopMask, xcontext); if( updateMask(mask, loopMask, xcontext.returnMask(), xcontext) ) break; } } while (takeLoopPath );}
开发者ID:Distrotech,项目名称:CTL,代码行数:53,
示例21: updateMaskvoid UBDesktopAnnotationController::refreshMask(){ if(mIsFullyTransparent || UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Selector //Needed to work correctly when another actions on stylus are checked || UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Eraser || UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Pointer || UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Pen || UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Marker) { updateMask(true); }}
开发者ID:colombc,项目名称:Sankore-3.1,代码行数:13,
示例22: sizevoid MainWindow::resizeEvent(QResizeEvent *event){ if (!(windowState() & Qt::WindowMaximized)) currentSize = size(); drawingWindow->updatePosition(this); historyWindow->updatePosition(this); contactList->updatePosition(this); updateMask(); QMainWindow::resizeEvent(event);}
开发者ID:ildus,项目名称:moodbox_aka_risovaska,代码行数:13,
示例23: cloudIndicesModelCallback // What we want to do here is to look at all the points that are *not* included in the indices list, // (i.e. these are the outliers, the points not on the floor) and determine which are the closest to the camera void cloudIndicesModelCallback(const sensor_msgs::PointCloud2ConstPtr& cloud_msg, const PointIndicesConstPtr& indices, const pcl::ModelCoefficientsConstPtr& model) { boost::mutex::scoped_lock lock (callback_mutex); NODELET_DEBUG_STREAM("Got cloud with timestamp " << cloud_msg->header.stamp << " + indices with timestamp " << indices->header.stamp << " + model with timestamp " << model->header.stamp); double dt; if (first) { first = false; dt = 0; } else { dt = (cloud_msg->header.stamp - prev_cloud_time).toSec(); prev_cloud_time = cloud_msg->header.stamp; } if (model->values.size() > 0) { // Determine altitude: kinect_z = reject_outliers(-fabs(model->values[3])) - imu_to_kinect_offset; calcVelocity(kinect_z, dt, kinect_vz); // Detect obstacles: pcl::PointXYZ obstacle_location; bool obstacle_found = detectObstacle(cloud_msg, indices, model, obstacle_location); if (obstacle_found) { publishObstacleMarker(obstacle_location); NODELET_DEBUG("Detected obstacle at: [%f, %f, %f]", obstacle_location.x, obstacle_location.y, obstacle_location.z); } publishObstacle(obstacle_found, obstacle_location); } else { NODELET_WARN("No planar model found -- cannot determine altitude or obstacles"); } updateMask(); if (not use_backup_estimator_alt) { publishOdom(); } if (debug_throttle_rate > 0) { ros::Duration(1 / debug_throttle_rate).sleep(); } }
开发者ID:robotambassador,项目名称:robot-ambassadors,代码行数:53,
示例24: actionsvoidLauncherContextualMenu::setFolded(int folded){ if (folded == m_folded) { return; } if (folded) { /* Remove all actions but the title. */ for (int i = actions().size(); i > 0; --i) { QAction* action = actions().at(i - 1); if (action != m_titleAction) { removeAction(action); if (action->parent() == this) { /* Delete the action only if we "own" it, otherwise let its parent take care of it. */ delete action; } } } } else { int prevWidth = width(); int left = x(), top = y(); addSeparator(); m_launcherItem->createMenuActions(); QRect screenGeometry = QApplication::desktop()->screenGeometry(this); if (QApplication::isRightToLeft()) { left -= width() - prevWidth; } if (height() <= screenGeometry.height()) { /* Adjust the position of the menu only if it fits entirely on the screen. */ int menuBottomEdge = y() + height(); int screenBottomEdge = screenGeometry.y() + screenGeometry.height(); if (menuBottomEdge > screenBottomEdge) { /* The menu goes offscreen, shift it upwards. */ m_arrowY += menuBottomEdge - screenBottomEdge; top = screenBottomEdge - height(); } } move(left, top); if (!transparencyAvailable()) { /* The arrow has moved relatively to the menu. */ updateMask(); } } m_folded = folded; Q_EMIT foldedChanged(m_folded);}
开发者ID:ManoharUpputuri,项目名称:unity-2d,代码行数:51,
示例25: sizeTypevoid Spacer::setOrientation( Qt::Orientation o ){ if ( orient == o ) return; SizeType st = sizeType(); orient = o; setSizeType( st ); if ( ar ) resize( QSize( size().height(), size().width() ) ); updateMask(); update(); updateGeometry();}
开发者ID:kthxbyte,项目名称:QT2-Linaro,代码行数:14,
示例26: QWidgetToolButtonTip::ToolButtonTip( const QPixmap & _pixmap, const QString & _title, const QString & _description, QWidget * _parent, QWidget * _tool_btn ) : QWidget( _parent, Qt::ToolTip ), m_icon( FastQImage( _pixmap ).scaled( 72, 72 ) ), m_title( _title ), m_description( _description ), m_toolButton( _tool_btn ){ setAttribute( Qt::WA_DeleteOnClose, TRUE ); setAttribute( Qt::WA_NoSystemBackground, TRUE ); resize( sizeHint() ); updateMask();}
开发者ID:EmebedQtsoft,项目名称:italc2,代码行数:15,
注:本文中的updateMask函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateMenu函数代码示例 C++ updateList函数代码示例 |