Qt 4.8
Classes | Typedefs | Functions
qabstractitemview_p.h File Reference
#include "private/qabstractscrollarea_p.h"
#include "private/qabstractitemmodel_p.h"
#include "QtGui/qapplication.h"
#include "QtGui/qevent.h"
#include "QtGui/qmime.h"
#include "QtGui/qpainter.h"
#include "QtCore/qpair.h"
#include "QtGui/qregion.h"
#include "QtCore/qdebug.h"
#include "QtCore/qbasictimer.h"
#include "QtCore/qelapsedtimer.h"
#include <qvector.h>

Go to the source code of this file.

Classes

class  QAbstractItemViewPrivate
 
struct  QEditorInfo
 
class  QEmptyModel
 

Typedefs

typedef QHash< QWidget *, QPersistentModelIndexQEditorIndexHash
 
typedef QHash< QPersistentModelIndex, QEditorInfoQIndexEditorHash
 
typedef QPair< QRect, QModelIndexQItemViewPaintPair
 
typedef QList< QItemViewPaintPairQItemViewPaintPairs
 

Functions

template<typename T >
int qBinarySearch (const QVector< T > &vec, const T &item, int start, int end)
 

Typedef Documentation

◆ QEditorIndexHash

Definition at line 82 of file qabstractitemview_p.h.

◆ QIndexEditorHash

Definition at line 83 of file qabstractitemview_p.h.

◆ QItemViewPaintPair

Definition at line 85 of file qabstractitemview_p.h.

◆ QItemViewPaintPairs

Definition at line 86 of file qabstractitemview_p.h.

Function Documentation

◆ qBinarySearch()

template<typename T >
int qBinarySearch ( const QVector< T > &  vec,
const T &  item,
int  start,
int  end 
)
inline

Definition at line 443 of file qabstractitemview_p.h.

444 {
445  int i = (start + end + 1) >> 1;
446  while (end - start > 0) {
447  if (vec.at(i) > item)
448  end = i - 1;
449  else
450  start = i;
451  i = (start + end + 1) >> 1;
452  }
453  return i;
454 }
const T & at(int i) const
Returns the item at index position i in the vector.
Definition: qvector.h:350
static const KeyPair *const end