digiKam
Digikam::ImportCategoryDrawer Class Reference
+ Inheritance diagram for Digikam::ImportCategoryDrawer:

Signals

void actionRequested (int action, const QModelIndex &index)
 
void collapseOrExpandClicked (const QModelIndex &index)
 

Public Member Functions

int categoryHeight (const QModelIndex &index, const QStyleOption &option) const override
 
void drawCategory (const QModelIndex &index, int sortRole, const QStyleOption &option, QPainter *painter) const override
 
 ImportCategoryDrawer (ImportCategorizedView *const parent)
 
void invalidatePaintingCache ()
 
virtual int leftMargin () const
 
virtual int maximumHeight () const
 
virtual int rightMargin () const
 
void setDefaultViewOptions (const QStyleOptionViewItem &option)
 
void setLowerSpacing (int spacing)
 
DCategorizedViewview () const
 
 ~ImportCategoryDrawer () override
 

Protected Member Functions

virtual void mouseButtonDoubleClicked (const QModelIndex &index, const QRect &blockRect, QMouseEvent *event)
 
virtual void mouseButtonPressed (const QModelIndex &index, const QRect &blockRect, QMouseEvent *event)
 
virtual void mouseButtonReleased (const QModelIndex &index, const QRect &blockRect, QMouseEvent *event)
 
virtual void mouseLeft (const QModelIndex &index, const QRect &blockRect)
 
virtual void mouseMoved (const QModelIndex &index, const QRect &blockRect, QMouseEvent *event)
 

Constructor & Destructor Documentation

◆ ImportCategoryDrawer()

Digikam::ImportCategoryDrawer::ImportCategoryDrawer ( ImportCategorizedView *const  parent)
explicit

◆ ~ImportCategoryDrawer()

Digikam::ImportCategoryDrawer::~ImportCategoryDrawer ( )
override

Member Function Documentation

◆ actionRequested

void Digikam::DCategoryDrawer::actionRequested ( int  action,
const QModelIndex &  index 
)
signalinherited

Emit this signal on your subclass implementation to notify that something happened. Usually this will be triggered when you have received an event, and its position matched some "hot spot".

You give this action the integer you want, and having connected this signal to your code, the connected slot can perform the needed changes (view, model, selection model, delegate...)

◆ categoryHeight()

int Digikam::ImportCategoryDrawer::categoryHeight ( const QModelIndex &  index,
const QStyleOption &  option 
) const
overridevirtual
Returns
The category height for the category represented by index index with style options option.

Reimplemented from Digikam::DCategoryDrawer.

◆ collapseOrExpandClicked

void Digikam::DCategoryDrawer::collapseOrExpandClicked ( const QModelIndex &  index)
signalinherited

This signal becomes emitted when collapse or expand has been clicked.

◆ drawCategory()

void Digikam::ImportCategoryDrawer::drawCategory ( const QModelIndex &  index,
int  sortRole,
const QStyleOption &  option,
QPainter *  painter 
) const
overridevirtual

This method purpose is to draw a category represented by the given

Parameters
indexwith the given
sortRolesorting role
Note
This method will be called one time per category, always with the first element in that category

Reimplemented from Digikam::DCategoryDrawer.

References Digikam::ImportFilterModel::CategorizationModeRole, Digikam::CamItemSortSettings::CategoryByDate, Digikam::CamItemSortSettings::CategoryByFolder, Digikam::CamItemSortSettings::CategoryByFormat, and Digikam::CamItemSortSettings::NoCategories.

◆ invalidatePaintingCache()

void Digikam::ImportCategoryDrawer::invalidatePaintingCache ( )

◆ leftMargin()

int Digikam::DCategoryDrawer::leftMargin ( ) const
virtualinherited
Note
0 by default

◆ maximumHeight()

int Digikam::ImportCategoryDrawer::maximumHeight ( ) const
virtual

◆ mouseButtonDoubleClicked()

void Digikam::DCategoryDrawer::mouseButtonDoubleClicked ( const QModelIndex &  index,
const QRect &  blockRect,
QMouseEvent *  event 
)
protectedvirtualinherited

Method called when the mouse button has been double clicked.

Parameters
indexThe representative index of the block of items.
blockRectThe rect occupied by the block of items.
eventThe mouse event.
Warning
You explicitly have to determine whether the event has been accepted or not. You have to call event->accept() or event->ignore() at all possible case branches in your code.

◆ mouseButtonPressed()

void Digikam::DCategoryDrawer::mouseButtonPressed ( const QModelIndex &  index,
const QRect &  blockRect,
QMouseEvent *  event 
)
protectedvirtualinherited

Method called when the mouse button has been pressed.

Parameters
indexThe representative index of the block of items.
blockRectThe rect occupied by the block of items.
eventThe mouse event.
Warning
You explicitly have to determine whether the event has been accepted or not. You have to call event->accept() or event->ignore() at all possible case branches in your code.

◆ mouseButtonReleased()

void Digikam::DCategoryDrawer::mouseButtonReleased ( const QModelIndex &  index,
const QRect &  blockRect,
QMouseEvent *  event 
)
protectedvirtualinherited

Method called when the mouse button has been released.

Parameters
indexThe representative index of the block of items.
blockRectThe rect occupied by the block of items.
eventThe mouse event.
Warning
You explicitly have to determine whether the event has been accepted or not. You have to call event->accept() or event->ignore() at all possible case branches in your code.

◆ mouseLeft()

void Digikam::DCategoryDrawer::mouseLeft ( const QModelIndex &  index,
const QRect &  blockRect 
)
protectedvirtualinherited

Method called when the mouse button has left this block.

Parameters
indexThe representative index of the block of items.
blockRectThe rect occupied by the block of items.

◆ mouseMoved()

void Digikam::DCategoryDrawer::mouseMoved ( const QModelIndex &  index,
const QRect &  blockRect,
QMouseEvent *  event 
)
protectedvirtualinherited

Method called when the mouse has been moved.

Parameters
indexThe representative index of the block of items.
blockRectThe rect occupied by the block of items.
eventThe mouse event.

◆ rightMargin()

int Digikam::DCategoryDrawer::rightMargin ( ) const
virtualinherited
Note
0 by default

◆ setDefaultViewOptions()

void Digikam::ImportCategoryDrawer::setDefaultViewOptions ( const QStyleOptionViewItem &  option)

◆ setLowerSpacing()

void Digikam::ImportCategoryDrawer::setLowerSpacing ( int  spacing)

◆ view()

DCategorizedView * Digikam::DCategoryDrawer::view ( ) const
inherited
Returns
The view this category drawer is associated with.

The documentation for this class was generated from the following files: