2
* Copyright 2009 by Artur Duque de Souza <morpheuz@gmail.com>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU Library General Public License version 2,
7
* or (at your option) any later version.
9
* This program 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
12
* GNU General Public License for more details
14
* You should have received a copy of the GNU Library General Public
15
* License along with this program; if not, write to the
16
* Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24
#include <KConfigGroup>
27
#include <QGraphicsLinearLayout>
28
#include <QGraphicsSceneResizeEvent>
29
#include <QGraphicsWidget>
32
#include <Plasma/RunnerContext>
43
class IconActionCollection;
45
class FavouritesModel;
47
class StripWidget : public QGraphicsWidget
52
StripWidget(QGraphicsWidget *parent = 0);
55
void save(KConfigGroup &cg);
56
void restore(KConfigGroup &cg);
58
void setIconSize(int iconSize);
61
//TODO: geter and setter?
62
void setImmutability(Plasma::ImmutabilityType immutability);
63
void add(const QUrl &url);
66
Plasma::IconWidget *createIcon(const QPointF &point);
67
void focusInEvent(QFocusEvent *event);
68
void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
69
void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
70
void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
71
void dropEvent(QGraphicsSceneDragDropEvent *event);
74
void launchFavourite(const QModelIndex &index);
75
void arrowsNeededChanged(ItemView::ScrollBarFlags flags);
79
void reorderItem(const QModelIndex &index, const QPointF &point);
80
void showDeleteTarget();
86
Plasma::ToolButton *m_leftArrow;
87
Plasma::ToolButton *m_rightArrow;
88
QGraphicsLinearLayout *m_arrowsLayout;
90
QHash<Plasma::IconWidget*, KService::Ptr> m_services;
92
Plasma::RunnerContext *m_context;
93
QTimer *m_scrollTimer;
94
Plasma::IconWidget *m_deleteTarget;
95
IconActionCollection *m_iconActionCollection;
98
bool m_startupCompleted;
99
FavouritesModel *m_favouritesModel;