add a test containment

This commit is contained in:
Marco Martin 2013-02-04 16:43:55 +01:00
parent 60b37cff34
commit 274e4372c5
5 changed files with 52 additions and 1 deletions

View File

@ -51,3 +51,4 @@ target_link_libraries(testplasma2
install(TARGETS testplasma2 ${INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS testplasma2 ${INSTALL_TARGETS_DEFAULT_ARGS})
add_subdirectory(qmlpackages) add_subdirectory(qmlpackages)
add_subdirectory(testcontainment)

View File

@ -48,7 +48,7 @@ DesktopCorona::~DesktopCorona()
void DesktopCorona::loadDefaultLayout() void DesktopCorona::loadDefaultLayout()
{ {
Plasma::Containment *cont = addContainment("desktop"); Plasma::Containment *cont = addContainment("org.kde.testcontainment");
Plasma::Applet *appl = cont->addApplet("foo"); Plasma::Applet *appl = cont->addApplet("foo");
qDebug() << "Containment:" << cont->name() << "Applet:" << appl->name() << appl; qDebug() << "Containment:" << cont->name() << "Applet:" << appl->name() << appl;
} }

View File

@ -0,0 +1,4 @@
install(DIRECTORY . DESTINATION ${DATA_INSTALL_DIR}/plasma/packages/org.kde.testcontainment PATTERN .svn EXCLUDE PATTERN CMakeLists.txt EXCLUDE PATTERN Messages.sh EXCLUDE)

View File

@ -0,0 +1,30 @@
/*
* Copyright 2013 Marco Martin <mart@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 2.0
//import org.kde.plasma 2.0
import org.kde.plasma.core 0.1 as PlasmaCore
Rectangle {
color: "red"
width: 640
height: 480
}

View File

@ -0,0 +1,16 @@
[Desktop Entry]
Encoding=UTF-8
Keywords=
Name=Containment Test
Type=Service
X-KDE-ServiceTypes=Plasma/Applet,Plasma/Containment
X-KDE-ParentApp=
X-KDE-PluginInfo-Author=Marco Martin
X-KDE-PluginInfo-Category=
X-KDE-PluginInfo-Email=mart@kde.org
X-KDE-PluginInfo-License=GPLv2+
X-KDE-PluginInfo-Name=org.kde.testcontainment
X-KDE-PluginInfo-Version=
X-KDE-PluginInfo-Website=
X-Plasma-MainScript=ui/main.qml