feat: Online search button

- MailListView: new '🌐 Online' button in search bar
- Clicking button emits onlineSearchRequested(query)
- If search box empty, shows QInputDialog for query entry
- MainMainWindow::onOnlineSearchRequested() handler:
  - Validates current folder selected
  - Gets account for folder
  - Shows status message
  - Shows info dialog with query/folder/account (placeholder for IMAP SEARCH)
- Signal: onlineSearchRequested(const QString& query)
- Button styled in blue (online theme)
This commit is contained in:
2026-08-26 04:45:10 +02:00
parent 6d1feabfc5
commit 6f348b17f0
14 changed files with 6066 additions and 7566 deletions
@@ -65,6 +65,8 @@ template <> constexpr inline auto MailListView::qt_create_metaobjectdata<qt_meta
"batchMarkUnreadRequested",
"batchMoveRequested",
"targetFolderId",
"onlineSearchRequested",
"query",
"setFolderType",
"folderType",
"onRowSelected",
@@ -101,7 +103,8 @@ template <> constexpr inline auto MailListView::qt_create_metaobjectdata<qt_meta
"onBatchDeleteClicked",
"enterMultiSelectMode",
"exitMultiSelectMode",
"onPivotChanged"
"onPivotChanged",
"onOnlineSearchClicked"
};
QtMocHelpers::UintData qt_methods {
@@ -163,98 +166,104 @@ template <> constexpr inline auto MailListView::qt_create_metaobjectdata<qt_meta
QtMocHelpers::SignalData<void(const QVector<int> &, int)>(23, 2, QMC::AccessPublic, QMetaType::Void, {{
{ 0x80000000 | 16, 19 }, { QMetaType::Int, 24 },
}}),
// Slot 'setFolderType'
QtMocHelpers::SlotData<void(const QString &)>(25, 2, QMC::AccessPublic, QMetaType::Void, {{
// Signal 'onlineSearchRequested'
QtMocHelpers::SignalData<void(const QString &)>(25, 2, QMC::AccessPublic, QMetaType::Void, {{
{ QMetaType::QString, 26 },
}}),
// Slot 'setFolderType'
QtMocHelpers::SlotData<void(const QString &)>(27, 2, QMC::AccessPublic, QMetaType::Void, {{
{ QMetaType::QString, 28 },
}}),
// Slot 'onRowSelected'
QtMocHelpers::SlotData<void(const QModelIndex &)>(27, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ 0x80000000 | 28, 29 },
QtMocHelpers::SlotData<void(const QModelIndex &)>(29, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ 0x80000000 | 30, 31 },
}}),
// Slot 'onSearchTextChanged'
QtMocHelpers::SlotData<void(const QString &)>(30, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::QString, 31 },
QtMocHelpers::SlotData<void(const QString &)>(32, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::QString, 33 },
}}),
// Slot 'onFilterChanged'
QtMocHelpers::SlotData<void()>(32, 2, QMC::AccessPrivate, QMetaType::Void),
QtMocHelpers::SlotData<void()>(34, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'onGroupByChanged'
QtMocHelpers::SlotData<void(int)>(33, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 29 },
QtMocHelpers::SlotData<void(int)>(35, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 31 },
}}),
// Slot 'onCompactFlagRequested'
QtMocHelpers::SlotData<void(int)>(34, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactDeleteRequested'
QtMocHelpers::SlotData<void(int)>(35, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactCategoryRequested'
QtMocHelpers::SlotData<void(int)>(36, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactMoreRequested'
QtMocHelpers::SlotData<void(int, const QPoint &)>(37, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 }, { 0x80000000 | 10, 11 },
// Slot 'onCompactDeleteRequested'
QtMocHelpers::SlotData<void(int)>(37, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactMailClicked'
// Slot 'onCompactCategoryRequested'
QtMocHelpers::SlotData<void(int)>(38, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactReplyRequested'
QtMocHelpers::SlotData<void(int)>(39, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
// Slot 'onCompactMoreRequested'
QtMocHelpers::SlotData<void(int, const QPoint &)>(39, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 }, { 0x80000000 | 10, 11 },
}}),
// Slot 'onCompactForwardRequested'
// Slot 'onCompactMailClicked'
QtMocHelpers::SlotData<void(int)>(40, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactMarkUnreadRequested'
// Slot 'onCompactReplyRequested'
QtMocHelpers::SlotData<void(int)>(41, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onDisplayModeChanged'
// Slot 'onCompactForwardRequested'
QtMocHelpers::SlotData<void(int)>(42, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 29 },
{ QMetaType::Int, 3 },
}}),
// Slot 'onCompactMarkUnreadRequested'
QtMocHelpers::SlotData<void(int)>(43, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 3 },
}}),
// Slot 'onDisplayModeChanged'
QtMocHelpers::SlotData<void(int)>(44, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 31 },
}}),
// Slot 'onTotalCountChanged'
QtMocHelpers::SlotData<void(int)>(43, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 44 },
}}),
// Slot 'onTreeViewScrolled'
QtMocHelpers::SlotData<void(int)>(45, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 46 },
}}),
// Slot 'onListViewScrolled'
// Slot 'onTreeViewScrolled'
QtMocHelpers::SlotData<void(int)>(47, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 46 },
{ QMetaType::Int, 48 },
}}),
// Slot 'onListViewScrolled'
QtMocHelpers::SlotData<void(int)>(49, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 48 },
}}),
// Slot 'onRowsInserted'
QtMocHelpers::SlotData<void(const QModelIndex &, int, int)>(48, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ 0x80000000 | 28, 49 }, { QMetaType::Int, 50 }, { QMetaType::Int, 51 },
QtMocHelpers::SlotData<void(const QModelIndex &, int, int)>(50, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ 0x80000000 | 30, 51 }, { QMetaType::Int, 52 }, { QMetaType::Int, 53 },
}}),
// Slot 'onSelectionChanged'
QtMocHelpers::SlotData<void()>(52, 2, QMC::AccessPrivate, QMetaType::Void),
QtMocHelpers::SlotData<void()>(54, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'onSelectAllToggled'
QtMocHelpers::SlotData<void(bool)>(53, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Bool, 54 },
QtMocHelpers::SlotData<void(bool)>(55, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Bool, 56 },
}}),
// Slot 'onBatchFlagClicked'
QtMocHelpers::SlotData<void()>(55, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'onBatchMarkUnreadClicked'
QtMocHelpers::SlotData<void()>(56, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'onBatchMoveClicked'
QtMocHelpers::SlotData<void()>(57, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'onBatchDeleteClicked'
// Slot 'onBatchMarkUnreadClicked'
QtMocHelpers::SlotData<void()>(58, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'enterMultiSelectMode'
// Slot 'onBatchMoveClicked'
QtMocHelpers::SlotData<void()>(59, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'exitMultiSelectMode'
// Slot 'onBatchDeleteClicked'
QtMocHelpers::SlotData<void()>(60, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'enterMultiSelectMode'
QtMocHelpers::SlotData<void()>(61, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'exitMultiSelectMode'
QtMocHelpers::SlotData<void()>(62, 2, QMC::AccessPrivate, QMetaType::Void),
// Slot 'onPivotChanged'
QtMocHelpers::SlotData<void(int)>(61, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 29 },
QtMocHelpers::SlotData<void(int)>(63, 2, QMC::AccessPrivate, QMetaType::Void, {{
{ QMetaType::Int, 31 },
}}),
// Slot 'onOnlineSearchClicked'
QtMocHelpers::SlotData<void()>(64, 2, QMC::AccessPrivate, QMetaType::Void),
};
QtMocHelpers::UintData qt_properties {
};
@@ -293,33 +302,35 @@ void MailListView::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id
case 12: _t->batchDeleteRequested((*reinterpret_cast<std::add_pointer_t<QList<int>>>(_a[1]))); break;
case 13: _t->batchMarkUnreadRequested((*reinterpret_cast<std::add_pointer_t<QList<int>>>(_a[1]))); break;
case 14: _t->batchMoveRequested((*reinterpret_cast<std::add_pointer_t<QList<int>>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2]))); break;
case 15: _t->setFolderType((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
case 16: _t->onRowSelected((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
case 17: _t->onSearchTextChanged((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
case 18: _t->onFilterChanged(); break;
case 19: _t->onGroupByChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 20: _t->onCompactFlagRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 21: _t->onCompactDeleteRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 22: _t->onCompactCategoryRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 23: _t->onCompactMoreRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QPoint>>(_a[2]))); break;
case 24: _t->onCompactMailClicked((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 25: _t->onCompactReplyRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 26: _t->onCompactForwardRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 27: _t->onCompactMarkUnreadRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 28: _t->onDisplayModeChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 29: _t->onTotalCountChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 30: _t->onTreeViewScrolled((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 31: _t->onListViewScrolled((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 32: _t->onRowsInserted((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[3]))); break;
case 33: _t->onSelectionChanged(); break;
case 34: _t->onSelectAllToggled((*reinterpret_cast<std::add_pointer_t<bool>>(_a[1]))); break;
case 35: _t->onBatchFlagClicked(); break;
case 36: _t->onBatchMarkUnreadClicked(); break;
case 37: _t->onBatchMoveClicked(); break;
case 38: _t->onBatchDeleteClicked(); break;
case 39: _t->enterMultiSelectMode(); break;
case 40: _t->exitMultiSelectMode(); break;
case 41: _t->onPivotChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 15: _t->onlineSearchRequested((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
case 16: _t->setFolderType((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
case 17: _t->onRowSelected((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
case 18: _t->onSearchTextChanged((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
case 19: _t->onFilterChanged(); break;
case 20: _t->onGroupByChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 21: _t->onCompactFlagRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 22: _t->onCompactDeleteRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 23: _t->onCompactCategoryRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 24: _t->onCompactMoreRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QPoint>>(_a[2]))); break;
case 25: _t->onCompactMailClicked((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 26: _t->onCompactReplyRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 27: _t->onCompactForwardRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 28: _t->onCompactMarkUnreadRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 29: _t->onDisplayModeChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 30: _t->onTotalCountChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 31: _t->onTreeViewScrolled((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 32: _t->onListViewScrolled((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 33: _t->onRowsInserted((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[3]))); break;
case 34: _t->onSelectionChanged(); break;
case 35: _t->onSelectAllToggled((*reinterpret_cast<std::add_pointer_t<bool>>(_a[1]))); break;
case 36: _t->onBatchFlagClicked(); break;
case 37: _t->onBatchMarkUnreadClicked(); break;
case 38: _t->onBatchMoveClicked(); break;
case 39: _t->onBatchDeleteClicked(); break;
case 40: _t->enterMultiSelectMode(); break;
case 41: _t->exitMultiSelectMode(); break;
case 42: _t->onPivotChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
case 43: _t->onOnlineSearchClicked(); break;
default: ;
}
}
@@ -394,6 +405,8 @@ void MailListView::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id
return;
if (QtMocHelpers::indexOfMethod<void (MailListView::*)(const QVector<int> & , int )>(_a, &MailListView::batchMoveRequested, 14))
return;
if (QtMocHelpers::indexOfMethod<void (MailListView::*)(const QString & )>(_a, &MailListView::onlineSearchRequested, 15))
return;
}
}
@@ -416,14 +429,14 @@ int MailListView::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 42)
if (_id < 44)
qt_static_metacall(this, _c, _id, _a);
_id -= 42;
_id -= 44;
}
if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 42)
if (_id < 44)
qt_static_metacall(this, _c, _id, _a);
_id -= 42;
_id -= 44;
}
return _id;
}
@@ -517,4 +530,10 @@ void MailListView::batchMoveRequested(const QVector<int> & _t1, int _t2)
{
QMetaObject::activate<void>(this, &staticMetaObject, 14, nullptr, _t1, _t2);
}
// SIGNAL 15
void MailListView::onlineSearchRequested(const QString & _t1)
{
QMetaObject::activate<void>(this, &staticMetaObject, 15, nullptr, _t1);
}
QT_WARNING_POP