add preview panel for entries and groups

This commit is contained in:
thez3ro 2017-08-17 21:02:21 +02:00
parent 03eda06a38
commit 1a87e30b95
No known key found for this signature in database
GPG key ID: F628F9E41DD7C073
17 changed files with 930 additions and 1 deletions

View file

@ -49,6 +49,8 @@ EntryView::EntryView(QWidget* parent)
connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SIGNAL(entrySelectionChanged()));
connect(m_model, SIGNAL(switchedToEntryListMode()), SLOT(switchToEntryListMode()));
connect(m_model, SIGNAL(switchedToGroupMode()), SLOT(switchToGroupMode()));
connect(this, SIGNAL(clicked(QModelIndex)), SLOT(emitEntryPressed(QModelIndex)));
}
void EntryView::keyPressEvent(QKeyEvent* event)
@ -99,6 +101,11 @@ void EntryView::emitEntryActivated(const QModelIndex& index)
emit entryActivated(entry, static_cast<EntryModel::ModelColumn>(m_sortModel->mapToSource(index).column()));
}
void EntryView::emitEntryPressed(const QModelIndex& index)
{
emit entryPressed(entryFromIndex(index));
}
void EntryView::setModel(QAbstractItemModel* model)
{
Q_UNUSED(model);