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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user