1 /***************************************************************************
2 * Copyright 2007 by Aaron Seigo <aseigo@kde.org *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (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 General Public License *
15 * 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 . *
18 ***************************************************************************/
26 #include <Plasma/Applet>
28 class KPropertiesDialog
;
30 class QGraphicsSceneMouseEvent
;
38 class IconApplet
: public Plasma::Applet
42 IconApplet(QObject
*parent
, const QVariantList
&args
);
46 void setUrl(const KUrl
& url
);
47 void constraintsEvent(Plasma::Constraints constraints
);
48 void setDisplayLines(int displayLines
);
50 QPainterPath
shape() const;
56 void dropEvent(QGraphicsSceneDragDropEvent
*event
);
57 void saveState(KConfigGroup
&cg
) const;
58 void showConfigurationInterface();
61 void acceptedPropertiesDialog();
62 void propertiesDialogClosed();
65 //dropUrls from DolphinDropController
66 void dropUrls(const KUrl::List
& urls
,
67 const KUrl
& destination
,
68 Qt::KeyboardModifiers modifier
);
70 Plasma::IconWidget
* m_icon
;
72 QString m_genericName
;
73 KPropertiesDialog
*m_dialog
;
74 KMimeType::Ptr m_mimetype
;
78 K_EXPORT_PLASMA_APPLET(icon
, IconApplet
)