~ubuntu-branches/ubuntu/lucid/kdebase/lucid

« back to all changes in this revision

Viewing changes to apps/plasma/applets/folderview/iconview.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Stalcup
  • Date: 2009-06-03 23:42:46 UTC
  • mto: This revision was merged to the branch mainline in revision 242.
  • Revision ID: james.westby@ubuntu.com-20090603234246-lt9inobn80tnv1o3
Tags: upstream-4.2.90
ImportĀ upstreamĀ versionĀ 4.2.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
class KFileItemDelegate;
37
37
class KFileItemList;
38
38
class KFilePreviewGenerator;
 
39
class KJob;
39
40
class KNewMenu;
40
41
class KonqOperations;
41
42
class QItemSelectionModel;
64
65
 
65
66
public:
66
67
    enum Flow { LeftToRight, TopToBottom, RightToLeft, TopToBottomRightToLeft };
 
68
    enum ToolTipType { FolderTip, FileTip };
67
69
 
68
70
    Q_PROPERTY(QSize gridSize READ gridSize WRITE setGridSize)
69
71
    Q_PROPERTY(bool wordWrap READ wordWrap WRITE setWordWrap)
118
120
 
119
121
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
120
122
 
 
123
    void triggerToolTip(ToolTipType type);
 
124
 
121
125
signals:
122
126
    void indexesMoved(const QModelIndexList &indexes);
123
127
    void popupViewClosed();
139
143
    void wheelEvent(QGraphicsSceneWheelEvent *event);
140
144
    void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
141
145
    void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
 
146
    void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
142
147
    void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
143
148
    void dropEvent(QGraphicsSceneDragDropEvent *event);
144
149
    void timerEvent(QTimerEvent *event);
168
173
    void popupCloseRequested();
169
174
    void dropActionTriggered(QAction *action);
170
175
    void dropCompleted();
 
176
    void statResult(KJob *job);
171
177
 
172
178
private:
173
179
    void paintErrorMessage(QPainter *painter, const QRect &rect, const QString &message) const;
175
181
    int rowsForHeight(qreal height) const;
176
182
    QPoint nextGridPosition(const QPoint &prevPos, const QSize &gridSize, const QRect &contentRect) const;
177
183
    QPoint findNextEmptyPosition(const QPoint &prevPos, const QSize &gridSize, const QRect &contentRect) const;
178
 
    KUrl targetFolder(const QModelIndex &index) const;
179
184
    void layoutItems();
180
185
    void alignIconsToGrid();
181
186
    QRect itemsBoundingRect() const;
185
190
    void updateScrollBar();
186
191
    void updateScrollBarGeometry();
187
192
    void updateTextShadows(const QColor &textColor);
188
 
    void updateToolTip(const QModelIndex &index, QWidget *causedWidget = 0);
 
193
    void updateToolTip(QWidget *causedWidget = 0);
189
194
    void createDropActions(const KUrl::List &urls, QActionGroup *actions);
190
195
    QStyleOptionViewItemV4 viewOptions() const;
191
196
 
203
208
    bool m_positionsLoaded;
204
209
    bool m_doubleClick;
205
210
    bool m_dragInProgress;
 
211
    bool m_hoverDrag;
206
212
    bool m_iconsLocked;
207
213
    bool m_alignToGrid;
208
214
    bool m_wordWrap;
225
231
    ToolTipWidget *m_toolTipWidget;
226
232
    QPointer<PopupView> m_popupView;
227
233
    QPointer<QWidget> m_popupCausedWidget;
 
234
    KUrl m_popupUrl;
228
235
    KonqOperations *m_dropOperation;
229
236
    QActionGroup *m_dropActions;
230
237
    QPersistentModelIndex m_popupIndex;