File indexing completed on 2024-05-12 16:39:56
0001 /* This file is part of the KDE project 0002 Copyright (C) 2003 Lucijan Busch <lucijan@kde.org> 0003 Copyright (C) 2003-2015 Jarosław Staniek <staniek@kde.org> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Library General Public 0007 License as published by the Free Software Foundation; either 0008 version 2 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Library General Public License for more details. 0014 0015 You should have received a copy of the GNU Library General Public License 0016 along with this library; see the file COPYING.LIB. If not, write to 0017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef KEXIPLUGINMETADATA_H 0022 #define KEXIPLUGINMETADATA_H 0023 0024 #include <KPluginMetaData> 0025 0026 #include "kexiutils_export.h" 0027 0028 //! Extended version of KPluginMetaData 0029 class KEXIUTILS_EXPORT KexiPluginMetaData : public KPluginMetaData 0030 { 0031 public: 0032 ~KexiPluginMetaData(); 0033 0034 /** 0035 * @return internal name of the plugin, a shortcut of pluginId() 0036 * 0037 * Example: "org.kexi-project.table" 0038 */ 0039 QString id() const; 0040 0041 /** 0042 * @return major version of this part. 0043 * 0044 * 0 means invalid version. 0045 * @see version() 0046 */ 0047 int majorVersion() const; 0048 0049 /** 0050 * @return minor version of this part. 0051 * 0052 * @see version() 0053 */ 0054 int minorVersion() const; 0055 0056 /** 0057 * @return translated user-visible error message set by setErrorMessage(). 0058 */ 0059 QString errorMessage() const; 0060 0061 protected: 0062 explicit KexiPluginMetaData(const QPluginLoader &loader); 0063 0064 /** 0065 * Sets a translated user-visible error message useful to explain loading-related 0066 * issues found with this plugin. Most likely to be called by a plugin manager. 0067 */ 0068 void setErrorMessage(const QString& errorMessage); 0069 0070 private: 0071 Q_DISABLE_COPY(KexiPluginMetaData) 0072 class Private; 0073 Private * const d; 0074 }; 0075 0076 #endif