mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-11 00:13:03 -04:00
Make the edit entry button work.
This commit is contained in:
parent
e11b0061d4
commit
73b84ff670
6 changed files with 46 additions and 1 deletions
|
@ -29,6 +29,7 @@ EntryView::EntryView(QWidget* parent)
|
|||
setRootIsDecorated(false);
|
||||
|
||||
connect(this, SIGNAL(activated(const QModelIndex&)), SLOT(emitEntryActivated(const QModelIndex&)));
|
||||
connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SIGNAL(entrySelectionChanged()));
|
||||
}
|
||||
|
||||
void EntryView::setGroup(Group* group)
|
||||
|
@ -46,3 +47,14 @@ void EntryView::setModel(QAbstractItemModel* model)
|
|||
Q_UNUSED(model);
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
|
||||
Entry* EntryView::currentEntry()
|
||||
{
|
||||
// TODO use selection instead of current?
|
||||
return m_model->entryFromIndex(currentIndex());
|
||||
}
|
||||
|
||||
bool EntryView::isSingleEntrySelected()
|
||||
{
|
||||
return (selectionModel()->selectedRows().size() == 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue