drag and drop implementation for group tree hierarchy finished
(TODO: sorting via d'n'd) git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@20 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "GroupView.h"
|
||||
|
||||
KeepassGroupView::KeepassGroupView(QWidget* parent):QTreeWidget(parent){
|
||||
db=0;
|
||||
LastHoverItem=NULL;
|
||||
setHeaderLabels(QStringList()<<tr("Gruppen"));
|
||||
}
|
||||
@@ -84,8 +85,14 @@ if(LastHoverItem){
|
||||
QFont f=LastHoverItem->font(0);
|
||||
f.setBold(false);
|
||||
LastHoverItem->setFont(0,f);
|
||||
LastHoverItem=NULL;
|
||||
}
|
||||
|
||||
GroupViewItem* item=(GroupViewItem*)itemAt(event->pos());
|
||||
if(item)
|
||||
db->moveGroup(DragItem->pGroup,item->pGroup);
|
||||
else
|
||||
db->moveGroup(DragItem->pGroup,NULL);
|
||||
updateItems();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user