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

C++ resetSelection函数代码示例

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

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



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

示例1: QgsAbstractFeatureIterator

QgsGrassFeatureIterator::QgsGrassFeatureIterator( QgsGrassProvider* p, const QgsFeatureRequest& request )
    : QgsAbstractFeatureIterator( request ), P( p )
{
  // make sure that only one iterator is active
  if ( P->mActiveIterator )
  {
    QgsMessageLog::logMessage( QObject::tr( "Already active iterator on this provider was closed." ), QObject::tr( "GRASS" ) );
    P->mActiveIterator->close();
  }
  P->mActiveIterator = this;

  // check if outdated and update if necessary
  P->ensureUpdated();

  // Init structures
  mPoints = Vect_new_line_struct();
  mCats = Vect_new_cats_struct();
  mList = Vect_new_list();

  // Create selection array
  allocateSelection( P->mMap );
  resetSelection( 1 );

  if ( request.filterType() == QgsFeatureRequest::FilterRect )
  {
    setSelectionRect( request.filterRect(), request.flags() & QgsFeatureRequest::ExactIntersect );
  }
  else
  {
    // TODO: implement fast lookup by feature id

    //no filter - use all features
    resetSelection( 1 );
  }
}
开发者ID:innotechsoftware,项目名称:Quantum-GIS,代码行数:35,代码来源:qgsgrassfeatureiterator.cpp


示例2: Vect_new_line_struct

