42 #ifndef QHEADERVIEW_P_H 43 #define QHEADERVIEW_P_H 56 #include "private/qabstractitemview_p.h" 58 #ifndef QT_NO_ITEMVIEWS 60 #include "QtCore/qbitarray.h" 61 #include "QtGui/qapplication.h" 62 #include "QtGui/qlabel.h" 293 : size(length), count(sections), resizeMode(mode) {}
294 inline int sectionSize()
const {
return (count > 0 ? size / count : 0); }
295 #ifndef QT_NO_DATASTREAM 297 { out <<
size; out <<
count; out << (int)resizeMode; }
312 for (
int i = 0; i < sectionSpans.
count(); ++i)
313 count += sectionSpans.
at(i).count;
319 for (
int i = 0; i < sectionSpans.
count(); ++i)
320 len += sectionSpans.
at(i).size;
325 for (
int i = spans.
count() - 1; i >= 0; --i) {
326 length -= sectionSpans.
at(spans.
at(i)).
size;
332 int section_start = 0;
333 for (
int i = 0; i < sectionSpans.
count(); ++i) {
334 int section_end = section_start + sectionSpans.
at(i).count - 1;
335 if (visual >= section_start && visual <= section_end)
337 section_start = section_end + 1;
355 #ifndef QT_NO_DATASTREAM 364 #endif // QT_NO_ITEMVIEWS 366 #endif // QHEADERVIEW_P_H void clear()
Clears the contents of the bit array and makes it empty.
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of columns for the children of the given parent.
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
void setBit(int i)
Sets the bit at index position i to 1.
virtual QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const
#define QT_END_NAMESPACE
This macro expands to.
void clear()
Removes all items from the hash.
void remove(int i)
Removes the element at index position i.
int count(const T &t) const
Returns the number of occurrences of value in the vector.
bool isColumnSelected(int column, const QModelIndex &parent) const
Returns true if all items are selected in the column with the given parent.
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
bool isActive() const
Returns true if the timer is running and has not been stopped; otherwise returns false.
QPointer< QItemSelectionModel > selectionModel
int count(const T &t) const
Returns the number of occurrences of value in the list.
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
bool rowIntersectsSelection(int row, const QModelIndex &parent) const
Returns true if there are any items selected in the row with the given parent.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
void resize(int size)
Sets the size of the vector to size.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
bool fill(bool val, int size=-1)
Sets every bit in the bit array to value, returning true if successful; otherwise returns false...
#define QT_BEGIN_NAMESPACE
This macro expands to.
const T & at(int i) const
Returns the item at index position i in the list.
The State element defines configurations of objects and properties.
const T & at(int i) const
Returns the item at index position i in the vector.
QPersistentModelIndex root
The QBitArray class provides an array of bits.
bool hasSelection() const
Returns true if the selection model contains any selection ranges; otherwise returns false...
bool columnIntersectsSelection(int column, const QModelIndex &parent) const
Returns true if there are any items selected in the column with the given parent. ...
#define Q_DECLARE_PUBLIC(Class)
The QModelIndex class is used to locate data in a data model.
The QLabel widget provides a text or image display.
int count() const
Same as size().
The QBasicTimer class provides timer events for objects.
The QSize class defines the size of a two-dimensional object using integer point precision.
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
The QDataStream class provides serialization of binary data to a QIODevice.
bool at(int i) const
Returns the value of the bit at index position i.
static const KeyPair *const end
QAbstractItemModel * model
bool isEmpty() const
Returns true if this bit array has size 0; otherwise returns false.
void start(int msec, QObject *obj)
Starts (or restarts) the timer with a msec milliseconds timeout.
bool isRowSelected(int row, const QModelIndex &parent) const
Returns true if all items are selected in the row with the given parent.