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

filelight

  • sources
  • kde-4.14
  • kdeutils
  • filelight
  • src
  • part
scan.h
Go to the documentation of this file.
1 /***********************************************************************
2 * Copyright 2003-2004 Max Howell <max.howell@methylblue.com>
3 * Copyright 2008-2009 Martin Sandsmark <martin.sandsmark@kde.org>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License or (at your option) version 3 or any later version
9 * accepted by the membership of KDE e.V. (or its successor approved
10 * by the membership of KDE e.V.), which shall act as a proxy
11 * defined in Section 14 of version 3 of the license.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ***********************************************************************/
21 
22 #ifndef SCAN_H
23 #define SCAN_H
24 
25 #include <KUrl>
26 #include <QtCore/QObject>
27 #include <QtCore/QMutex>
28 
29 class QThread;
30 class Folder;
31 template<class T> class Chain;
32 
33 namespace Filelight
34 {
35 class ScanManager : public QObject
36 {
37  Q_OBJECT
38 
39  friend class LocalLister;
40  friend class RemoteLister;
41 
42 public:
43  explicit ScanManager(QObject *parent);
44  virtual ~ScanManager();
45 
46  bool start(const KUrl&);
47  bool running() const;
48 
49  uint files() const {
50  return m_files;
51  }
52 
53 public slots:
54  bool abort();
55  void emptyCache();
56  void cacheTree(Folder*, bool);
57  void foundCached(Folder*);
58 
59 signals:
60  void completed(Folder*);
61  void aboutToEmptyCache();
62  void branchCompleted(Folder* tree, bool finished);
63  void branchCacheHit(Folder* tree);
64 
65 private:
66  bool m_abort;
67  uint m_files;
68 
69  KUrl m_url;
70  QMutex m_mutex;
71  QThread *m_thread;
72  Chain<Folder> *m_cache;
73 
74 };
75 }
76 
77 #endif
QMutex
Filelight::ScanManager::cacheTree
void cacheTree(Folder *, bool)
Definition: scan.cpp:201
Filelight::ScanManager::~ScanManager
virtual ~ScanManager()
Definition: scan.cpp:48
Filelight::ScanManager::completed
void completed(Folder *)
Filelight::ScanManager::running
bool running() const
Definition: scan.cpp:61
Filelight::ScanManager::emptyCache
void emptyCache()
Definition: scan.cpp:188
Filelight::ScanManager::foundCached
void foundCached(Folder *)
Definition: scan.cpp:229
Filelight::RemoteLister
Definition: remoteLister.h:33
Filelight::ScanManager::files
uint files() const
Definition: scan.h:49
Filelight::LocalLister
Definition: localLister.h:35
Folder
Definition: fileTree.h:271
Filelight::ScanManager::start
bool start(const KUrl &)
Definition: scan.cpp:66
QObject
Filelight::ScanManager::branchCacheHit
void branchCacheHit(Folder *tree)
Filelight::ScanManager::aboutToEmptyCache
void aboutToEmptyCache()
Filelight::ScanManager::ScanManager
ScanManager(QObject *parent)
Definition: scan.cpp:35
Filelight::ScanManager::branchCompleted
void branchCompleted(Folder *tree, bool finished)
Chain
Definition: fileTree.h:40
Filelight::ScanManager::abort
bool abort()
Definition: scan.cpp:178
Filelight::ScanManager
Definition: scan.h:35
QThread
QObject::parent
QObject * parent() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

filelight

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

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

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