2 * Copyright (C) 2007 Ivan Cukic <ivan.cukic+kde@gmail.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library/Lesser General Public License
6 * version 2, or (at your option) any later version, as published by the
7 * Free Software Foundation
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/Lesser 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.
20 #ifndef APPLETBROWSERWINDOW_H_
21 #define APPLETBROWSERWINDOW_H_
23 #include <KDE/KDialog>
25 #include <plasma/plasma_export.h>
34 class PLASMA_EXPORT AppletBrowserWidget
: public QWidget
38 AppletBrowserWidget(Plasma::Containment
*containment
, QWidget
*parent
= 0, Qt::WindowFlags f
= 0);
39 virtual ~AppletBrowserWidget();
41 void setApplication(const QString
& application
= QString());
42 QString
application();
45 * Changes the current default containment to add applets to
47 * @arg containment the new default
49 void setContainment(Plasma::Containment
*containment
);
52 * @return the current default containment to add applets to
54 Containment
* containment() const;
58 * Adds currently selected applets
63 * Tracks a new running applet
65 void appletAdded(Plasma::Applet
* applet
);
68 * A running applet is no more
70 void appletDestroyed(QObject
* applet
);
73 * Destroy all applets with this name
75 void destroyApplets(const QString
&name
);
78 * Launches a download dialog to retrieve new applets from the Internet
80 void downloadWidgets();
83 * Opens a file dialog to open a widget from a local file
85 void openWidgetFile();
89 void initRunningApplets();
94 class PLASMA_EXPORT AppletBrowser
: public KDialog
98 explicit AppletBrowser(Plasma::Containment
*containment
, QWidget
*parent
= 0, Qt::WindowFlags f
= 0);
99 virtual ~AppletBrowser();
101 void setApplication(const QString
& application
= QString());
102 QString
application();
105 * Changes the current default containment to add applets to
107 * @arg containment the new default
109 void setContainment(Plasma::Containment
*containment
);
112 * @return the current default containment to add applets to
114 Containment
* containment() const;
121 } // namespace Plasma
123 #endif /*APPLETBROWSERWINDOW_H_*/