Fix comp?
This commit is contained in:
parent
12e838c7a1
commit
1502004c58
2 changed files with 9 additions and 7 deletions
|
@ -59,13 +59,7 @@ FeedsView::FeedsView(QWidget *parent)
|
|||
connect(m_sourceModel, SIGNAL(itemExpandRequested(QList<RootItem*>,bool)), this, SLOT(onItemExpandRequested(QList<RootItem*>,bool)));
|
||||
connect(m_sourceModel, SIGNAL(itemExpandStateSaveRequested(RootItem*)), this, SLOT(onItemExpandStateSaveRequested(RootItem*)));
|
||||
connect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), this, SLOT(saveSortState(int,Qt::SortOrder)));
|
||||
|
||||
connect(m_proxyModel, &FeedsProxyModel::expandAfterFilterIn, [=](const QModelIndex &idx) {
|
||||
QTimer::singleShot(100, this, [=] {
|
||||
// TODO: Z nastavení.
|
||||
setExpanded(m_proxyModel->mapFromSource(idx), true);
|
||||
});
|
||||
});
|
||||
connect(m_proxyModel, &FeedsProxyModel::expandAfterFilterIn, this, &FeedsView::expandItemDelayed);
|
||||
|
||||
setModel(m_proxyModel);
|
||||
setupAppearance();
|
||||
|
@ -359,6 +353,13 @@ void FeedsView::switchVisibility() {
|
|||
setVisible(!isVisible());
|
||||
}
|
||||
|
||||
void FeedsView::expandItemDelayed(const QModelIndex &idx) {
|
||||
QTimer::singleShot(100, this, [=] {
|
||||
// TODO: Z nastavení.
|
||||
setExpanded(m_proxyModel->mapFromSource(idx), true);
|
||||
});
|
||||
}
|
||||
|
||||
QMenu *FeedsView::initializeContextMenuCategories(RootItem *clicked_item) {
|
||||
if (m_contextMenuCategories == NULL) {
|
||||
m_contextMenuCategories = new QMenu(tr("Context menu for categories"), this);
|
||||
|
|
|
@ -102,6 +102,7 @@ class FeedsView : public QTreeView {
|
|||
void openMessagesInNewspaperView(RootItem *root, const QList<Message> &messages);
|
||||
|
||||
private slots:
|
||||
void expandItemDelayed(const QModelIndex &idx);
|
||||
void markSelectedItemReadStatus(RootItem::ReadStatus read);
|
||||
void markAllItemsReadStatus(RootItem::ReadStatus read);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue