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

Plasma

datacontainer.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2006-2007 Aaron Seigo <aseigo@kde.org>
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU Library General Public License as
00006  *   published by the Free Software Foundation; either version 2, 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 Library General Public
00015  *   License 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 PLASMA_DATACONTAINER_H
00021 #define PLASMA_DATACONTAINER_H
00022 
00023 #include <QtCore/QHash>
00024 #include <QtCore/QObject>
00025 
00026 #include <plasma/plasma_export.h>
00027 #include <plasma/dataengine.h>
00028 
00029 namespace Plasma
00030 {
00031 
00032 class DataContainerPrivate;
00033 
00061 class PLASMA_EXPORT DataContainer : public QObject
00062 {
00063     friend class DataEngine;
00064     friend class DataEnginePrivate;
00065     Q_OBJECT
00066 
00067     public:
00072         explicit DataContainer(QObject *parent = 0);
00073         virtual ~DataContainer();
00074 
00078         const DataEngine::Data data() const;
00079 
00095         void setData(const QString &key, const QVariant &value);
00096 
00105         void removeAllData();
00106 
00110         bool visualizationIsConnected(QObject *visualization) const;
00111 
00122         void connectVisualization(QObject *visualization, uint pollingInterval,
00123                                   Plasma::IntervalAlignment alignment);
00124 
00125     public Q_SLOTS:
00132         void disconnectVisualization(QObject *visualization);
00133 
00134     Q_SIGNALS:
00146         void dataUpdated(const QString &source, const Plasma::DataEngine::Data &data);
00147 
00157         void becameUnused(const QString &source);
00158 
00172         void updateRequested(DataContainer *source);
00173 
00174     protected:
00178         void checkForUpdate();
00179 
00187         uint timeSinceLastUpdate() const;
00188 
00197         void setNeedsUpdate(bool update = true);
00198 
00199     protected Q_SLOTS:
00208         void checkUsage();
00209 
00210     private:
00211         friend class SignalRelay;
00212         DataContainerPrivate *const d;
00213 };
00214 
00215 } // Plasma namespace
00216 
00217 #endif // multiple inclusion guard

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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