Support copying entries and groups using drag'n'drop.

Closes #74
This commit is contained in:
Felix Geyer 2013-04-07 12:36:53 +02:00
parent 701013baab
commit 317f603262
4 changed files with 32 additions and 5 deletions

View file

@ -40,6 +40,9 @@ EntryView::EntryView(QWidget* parent)
setSortingEnabled(true);
setSelectionMode(QAbstractItemView::ExtendedSelection);
// QAbstractItemView::startDrag() uses this property as the default drag action
setDefaultDropAction(Qt::MoveAction);
connect(this, SIGNAL(activated(QModelIndex)), SLOT(emitEntryActivated(QModelIndex)));
connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SIGNAL(entrySelectionChanged()));
connect(m_model, SIGNAL(switchedToEntryListMode()), SLOT(switchToEntryListMode()));