• Skip to content
  • Skip to link menu
KDE 4.1 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.h>
00032 
00033 class KPropertiesDialog;
00034 class KFilePlacesModel;
00035 class QAction;
00036 
00037 namespace Plasma
00038 {
00039     class Icon;
00040 }
00041 
00042 class Trash : public Plasma::Applet
00043 {
00044     Q_OBJECT
00045     public:
00046         Trash(QObject *parent, const QVariantList &args);
00047         virtual QList<QAction*> contextualActions();
00048         ~Trash();
00049 
00050         void init();
00051         void constraintsEvent(Plasma::Constraints constraints);
00052         
00053     public slots:
00054         void slotOpen();
00055         void slotEmpty();
00056 
00057     protected:
00058         void dropEvent(QGraphicsSceneDragDropEvent *event);
00059         void createMenu();
00060         void setIcon();
00061 
00062     protected slots:
00063         void popup();
00064         void slotClear();
00065         void slotCompleted();
00066         void slotDeleteItem(const KFileItem &);
00067 
00068     private:
00069         Plasma::Icon* m_icon;
00070         QList<QAction*> actions;
00071         KPropertiesDialog *m_dialog;
00072         KDirLister *m_dirLister;
00073         KUrl m_trashUrl;
00074         KMenu m_menu;
00075         QAction *emptyTrash;
00076         int m_count;
00077         bool m_showText;
00078         //FIXME PORT TO TOOLTIP MANAGER
00079     //Plasma::ToolTipData m_data;
00080         KFilePlacesModel *m_places;
00081 };
00082 
00083 K_EXPORT_PLASMA_APPLET(trash, Trash)
00084 
00085 #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
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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