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
17 changed files with 930 additions and 1 deletions

View File

@@ -41,6 +41,8 @@ GroupView::GroupView(Database* db, QWidget* parent)
connect(selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), SLOT(emitGroupChanged()));
connect(this, SIGNAL(clicked(QModelIndex)), SLOT(emitGroupPressed(QModelIndex)));
modelReset();
setDragEnabled(true);
@@ -126,6 +128,11 @@ void GroupView::emitGroupChanged()
emit groupChanged(currentGroup());
}
void GroupView::emitGroupPressed(const QModelIndex& index)
{
emit groupPressed(m_model->groupFromIndex(index));
}
void GroupView::syncExpandedState(const QModelIndex& parent, int start, int end)
{
for (int row = start; row <= end; row++) {