mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-12 08:53:08 -04:00
parent
f836629dda
commit
6b6c109903
13 changed files with 224 additions and 35 deletions
|
@ -40,6 +40,8 @@ EntryView::EntryView(QWidget* parent)
|
|||
|
||||
connect(this, SIGNAL(activated(const QModelIndex&)), SLOT(emitEntryActivated(const QModelIndex&)));
|
||||
connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SIGNAL(entrySelectionChanged()));
|
||||
connect(m_model, SIGNAL(switchedToSearch()), this, SLOT(switchToSearch()));
|
||||
connect(m_model, SIGNAL(switchedToView()), this, SLOT(switchToView()));
|
||||
|
||||
sortByColumn(0, Qt::AscendingOrder);
|
||||
}
|
||||
|
@ -50,6 +52,12 @@ void EntryView::setGroup(Group* group)
|
|||
Q_EMIT entrySelectionChanged();
|
||||
}
|
||||
|
||||
void EntryView::search(QList<Entry*> entries)
|
||||
{
|
||||
m_model->setEntries(entries);
|
||||
Q_EMIT entrySelectionChanged();
|
||||
}
|
||||
|
||||
void EntryView::emitEntryActivated(const QModelIndex& index)
|
||||
{
|
||||
Q_EMIT entryActivated(entryFromIndex(index));
|
||||
|
@ -86,3 +94,13 @@ Entry* EntryView::entryFromIndex(const QModelIndex& index)
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void EntryView::switchToSearch()
|
||||
{
|
||||
showColumn(0);
|
||||
}
|
||||
|
||||
void EntryView::switchToView()
|
||||
{
|
||||
hideColumn(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue