Add EntryView and DatabaseWidget.

This commit is contained in:
Felix Geyer 2010-08-24 22:26:52 +02:00
parent e96c3bb011
commit 621b367f45
8 changed files with 170 additions and 7 deletions

View file

@ -27,6 +27,8 @@ GroupView::GroupView(Database* db, QWidget* parent) : QTreeView(parent)
QTreeView::setModel(m_model);
recInitExpanded(db->rootGroup());
setHeaderHidden(true);
connect(this, SIGNAL(clicked(const QModelIndex&)), SLOT(emitGroupChanged(const QModelIndex&)));
}
void GroupView::expandedChanged(const QModelIndex& index)
@ -45,6 +47,11 @@ void GroupView::recInitExpanded(Group* group)
}
}
void GroupView::emitGroupChanged(const QModelIndex& index)
{
Q_EMIT groupChanged(m_model->groupFromIndex(index));
}
void GroupView::setModel(QAbstractItemModel* model)
{
Q_UNUSED(model);