Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 595000b5133f4458e88b0ef6355a26be > files > 156

qt3-devel-docs-3.3.8b-37.fc14.x86_64.rpm

#include <qlistview.h>

class ListViewItem : public QListViewItem
{
public:
    ListViewItem ( QListView * parent, const QString& name, const QString& tag )
        : QListViewItem( parent, name ), _tag( tag ) {}
    ListViewItem ( QListView * parent, QListViewItem * after, const QString& name, const QString& tag )
        : QListViewItem( parent, after, name ), _tag( tag ) {}
    virtual ~ListViewItem() {}

    QString tag() { return _tag; }

private:
    QString _tag;
};

class ListView : public QListView
{
    Q_OBJECT

public:
    ListView( QWidget* parent = 0, const char* name = 0 );
    ~ListView();

    void dragEnterEvent( QDragEnterEvent * );
    void dropEvent( QDropEvent * );
    void contentsMousePressEvent( QMouseEvent * );
    void contentsMouseMoveEvent( QMouseEvent * );
    void contentsMouseReleaseEvent( QMouseEvent * );

private:
    QPoint pressPos;
    bool dragging;
};