Baloo

indexerstate.cpp
1/*
2 This file is part of the KDE Baloo Project
3 SPDX-FileCopyrightText: 2015 Pinak Ahuja <pinak.ahuja@gmail.com>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#include "indexerstate.h"
9
10#include <KLocalizedString>
11
12QString Baloo::stateString(IndexerState state)
13{
14 QString status = i18n("Unknown");
15 switch (state) {
16 case Idle:
17 status = i18n("Idle");
18 break;
19 case Suspended:
20 status = i18n("Suspended");
21 break;
22 case FirstRun:
23 status = i18n("Initial Indexing");
24 break;
25 case NewFiles:
26 status = i18n("Indexing new files");
27 break;
28 case ModifiedFiles:
29 status = i18n("Indexing modified files");
30 break;
31 case XAttrFiles:
32 status = i18n("Indexing Extended Attributes");
33 break;
34 case ContentIndexing:
35 status = i18n("Indexing file content");
36 break;
37 case UnindexedFileCheck:
38 status = i18n("Checking for unindexed files");
39 break;
40 case StaleIndexEntriesClean:
41 status = i18n("Checking for stale index entries");
42 break;
43 case LowPowerIdle:
44 status = i18n("Idle (Powersave)");
45 break;
46 case Unavailable:
47 status = i18n("Not Running");
48 break;
49 case Startup:
50 status = i18n("Starting");
51 break;
52 }
53 return status;
54}
55
56QString Baloo::stateString(int state)
57{
58 return stateString(static_cast<IndexerState>(state));
59}
60
61#include "moc_indexerstate.cpp"
Q_SCRIPTABLE CaptureState status()
QString i18n(const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.