Warning, file /office/calligra/libs/main/KoComponentData.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 Copyright (C) 2015 Friedrich W. H. Kossebau <kossebau@kde.org> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This library is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this library; see the file COPYING.LIB. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef KOCOMPONENTDATA_H 0021 #define KOCOMPONENTDATA_H 0022 0023 #include "komain_export.h" 0024 0025 #include <KSharedConfig> 0026 0027 #include <QExplicitlySharedDataPointer> 0028 0029 class QString; 0030 class KAboutData; 0031 class KoComponentDataPrivate; 0032 0033 /** 0034 * Data about a component. 0035 */ 0036 class KOMAIN_EXPORT KoComponentData 0037 { 0038 public: 0039 /** 0040 * Constructor. 0041 * 0042 * A copy of the aboutData object is made. 0043 * 0044 * @param aboutData data about this component 0045 * 0046 * @see KAboutData 0047 */ 0048 explicit KoComponentData(const KAboutData &aboutData); 0049 0050 /** 0051 * Copy constructor. 0052 * 0053 * It does not copy the data. The data is shared between the old and new objects. 0054 */ 0055 KoComponentData(const KoComponentData&); 0056 0057 /** 0058 * Destructor. 0059 */ 0060 virtual ~KoComponentData(); 0061 0062 /** 0063 * Assignment operator. 0064 * 0065 * It does not copy the data. The data is shared between the old and new objects. 0066 */ 0067 KoComponentData &operator=(const KoComponentData&); 0068 0069 /** 0070 * Returns whether two objects reference the same data. 0071 */ 0072 bool operator==(const KoComponentData&) const; 0073 0074 /** 0075 * Returns whether two objects do not reference the same data. 0076 */ 0077 bool operator!=(const KoComponentData &rhs) const { return !operator==(rhs); } 0078 0079 /** 0080 * Returns the general config object (componentName"rc"). 0081 * @return the KConfig object for the component. 0082 */ 0083 const KSharedConfig::Ptr &config() const; 0084 0085 /** 0086 * Returns the complete aboutdata of the component. 0087 * 0088 * @return The component name. 0089 */ 0090 const KAboutData &aboutData() const; 0091 0092 /** 0093 * Returns the name of the component. 0094 * 0095 * @return The component name. 0096 */ 0097 QString componentName() const; 0098 0099 /** 0100 * Returns the display name of the component. 0101 * 0102 * @return The component display name. 0103 */ 0104 QString componentDisplayName() const; 0105 0106 private: 0107 QExplicitlySharedDataPointer<KoComponentDataPrivate> d; 0108 }; 0109 0110 #endif