~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to projectmanagers/custommake/custommaketreesynchronizer.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* KDevelop Custom Makefile Support
 
2
 *
 
3
 * Copyright 2007 Dukju Ahn <dukjuahn@gmail.com>
 
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
 
7
 * as published by the Free Software Foundation; either version 2
 
8
 * of the License, or (at your option) any later version.
 
9
 */
 
10
 
 
11
#ifndef CUSTOMMAKETREESYNCHRONIZER_H
 
12
#define CUSTOMMAKETREESYNCHRONIZER_H
 
13
 
 
14
#include "projectfilesystemwatcher.h"
 
15
 
 
16
class KUrl;
 
17
 
 
18
namespace KDevelop
 
19
{
 
20
class ProjectFileItem;
 
21
class ProjectFolderItem;
 
22
class IProjectFileManager;
 
23
}
 
24
 
 
25
class CustomMakeManager;
 
26
class ProjectFileSystemWatcher;
 
27
 
 
28
class CustomMakeTreeSynchronizer : public QObject
 
29
{
 
30
    Q_OBJECT
 
31
public:
 
32
    explicit CustomMakeTreeSynchronizer( CustomMakeManager* manager, QObject* parent = 0 );
 
33
    virtual ~CustomMakeTreeSynchronizer();
 
34
 
 
35
    void addDirectory( const QString &path, KDevelop::ProjectFolderItem *folderItem );
 
36
    void addFile( const QString &path, KDevelop::ProjectFileItem *fileItem = 0 );
 
37
 
 
38
    void removeDirectory( const QString & path, bool recurse );
 
39
    void removeFile( const QString & path );
 
40
 
 
41
protected Q_SLOTS:
 
42
    void filesCreated( const KUrl::List &files, KDevelop::ProjectFolderItem *parentFolder );
 
43
    void filesDeleted( const QList<KDevelop::ProjectFileItem*> &files,
 
44
                               KDevelop::ProjectFolderItem *parentFolder );
 
45
 
 
46
    void directoriesCreated( const KUrl::List &files, KDevelop::ProjectFolderItem *parentFolder );
 
47
    void directoriesDeleted( const QList<KDevelop::ProjectFolderItem*> &dirs,
 
48
                                     KDevelop::ProjectFolderItem *parentFolder );
 
49
 
 
50
    void fileChanged( const QString& file, KDevelop::ProjectFileItem* fileItem);
 
51
 
 
52
private:
 
53
    void parseDirectoryRecursively( KDevelop::ProjectFolderItem* dir,
 
54
                                    KDevelop::IProjectFileManager* manager );
 
55
 
 
56
private:
 
57
    CustomMakeManager *m_customMan;
 
58
    ProjectFileSystemWatcher *m_watch;
 
59
};
 
60
 
 
61
#endif