Add support for copying & deleting multiple messages at once

BUG: 496458
This commit is contained in:
Azhar Momin
2026-02-11 18:30:09 +05:30
committed by Joshua Goins
parent 0f634ff795
commit f5d726989f
10 changed files with 357 additions and 15 deletions

View File

@@ -101,6 +101,16 @@ class MessageDelegateBase : public TimelineDelegate
*/
Q_PROPERTY(QQmlComponent *quickActionComponent READ quickActionComponent WRITE setQuickActionComponent NOTIFY quickActionComponentChanged FINAL)
/**
* @brief The component to use to visualize message selection.
*/
Q_PROPERTY(QQmlComponent *selectionComponent READ selectionComponent WRITE setSelectionComponent NOTIFY selectionComponentChanged FINAL)
/**
* @brief Whether to show the selection component.
*/
Q_PROPERTY(bool showSelection READ showSelection WRITE setShowSelection NOTIFY showSelectionChanged FINAL REQUIRED)
/**
* @brief Whether to use the compact mode appearance.
*/
@@ -161,6 +171,11 @@ public:
QQmlComponent *quickActionComponent() const;
void setQuickActionComponent(QQmlComponent *quickActionComponent);
QQmlComponent *selectionComponent() const;
void setSelectionComponent(QQmlComponent *selectionComponent);
bool showSelection() const;
void setShowSelection(bool showSelection);
bool showLocalMessagesOnRight() const;
void setShowLocalMessagesOnRight(bool showLocalMessagesOnRight);
@@ -182,6 +197,8 @@ Q_SIGNALS:
void showReadMarkersChanged();
void compactBackgroundComponentChanged();
void quickActionComponentChanged();
void selectionComponentChanged();
void showSelectionChanged();
void compactModeChanged();
void showLocalMessagesOnRightChanged();
void isTemporaryHighlightedChanged();
@@ -227,6 +244,12 @@ private:
bool m_quickActionIncubating = false;
QPointer<QQuickItem> m_quickActionItem;
QPointer<QQmlComponent> m_selectionComponent;
bool m_selectionIncubating = false;
QPointer<QQuickItem> m_selectionItem;
bool m_showSelection = false;
void updateSelection();
bool m_showLocalMessagesOnRight = true;
bool m_hovered = false;