File indexing completed on 2024-04-21 16:19:52
0001 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0002 // SPDX-FileCopyrightText: 2020 Harald Sitter <sitter@kde.org> 0003 0004 #include "module.h" 0005 0006 #include <KAboutData> 0007 #include <KLocalizedString> 0008 #include <KPluginFactory> 0009 0010 #include "devicemodel.h" 0011 #include "servicerunner.h" 0012 #include "version.h" 0013 0014 K_PLUGIN_CLASS_WITH_JSON(Module, "smart.json") 0015 0016 Module::Module(QObject *parent, const QVariantList &args) 0017 : KQuickAddons::ConfigModule(parent, args) 0018 { 0019 auto aboutData = new KAboutData(QStringLiteral("plasma_disks"), 0020 i18nc("@title", "Storage Device Health Monitoring"), 0021 QString::fromLatin1(global_s_versionStringFull), 0022 QString(), 0023 KAboutLicense::LicenseKey::GPL_V3, 0024 i18nc("@info:credit", "Copyright 2020 Harald Sitter")); 0025 setAboutData(aboutData); 0026 // We have no help so remove the button from the buttons. 0027 setButtons(buttons() ^ Help ^ Default ^ Apply); 0028 0029 qmlRegisterType<DeviceModel>("SMART", 1, 0, "DeviceModel"); 0030 qmlRegisterType<ServiceRunner>("SMART", 1, 0, "ServiceRunner"); 0031 } 0032 0033 Module::~Module() 0034 { 0035 } 0036 0037 void Module::load() 0038 { 0039 } 0040 0041 void Module::save() 0042 { 0043 } 0044 0045 void Module::defaults() 0046 { 0047 } 0048 0049 #include "module.moc"