digiKam
|
Classes | |
class | ElementInfo |
Attributes. More... | |
Public Member Functions | |
const QRect & | cacheCategory (const QString &category) |
const QRect & | cachedRectCategory (const QString &category) |
const QRect & | cachedRectIndex (const QModelIndex &index) |
const QRect & | cacheIndex (const QModelIndex &index) |
int | categoryUpperBound (SparseModelIndexVector &modelIndexList, int begin, int averageSize=0) |
QRect | categoryVisualRect (const QString &category) |
QSize | contentsSize () |
void | drawDraggedItems () |
void | drawDraggedItems (QPainter *painter) |
void | drawNewCategory (const QModelIndex &index, int sortRole, const QStyleOption &option, QPainter *painter) |
const QModelIndexList & | intersectionSet (const QRect &rect) |
Private (DCategorizedView *const listView) | |
QItemSelection | selectionForRect (const QRect &rect) |
void | updateScrollbars () |
QRect | visualCategoryRectInViewport (const QString &category) const |
QRect | visualRect (const QModelIndex &index) |
QRect | visualRectInViewport (const QModelIndex &index) const |
~Private () | |
Public Attributes | |
QSize | biggestItemSize |
QStringList | categories |
QHash< QString, QVector< int > > | categoriesIndexes |
QHash< QString, QRect > | categoriesPosition |
DCategoryDrawer * | categoryDrawer |
bool | dragLeftViewport |
bool | drawItemsWhileDragging |
QVector< ElementInfo > | elementsInfo |
QHash< int, QRect > | elementsPosition |
int | forcedSelectionPosition |
QModelIndex | hovered |
QString | hoveredCategory |
QPoint | initialPressPosition |
QModelIndexList | intersectedIndexes |
QRect | lastDraggedItemsRect |
QItemSelection | lastSelection |
DCategorizedView * | listView |
Basic data. More... | |
bool | mouseButtonPressed |
Behavior data. More... | |
QPoint | mousePosition |
DCategorizedSortFilterProxyModel * | proxyModel |
Attributes for speed reasons. More... | |
bool | rightMouseButtonPressed |
|
explicit |
Digikam::DCategorizedView::Private::~Private | ( | ) |
const QRect & Digikam::DCategorizedView::Private::cacheCategory | ( | const QString & | category | ) |
Caches and returns the rect that corresponds to category
We're sure categoriesPosition doesn't contain category
const QRect & Digikam::DCategorizedView::Private::cachedRectCategory | ( | const QString & | category | ) |
Returns the rect that corresponds to category
const QRect & Digikam::DCategorizedView::Private::cachedRectIndex | ( | const QModelIndex & | index | ) |
Returns the rect that corresponds to index
Referenced by Digikam::DCategorizedView::setSelection().
const QRect & Digikam::DCategorizedView::Private::cacheIndex | ( | const QModelIndex & | index | ) |
Caches and returns the rect that corresponds to index
We're sure elementsPosition doesn't contain index
int Digikam::DCategorizedView::Private::categoryUpperBound | ( | SparseModelIndexVector & | modelIndexList, |
int | begin, | ||
int | averageSize = 0 |
||
) |
This method will, starting from the index at begin in the given (sorted) modelIndex List, find the last index having the same category as the index to begin with.
References Digikam::DCategorizedSortFilterProxyModel::CategoryDisplayRole, and value.
Referenced by Digikam::DCategorizedView::rowsInsertedArtifficial().
QRect Digikam::DCategorizedView::Private::categoryVisualRect | ( | const QString & | category | ) |
Returns the visual rect (taking in count x and y offsets) for category
Referenced by Digikam::DCategorizedView::categoryAt(), Digikam::DCategorizedView::categoryVisualRect(), Digikam::DCategorizedView::mouseMoveEvent(), Digikam::DCategorizedView::mousePressEvent(), Digikam::DCategorizedView::mouseReleaseEvent(), and Digikam::DCategorizedView::paintEvent().
QSize Digikam::DCategorizedView::Private::contentsSize | ( | ) |
Returns the contents size of this view (topmost category to bottommost index + spacing)
Referenced by Digikam::DCategorizedView::setSelection().
void Digikam::DCategorizedView::Private::drawDraggedItems | ( | ) |
This method will determine which rect needs to be updated because of a dragging operation
References Digikam::DCategorizedView::visualRect().
void Digikam::DCategorizedView::Private::drawDraggedItems | ( | QPainter * | painter | ) |
This method will draw dragged items in the painting operation
References Digikam::DCategorizedView::visualRect().
Referenced by Digikam::DCategorizedView::dragMoveEvent(), and Digikam::DCategorizedView::paintEvent().
void Digikam::DCategorizedView::Private::drawNewCategory | ( | const QModelIndex & | index, |
int | sortRole, | ||
const QStyleOption & | option, | ||
QPainter * | painter | ||
) |
This method will draw a new category represented by index index
on the rect specified by option.rect
, with painter painter
References Digikam::DCategorizedSortFilterProxyModel::CategoryDisplayRole, Digikam::DCategorizedView::categoryDrawer(), and Digikam::DCategoryDrawer::drawCategory().
Referenced by Digikam::DCategorizedView::paintEvent().
const QModelIndexList & Digikam::DCategorizedView::Private::intersectionSet | ( | const QRect & | rect | ) |
Returns the list of items that intersects with rect
References Digikam::DCategorizedView::visualRect().
Referenced by Digikam::DCategorizedView::categorizedIndexesIn(), Digikam::DCategorizedView::indexAt(), Digikam::DCategorizedView::mouseMoveEvent(), Digikam::DCategorizedView::moveCursor(), Digikam::DCategorizedView::paintEvent(), selectionForRect(), and Digikam::DCategorizedView::setSelection().
QItemSelection Digikam::DCategorizedView::Private::selectionForRect | ( | const QRect & | rect | ) |
Returns a QItemSelection for all items intersection rect.
References intersectedIndexes, and intersectionSet().
Referenced by Digikam::DCategorizedView::setSelection().
void Digikam::DCategorizedView::Private::updateScrollbars | ( | ) |
This method will update scrollbars ranges. Called when our model changes or when the view is resized
Referenced by Digikam::DCategorizedView::resizeEvent(), and Digikam::DCategorizedView::rowsInsertedArtifficial().
QRect Digikam::DCategorizedView::Private::visualCategoryRectInViewport | ( | const QString & | category | ) | const |
Returns the category rect in the viewport for category
References Digikam::DCategorizedView::categoryDrawer(), and Digikam::DCategoryDrawer::categoryHeight().
QRect Digikam::DCategorizedView::Private::visualRect | ( | const QModelIndex & | index | ) |
Returns the visual rect (taking in count x and y offsets) for index
Referenced by Digikam::DCategorizedView::visualRect().
QRect Digikam::DCategorizedView::Private::visualRectInViewport | ( | const QModelIndex & | index | ) | const |
Gets the item rect in the viewport for index
References Digikam::DCategorizedView::categoryDrawer(), and Digikam::DCategoryDrawer::categoryHeight().
QSize Digikam::DCategorizedView::Private::biggestItemSize |
QStringList Digikam::DCategorizedView::Private::categories |
Referenced by Digikam::DCategorizedView::categoryAt(), Digikam::DCategorizedView::mouseMoveEvent(), Digikam::DCategorizedView::mouseReleaseEvent(), Digikam::DCategorizedView::moveCursor(), Digikam::DCategorizedView::paintEvent(), Digikam::DCategorizedView::reset(), Digikam::DCategorizedView::rowsInserted(), Digikam::DCategorizedView::rowsInsertedArtifficial(), Digikam::DCategorizedView::setCategoryDrawer(), and Digikam::DCategorizedView::setModel().
QHash<QString, QVector<int> > Digikam::DCategorizedView::Private::categoriesIndexes |
Referenced by Digikam::DCategorizedView::categoryAt(), Digikam::DCategorizedView::categoryRange(), Digikam::DCategorizedView::mouseReleaseEvent(), Digikam::DCategorizedView::moveCursor(), Digikam::DCategorizedView::paintEvent(), Digikam::DCategorizedView::reset(), Digikam::DCategorizedView::rowsInserted(), Digikam::DCategorizedView::rowsInsertedArtifficial(), Digikam::DCategorizedView::setCategoryDrawer(), and Digikam::DCategorizedView::setModel().
QHash<QString, QRect> Digikam::DCategorizedView::Private::categoriesPosition |
DCategoryDrawer* Digikam::DCategorizedView::Private::categoryDrawer |
Referenced by Digikam::DCategorizedView::categorizedIndexesIn(), Digikam::DCategorizedView::categoryAt(), Digikam::DCategorizedView::categoryDrawer(), Digikam::DCategorizedView::categoryRange(), Digikam::DCategorizedView::categoryVisualRect(), Digikam::DCategorizedView::currentChanged(), Digikam::DCategorizedView::dragMoveEvent(), Digikam::DCategorizedView::indexAt(), Digikam::DCategorizedView::mouseMoveEvent(), Digikam::DCategorizedView::mouseReleaseEvent(), Digikam::DCategorizedView::moveCursor(), Digikam::DCategorizedView::paintEvent(), Digikam::DCategorizedView::resizeEvent(), Digikam::DCategorizedView::rowsInserted(), Digikam::DCategorizedView::rowsRemoved(), Digikam::DCategorizedView::setCategoryDrawer(), Digikam::DCategorizedView::setSelection(), Digikam::DCategorizedView::slotLayoutChanged(), Digikam::DCategorizedView::updateGeometries(), and Digikam::DCategorizedView::visualRect().
bool Digikam::DCategorizedView::Private::dragLeftViewport |
bool Digikam::DCategorizedView::Private::drawItemsWhileDragging |
QVector<ElementInfo> Digikam::DCategorizedView::Private::elementsInfo |
Cache data We cannot merge some of them into structs because it would affect performance
Referenced by Digikam::DCategorizedView::categoryRange(), Digikam::DCategorizedView::categoryVisualRect(), Digikam::DCategorizedView::currentChanged(), Digikam::DCategorizedView::moveCursor(), Digikam::DCategorizedView::reset(), Digikam::DCategorizedView::rowsInserted(), Digikam::DCategorizedView::rowsInsertedArtifficial(), Digikam::DCategorizedView::setCategoryDrawer(), and Digikam::DCategorizedView::setModel().
QHash<int, QRect> Digikam::DCategorizedView::Private::elementsPosition |
int Digikam::DCategorizedView::Private::forcedSelectionPosition |
Referenced by Digikam::DCategorizedView::currentChanged(), Digikam::DCategorizedView::leaveEvent(), Digikam::DCategorizedView::moveCursor(), Digikam::DCategorizedView::reset(), Digikam::DCategorizedView::resizeEvent(), Digikam::DCategorizedView::rowsInserted(), Digikam::DCategorizedView::rowsInsertedArtifficial(), Digikam::DCategorizedView::setCategoryDrawer(), and Digikam::DCategorizedView::setModel().
QModelIndex Digikam::DCategorizedView::Private::hovered |
Referenced by Digikam::DCategorizedView::dragMoveEvent(), Digikam::DCategorizedView::leaveEvent(), Digikam::DCategorizedView::mouseMoveEvent(), Digikam::DCategorizedView::mouseReleaseEvent(), Digikam::DCategorizedView::paintEvent(), Digikam::DCategorizedView::reset(), Digikam::DCategorizedView::rowsInserted(), Digikam::DCategorizedView::rowsInsertedArtifficial(), Digikam::DCategorizedView::setCategoryDrawer(), and Digikam::DCategorizedView::setModel().
QString Digikam::DCategorizedView::Private::hoveredCategory |
QPoint Digikam::DCategorizedView::Private::initialPressPosition |
QModelIndexList Digikam::DCategorizedView::Private::intersectedIndexes |
QRect Digikam::DCategorizedView::Private::lastDraggedItemsRect |
Referenced by Digikam::DCategorizedView::mouseMoveEvent().
QItemSelection Digikam::DCategorizedView::Private::lastSelection |
DCategorizedView* Digikam::DCategorizedView::Private::listView |
Basic data.
bool Digikam::DCategorizedView::Private::mouseButtonPressed |
Behavior data.
Referenced by Digikam::DCategorizedView::leaveEvent(), Digikam::DCategorizedView::mouseMoveEvent(), Digikam::DCategorizedView::mousePressEvent(), Digikam::DCategorizedView::mouseReleaseEvent(), Digikam::DCategorizedView::paintEvent(), Digikam::DCategorizedView::reset(), Digikam::DCategorizedView::rowsInserted(), Digikam::DCategorizedView::rowsInsertedArtifficial(), Digikam::DCategorizedView::setCategoryDrawer(), and Digikam::DCategorizedView::setModel().
QPoint Digikam::DCategorizedView::Private::mousePosition |
DCategorizedSortFilterProxyModel* Digikam::DCategorizedView::Private::proxyModel |
Attributes for speed reasons.
Referenced by Digikam::DCategorizedView::categorizedIndexesIn(), Digikam::DCategorizedView::categoryAt(), Digikam::DCategorizedView::categoryRange(), Digikam::DCategorizedView::categoryVisualRect(), Digikam::DCategorizedView::currentChanged(), Digikam::DCategorizedView::dragMoveEvent(), Digikam::DCategorizedView::indexAt(), Digikam::DCategorizedView::mouseMoveEvent(), Digikam::DCategorizedView::mouseReleaseEvent(), Digikam::DCategorizedView::moveCursor(), Digikam::DCategorizedView::paintEvent(), Digikam::DCategorizedView::resizeEvent(), Digikam::DCategorizedView::rowsInserted(), Digikam::DCategorizedView::rowsInsertedArtifficial(), Digikam::DCategorizedView::rowsRemoved(), Digikam::DCategorizedView::setCategoryDrawer(), Digikam::DCategorizedView::setModel(), Digikam::DCategorizedView::setSelection(), Digikam::DCategorizedView::slotLayoutChanged(), Digikam::DCategorizedView::updateGeometries(), and Digikam::DCategorizedView::visualRect().
bool Digikam::DCategorizedView::Private::rightMouseButtonPressed |
Referenced by Digikam::DCategorizedView::mouseMoveEvent(), Digikam::DCategorizedView::mousePressEvent(), Digikam::DCategorizedView::mouseReleaseEvent(), Digikam::DCategorizedView::reset(), Digikam::DCategorizedView::rowsInserted(), Digikam::DCategorizedView::rowsInsertedArtifficial(), Digikam::DCategorizedView::setCategoryDrawer(), and Digikam::DCategorizedView::setModel().