2
This program is free software; you can redistribute it and/or modify
3
it under the terms of the GNU General Public License as published by
4
the Free Software Foundation; either version 2 of the License, or
5
(at your option) any later version.
2
This program is free software; you can redistribute it and/or modify
3
it under the terms of the GNU General Public License as published by
4
the Free Software Foundation; either version 2 of the License, or
5
(at your option) any later version.
9
ServerListView is derived from K3ListView and implements custom
10
drag'n'drop behavior needed in ServerListDialog.
9
ServerListView is derived from K3ListView and implements custom
10
drag'n'drop behavior needed in ServerListDialog.
12
Copyright (C) 2006 Eike Hein <hein@kde.org>
12
Copyright (C) 2006 Eike Hein <hein@kde.org>
15
15
#ifndef SERVERLISTVIEW_H
16
16
#define SERVERLISTVIEW_H
18
#include <k3listview.h>
23
class ServerListView : public K3ListView
18
#include <QTreeWidget>
22
class ServerListView : public QTreeWidget
28
27
explicit ServerListView(QWidget *parent);
31
Q3PtrList<Q3ListViewItem> selectedServerListItems();
34
void findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after);
35
Q3DragObject* dragObject();
30
QList<QTreeWidgetItem*> selectedServerListItems();
41
void dragEnterEvent(QDragEnterEvent *e);
42
void dragMoveEvent(QDragMoveEvent *e);
43
void dragLeaveEvent(QDragLeaveEvent *);
44
int position(const QPoint &pos, const QRect &rect);
45
void paintDropIndicator(QPainter *painter);
46
void paintEvent(QPaintEvent *event);
47
void dropEvent(QDropEvent *event);
48
bool dropOn(QDropEvent *event, int *dropRow, int *dropCol, QModelIndex *dropIndex);
49
bool droppingOnItself(QDropEvent *event, const QModelIndex &index);