Add additional columns to entry view table

Add additional columns 'Password', 'Notes', 'Expires', 'Created',
'Modified', 'Accessed' and 'Attachments' to entry view table:
- add columns themselves
- add display role data providers
- introduce/apply sort role
- add sort role data providers
- add settings to display usernames/passwords visible/hidden
- minor addition to EntryModel::columnCount() as advised by Qt
  documentation
This commit is contained in:
Fonic 2017-12-19 10:47:51 +01:00
parent 5e30214e4c
commit 34a7ba4477
3 changed files with 304 additions and 5 deletions

View file

@ -32,6 +32,13 @@ EntryView::EntryView(QWidget* parent)
m_sortModel->setDynamicSortFilter(true);
m_sortModel->setSortLocaleAware(true);
m_sortModel->setSortCaseSensitivity(Qt::CaseInsensitive);
/**
* @author Fonic <https://github.com/fonic>
* Set Qt::UserRole as sort role
* -> refer to 'if (role == Qt::UserRole)', EntryModel.cpp, EntryModel::
* data() for details
*/
m_sortModel->setSortRole(Qt::UserRole);
QTreeView::setModel(m_sortModel);
setUniformRowHeights(true);