• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

lokalize

  • sources
  • kde-4.14
  • kdesdk
  • lokalize
  • src
  • tm
tmscanapi.h
Go to the documentation of this file.
1 /* ****************************************************************************
2  This file is part of Lokalize
3 
4  Copyright (C) 2007-2009 by Nick Shaforostoff <shafff@ukr.net>
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License as
8  published by the Free Software Foundation; either version 2 of
9  the License or (at your option) version 3 or any later version
10  accepted by the membership of KDE e.V. (or its successor approved
11  by the membership of KDE e.V.), which shall act as a proxy
12  defined in Section 14 of version 3 of the license.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>.
21 
22 **************************************************************************** */
23 
24 
25 #ifndef SCANAPI_H
26 #define SCANAPI_H
27 
28 #include <kjob.h>
29 #include <QDir>
30 #include <QUrl>
31 #include <QTime>
32 #include <QVector>
33 
34 namespace ThreadWeaver{class Job;}
35 
36 bool dragIsAcceptable(const QList<QUrl>& urls);
37 QString shorterFilePath(const QString path);
38 
39 
40 namespace TM {
41 class ScanJob;
42 
44 int scanRecursive(const QList<QUrl>& urls, const QString& dbName);
45 
46 class RecursiveScanJob: public KJob
47 {
48  Q_OBJECT
49 public:
50  RecursiveScanJob(const QString& dbName,QObject* parent=0);
51  void setJobs(const QVector<ScanJob*>& jobs);
52  void start();
53 
54 public slots:
55  void scanJobFinished(ThreadWeaver::Job*);
56 protected:
57  bool doKill();
58 
59 private:
60  QString m_dbName;
61  QTime m_time;
62  QVector<ScanJob*> m_jobs;
63 };
64 
65 }
66 
67 #endif
TM::scanRecursive
int scanRecursive(const QList< QUrl > &urls, const QString &dbName)
wrapper. returns gross number of jobs started
Definition: tmscanapi.cpp:92
TM::RecursiveScanJob::setJobs
void setJobs(const QVector< ScanJob * > &jobs)
Definition: tmscanapi.cpp:57
QTime
TM::RecursiveScanJob::scanJobFinished
void scanJobFinished(ThreadWeaver::Job *)
Definition: tmscanapi.cpp:66
TM::RecursiveScanJob::doKill
bool doKill()
Definition: tmscanapi.cpp:50
QObject
dragIsAcceptable
bool dragIsAcceptable(const QList< QUrl > &urls)
Definition: tmscanapi.cpp:151
QString
QList
QVector
TM::RecursiveScanJob::start
void start()
Definition: tmscanapi.cpp:84
TM::RecursiveScanJob
Definition: tmscanapi.h:46
shorterFilePath
QString shorterFilePath(const QString path)
Definition: tmscanapi.cpp:169
TM::RecursiveScanJob::RecursiveScanJob
RecursiveScanJob(const QString &dbName, QObject *parent=0)
Definition: tmscanapi.cpp:43
KJob
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

lokalize

Skip menu "lokalize"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal