very war enable of components

they will still not work due theme not being defined yet
This commit is contained in:
Marco Martin 2013-02-06 13:37:56 +01:00
parent 8516ec516f
commit 3777ae67ef
55 changed files with 89 additions and 78 deletions

View File

@ -2,6 +2,6 @@ add_subdirectory(core)
#add_subdirectory(draganddrop)
#add_subdirectory(krunnermodel)
#add_subdirectory(qtextracomponents)
#add_subdirectory(plasmacomponents)
add_subdirectory(plasmacomponents)
#add_subdirectory(plasmaextracomponents)
#add_subdirectory(locale)

View File

@ -183,4 +183,4 @@ void DeclarativeItemContainer::preferredHeightChanged()
setPreferredHeight(preferredHeight);
}
#include "declarativeitemcontainer_p.moc"
#include "declarativeitemcontainer.moc"

View File

@ -1,27 +1,39 @@
project(plasmacomponents)
find_package(KDeclarative REQUIRED)
set(plasmacomponents_SRCS
fullscreensheet.cpp
fullscreenwindow.cpp
#fullscreensheet.cpp
#fullscreenwindow.cpp
plasmacomponentsplugin.cpp
qrangemodel.cpp
enums.cpp
qmenu.cpp
qmenuitem.cpp
../core/declarativeitemcontainer.cpp
#../core/declarativeitemcontainer.cpp
)
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
${KDECLARATIVE_INCLUDE_DIR}
)
qt4_automoc(${plasmacomponents_SRCS})
set(IMPORTS_INSTALL_DIR "qml")
message("!!! Forcing Imports install location: ${IMPORTS_INSTALL_DIR}")
add_library(plasmacomponentsplugin SHARED ${plasmacomponents_SRCS})
target_link_libraries(plasmacomponentsplugin ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBRARY} ${KDECLARATIVE_LIBRARIES} ${KDE4_PLASMA_LIBS})
target_link_libraries(plasmacomponentsplugin
${QT_QTCORE_LIBRARY}
${Qt5Quick_LIBRARIES}
${Qt5Qml_LIBRARIES}
${QT_QTGUI_LIBRARY}
${KDE4_KDEUI_LIBRARY}
${KDECLARATIVE_LIBRARIES}
plasma)
install(TARGETS plasmacomponentsplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/components)

View File

@ -21,4 +21,4 @@
#include "enums.moc"
#include "moc_enums.cpp"

View File

@ -22,7 +22,6 @@
#include <QObject>
#include <QtDeclarative/qdeclarative.h>
class DialogStatus : public QObject
{

View File

@ -19,10 +19,9 @@
#include "plasmacomponentsplugin.h"
#include <QtDeclarative/qdeclarative.h>
#include <QtDeclarative/QDeclarativeEngine>
#include <QtDeclarative/QDeclarativeContext>
#include <QtDeclarative/QDeclarativeItem>
#include <QQmlEngine>
#include <QQmlContext>
#include <QQuickItem>
#include "qrangemodel.h"
@ -35,9 +34,9 @@
#include "enums.h"
#include "qmenu.h"
#include "qmenuitem.h"
#include "fullscreensheet.h"
//#include "fullscreensheet.h"
Q_EXPORT_PLUGIN2(plasmacomponentsplugin, PlasmaComponentsPlugin)
//Q_EXPORT_PLUGIN2(plasmacomponentsplugin, PlasmaComponentsPlugin)
class BKSingleton
{
@ -55,7 +54,7 @@ EngineBookKeeping *EngineBookKeeping::self()
return &privateBKSelf->self;
}
QDeclarativeEngine *EngineBookKeeping::engine() const
QQmlEngine *EngineBookKeeping::engine() const
{
//for components creation, any engine will do, as long is valid
if (m_engines.isEmpty()) {
@ -66,7 +65,7 @@ QDeclarativeEngine *EngineBookKeeping::engine() const
}
}
void EngineBookKeeping::insertEngine(QDeclarativeEngine *engine)
void EngineBookKeeping::insertEngine(QQmlEngine *engine)
{
connect(engine, SIGNAL(destroyed(QObject *)),
this, SLOT(engineDestroyed(QObject *)));
@ -75,14 +74,14 @@ void EngineBookKeeping::insertEngine(QDeclarativeEngine *engine)
void EngineBookKeeping::engineDestroyed(QObject *deleted)
{
m_engines.remove(static_cast<QDeclarativeEngine *>(deleted));
m_engines.remove(static_cast<QQmlEngine *>(deleted));
}
void PlasmaComponentsPlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri)
void PlasmaComponentsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
{
QDeclarativeExtensionPlugin::initializeEngine(engine, uri);
QQmlExtensionPlugin::initializeEngine(engine, uri);
EngineBookKeeping::self()->insertEngine(engine);
}
@ -96,7 +95,7 @@ void PlasmaComponentsPlugin::registerTypes(const char *uri)
qmlRegisterType<QMenuProxy>(uri, 0, 1, "Menu");
qmlRegisterType<QMenuItem>(uri, 0, 1, "MenuItem");
} else {
qmlRegisterType<FullScreenSheet>(uri, 0, 1, "Sheet");
// qmlRegisterType<FullScreenSheet>(uri, 0, 1, "Sheet");
}
qmlRegisterType<Plasma::QRangeModel>(uri, 0, 1, "RangeModel");
@ -107,5 +106,5 @@ void PlasmaComponentsPlugin::registerTypes(const char *uri)
}
#include "plasmacomponentsplugin.moc"
#include "moc_plasmacomponentsplugin.cpp"

