2
Copyright 2007 Robert Knight <robertknight@gmail.com>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License as published by the Free Software Foundation; either
7
version 2 of the License, or (at your option) any later version.
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Library General Public License for more details.
14
You should have received a copy of the GNU Library General Public License
15
along with this library; see the file COPYING.LIB. If not, write to
16
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
Boston, MA 02110-1301, USA.
24
#include <QAbstractItemView>
29
class ItemStateProvider;
30
class UrlItemView : public QAbstractItemView
35
UrlItemView(QWidget *parent = 0);
36
virtual ~UrlItemView();
38
void setItemStateProvider(ItemStateProvider *provider);
39
ItemStateProvider *itemStateProvider() const;
41
// reimplemented from QAbstractItemView
42
virtual QModelIndex indexAt(const QPoint& point) const;
43
virtual void scrollTo(const QModelIndex& index, ScrollHint hint = EnsureVisible);
44
virtual QRect visualRect(const QModelIndex& index) const;
45
virtual void setModel(QAbstractItemModel *model);
47
/* if nothing is selected, the first item is
48
* @returns whether the selection has changed
50
bool initializeSelection();
53
// reimplemented from QAbstractItemView
54
virtual int horizontalOffset() const;
55
virtual bool isIndexHidden(const QModelIndex& index) const;
56
virtual QModelIndex moveCursor(CursorAction action, Qt::KeyboardModifiers modifiers);
57
virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags flags);
58
virtual int verticalOffset() const;
59
virtual QRegion visualRegionForSelection(const QItemSelection& selection) const;
60
virtual void startDrag(Qt::DropActions supportedActions);
61
virtual void dragEnterEvent(QDragEnterEvent *event);
62
virtual void dragLeaveEvent(QDragLeaveEvent *event);
63
virtual void dragMoveEvent(QDragMoveEvent *event);
65
// reimplemented from QWidget
66
virtual void paintEvent(QPaintEvent *event);
67
virtual void resizeEvent(QResizeEvent *event);
68
virtual void mouseMoveEvent(QMouseEvent *event);
69
virtual void mousePressEvent(QMouseEvent *event);
70
virtual void mouseReleaseEvent(QMouseEvent *event);
71
virtual void dropEvent(QDropEvent *event);
72
virtual void leaveEvent(QEvent *event);
76
// lays out all items in the view and sets the current index to the first
87
#endif // URLITEMVIEW_H