diff --git a/CMakeLists.txt b/CMakeLists.txt index 32c5d41ae..128ebfb6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,9 @@ install( FILES plasma_export.h svg.h theme.h + DESTINATION ${INCLUDE_INSTALL_DIR}/plasma ) + +install( FILES widgets/icon.h widgets/layout.h widgets/layoutitem.h @@ -57,7 +60,7 @@ install( FILES widgets/radiobutton.h widgets/vboxlayout.h widgets/widget.h - DESTINATION ${INCLUDE_INSTALL_DIR}/plasma ) + DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/widgets ) install( FILES includes/Applet diff --git a/abstractrunner.h b/abstractrunner.h index c861e59ab..0e1e3fa64 100644 --- a/abstractrunner.h +++ b/abstractrunner.h @@ -22,7 +22,7 @@ #include #include -#include +#include class KActionCollection; class QAction; diff --git a/applet.cpp b/applet.cpp index 2671916cc..702f01418 100644 --- a/applet.cpp +++ b/applet.cpp @@ -121,18 +121,20 @@ KConfigGroup Applet::globalAppletConfig() const return KConfigGroup(d->globalConfig, "General"); } -bool Applet::loadDataEngine( const QString& name ) +DataEngine* Applet::dataEngine(const QString& name) { - if ( d->loadedEngines.indexOf( name ) != -1 ) { - return true; + int index = d->loadedEngines.indexOf(name); + if (index != -1) { + return DataEngineManager::self()->dataEngine(name); } - if ( DataEngineManager::self()->loadDataEngine( name ) ) { - d->loadedEngines.append( name ); - return true; + DataEngine* engine = DataEngineManager::self()->loadDataEngine(name); + if (engine) { + d->loadedEngines.append(name); + return engine; } - return false; + return 0; } void Applet::constraintsUpdated() diff --git a/applet.h b/applet.h index a17e806fb..9dc99576e 100644 --- a/applet.h +++ b/applet.h @@ -26,11 +26,13 @@ #include #include -#include -#include +#include namespace Plasma { + +class DataEngine; + /** * @short The base Applet (Plasmoid) class * @@ -92,7 +94,7 @@ class PLASMA_EXPORT Applet : public QObject, public QGraphicsItemGroup * * @return returns true on success, false on failure */ - bool loadDataEngine( const QString& name ); + DataEngine* dataEngine(const QString& name); /** * called when any of the geometry constraints have been updated diff --git a/appletLayout.h b/appletLayout.h index 2b6602454..d66a8a690 100644 --- a/appletLayout.h +++ b/appletLayout.h @@ -4,7 +4,7 @@ #include #include -#include +#include class QLayoutItem; class QRect; diff --git a/corona.h b/corona.h index d70030b3c..4fad628c0 100644 --- a/corona.h +++ b/corona.h @@ -23,7 +23,7 @@ #include "applet.h" #include "plasma.h" -#include "plasma_export.h" +#include "plasma/plasma_export.h" namespace Plasma { diff --git a/dataengine.h b/dataengine.h index fb916bda9..738517caf 100644 --- a/dataengine.h +++ b/dataengine.h @@ -26,7 +26,7 @@ #include -#include +#include namespace Plasma { diff --git a/dataenginemanager.h b/dataenginemanager.h index 296c8e922..c3232eae0 100644 --- a/dataenginemanager.h +++ b/dataenginemanager.h @@ -20,7 +20,7 @@ #define PLASMA_ENGINE_MANAGER_H #include -#include "dataengine.h" +#include "plasma/dataengine.h" namespace Plasma { diff --git a/datasource.h b/datasource.h index 1f29f0830..aaa779505 100644 --- a/datasource.h +++ b/datasource.h @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include namespace Plasma { diff --git a/plasma.h b/plasma.h index e72997809..1d9e9eeae 100644 --- a/plasma.h +++ b/plasma.h @@ -19,7 +19,7 @@ #ifndef PLASMA_DEFS_H #define PLASMA_DEFS_H -#include +#include /** * Namespace for everything in libplasma diff --git a/svg.h b/svg.h index 17832802b..d513c9ddd 100644 --- a/svg.h +++ b/svg.h @@ -21,7 +21,7 @@ #include -#include +#include class QPainter; class QPoint; diff --git a/theme.h b/theme.h index 2b92dbdb9..2a01b128e 100644 --- a/theme.h +++ b/theme.h @@ -21,7 +21,7 @@ #include -#include +#include namespace Plasma { diff --git a/widgets/checkbox.h b/widgets/checkbox.h index aef56e87b..1ebf8ee17 100644 --- a/widgets/checkbox.h +++ b/widgets/checkbox.h @@ -22,9 +22,9 @@ #include #include -#include +#include -#include +#include //TODO //Please Document this class diff --git a/widgets/icon.h b/widgets/icon.h index e83c1de0a..60431259e 100644 --- a/widgets/icon.h +++ b/widgets/icon.h @@ -22,9 +22,9 @@ #include #include -#include -#include -#include +#include +#include +#include //TODO //Please Document this class diff --git a/widgets/layout.h b/widgets/layout.h index 3c140b7e2..ec215807c 100644 --- a/widgets/layout.h +++ b/widgets/layout.h @@ -22,9 +22,8 @@ #include #include -#include - -#include "layoutitem.h" +#include +#include namespace Plasma { diff --git a/widgets/layoutitem.h b/widgets/layoutitem.h index f66ca7275..6c366d654 100644 --- a/widgets/layoutitem.h +++ b/widgets/layoutitem.h @@ -22,7 +22,7 @@ #include #include -#include +#include namespace Plasma { diff --git a/widgets/lineedit.h b/widgets/lineedit.h index 373025c9d..2b7002fe3 100644 --- a/widgets/lineedit.h +++ b/widgets/lineedit.h @@ -22,10 +22,10 @@ #include #include -#include +#include -#include -#include +#include +#include namespace Plasma { diff --git a/widgets/pushbutton.h b/widgets/pushbutton.h index 9f447829a..bac0c2153 100644 --- a/widgets/pushbutton.h +++ b/widgets/pushbutton.h @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include //TODO //Please Document this class diff --git a/widgets/radiobutton.h b/widgets/radiobutton.h index 358f4e404..311887850 100644 --- a/widgets/radiobutton.h +++ b/widgets/radiobutton.h @@ -24,9 +24,9 @@ #include // KDE includes -#include +#include -#include +#include namespace Plasma { diff --git a/widgets/vboxlayout.h b/widgets/vboxlayout.h index 8c91f8ae0..fa35be151 100644 --- a/widgets/vboxlayout.h +++ b/widgets/vboxlayout.h @@ -22,9 +22,8 @@ #include #include -#include - -#include "layout.h" +#include +#include namespace Plasma { diff --git a/widgets/widget.h b/widgets/widget.h index 7efd05730..52b4f22cf 100644 --- a/widgets/widget.h +++ b/widgets/widget.h @@ -25,9 +25,8 @@ #include #include -#include - -#include "layoutitem.h" +#include +#include namespace Plasma {