MailCommon::FavoriteCollectionWidget Class

class MailCommon::FavoriteCollectionWidget

The FavoriteCollectionWidget class. More...

Header: #include <MailCommon/FavoriteCollectionWidget>
CMake: find_package(KPim6MailCommon REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::MailCommon)

Public Functions

FavoriteCollectionWidget(MailCommon::MailCommonSettings *settings, KXMLGUIClient *xmlGuiClient, QWidget *parent = nullptr)
virtual ~FavoriteCollectionWidget() override
void changeViewMode(QListView::ViewMode mode)
void readConfig()
void updateMode()

Signals

void newTabRequested(bool isChecked)

Reimplemented Protected Functions

virtual void dragEnterEvent(QDragEnterEvent *event) override
virtual void dragMoveEvent(QDragMoveEvent *event) override
virtual void dropEvent(QDropEvent *event) override
virtual bool event(QEvent *e) override
virtual void mousePressEvent(QMouseEvent *e) override
virtual void paintEvent(QPaintEvent *event) override
virtual void startDrag(Qt::DropActions supportedActions) override

Protected Slots

void slotChangeIconSize(bool toggle)
void slotChangeMode(bool toggle)
void slotGeneralFontChanged()
void slotGeneralPaletteChanged()

Detailed Description

Author: Laurent Montel <montel@kde.org>

Member Function Documentation

[explicit] FavoriteCollectionWidget::FavoriteCollectionWidget(MailCommon::MailCommonSettings *settings, KXMLGUIClient *xmlGuiClient, QWidget *parent = nullptr)

Constructs a favorite collection widget.

settings The mail common settings object xmlGuiClient The XML GUI client for action management parent The parent widget

[override virtual noexcept] FavoriteCollectionWidget::~FavoriteCollectionWidget()

Destroys the favorite collection widget.

void FavoriteCollectionWidget::changeViewMode(QListView::ViewMode mode)

Changes the view mode of the favorite collection list.

mode The new view mode (Icon, List, etc.)

[override virtual protected] void FavoriteCollectionWidget::dragEnterEvent(QDragEnterEvent *event)

Handles drag enter events for drag and drop operations.

event The drag enter event

[override virtual protected] void FavoriteCollectionWidget::dragMoveEvent(QDragMoveEvent *event)

Handles drag move events for drag and drop operations.

event The drag move event

[override virtual protected] void FavoriteCollectionWidget::dropEvent(QDropEvent *event)

Handles drop events for drag and drop operations.

event The drop event

[override virtual protected] bool FavoriteCollectionWidget::event(QEvent *e)

Processes events with special handling.

e The event to process Returns True if the event was processed, false otherwise

[override virtual protected] void FavoriteCollectionWidget::mousePressEvent(QMouseEvent *e)

Handles mouse press events.

e The mouse event

[signal] void FavoriteCollectionWidget::newTabRequested(bool isChecked)

Emitted when a new tab is requested.

isChecked True if the action that triggered this signal is checked

[override virtual protected] void FavoriteCollectionWidget::paintEvent(QPaintEvent *event)

Handles paint events to draw the favorite collections.

event The paint event

void FavoriteCollectionWidget::readConfig()

Reads the configuration for the widget.

[protected slot] void FavoriteCollectionWidget::slotChangeIconSize(bool toggle)

Slot called when the icon size should be changed.

toggle Whether to toggle the icon size

[protected slot] void FavoriteCollectionWidget::slotChangeMode(bool toggle)

Slot called when the display mode should be changed.

toggle Whether to toggle the mode

[protected slot] void FavoriteCollectionWidget::slotGeneralFontChanged()

Slot called when the general font in KDE settings has changed.

[protected slot] void FavoriteCollectionWidget::slotGeneralPaletteChanged()

Slot called when the general palette in KDE settings has changed.

[override virtual protected] void FavoriteCollectionWidget::startDrag(Qt::DropActions supportedActions)

Initiates drag operations.

supportedActions The drop actions supported by the source

void FavoriteCollectionWidget::updateMode()

Updates the display mode of the widget.