diff --git a/CMakeLists.txt b/CMakeLists.txt index f6d276bd4..9ed80af8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ set(plasma_LIB_SRCS appletbrowser/plasmaappletitemmodel.cpp configxml.cpp containment.cpp + context.cpp corona.cpp datacontainer.cpp dataengine.cpp @@ -134,6 +135,7 @@ set(plasma_LIB_INCLUDES appletbrowser.h configxml.h containment.h + context.h corona.h datacontainer.h dataengine.h @@ -210,6 +212,7 @@ includes/CheckBox includes/ComboBox includes/ConfigXml includes/Containment +includes/Context includes/Corona includes/DataContainer includes/DataEngine @@ -275,3 +278,13 @@ install(FILES install(FILES scripting/plasmoids.knsrc DESTINATION ${CONFIG_INSTALL_DIR}) +# Nepomuk integration +configure_file(ontology/workspace.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/workspace.desktop) + +install(FILES + ontology/workspace.trig + ${CMAKE_CURRENT_BINARY_DIR}/workspace.desktop + DESTINATION + ${DATA_INSTALL_DIR}/nepomuk/ontologies +) + diff --git a/context.cpp b/context.cpp new file mode 100644 index 000000000..c5ddd2154 --- /dev/null +++ b/context.cpp @@ -0,0 +1,61 @@ +/* + * Copyright 2008 by Aaron Seigo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library 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. + */ + +#include "context.h" + +namespace Plasma +{ + +class ContextPrivate +{ +public: +}; + +Context::Context(QObject *parent) + : QObject(parent), + d(new ContextPrivate) +{ +} + +Context::~Context() +{ +} + +void Context::createContext(const QString &name) +{ +} + +QStringList Context::contexts() const +{ + return QStringList(); +} + +void Context::setCurrentContext(const QString &name) +{ +} + +QString Context::currentContext() const +{ + return QString(); +} + +} // namespace Plasma + +#include "context.moc" + diff --git a/context.h b/context.h new file mode 100644 index 000000000..18bb62b97 --- /dev/null +++ b/context.h @@ -0,0 +1,57 @@ +/* + * Copyright 2008 by Aaron Seigo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library 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. + */ + +#ifndef PLASMA_CONTEXT_H +#define PLASMA_CONTEXT_H + +#include +#include + +#include "plasma_export.h" + +namespace Plasma +{ + +class ContextPrivate; + +class PLASMA_EXPORT Context : QObject +{ + Q_OBJECT + +public: + explicit Context(QObject *parent = 0); + ~Context(); + + void createContext(const QString &name); + QStringList contexts() const; + + void setCurrentContext(const QString &name); + QString currentContext() const; + +Q_SIGNALS: + void currentChanged(const QString &); + +private: + ContextPrivate * const d; +}; + +} // namespace Plasma + +#endif // multiple inclusion guard + diff --git a/includes/Context b/includes/Context new file mode 100644 index 000000000..9d71d04d8 --- /dev/null +++ b/includes/Context @@ -0,0 +1,2 @@ +#include "../../plasma/context.h" + diff --git a/ontology/workspace.desktop.cmake b/ontology/workspace.desktop.cmake new file mode 100755 index 000000000..79413489e --- /dev/null +++ b/ontology/workspace.desktop.cmake @@ -0,0 +1,7 @@ +[Desktop Entry] +Version=1.0 +Name=Workspace Context Ontology +URL=http://plasma.kde.org/ontologies/workspacecontext# +Path=${DATA_INSTALL_DIR}/nepomuk/ontologies/workspace.trig +MimeType=application/x-trig +Type=Data diff --git a/ontology/workspace.rdf b/ontology/workspace.rdf new file mode 100755 index 000000000..e0d40e89c --- /dev/null +++ b/ontology/workspace.rdf @@ -0,0 +1,33 @@ + + + + + + +]> + + + + + + + + + + + + + diff --git a/ontology/workspace.trig b/ontology/workspace.trig new file mode 100755 index 000000000..018a34342 --- /dev/null +++ b/ontology/workspace.trig @@ -0,0 +1,44 @@ +@prefix workspacecontext: . +@prefix nie: . +@prefix nao: . +@prefix nrl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . + +semn: { + semn:Context + a rdfs:Context ; + rdfs:comment "Represents a workspace context, such as a user project or activity." ; + rdfs:label "Context" ; + rdfs:subClassOf nie:InformationElement . + + semn:name + a rdf:Property ; + rdfs:comment "A workspace context name."; + rdfs:label "name" ; + rdfs:domain workspacecontext:Context ; + rdfs:range xsd:string . + + semn:name + a rdf:Property ; + rdfs:comment "Is this context the active one?"; + rdfs:label "isActive" ; + rdfs:domain workspacecontext:Context ; + rdfs:range xsd:boolean . +} + + { + workspacecontext: + a ; + nao:creator "http://www.dfki.uni-kl.de/~mylka" ; + nao:hasDefaultNamespace "http://plasma.kde.org/ontologies/workspacecontext#" ; + nao:hasDefaultNamespaceAbbreviation "workspacecontext" ; + nao:status "Unstable" ; + nao:updatable "0 " ; + nao:version "0.1" . + + + a nrl:GraphMetadata ; + nrl:coreGraphMetadataFor workspacecontext: . +}