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 <QModelIndex>
28
#include <Plasma/Applet>
34
* The main window class for the Kickoff launcher. This class is responsible
35
* for creating the various tabs, views and models which make up the launcher's
38
class Launcher : public QWidget
43
/** Construct a new Launcher with the specified parent. */
44
explicit Launcher(QWidget *parent = 0);
45
/** Construct a new Launcher associated with the specified Plasma::Applet. */
46
explicit Launcher(Plasma::Applet *applet = 0);
49
/** Specifies whether the launcher should hide itself when an item is activated. */
50
void setAutoHide(bool autoHide);
51
bool autoHide() const;
53
/** Specifies whether the application names in the launcher should be displayed *
54
before or after the description */
55
void setShowAppsByName(bool showAppByName);
56
bool showAppsByName() const;
58
/** Specifies whether hovering switches between tabs or if a click is required to switch the tabs. */
59
void setSwitchTabsOnHover(bool switchOnHover);
60
bool switchTabsOnHover() const;
62
/** Specifies the number of visible items used to determinate the visible height. */
63
void setVisibleItemCount(int count);
64
int visibleItemCount() const;
66
/** Specifies the plasma applet the launcher is working on. */
67
void setApplet(Plasma::Applet *applet);
69
/** Specifies the direction the launcher is popping up in relative to its icon */
70
void setLauncherOrigin(const Plasma::PopupPlacement placement, Plasma::Location location);
73
virtual bool eventFilter(QObject *object, QEvent *event);
74
virtual QSize minimumSizeHint() const;
75
virtual QSize sizeHint() const;
77
/** Reset the launcher. This is called e.g. by the Kickoff-applet before shown to be sure
78
we don't display old searches and switch back to the favorite-view. */
83
void configNeedsSaving();
86
virtual void keyPressEvent(QKeyEvent *event);
87
virtual void showEvent(QShowEvent *event);
88
virtual void hideEvent(QHideEvent *event);
91
void focusSearchView(const QString& query);
92
void showViewContextMenu(const QPoint& pos);
93
void focusFavoritesView();
94
void resultsAvailable();
95
void updateThemedPalette();
96
void fillBreadcrumbs(const QModelIndex &index);
97
void breadcrumbActivated();
100
void addBreadcrumb(const QModelIndex &index, bool isLeaf);