File indexing completed on 2024-05-12 17:07:08
0001 /* 0002 This file is part of the KDE project 0003 SPDX-FileCopyrightText: 2007 Sebastian Trueg <trueg@kde.org> 0004 SPDX-FileCopyrightText: 2012-2014 Vishesh Handa <me@vhanda.in> 0005 SPDX-FileCopyrightText: 2020 Benjamin Port <benjamin.port@enioka.com> 0006 0007 SPDX-License-Identifier: LGPL-2.0-only 0008 */ 0009 0010 #pragma once 0011 0012 #include <KQuickAddons/ManagedConfigModule> 0013 0014 #include "filteredfoldermodel.h" 0015 0016 class BalooSettings; 0017 class BalooData; 0018 0019 namespace Baloo 0020 { 0021 class ServerConfigModule : public KQuickAddons::ManagedConfigModule 0022 { 0023 Q_OBJECT 0024 Q_PROPERTY(FilteredFolderModel *filteredModel READ filteredModel CONSTANT) 0025 Q_PROPERTY(BalooSettings *balooSettings READ balooSettings CONSTANT) 0026 0027 public: 0028 ServerConfigModule(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args); 0029 virtual ~ServerConfigModule() override; 0030 0031 BalooSettings *balooSettings() const; 0032 FilteredFolderModel *filteredModel() const; 0033 0034 Q_INVOKABLE void deleteIndex(); 0035 Q_INVOKABLE int rawIndexFileSize(); 0036 Q_INVOKABLE QString prettyIndexFileSize(); 0037 Q_INVOKABLE void requestReboot(); 0038 0039 public Q_SLOTS: 0040 void load() override; 0041 void save() override; 0042 0043 Q_SIGNALS: 0044 void indexingSettingsChanged(); 0045 0046 private: 0047 BalooData *m_data; 0048 FilteredFolderModel *m_filteredFolderModel; 0049 }; 0050 }