• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-runtime API Reference
  • KDE Home
  • Contact Us
 

PlasmaExtraComponents

  • sources
  • kde-4.14
  • kde-runtime
  • plasma
  • declarativeimports
  • plasmaextracomponents
plasmaextracomponentsplugin.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2012 by Sebastian Kügler <sebas@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 #include "plasmaextracomponentsplugin.h"
21 
22 #include "appbackgroundprovider_p.h"
23 #include "resourceinstance.h"
24 #include "fallbackcomponent.h"
25 
26 #include <QtDeclarative/qdeclarative.h>
27 #include <QtDeclarative/QDeclarativeEngine>
28 
29 
30 // #include <KSharedConfig>
31 // #include <KConfigGroup>
32 
33 void PlasmaExtraComponentsPlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri)
34 {
35  Q_ASSERT(uri == QLatin1String("org.kde.plasma.extras"));
36  engine->addImageProvider(QLatin1String("appbackgrounds"), new AppBackgroundProvider);
37 }
38 
39 void PlasmaExtraComponentsPlugin::registerTypes(const char *uri)
40 {
41  Q_ASSERT(uri == QLatin1String("org.kde.plasma.extras"));
42  qmlRegisterType<ResourceInstance>(uri, 0, 1, "ResourceInstance");
43  qmlRegisterType<FallbackComponent>(uri, 0, 1, "FallbackComponent");
44 }
45 
46 
47 #include "plasmaextracomponentsplugin.moc"
48 
appbackgroundprovider_p.h
QDeclarativeEngine
PlasmaExtraComponentsPlugin::initializeEngine
void initializeEngine(QDeclarativeEngine *engine, const char *uri)
Definition: plasmaextracomponentsplugin.cpp:33
QDeclarativeEngine::addImageProvider
void addImageProvider(const QString &providerId, QDeclarativeImageProvider *provider)
plasmaextracomponentsplugin.h
fallbackcomponent.h
AppBackgroundProvider
Definition: appbackgroundprovider_p.h:26
QLatin1String
PlasmaExtraComponentsPlugin::registerTypes
void registerTypes(const char *uri)
Definition: plasmaextracomponentsplugin.cpp:39
resourceinstance.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:08:46 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

PlasmaExtraComponents

Skip menu "PlasmaExtraComponents"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kde-runtime API Reference

Skip menu "kde-runtime API Reference"
  • KCMShell
  • KNotify
  • Plasma Runtime
  •     PlasmaCore
  •     DragAndDrop
  •     PlasmaComponents
  •     PlasmaExtraComponents
  •     QtExtraComponents

Search



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