![]() |
Home · All Namespaces · All Classes |
00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of systemui. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 00020 #include "contextframeworkcontext.h" 00021 #include <QVariant> 00022 00023 #ifdef HAVE_CONTEXTSUBSCRIBER 00024 ContextFrameworkItem::ContextFrameworkItem(const QString &key) 00025 : property(key) 00026 { 00027 connect(&property, SIGNAL(valueChanged()), this, SIGNAL(contentsChanged())); 00028 } 00029 00030 QVariant ContextFrameworkItem::value() const 00031 { 00032 return property.value(); 00033 } 00034 00035 void ContextFrameworkItem::subscribe() const 00036 { 00037 property.subscribe(); 00038 } 00039 00040 void ContextFrameworkItem::unsubscribe() const 00041 { 00042 property.unsubscribe(); 00043 } 00044 #else 00045 ContextFrameworkItem::ContextFrameworkItem(const QString &) 00046 { 00047 } 00048 00049 QVariant ContextFrameworkItem::value() const 00050 { 00051 return QVariant(); 00052 } 00053 00054 void ContextFrameworkItem::subscribe() const 00055 { 00056 } 00057 00058 void ContextFrameworkItem::unsubscribe() const 00059 { 00060 } 00061 #endif 00062 00063 ContextItem *ContextFrameworkContext::createContextItem(const QString &key) 00064 { 00065 return new ContextFrameworkItem(key); 00066 }
| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:19:34 Doxygen 1.7.1 |
MeeGo Touch |
