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:
tariq
2006-01-23 21:32:29 +00:00
parent 3c4ac74af1
commit 265104133b
3 changed files with 55 additions and 10 deletions

View File

@@ -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();
}