delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / nepomuk / services / strigi / config.h
blob351bf9e5a72a342d2d7ff78da1d13d67638d3585
1 /* This file is part of the KDE Project
2 Copyright (c) 2008 Sebastian Trueg <trueg@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
19 #ifndef _NEPOMUK_STRIGI_CONFIG_H_
20 #define _NEPOMUK_STRIGI_CONFIG_H_
22 #include <QtCore/QObject>
24 #include <kconfig.h>
25 #include <kio/global.h>
28 namespace Nepomuk {
29 /**
30 * Active config class which emits signals if the config
31 * was changed, for example if the KCM saved the config file.
33 class Config : public QObject
35 Q_OBJECT
37 public:
38 ~Config();
39 static Config* self();
41 /**
42 * The folders to search for files to analyze
44 QStringList folders() const;
46 /**
47 * The folders that should be excluded.
48 * It is perfectly possible to include subfolders again.
50 QStringList excludeFolders() const;
52 QStringList excludeFilters() const;
53 QStringList includeFilters() const;
55 bool showGui() const;
56 void setShowGui( bool showGui );
58 /**
59 * The minimal available disk space. If it drops below
60 * indexing will be suspended.
62 KIO::filesize_t minDiskSpace() const;
64 /**
65 * true the first time the service is run (or after manually
66 * tampering with the config.
68 bool isInitialRun() const;
70 /**
71 * Check if the folder should be indexed based on
72 * folders() and excludeFolders()
74 bool shouldFolderBeIndexed( const QString& );
76 Q_SIGNALS:
77 void configChanged();
79 private Q_SLOTS:
80 void slotConfigDirty();
82 private:
83 Config();
85 KConfig m_config;
89 #endif