QgsGrassFeatureIterator::QgsGrassFeatureIterator( QgsGrassFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
    : QgsAbstractFeatureIteratorFromSource<QgsGrassFeatureSource>( source, ownSource, request )
{
  sMutex.lock();

  // Init structures
  mPoints = Vect_new_line_struct();
  mCats = Vect_new_cats_struct();
  mList = Vect_new_list();

  // Create selection array
  allocateSelection( mSource->mMap );
  resetSelection( 1 );

  if ( request.filterType() == QgsFeatureRequest::FilterRect )
  {
    setSelectionRect( request.filterRect(), request.flags() & QgsFeatureRequest::ExactIntersect );
  }
  else
  {
    // TODO: implement fast lookup by feature id

    //no filter - use all features
    resetSelection( 1 );
  }
}
开发者ID:Ariki,项目名称:QGIS,代码行数:26,代码来源:qgsgrassfeatureiterator.cpp


示例3: setCursorPosition

void QHexEdit::selectData(int position, int size)
{
	setCursorPosition(position * 2 - 1);
	resetSelection(position * 2);
	setSelection(position * 2 + size * 2);
	ensureVisible();
}
开发者ID:SilentControl,项目名称:mangler,代码行数:7,代码来源:qhexedit.cpp


示例4: QWidget

QHexEditPrivate::QHexEditPrivate(QScrollArea *parent) : QWidget(parent)
{
    _undoStack = new QUndoStack(this);

    _scrollArea = parent;
    setAddressWidth(4);
    setAddressOffset(0);
    setAddressArea(true);
    setAsciiArea(true);
    setHighlighting(true);
    setOverwriteMode(true);
    setReadOnly(false);
    setAddressAreaColor(QColor(0xd4, 0xd4, 0xd4, 0xff));
    setHighlightingColor(QColor(0xff, 0xff, 0x99, 0xff));
    setSelectionColor(QColor(0x6d, 0x9e, 0xff, 0xff));
    setFont(QFont("Courier", 10));

    _size = 0;
    resetSelection(0);

    setFocusPolicy(Qt::StrongFocus);

    connect(&_cursorTimer, SIGNAL(timeout()), this, SLOT(updateCursor()));
    _cursorTimer.setInterval(500);
    _cursorTimer.start();
}
开发者ID:DDuarte,项目名称:IntWars2,代码行数:26,代码来源:qhexedit_p.cpp


示例5: CharCommand

void QHexEditPrivate::replace(int index, char ch)
{
    QUndoCommand *charCommand = new CharCommand(&_xData, CharCommand::replace, index, ch);
    _undoStack->push(charCommand);
    resetSelection();
    emit dataChanged();
}
开发者ID:DDuarte,项目名称:IntWars2,代码行数:7,代码来源:qhexedit_p.cpp


示例6: ArrayCommand

void QHexEditPrivate::replace(int index, const QByteArray & ba)
{
    QUndoCommand *arrayCommand= new ArrayCommand(&_xData, ArrayCommand::replace, index, ba, ba.length());
    _undoStack->push(arrayCommand);
    resetSelection();
    emit dataChanged();
}
开发者ID:DDuarte,项目名称:IntWars2,代码行数:7,代码来源:qhexedit_p.cpp


示例7: QGLWidget

// ...
GLWidget::GLWidget(QWidget* parent) : QGLWidget(QGLFormat(QGL::DoubleBuffer | QGL::Rgba | QGL::DepthBuffer), parent)
{
	makeCurrent();
	initFont();
	resetSelection();

}
开发者ID:hunhuang,项目名称:codeblock,代码行数:8,代码来源:glwidget.cpp


示例8: setCursorPos

void QHexEditPrivate::scrollToEnd()
{
    setCursorPos(_xData.size() * 2);
    resetSelection(_cursorPosition);
    _scrollArea->ensureVisible(_cursorX, _cursorY + _charHeight/2, 3, _charHeight/2 + 2);
    update();
}
开发者ID:Jacob1988,项目名称:lxyppc-serial,代码行数:7,代码来源:qhexedit_p.cpp


示例9: QAbstractScrollArea

UIHexEditorWnd::UIHexEditorWnd( QWidget* p )
	: QAbstractScrollArea( p )
{
   gapSizeAddrHex = 10;
   gapSizeHexText = 16;
   bytesPerLine = 16;
   bytesPerGroup = 2;
   nibblesPerGroup = bytesPerGroup * 2;
   hexCharsInLine = bytesPerLine * 2 + (bytesPerLine / bytesPerGroup) - 1;

   textEdit = false;
   setStartAddress(0);
   setEndAddress(0xFFFFFFFF);
   setAddrAreaColor(this->palette().color(QPalette::AlternateBase));
   adjustSettings();
   resetSelection(0);
   goToAddress(0);

   connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(sliderUpdate(int)));

   connect(&cursorTimer, SIGNAL(timeout()), this, SLOT(updateCursor()));
   cursorTimer.setInterval(500);
   cursorTimer.start();

   connect(&autoScrollTimer, SIGNAL(timeout()), this, SLOT(autoScroll()));
   autoScrollTimer.setInterval(5);

   setMouseTracking(true);
}
开发者ID:d356,项目名称:yabause-ci-test,代码行数:29,代码来源:UIHexEditor.cpp


示例10: resetSelection

QGraphicsPixmapItem* ImageScene::addPixmap(QPixmap in_Pixmap) {
	if (m_pPixmap != NULL ) {
		QGraphicsScene::removeItem ( m_pPixmap);
	}
	m_pPixmap = QGraphicsScene::addPixmap(in_Pixmap);
	resetSelection();
	return m_pPixmap;
}
开发者ID:ein-shved,项目名称:qPaint,代码行数:8,代码来源:ImageScene.cpp


示例11: deleteAddedLists

//Removes all of the Characters from the list.
//Pre:  None.
//Post: Uses clear to remove all the elements from the list.
void CharacterList::deleteList(){

    deleteAddedLists();    

    charList.clear();

    resetSelection();
}
开发者ID:yabem,项目名称:Vintage-RPG,代码行数:11,代码来源:CharacterList.cpp


示例12: QAction

void HotPointView::createActions()
{
	resetSelectionAct = new QAction( QString::fromUtf8( "Resetuj zaznaczenie" ), this );
	connect( resetSelectionAct, SIGNAL( triggered() ), this, SLOT( resetSelection() ) );

	beginSelectionAct = new QAction( QString::fromUtf8( "Wyznacz histogram" ), this );
	connect( beginSelectionAct, SIGNAL( triggered() ), this, SLOT( beginSelection() ) );
}
开发者ID:mmalicki2,项目名称:QOczko,代码行数:8,代码来源:HotPointView.cpp


