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

Plasma

plasmawebapplet.h

Go to the documentation of this file.
00001 /*
00002 Copyright (c) 2007 Zack Rusin <zack@kde.org>
00003 Copyright (c) 2008 Petri Damstén <damu@iki.fi>
00004 
00005 Permission is hereby granted, free of charge, to any person obtaining a copy
00006 of this software and associated documentation files (the "Software"), to deal
00007 in the Software without restriction, including without limitation the rights
00008 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00009 copies of the Software, and to permit persons to whom the Software is
00010 furnished to do so, subject to the following conditions:
00011 
00012 The above copyright notice and this permission notice shall be included in
00013 all copies or substantial portions of the Software.
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00016 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00017 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00018 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00019 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00020 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
00021 THE SOFTWARE.
00022 */
00023 
00024 #ifndef PLASMAWEBAPPLET_H
00025 #define PLASMAWEBAPPLET_H
00026 
00027 #include "webapplet.h"
00028 #include "plasmajs.h"
00029 
00030 #include <KTemporaryFile>
00031 
00032 class PlasmaWebApplet : public WebApplet
00033 {
00034     Q_OBJECT
00035     Q_PROPERTY(QString name READ name)
00036     Q_PROPERTY(uint id READ id)
00037     Q_PROPERTY(QString pluginName READ pluginName)
00038     Q_PROPERTY(QString icon READ icon)
00039     Q_PROPERTY(QString category READ category)
00040     Q_PROPERTY(int formFactor READ formFactor)
00041     Q_PROPERTY(int location READ location)
00042 public:
00043     PlasmaWebApplet(QObject *parent, const QVariantList &args);
00044     virtual ~PlasmaWebApplet();
00045 
00046     virtual bool init();
00047 
00048     QString name() const;
00049     uint id() const;
00050     QString pluginName() const;
00051     QString icon() const;
00052     QString category() const;
00053     bool shouldConserveResources() const;
00054     int formFactor() const;
00055     int location() const;
00056 
00057 public slots:
00058     QObject* dataEngine(const QString& name);
00059     QObject* config();
00060     QObject* globalConfig();
00061     void setScrollBarPolicy(int orientation, int policy);
00062     void setDefaultSize(qreal w, qreal h);
00063     QVariantList screenRect();
00064     void setConfigurationRequired(bool needsConfiguring);
00065     QVariantList getContentsMargins();
00066     void resize(qreal w, qreal h);
00067     QVariantList size();
00068     void setBackgroundHints(int hints);
00069     int backgroundHints();
00070     void setAspectRatioMode(int mode);
00071     int aspectRatioMode();
00072     void setMaximumSize(qreal w, qreal h);
00073     QVariantList maximumSize();
00074     void setMinimumSize(qreal w, qreal h);
00075     QVariantList minimumSize();
00076     void setPreferredSize(qreal w, qreal h);
00077     QVariantList preferredSize();
00078     void setGeometry(qreal x, qreal y, qreal w, qreal h);
00079     QVariantList geometry();
00080     void setPos(qreal x, qreal y);
00081     QVariantList pos();
00082 
00083     QVariant arg(int index) const;
00084     QObject* objArg(int index) const;
00085     void dataUpdated(const QString& source, const Plasma::DataEngine::Data &data);
00086     void configChanged();
00087     void themeChanged();
00088     void makeStylesheet();
00089 
00090 protected:
00091     QVariant callJsFunction(const QString &func, const QVariantList &args = QVariantList());
00092     void constraintsEvent(Plasma::Constraints constraints);
00093 
00094 protected slots:
00095     virtual void loadFinished(bool success);
00096     virtual void initJsObjects();
00097 
00098 private:
00099     QVariantList m_args;
00100     DataEngineDataWrapper m_dataEngineData;
00101     ConfigGroupWrapper m_config;
00102     ConfigGroupWrapper m_globalConfig;
00103     KTemporaryFile m_temp;
00104     bool m_useDefaultSize;
00105     static QString m_jsConstants;
00106 };
00107 
00108 #endif

Plasma

Skip menu "Plasma"
  • 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