Home · All Namespaces · All Classes · Main Classes |
00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Karoliina T. Salminen <karoliina.t.salminen@nokia.com> 00006 ** 00007 ** This file is part of duicontrolpanel. 00008 ** 00009 ** 00010 ** This library is free software; you can redistribute it and/or 00011 ** modify it under the terms of the GNU Lesser General Public 00012 ** License version 2.1 as published by the Free Software Foundation 00013 ** and appearing in the file LICENSE.LGPL included in the packaging 00014 ** of this file. 00015 ** 00016 ****************************************************************************/ 00017 00018 /* -*- Mode: C; indent-tabs-mode: s; c-basic-offset: 4; tab-width: 4 -*- */ 00019 /* vim:set et sw=4 ts=4 sts=4: */ 00020 00021 #ifndef DCPAPPLETMETADATA_H 00022 #define DCPAPPLETMETADATA_H 00023 00024 #include <QObject> 00025 #include <QString> 00026 #include <QStringList> 00027 00028 class MDesktopEntry; 00029 class DcpAppletMetadataPrivate; 00030 00031 00046 class DcpAppletMetadata : public QObject 00047 { 00048 Q_OBJECT 00049 public: 00050 DcpAppletMetadata (const QString& filename); 00051 virtual ~DcpAppletMetadata (); 00052 00053 virtual bool isValid () const; 00054 virtual bool isUnique () const; 00055 virtual bool isModified () const; 00056 00057 QString name () const; 00058 QString fileName () const; 00059 QString category () const; 00060 QString toggleIconId () const; 00061 int widgetTypeID() const; 00062 QString binary () const; 00063 QString dslFilename () const; 00064 QString applicationCommand () const; 00065 bool hasApplicationCommand () const; 00066 bool toggle() const; 00067 QString fullBinary () const; 00068 00069 Qt::Alignment align () const; 00070 00071 QString text1 () const; 00072 QString text2 () const; 00073 QStringList translationCatalogs() const; 00074 00075 QString imageName() const; 00076 00077 int order () const; 00078 int usage () const; 00079 void incrementUsage(); 00080 00081 static bool usageGreatherThan ( 00082 DcpAppletMetadata *meta1, 00083 DcpAppletMetadata *meta2); 00084 QString part () const; 00085 00086 static bool orderLessThan ( 00087 DcpAppletMetadata *meta1, 00088 DcpAppletMetadata *meta2); 00089 00090 static bool nameLessThan ( 00091 DcpAppletMetadata *meta1, 00092 DcpAppletMetadata *meta2); 00093 00094 static bool titleLessThan ( 00095 DcpAppletMetadata *meta1, 00096 DcpAppletMetadata *meta2); 00097 00098 bool isDisabled () const; 00099 void setDisabled (bool disabled); 00100 00101 void markActive(); 00102 void markInactive(); 00103 bool isActive() const; 00104 00105 bool isHidden() const; 00106 00108 static DcpAppletMetadata* lastUsed (); 00110 static void setLastUsed (DcpAppletMetadata* metadata); 00111 static QString storedLastUsedItem(); 00112 00113 QString helpId() const; 00114 00115 bool hasMainView () const; 00116 bool hasInProcessBrief () const; 00117 00118 static QString defaultSOPath (); 00119 static void setDefaultSOPath (const QString& path); 00120 00121 QString sliderLeftImage () const; 00122 QString sliderRightImage () const; 00123 00124 Qt::Orientation textOrientation () const; 00125 00126 protected: 00127 MDesktopEntry* desktopEntry () const; 00128 QString desktopEntryStr (int id) const; 00129 private: 00130 DcpAppletMetadataPrivate *const d_ptr; 00131 Q_DISABLE_COPY (DcpAppletMetadata); 00132 friend class Ut_DcpAppletMetadata; 00133 }; 00134 00135 00136 #endif 00137
Copyright © 2009 Nokia Corporation | Generated on Tue Jul 5 2011 15:01:31 Doxygen 1.7.1 |
Meego control panel |