mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
parent
552ca7bf71
commit
4ab887c773
@ -62,13 +62,24 @@ void EntryView::keyPressEvent(QKeyEvent* event)
|
|||||||
void EntryView::setGroup(Group* group)
|
void EntryView::setGroup(Group* group)
|
||||||
{
|
{
|
||||||
m_model->setGroup(group);
|
m_model->setGroup(group);
|
||||||
Q_EMIT entrySelectionChanged();
|
setFirstEntryActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryView::setEntryList(const QList<Entry*>& entries)
|
void EntryView::setEntryList(const QList<Entry*>& entries)
|
||||||
{
|
{
|
||||||
m_model->setEntryList(entries);
|
m_model->setEntryList(entries);
|
||||||
Q_EMIT entrySelectionChanged();
|
setFirstEntryActive();
|
||||||
|
}
|
||||||
|
|
||||||
|
void EntryView::setFirstEntryActive()
|
||||||
|
{
|
||||||
|
if(m_model->rowCount() > 0) {
|
||||||
|
QModelIndex index = m_sortModel->mapToSource(m_sortModel->index(0, 0));
|
||||||
|
setCurrentEntry(m_model->entryFromIndex(index));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Q_EMIT entrySelectionChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EntryView::inEntryListMode()
|
bool EntryView::inEntryListMode()
|
||||||
|
@ -42,6 +42,7 @@ public:
|
|||||||
void setEntryList(const QList<Entry*>& entries);
|
void setEntryList(const QList<Entry*>& entries);
|
||||||
bool inEntryListMode();
|
bool inEntryListMode();
|
||||||
int numberOfSelectedEntries();
|
int numberOfSelectedEntries();
|
||||||
|
void setFirstEntryActive();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void setGroup(Group* group);
|
void setGroup(Group* group);
|
||||||
|
Loading…
Reference in New Issue
Block a user