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

Applets

devicenotifier.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Alexis Ménard <darktears31@gmail.com>           *
00003  *                                                                         *
00004  *   This program is free software; you can redistribute it and/or modify  *
00005  *   it under the terms of the GNU General Public License as published by  *
00006  *   the Free Software Foundation; either version 2 of the License, or     *
00007  *   (at your option) any later version.                                   *
00008  *                                                                         *
00009  *   This program is distributed in the hope that it will be useful,       *
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00012  *   GNU General Public License for more details.                          *
00013  *                                                                         *
00014  *   You should have received a copy of the GNU General Public License     *
00015  *   along with this program; if not, write to the                         *
00016  *   Free Software Foundation, Inc.,                                       *
00017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
00018  ***************************************************************************/
00019 
00020 #ifndef DEVICENOTIFIER_H
00021 #define DEVICENOTIFIER_H
00022 
00023 //Solid
00024 #include <solid/solidnamespace.h>
00025 
00026 //Plasma
00027 #include <Plasma/PopupApplet>
00028 #include <Plasma/DataEngine>
00029 #include <Plasma/ToolTipManager>
00030 
00031 class QStandardItemModel;
00032 class QGraphicsLinearLayout;
00033 class QGraphicsProxyWidget;
00034 class QTimer;
00035 
00036 class KIcon;
00037 
00038 namespace Notifier
00039 {
00040     class NotifierDialog;
00041 }
00042 
00043 //desktop view
00044 namespace Plasma
00045 {
00046     class IconWidget;
00047 }
00048 
00053 class DeviceNotifier : public Plasma::PopupApplet
00054 {
00055     Q_OBJECT
00056 
00057     public:
00062         DeviceNotifier(QObject *parent, const QVariantList &args);
00063         
00067         ~DeviceNotifier();
00068         
00072         void init();
00073 
00077         void changeNotifierIcon(const QString& name = QString());
00078 
00082         QWidget *widget();
00083 
00084     protected:
00085         void popupEvent(bool show);
00086 
00087     public slots:
00091          void toolTipAboutToShow();
00092 
00096          void toolTipHidden();
00097     
00098     protected slots:
00103         void onSourceAdded(const QString &name);
00104 
00109         void onSourceRemoved(const QString &name);
00110 
00116         void dataUpdated(const QString &source, Plasma::DataEngine::Data data);
00117 
00118     private:
00122         void fillPreviousDevices();
00123 
00127         void notifyDevice(const QString &name);
00128 
00132         void removeLastDeviceNotification(const QString &name);
00133 
00135         Plasma::DataEngine *m_solidEngine;
00136 
00138         Plasma::DataEngine *m_solidDeviceEngine;
00139   
00141         Plasma::IconWidget *m_icon;
00142     
00144         QString m_iconName;
00145 
00147         Notifier::NotifierDialog * m_dialog;
00148         
00150         int m_displayTime;
00151       
00153         int m_numberItems;
00154       
00156         int m_itemsValidity;
00157 
00159         QTimer *m_timer;
00160        
00162         bool isNotificationEnabled;
00163 
00165         QList<QString> m_lastPlugged;
00166 
00168         bool m_fillingPreviousDevices;
00169 };
00170 
00171 #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