View File

@ -20,11 +20,11 @@
#ifndef PLASMACOMPONENTSPLUGIN_H
#define PLASMACOMPONENTSPLUGIN_H
#include <QDeclarativeExtensionPlugin>
#include <QQmlExtensionPlugin>
#include <QSet>
class QDeclarativeEngine;
class QDeclarativeItem;
class QQmlEngine;
class QQuickItem;
class PlasmaComponentsPlugin;
class EngineBookKeeping : public QObject
@ -35,22 +35,23 @@ public:
EngineBookKeeping();
static EngineBookKeeping *self();
void insertEngine(QDeclarativeEngine *engine);
QDeclarativeEngine *engine() const;
void insertEngine(QQmlEngine *engine);
QQmlEngine *engine() const;
private Q_SLOTS:
void engineDestroyed(QObject *deleted);
private:
QSet <QDeclarativeEngine*> m_engines;
QSet <QQmlEngine*> m_engines;
};
class PlasmaComponentsPlugin : public QDeclarativeExtensionPlugin
class PlasmaComponentsPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
void initializeEngine(QDeclarativeEngine *engine, const char *uri);
void initializeEngine(QQmlEngine *engine, const char *uri);
void registerTypes(const char *uri);
};

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.qtextracomponents 0.1

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "." 0.1

View File

@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
Item {

View File

@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
/**
* Just provided for compatibility

View File

@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import "private/SectionScroller.js" as Sections
import org.kde.plasma.core 0.1 as PlasmaCore

View File

@ -40,7 +40,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private/AppManager.js" as Utils
import "." 0.1

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.qtextracomponents 0.1
import "EditBubble.js" as EditBubbleHelper

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.qtextracomponents 0.1
import "EditBubble.js" as EditBubbleHelper

View File

@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
Item {

View File

@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.0
Item {
id: root

View File

@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
/**

View File

@ -28,7 +28,7 @@
* theme which changes via the systemsetting-workspace appearance -desktop
* theme.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private

View File

@ -39,7 +39,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import "ButtonGroup.js" as Behavior
/**

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private

View File

@ -40,7 +40,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "." 0.1

View File

@ -40,7 +40,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.components 0.1
/**

View File

@ -40,7 +40,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private/AppManager.js" as Utils
import "." 0.1

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
/**

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
/**

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private/Config.js" as Config

View File

@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import "." 0.1

View File

@ -43,7 +43,7 @@
// The PageStack item defines a container for pages and a stack-based
// navigation model. Pages can be defined as QML items or components.
import QtQuick 1.1
import QtQuick 2.0
import "." 0.1
import "private/PageStack.js" as Engine

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.qtextracomponents 0.1

View File

@ -40,7 +40,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.extras 0.1 as PlasmaExtras
import "." 0.1

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private

View File

@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private

View File

@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import "private/SectionScroller.js" as Sections
import org.kde.plasma.core 0.1 as PlasmaCore

View File

@ -40,7 +40,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "." 0.1

View File

@ -40,7 +40,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private/AppManager.js" as Utils
import "." 0.1

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private

View File

@ -40,7 +40,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private

View File

@ -40,7 +40,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import "private/AppManager.js" as Utils
import org.kde.plasma.core 0.1 as PlasmaCore

View File

@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import "private/TabGroup.js" as Engine
import "." 0.1

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private
@ -122,7 +122,7 @@ FocusScope {
* integers between 11 and 31 into the text input:
*
* @code
* import QtQuick 1.0
* import QtQuick 2.0
* TextInput {
* validator: IntValidator { bottom: 11; top: 31 }
* focus: true

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
/**

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import "." 0.1
/**

View File

@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private

View File

@ -33,7 +33,7 @@ TODO i need more info here
Properties:
**/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
Item {

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
/**

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.plasma.extras 0.1 as PlasmaExtras
import org.kde.plasma.components 0.1 as PlasmaComponents

View File

@ -34,7 +34,7 @@ Properties:
TODO needs more info??
**/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
Item {

View File

@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore

View File

@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore

View File

@ -54,7 +54,7 @@ Properties:
**/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.qtextracomponents 0.1
import "AppManager.js" as Utils

View File

@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.0
import QtQuick 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
Item {