event handler for MainWindow X-Button
git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@39 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -111,13 +111,13 @@ update();
|
||||
|
||||
|
||||
void KeepassGroupView::dropEvent( QDropEvent * event ){
|
||||
emit fileModified();
|
||||
InsertionMarker=QLine();
|
||||
if(LastHoverItem){
|
||||
QFont f=LastHoverItem->font(0);
|
||||
f.setBold(false);
|
||||
LastHoverItem->setFont(0,f);
|
||||
LastHoverItem=NULL;
|
||||
|
||||
}
|
||||
GroupViewItem* item=(GroupViewItem*)itemAt(event->pos());
|
||||
if(item){
|
||||
|
||||
@@ -21,12 +21,14 @@
|
||||
#define _GROUP_VIEW_H_
|
||||
|
||||
#include <QTreeWidget>
|
||||
#include <QLine>
|
||||
#include "../PwManager.h"
|
||||
|
||||
class GroupViewItem;
|
||||
typedef vector<GroupViewItem*>::iterator GroupItemItr;
|
||||
|
||||
class KeepassGroupView:public QTreeWidget{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KeepassGroupView(QWidget* parent=0);
|
||||
void updateItems();
|
||||
@@ -35,6 +37,10 @@ public:
|
||||
PwDatabase *db;
|
||||
bool ShowSearchGroup; //needs a "updateItems()" after a change!
|
||||
vector<GroupViewItem*>Items;
|
||||
|
||||
signals:
|
||||
void fileModified();
|
||||
|
||||
protected:
|
||||
virtual void dragEnterEvent ( QDragEnterEvent * event );
|
||||
virtual void dragMoveEvent ( QDragMoveEvent * event );
|
||||
@@ -44,15 +50,12 @@ protected:
|
||||
virtual void mouseMoveEvent(QMouseEvent *event);
|
||||
virtual void paintEvent ( QPaintEvent * event );
|
||||
|
||||
|
||||
private:
|
||||
|
||||
QLine InsertionMarker;
|
||||
QPoint DragStartPos;
|
||||
QPixmap DragPixmap;
|
||||
GroupViewItem* DragItem;
|
||||
GroupViewItem* LastHoverItem;
|
||||
|
||||
GroupViewItem* getLastSameLevelItem(int level);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user