Baloo Widgets

ondemandextractor.h
1 /*
2  * <one line to give the library's name and an idea of what it does.>
3  * Copyright (C) 2019 Stefan BrĂ¼ns <[email protected]>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  */
20 
21 #ifndef ONDEMANDEXTRACTOR_H
22 #define ONDEMANDEXTRACTOR_H
23 
24 #include <QProcess>
25 #include <KFileMetaData/Properties>
26 
27 namespace Baloo {
28 namespace Private {
29 
30 class OnDemandExtractor : public QObject
31 {
32  Q_OBJECT
33 
34 public:
35  explicit OnDemandExtractor(QObject* parent = nullptr);
36  ~OnDemandExtractor();
37 
38  void process(const QString& filePath);
39 
40  bool waitFinished();
41  KFileMetaData::PropertyMap properties() const;
42 
43 Q_SIGNALS:
44  void fileFinished(QProcess::ExitStatus exitStatus);
45 
46 private Q_SLOTS:
47  void slotIndexedFile(int exitCode, QProcess::ExitStatus exitStatus);
48 
49 private:
50  QProcess m_process;
51  KFileMetaData::PropertyMap m_properties;
52 };
53 
54 } // namespace Private
55 } // namespace Baloo
56 
57 #endif // ONDEMANDEXTRACTOR_H
Q_SIGNALSQ_SIGNALS
Q_OBJECTQ_OBJECT
KGuiItem properties()
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 18 2021 23:07:21 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.