Applets
quicklaunchIcon.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2008 by Lukas Appelhans * 00003 * l.appelhans@gmx.de * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 00019 ***************************************************************************/ 00020 #ifndef QUICKLAUNCHICON_H 00021 #define QUICKLAUNCHICON_H 00022 00023 #include <plasma/widgets/iconwidget.h> 00024 00025 #include <KUrl> 00026 #include <KIcon> 00027 00028 class QAction; 00029 class QGraphicsContextMenuEvent; 00030 class QuicklaunchApplet; 00031 00032 class QuicklaunchIcon : public Plasma::IconWidget 00033 { 00034 Q_OBJECT 00035 public: 00042 QuicklaunchIcon(const KUrl & appUrl, const KIcon & icon, QuicklaunchApplet *parent); 00043 00047 ~QuicklaunchIcon(); 00048 00053 KUrl url() const; 00054 00055 public slots: 00059 void execute(); 00060 00061 protected: 00062 void contextMenuEvent(QGraphicsSceneContextMenuEvent *event); 00063 //bool eventFilter(QObject * object, QEvent * event); 00064 00065 private: 00066 QuicklaunchApplet *m_launcher; 00067 KUrl m_appUrl; 00068 QAction *m_removeAction; 00069 }; 00070 00071 #endif