Applets
trash.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef TRASH_H
00022 #define TRASH_H
00023
00024 #include <KUrl>
00025 #include <QAction>
00026 #include <KMenu>
00027 #include <QGraphicsView>
00028 #include <KFileItem>
00029 #include <KDirLister>
00030
00031 #include <Plasma/Applet>
00032
00033 class QAction;
00034
00035 class KCModuleProxy;
00036 class KFilePlacesModel;
00037 class KProcess;
00038 class KPropertiesDialog;
00039
00040 namespace Plasma
00041 {
00042 class IconWidget;
00043 }
00044
00045 class Trash : public Plasma::Applet
00046 {
00047 Q_OBJECT
00048 public:
00049 Trash(QObject *parent, const QVariantList &args);
00050 virtual QList<QAction*> contextualActions();
00051 ~Trash();
00052
00053 void init();
00054 void constraintsEvent(Plasma::Constraints constraints);
00055
00056 public slots:
00057 void slotOpen();
00058 void slotEmpty();
00059
00060 protected:
00061 void dropEvent(QGraphicsSceneDragDropEvent *event);
00062 void createConfigurationInterface(KConfigDialog *parent);
00063 void createMenu();
00064 void updateIcon();
00065
00066 protected slots:
00067 void popup();
00068 void slotClear();
00069 void slotCompleted();
00070 void slotDeleteItem(const KFileItem &);
00071 void slotApplyConfig();
00072 void emptyFinished(int exitCode, QProcess::ExitStatus exitStatus);
00073
00074 private:
00075 Plasma::IconWidget* m_icon;
00076 QList<QAction*> actions;
00077 KDirLister *m_dirLister;
00078 KMenu m_menu;
00079 QAction *emptyTrash;
00080 int m_count;
00081 bool m_showText;
00082 KFilePlacesModel *m_places;
00083 KCModuleProxy *m_proxy;
00084 KProcess *m_emptyProcess;
00085 };
00086
00087 K_EXPORT_PLASMA_APPLET(trash, Trash)
00088
00089 #endif