• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • plasma
containmentactions.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 Chani Armitage <chani@kde.org>
3
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library General Public License as
6 * published by the Free Software Foundation; either version 2, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20#ifndef PLASMA_CONTAINMENTACTIONS_H
21#define PLASMA_CONTAINMENTACTIONS_H
22
23#include <QList>
24
25#include <kplugininfo.h>
26
27#include <plasma/plasma.h>
28#include <plasma/packagestructure.h>
29#include <plasma/version.h>
30
31class QAction;
32
33namespace Plasma
34{
35
36class DataEngine;
37class Containment;
38class ContainmentActionsPrivate;
39
55class PLASMA_EXPORT ContainmentActions : public QObject
56{
57 Q_OBJECT
58 Q_PROPERTY(QString name READ name)
59 Q_PROPERTY(QString pluginName READ pluginName)
60 Q_PROPERTY(QString icon READ icon)
61
62 public:
66 explicit ContainmentActions(QObject * parent = 0);
67
68 ~ContainmentActions();
69
75 static KPluginInfo::List listContainmentActionsInfo();
76
89 static ContainmentActions *load(Containment *parent, const QString &name, const QVariantList &args = QVariantList());
90
103 static ContainmentActions *load(Containment *parent, const KPluginInfo &info, const QVariantList &args = QVariantList());
104
108 static PackageStructure::Ptr packageStructure();
109
116 QString name() const;
117
121 QString pluginName() const;
122
126 QString icon() const;
127
131 bool isInitialized() const;
132
138 void restore(const KConfigGroup &config);
139
144 virtual void save(KConfigGroup &config);
145
150 virtual QWidget *createConfigurationInterface(QWidget *parent);
151
155 virtual void configurationAccepted();
156
163 virtual void contextEvent(QEvent *event);
164
170 virtual QList<QAction*> contextualActions();
171
190 Q_INVOKABLE DataEngine *dataEngine(const QString &name) const;
191
196 bool configurationRequired() const;
197
202 static QString eventToString(QEvent *event);
203
212 QPoint popupPosition(const QSize &s, QEvent *event);
213
217 bool event(QEvent *e);
218
223 void setContainment(Containment *newContainment);
224
225 protected:
234 ContainmentActions(QObject *parent, const QVariantList &args);
235
241 virtual void init(const KConfigGroup &config);
242
250 void setConfigurationRequired(bool needsConfiguring = true);
251
255 Containment *containment();
256
260 void paste(QPointF scenePos, QPoint screenPos);
261
262 private:
263 friend class ContainmentActionsPackage;
264 friend class ContainmentActionsPrivate;
265 ContainmentActionsPrivate *const d;
266};
267
268} // Plasma namespace
269
273#define K_EXPORT_PLASMA_CONTAINMENTACTIONS(libname, classname) \
274K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
275K_EXPORT_PLUGIN(factory("plasma_containmentactions_" #libname)) \
276K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION)
277
278#endif // PLASMA_CONTAINMENTACTIONS_H
Plasma::ContainmentActions
The base ContainmentActions class.
Definition: containmentactions.h:56
Plasma::Containment
The base class for plugins that provide backgrounds and applet grouping containers.
Definition: containment.h:73
Plasma::DataEngine
Data provider for plasmoids (Plasma plugins)
Definition: dataengine.h:59
Plasma::PackageStructure::Ptr
KSharedPtr< PackageStructure > Ptr
Definition: packagestructure.h:77
QObject
QWidget
Plasma
Namespace for everything in libplasma.
Definition: abstractdialogmanager.cpp:25
Plasma::packageStructure
PackageStructure::Ptr packageStructure(const QString &language, ComponentType type)
Loads an appropriate PackageStructure for the given language and type.
Definition: scriptengine.cpp:274
packagestructure.h
plasma.h
version.h
<Plasma/Version>
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal