feat: Wino-style compact mail view with display modes + hover actions

- CompactMailDelegate: 3 display modes (Compact/Medium/Spacious) like WinUI original
  * Compact: 64px, minimal, no preview
  * Medium: 96px, with preview, detailed categories
  * Spacious: 120px, full padding, preview visible
- Hover actions: Reply (↩), Forward (↪), Mark unread (✎) on right side
- Unread dot indicator (top-right, blue) like WinUI
- User-configurable display mode via combo box in filter bar
- MainMainWindow handlers for reply/forward/mark-unread from compact view
- Signals: replyRequested, forwardRequested, markUnreadRequested
This commit is contained in:
2026-08-25 13:41:43 +02:00
parent 4c4fec7a0a
commit fa699b5399
92 changed files with 26111 additions and 13449 deletions
@@ -51,6 +51,9 @@ template <> constexpr inline auto MailListView::qt_create_metaobjectdata<qt_meta
"moreRequested",
"QPoint",
"globalPos",
"replyRequested",
"forwardRequested",
"markUnreadRequested",
"onRowSelected",
"QModelIndex",
"index",
@@ -62,7 +65,11 @@ template <> constexpr inline auto MailListView::qt_create_metaobjectdata<qt_meta
"onCompactDeleteRequested",
"onCompactCategoryRequested",
"onCompactMoreRequested",
"onCompactMailClicked"
"onCompactMailClicked",
"onCompactReplyRequested",
"onCompactForwardRequested",
"onCompactMarkUnreadRequested",
"onDisplayModeChanged"
};
QtMocHelpers::UintData qt_methods {
@@ -92,40 +99,68 @@ template <> constexpr inline auto MailListView::qt_create_metaobjectdata<qt_meta
QtMocHelpers::SignalData<void(int, const QPoint &)>(9, 2, QMC::AccessPublic, QMetaType::Void, {{
{ QMetaType::Int, 3 }, { 0x80000000 | 10, 11 },
}}),
// Signal 'replyRequested'
QtMocHelpers::SignalData<void(int)>(12, 2, QMC::AccessPublic, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Signal 'forwardRequested'
QtMocHelpers::SignalData<void(int)>(13, 2, QMC::AccessPublic, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Signal 'markUnreadRequested'
QtMocHelpers::SignalData<void(int)>(14, 2, QMC::AccessPublic, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onRowSelected'
QtMocHelpers::SlotData<void(const QModelIndex &)>(12, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ 0x80000000 | 13, 14 },
QtMocHelpers::SlotData<void(const QModelIndex &)>(15, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ 0x80000000 | 16, 17 },
}}),
// Slot 'onSearchTextChanged'
QtMocHelpers::SlotData<void(const QString &)>(15, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::QString, 16 },
QtMocHelpers::SlotData<void(const QString &)>(18, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::QString, 19 },
}}),
// Slot 'onFilterChanged'
QtMocHelpers::SlotData<void()>(17, 2, QMC::AccessPrivate, QMetaType::Void),
QtMocHelpers::SlotData<void()>(20, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'onGroupByChanged'
QtMocHelpers::SlotData<void(int)>(18, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 14 },
QtMocHelpers::SlotData<void(int)>(21, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 17 },
}}),
// Slot 'onCompactFlagRequested'
QtMocHelpers::SlotData<void(int)>(19, 2, QMC::AccessPrivate, QMetaType::Void, {{
QtMocHelpers::SlotData<void(int)>(22, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactDeleteRequested'
QtMocHelpers::SlotData<void(int)>(20, 2, QMC::AccessPrivate, QMetaType::Void, {{
QtMocHelpers::SlotData<void(int)>(23, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactCategoryRequested'
QtMocHelpers::SlotData<void(int)>(21, 2, QMC::AccessPrivate, QMetaType::Void, {{
QtMocHelpers::SlotData<void(int)>(24, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactMoreRequested'
QtMocHelpers::SlotData<void(int, const QPoint &)>(22, 2, QMC::AccessPrivate, QMetaType::Void, {{
QtMocHelpers::SlotData<void(int, const QPoint &)>(25, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 }, { 0x80000000 | 10, 11 },
}}),
// Slot 'onCompactMailClicked'
QtMocHelpers::SlotData<void(int)>(23, 2, QMC::AccessPrivate, QMetaType::Void, {{
QtMocHelpers::SlotData<void(int)>(26, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactReplyRequested'
QtMocHelpers::SlotData<void(int)>(27, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactForwardRequested'
QtMocHelpers::SlotData<void(int)>(28, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactMarkUnreadRequested'
QtMocHelpers::SlotData<void(int)>(29, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onDisplayModeChanged'
QtMocHelpers::SlotData<void(int)>(30, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 17 },
}}),
};
QtMocHelpers::UintData qt_properties {
};
@@ -156,15 +191,22 @@ void MailListView::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id
case 4: _t->deleteRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 5: _t->categoryRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 6: _t->moreRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QPoint>>(_a[2]))); break;
case 7: _t->onRowSelected((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
case 8: _t->onSearchTextChanged((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
case 9: _t->onFilterChanged(); break;
case 10: _t->onGroupByChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 11: _t->onCompactFlagRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 12: _t->onCompactDeleteRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 13: _t->onCompactCategoryRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 14: _t->onCompactMoreRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QPoint>>(_a[2]))); break;
case 15: _t->onCompactMailClicked((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 7: _t->replyRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 8: _t->forwardRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 9: _t->markUnreadRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 10: _t->onRowSelected((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
case 11: _t->onSearchTextChanged((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
case 12: _t->onFilterChanged(); break;
case 13: _t->onGroupByChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 14: _t->onCompactFlagRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 15: _t->onCompactDeleteRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 16: _t->onCompactCategoryRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 17: _t->onCompactMoreRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QPoint>>(_a[2]))); break;
case 18: _t->onCompactMailClicked((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 19: _t->onCompactReplyRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 20: _t->onCompactForwardRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 21: _t->onCompactMarkUnreadRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 22: _t->onDisplayModeChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
default: ;
}
}
@@ -183,6 +225,12 @@ void MailListView::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id
return;
if (QtMocHelpers::indexOfMethod<void (MailListView::*)(int , const QPoint & )>(_a, &MailListView::moreRequested, 6))
return;
if (QtMocHelpers::indexOfMethod<void (MailListView::*)(int )>(_a, &MailListView::replyRequested, 7))
return;
if (QtMocHelpers::indexOfMethod<void (MailListView::*)(int )>(_a, &MailListView::forwardRequested, 8))
return;
if (QtMocHelpers::indexOfMethod<void (MailListView::*)(int )>(_a, &MailListView::markUnreadRequested, 9))
return;
}
}
@@ -205,14 +253,14 @@ int MailListView::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 16)
if (_id < 23)
qt_static_metacall(this, _c, _id, _a);
_id -= 16;
_id -= 23;
}
if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 16)
if (_id < 23)
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
_id -= 16;
_id -= 23;
}
return _id;
}
@@ -258,4 +306,22 @@ void MailListView::moreRequested(int _t1, const QPoint & _t2)
{
QMetaObject::activate<void>(this, &staticMetaObject, 6, nullptr, _t1, _t2);
}
// SIGNAL 7
void MailListView::replyRequested(int _t1)
{
QMetaObject::activate<void>(this, &staticMetaObject, 7, nullptr, _t1);
}
// SIGNAL 8
void MailListView::forwardRequested(int _t1)
{
QMetaObject::activate<void>(this, &staticMetaObject, 8, nullptr, _t1);
}
// SIGNAL 9
void MailListView::markUnreadRequested(int _t1)
{
QMetaObject::activate<void>(this, &staticMetaObject, 9, nullptr, _t1);
}
QT_WARNING_POP
@@ -85,6 +85,9 @@ template <> constexpr inline auto MainMainWindow::qt_create_metaobjectdata<qt_me
"onMoreRequested",
"QPoint",
"globalPos",
"onReplyRequested",
"onForwardRequested",
"onMarkUnreadRequested",
"onEmbeddedSendRequested",
"to",
"cc",
@@ -207,16 +210,28 @@ template <> constexpr inline auto MainMainWindow::qt_create_metaobjectdata<qt_me
QtMocHelpers::SlotData<void(int, const QPoint &)>(42, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 7 }, { 0x80000000 | 43, 44 },
}}),
// Slot 'onReplyRequested'
QtMocHelpers::SlotData<void(int)>(45, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 7 },
}}),
// Slot 'onForwardRequested'
QtMocHelpers::SlotData<void(int)>(46, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 7 },
}}),
// Slot 'onMarkUnreadRequested'
QtMocHelpers::SlotData<void(int)>(47, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 7 },
}}),
// Slot 'onEmbeddedSendRequested'
QtMocHelpers::SlotData<void(const QString &, const QString &, const QString &, const QString &, const QString &, const QDateTime &, const QString &, const QStringList &)>(45, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::QString, 46 }, { QMetaType::QString, 47 }, { QMetaType::QString, 48 }, { QMetaType::QString, 49 },
{ QMetaType::QString, 50 }, { QMetaType::QDateTime, 51 }, { QMetaType::QString, 52 }, { QMetaType::QStringList, 53 },
QtMocHelpers::SlotData<void(const QString &, const QString &, const QString &, const QString &, const QString &, const QDateTime &, const QString &, const QStringList &)>(48, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::QString, 49 }, { QMetaType::QString, 50 }, { QMetaType::QString, 51 }, { QMetaType::QString, 52 },
{ QMetaType::QString, 53 }, { QMetaType::QDateTime, 54 }, { QMetaType::QString, 55 }, { QMetaType::QStringList, 56 },
}}),
// Slot 'onEmbeddedDiscardRequested'
QtMocHelpers::SlotData<void()>(54, 2, QMC::AccessPrivate, QMetaType::Void),
QtMocHelpers::SlotData<void()>(57, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'onEmbeddedDetachRequested'
QtMocHelpers::SlotData<void(QWidget *)>(55, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ 0x80000000 | 56, 57 },
QtMocHelpers::SlotData<void(QWidget *)>(58, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ 0x80000000 | 59, 60 },
}}),
};
QtMocHelpers::UintData qt_properties {
@@ -273,16 +288,19 @@ void MainMainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _
case 29: _t->onDeleteRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 30: _t->onCategoryRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 31: _t->onMoreRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QPoint>>(_a[2]))); break;
case 32: _t->onEmbeddedSendRequested((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[3])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[4])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[5])),(*reinterpret_cast<std::add_pointer_t<QDateTime>>(_a[6])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[7])),(*reinterpret_cast<std::add_pointer_t<QStringList>>(_a[8]))); break;
case 33: _t->onEmbeddedDiscardRequested(); break;
case 34: _t->onEmbeddedDetachRequested((*reinterpret_cast<std::add_pointer_t<QWidget*>>(_a[1]))); break;
case 32: _t->onReplyRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 33: _t->onForwardRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 34: _t->onMarkUnreadRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 35: _t->onEmbeddedSendRequested((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[3])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[4])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[5])),(*reinterpret_cast<std::add_pointer_t<QDateTime>>(_a[6])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[7])),(*reinterpret_cast<std::add_pointer_t<QStringList>>(_a[8]))); break;
case 36: _t->onEmbeddedDiscardRequested(); break;
case 37: _t->onEmbeddedDetachRequested((*reinterpret_cast<std::add_pointer_t<QWidget*>>(_a[1]))); break;
default: ;
}
}
if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
switch (_id) {
default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
case 34:
case 37:
switch (*reinterpret_cast<int*>(_a[1])) {
default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
case 0:
@@ -312,14 +330,14 @@ int MainMainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 35)
if (_id < 38)
qt_static_metacall(this, _c, _id, _a);
_id -= 35;
_id -= 38;
}
if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 35)
if (_id < 38)
qt_static_metacall(this, _c, _id, _a);
_id -= 35;
_id -= 38;
}
return _id;
}