~ubuntu-branches/ubuntu/lucid/konversation/lucid-updates

« back to all changes in this revision

Viewing changes to src/irc/serverlistview.h

  • Committer: Bazaar Package Importer
  • Author(s): Modestas Vainius
  • Date: 2009-05-15 11:24:24 UTC
  • mfrom: (1.15.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 47.
  • Revision ID: james.westby@ubuntu.com-20090515112424-b74i26lciabf4qnk
Tags: 1.1.75+svn968012-1
* New upstream development snapshot:
  - Last Changed Author: hein
  - Last Changed Rev: 968012
  - Last Changed Date: 2009-05-14 21:03:55 +0300
* Update README.source.
* Use dh --quilt instead of custom patch handling, build depend on
  quilt 0.46-7~.
* Update patches to upstream changes.
* Update konversation.install: remove docs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
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.
6
6
*/
7
7
 
8
8
/*
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.
11
11
 
12
 
  Copyright (C) 2006 Eike Hein <hein@kde.org>
 
12
Copyright (C) 2006 Eike Hein <hein@kde.org>
13
13
*/
14
14
 
15
15
#ifndef SERVERLISTVIEW_H
16
16
#define SERVERLISTVIEW_H
17
17
 
18
 
#include <k3listview.h>
19
 
 
20
 
 
21
 
class Q3DragObject;
22
 
 
23
 
class ServerListView : public K3ListView
 
18
#include <QTreeWidget>
 
19
 
 
20
#include <QDropEvent>
 
21
 
 
22
class ServerListView : public QTreeWidget
24
23
{
25
24
    Q_OBJECT
26
 
 
 
25
    
27
26
    public:
28
27
        explicit ServerListView(QWidget *parent);
29
28
        ~ServerListView();
30
 
 
31
 
        Q3PtrList<Q3ListViewItem> selectedServerListItems();
32
 
 
33
 
    protected:
34
 
        void findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after);
35
 
        Q3DragObject* dragObject();
 
29
        
 
30
        QList<QTreeWidgetItem*> selectedServerListItems();
 
31
        
 
32
    signals:
 
33
        void moved();
 
34
        void aboutToMove();
 
35
        
 
36
    private:
 
37
        int m_dropPosition;
 
38
        QRect m_dropRect;
 
39
        
 
40
    protected:        
 
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);
36
50
};
37
51
 
38
52
#endif