本文整理汇总了C++中resetSelection函数的典型用法代码示例。如果您正苦于以下问题:C++ resetSelection函数的具体用法?C++ resetSelection怎么用?C++ resetSelection使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了resetSelection函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 );
}
}
示例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 );
}
}
示例3: setCursorPosition
void QHexEdit::selectData(int position, int size)
{
setCursorPosition(position * 2 - 1);
resetSelection(position * 2);
setSelection(position * 2 + size * 2);
ensureVisible();
}
示例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();
}
示例5: CharCommand
void QHexEditPrivate::replace(int index, char ch)
{
QUndoCommand *charCommand = new CharCommand(&_xData, CharCommand::replace, index, ch);
_undoStack->push(charCommand);
resetSelection();
emit dataChanged();
}
示例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();
}
示例7: QGLWidget
// ...
GLWidget::GLWidget(QWidget* parent) : QGLWidget(QGLFormat(QGL::DoubleBuffer | QGL::Rgba | QGL::DepthBuffer), parent)
{
makeCurrent();
initFont();
resetSelection();
}
示例8: setCursorPos
void QHexEditPrivate::scrollToEnd()
{
setCursorPos(_xData.size() * 2);
resetSelection(_cursorPosition);
_scrollArea->ensureVisible(_cursorX, _cursorY + _charHeight/2, 3, _charHeight/2 + 2);
update();
}
示例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);
}
示例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;
}
示例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();
}
示例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() ) );
}
示例13: update
void QHexEditPrivate::mousePressEvent(QMouseEvent * event)
{
_blink = false;
update();
int cPos = cursorPos(event->pos());
resetSelection(cPos);
setCursorPos(cPos);
}
示例14: resetSelection
void CSelectionManager::exclusiveSelection(RoomId id)
{
if (selection.contains(id))
return;
else {
resetSelection();
select(id);
}
}
示例15: setAddressOffset
// ********************************************************************** Private utility functions
void QHexEdit::init()
{
_undoStack->clear();
setAddressOffset(0);
resetSelection(0);
setCursorPosition(0);
verticalScrollBar()->setValue(0);
_modified = false;
}