File indexing completed on 2025-05-04 04:51:07
0001 /* 0002 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "viewerpluginexternalscriptinfo.h" 0008 0009 ViewerPluginExternalScriptInfo::ViewerPluginExternalScriptInfo() = default; 0010 0011 QString ViewerPluginExternalScriptInfo::name() const 0012 { 0013 return mName; 0014 } 0015 0016 void ViewerPluginExternalScriptInfo::setName(const QString &name) 0017 { 0018 mName = name; 0019 } 0020 0021 QString ViewerPluginExternalScriptInfo::commandLine() const 0022 { 0023 return mCommandLine; 0024 } 0025 0026 void ViewerPluginExternalScriptInfo::setCommandLine(const QString &commandLine) 0027 { 0028 mCommandLine = commandLine; 0029 } 0030 0031 QString ViewerPluginExternalScriptInfo::executable() const 0032 { 0033 return mExecutable; 0034 } 0035 0036 void ViewerPluginExternalScriptInfo::setExecutable(const QString &executable) 0037 { 0038 mExecutable = executable; 0039 } 0040 0041 QString ViewerPluginExternalScriptInfo::description() const 0042 { 0043 return mDescription; 0044 } 0045 0046 void ViewerPluginExternalScriptInfo::setDescription(const QString &description) 0047 { 0048 mDescription = description; 0049 } 0050 0051 QString ViewerPluginExternalScriptInfo::icon() const 0052 { 0053 return mIcon; 0054 } 0055 0056 void ViewerPluginExternalScriptInfo::setIcon(const QString &icon) 0057 { 0058 mIcon = icon; 0059 } 0060 0061 bool ViewerPluginExternalScriptInfo::isValid() const 0062 { 0063 return !mName.trimmed().isEmpty() && !mExecutable.trimmed().isEmpty(); 0064 } 0065 0066 bool ViewerPluginExternalScriptInfo::isReadOnly() const 0067 { 0068 return mIsReadOnly; 0069 } 0070 0071 void ViewerPluginExternalScriptInfo::setIsReadOnly(bool isReadOnly) 0072 { 0073 mIsReadOnly = isReadOnly; 0074 } 0075 0076 QString ViewerPluginExternalScriptInfo::fileName() const 0077 { 0078 return mFileName; 0079 } 0080 0081 void ViewerPluginExternalScriptInfo::setFileName(const QString &fileName) 0082 { 0083 mFileName = fileName; 0084 } 0085 0086 bool ViewerPluginExternalScriptInfo::operator==(const ViewerPluginExternalScriptInfo &other) const 0087 { 0088 return (name() == other.name()) && (commandLine() == other.commandLine()) && (executable() == other.executable()) && (description() == other.description()) 0089 && (icon() == other.icon()) && (isReadOnly() == other.isReadOnly()) && (fileName() == other.fileName()); 0090 }