1
/***************************************************************************
2
* Copyright (C) 2008 by Lukas Appelhans <l.appelhans@gmx.de> *
3
* Copyright (C) 2010 - 2011 by Ingomar Wesp <ingomar@wesp.name> *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19
***************************************************************************/
20
#ifndef QUICKLAUNCH_QUICKLAUNCH_H
21
#define QUICKLAUNCH_QUICKLAUNCH_H
23
#include "ui_quicklaunchConfig.h"
28
#include <QtCore/QObject>
29
#include <QtCore/QPoint>
30
#include <QtCore/QPointF>
31
#include <QtCore/QSize>
32
#include <QtCore/QSizeF>
33
#include <QtCore/QStringList>
36
#include <Plasma/Applet>
47
class QGraphicsLinearLayout;
48
class QGraphicsSceneContextMenuEvent;
53
using Plasma::Constraints;
55
namespace Quicklaunch {
60
class Quicklaunch : public Plasma::Applet
65
Quicklaunch(QObject *parent, const QVariantList &args);
70
void createConfigurationInterface(KConfigDialog *parent);
71
bool eventFilter(QObject *watched, QEvent *event);
74
void constraintsEvent(Constraints constraints);
75
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
79
void iconSizeChanged();
80
void onConfigAccepted();
81
void onLaunchersChanged();
82
void onPopupTriggerClicked();
83
void onAddLauncherAction();
84
void onEditLauncherAction();
85
void onRemoveLauncherAction();
89
const QPoint& screenPos,
95
void updatePopupTrigger();
98
static QStringList defaultLaunchers();
99
static QString defaultBrowserPath();
100
static QString defaultFileManagerPath();
101
static QString defaultEmailClientPath();
103
static QString determineNewDesktopFilePath(const QString &baseName);
105
Ui::quicklaunchConfig uiConfig;
107
LauncherGrid *m_launcherGrid;
109
QGraphicsLinearLayout *m_layout;
110
Plasma::IconWidget *m_popupTrigger;
113
QAction* m_addLauncherAction;
114
QAction* m_editLauncherAction;
115
QAction* m_removeLauncherAction;
117
bool m_contextMenuTriggeredOnPopup;
118
int m_contextMenuLauncherIndex;
122
#endif /* QUICKLAUNCH_QUICKLAUNCH_H */