示例13: update

void QHexEditPrivate::mousePressEvent(QMouseEvent * event)
{
    _blink = false;
    update();
    int cPos = cursorPos(event->pos());
    resetSelection(cPos);
    setCursorPos(cPos);
}
开发者ID:DDuarte,项目名称:IntWars2,代码行数:8,代码来源:qhexedit_p.cpp


示例14: resetSelection

void CSelectionManager::exclusiveSelection(RoomId id) 
{
    if (selection.contains(id)) 
        return;
    else {
        resetSelection();
        select(id);
    }   
}
开发者ID:zpc930,项目名称:pandoramapper,代码行数:9,代码来源:CSelectionManager.cpp


示例15: setAddressOffset

// ********************************************************************** Private utility functions
void QHexEdit::init()
{
    _undoStack->clear();
    setAddressOffset(0);
    resetSelection(0);
    setCursorPosition(0);
    verticalScrollBar()->setValue(0);
    _modified = false;
}
开发者ID:SilentControl,项目名称:mangler,代码行数:10,代码来源:qhexedit.cpp


示例16: resetSelection

//Sets the current selection to the specific character.
//Pre:  The Character is valid.
//Post: Iterates through the list. If the character is in the list,
//      currSelection is set to that character. If the character is not
//      found, currSelection is set to the beginning of the list.
void CharacterList::setCurrSelection(Character *character){

    resetSelection();

    while(currPosition < size){

        if(*currSelection == character){

            return;
        }

        else{
            moveSelectionDown();
        }
    }

    //Character not found, reset to the beginning.
    resetSelection();
}
开发者ID:yabem,项目名称:Vintage-RPG,代码行数:24,代码来源:CharacterList.cpp


示例17: MappedMemoryReadByte

void UIHexEditorWnd::overwrite(s64 index, char ch)
{
   u8 data = MappedMemoryReadByte(index / 2);
   char str[2] = { ch, '\0' };
   ch = strtol(str, NULL, 16);
   if (index % 2 == 0)
      MappedMemoryWriteByte(index / 2, data & 0xF | (ch << 4));
   else
      MappedMemoryWriteByte(index / 2, data & 0xF0 | ch);
   resetSelection();
}
开发者ID:d356,项目名称:yabause-ci-test,代码行数:11,代码来源:UIHexEditor.cpp


示例18: viewport

void QHexEdit::mousePressEvent(QMouseEvent * event)
{
    _blink = false;
    viewport()->update();
    qint64 cPos = cursorPosition(event->pos());
    if (cPos >= 0)
    {
        resetSelection(cPos);
        setCursorPosition(cPos);
    }
}
开发者ID:SilentControl,项目名称:mangler,代码行数:11,代码来源:qhexedit.cpp


示例19: viewport

void UIHexEditorWnd::goToAddress(u32 address, bool setCursor)
{
   int height = viewport()->height();
   verticalScrollBar()->setValue(address/bytesPerLine);
   adjustSettings();
   if (setCursor)
   {
      setCursorPos(address * 2);
      resetSelection(address * 2);
   }
   viewport()->update();
}
开发者ID:d356,项目名称:yabause-ci-test,代码行数:12,代码来源:UIHexEditor.cpp


示例20: setCursorPosition

qint64 QHexEdit::lastIndexOf(const QByteArray &ba, qint64 from)
{
    qint64 pos = _chunks->lastIndexOf(ba, from);
    if (pos > -1)
    {
        qint64 curPos = pos*2;
        setCursorPosition(curPos - 1);
        resetSelection(curPos);
        setSelection(curPos + ba.length()*2);
        ensureVisible();
    }
    return pos;
}
开发者ID:Simsys,项目名称:qhexedit2,代码行数:13,代码来源:qhexedit.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ resetState函数代码示例发布时间:2022-05-30
下一篇:
C++ resetPQExpBuffer函数代码示例发布时间: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