• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Applets

trash.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright 2007 by Marco Martin <notmart@gmail.com>                    *
00003  *                                                                         *
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 
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

Applets

Skip menu "Applets"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal