feat: Pinned emails support (flag/follow-up)
- EmailListModel: new m_pinnedOnly filter + setShowPinnedOnly() - EmailListModel/EmailListModel.cpp: passes pinnedOnly to paginated queries - MailItemDao: countAll, countByFolderId, findAllPaginated, findByFolderIdPaginated accept pinnedOnly - MailListView: new 'Solo fijados' checkbox in filter bar - CompactMailDelegate: orange pushpin indicator (top-right) for pinned emails - Works in both tree view and compact card view - Pinned indicator uses QPainterPath for pushpin shape (orange)
This commit is contained in:
@@ -69,6 +69,10 @@ void MailListView::setupUI()
|
||||
m_hasAttachmentsCheck->setStyleSheet("QCheckBox { font-size: 12px; color: #333; }");
|
||||
filterLayout->addWidget(m_hasAttachmentsCheck);
|
||||
|
||||
m_pinnedOnlyCheck = new QCheckBox("Solo fijados");
|
||||
m_pinnedOnlyCheck->setStyleSheet("QCheckBox { font-size: 12px; color: #333; }");
|
||||
filterLayout->addWidget(m_pinnedOnlyCheck);
|
||||
|
||||
filterLayout->addStretch();
|
||||
|
||||
// Display mode combo (Compact/Medium/Spacious)
|
||||
@@ -209,6 +213,7 @@ void MailListView::setupUI()
|
||||
connect(m_unreadOnlyCheck, &QCheckBox::toggled, this, &MailListView::onFilterChanged);
|
||||
connect(m_flaggedOnlyCheck, &QCheckBox::toggled, this, &MailListView::onFilterChanged);
|
||||
connect(m_hasAttachmentsCheck, &QCheckBox::toggled, this, &MailListView::onFilterChanged);
|
||||
connect(m_pinnedOnlyCheck, &QCheckBox::toggled, this, &MailListView::onFilterChanged);
|
||||
}
|
||||
|
||||
void MailListView::setModel(EmailListModel *model)
|
||||
@@ -287,6 +292,7 @@ void MailListView::onFilterChanged()
|
||||
m_sourceModel->setShowUnreadOnly(m_unreadOnlyCheck->isChecked());
|
||||
m_sourceModel->setShowFlaggedOnly(m_flaggedOnlyCheck->isChecked());
|
||||
m_sourceModel->setShowHasAttachments(m_hasAttachmentsCheck->isChecked());
|
||||
m_sourceModel->setShowPinnedOnly(m_pinnedOnlyCheck->isChecked());
|
||||
}
|
||||
|
||||
void MailListView::onGroupByChanged(int index)
|
||||
|
||||
Reference in New Issue
Block a user