Cleanup, add docs, copyright

This commit is contained in:
Sebastian Kügler 2012-03-15 20:47:25 +01:00
parent 4b9a633c73
commit 85735ce130
3 changed files with 18 additions and 23 deletions

View File

@ -1,7 +1,6 @@
project(plasmaextracomponents) project(plasmaextracomponents)
set(plasmaextracomponents_SRCS set(plasmaextracomponents_SRCS
#../core/declarativeitemcontainer.cpp
plasmaextracomponentsplugin.cpp plasmaextracomponentsplugin.cpp
) )
@ -15,14 +14,13 @@ qt4_automoc(${plasmaextracomponents_SRCS})
add_library(plasmaextracomponentsplugin SHARED ${plasmaextracomponents_SRCS}) add_library(plasmaextracomponentsplugin SHARED ${plasmaextracomponents_SRCS})
target_link_libraries(plasmaextracomponentsplugin ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBRARY} ${KDE4_PLASMA_LIBS}) target_link_libraries(plasmaextracomponentsplugin ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_PLASMA_LIBS})
install(TARGETS plasmaextracomponentsplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/extras) install(TARGETS plasmaextracomponentsplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/extras)
install(DIRECTORY qml/ DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/extras) install(DIRECTORY qml/ DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/extras)
# The platform specific stuff, overwrites a copy of the desktop one # The platform specific stuff, overwrites a copy of the desktop one
# it does install some files on top of the old ones, has to be done # it does install some files on top of the old ones, has to be done
# file by file since if some component from the generic set is more # file by file since if some component from the generic set is more

View File

@ -1,5 +1,4 @@
/* /*
* Copyright 2011 by Marco Martin <mart@kde.org>
* Copyright 2012 by Sebastian Kügler <sebas@kde.org> * Copyright 2012 by Sebastian Kügler <sebas@kde.org>
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -21,26 +20,24 @@
#include "plasmaextracomponentsplugin.h" #include "plasmaextracomponentsplugin.h"
#include <QtDeclarative/qdeclarative.h> #include <QtDeclarative/qdeclarative.h>
#include <QtDeclarative/QDeclarativeEngine>
#include <QtDeclarative/QDeclarativeContext>
#include <QtDeclarative/QDeclarativeItem>
#include <KSharedConfig> // #include <KSharedConfig>
#include <KConfigGroup> // #include <KConfigGroup>
#include <KDebug>
void PlasmaExtraComponentsPlugin::registerTypes(const char *uri) void PlasmaExtraComponentsPlugin::registerTypes(const char *uri)
{ {
Q_ASSERT(uri == QLatin1String("org.kde.plasma.extras")); Q_ASSERT(uri == QLatin1String("org.kde.plasma.extras"));
/*
// Enable when adding touch-specific components
QString componentsPlatform = getenv("KDE_PLASMA_COMPONENTS_PLATFORM"); QString componentsPlatform = getenv("KDE_PLASMA_COMPONENTS_PLATFORM");
if (componentsPlatform.isEmpty()) { if (componentsPlatform.isEmpty()) {
KConfigGroup cg(KSharedConfig::openConfig("kdeclarativerc"), "Components-platform"); KConfigGroup cg(KSharedConfig::openConfig("kdeclarativerc"), "Components-platform");
componentsPlatform = cg.readEntry("name", "desktop"); componentsPlatform = cg.readEntry("name", "desktop");
} }
// Register types... */
// Register additional types here...
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011 by Marco Martin <mart@kde.org> * Copyright 2012 by Sebastian Kügler <sebas@kde.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -19,28 +19,28 @@
/**Documented API /**Documented API
Inherits: Inherits:
Text Label
Imports: Imports:
QtQuick 1.1 QtQuick 1.1
org.kde.plasma.core org.kde.plasma.components
Description: Description:
This is a label which uses the plasma theme. This is a title label which uses the plasma theme.
The characteristics of the text will be automatically seted The characteristics of the text will be automatically set
according to the plasma theme. If you need a more customized according to the plasma theme. Use this components for titles
text,then you can use the Text component from QtQuick. in your UI, for example page or section titles.
Properties: Properties:
string text: string text:
The most important property is "text". The most important property is "text", which applies to the text property of Label
For the other ones see the primitive QML Text element For the other ones see Plasma Component's Label or QML primitive Text element
Methods: Methods:
See the primitive QML Text element See Plasma Component's Label and primitive QML Text element
Signals: Signals:
See the primitive QML Text element See Plasma Component's Label and primitive QML Text element
**/ **/
import QtQuick 1.1 import QtQuick 1.1