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

« back to all changes in this revision

Viewing changes to buildtools/projectmanager/importers/custom/kdevcustomimporter.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2006-05-23 18:39:42 UTC
  • Revision ID: james.westby@ubuntu.com-20060523183942-hucifbvh68k2bwz7
Tags: upstream-3.3.2
Import upstream version 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of KDevelop
 
2
    Copyright (C) 2004 Roberto Raggi <roberto@kdevelop.org>
 
3
 
 
4
    This library is free software; you can redistribute it and/or
 
5
    modify it under the terms of the GNU Library General Public
 
6
    License as published by the Free Software Foundation; either
 
7
    version 2 of the License, or (at your option) any later version.
 
8
 
 
9
    This library is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
    Library General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Library General Public License
 
15
    along with this library; see the file COPYING.LIB.  If not, write to
 
16
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
    Boston, MA 02111-1307, USA.
 
18
*/
 
19
#ifndef KDEVCUSTOMIMPORTER_H
 
20
#define KDEVCUSTOMIMPORTER_H
 
21
 
 
22
#include <kdevprojecteditor.h>
 
23
#include <qstringlist.h>
 
24
 
 
25
class QFileInfo;
 
26
 
 
27
class KDevCustomImporter: public KDevProjectEditor
 
28
{
 
29
    Q_OBJECT
 
30
public:
 
31
    KDevCustomImporter(QObject *parent = 0, const char *name = 0, 
 
32
            const QStringList &args = QStringList());
 
33
    virtual ~KDevCustomImporter();
 
34
    
 
35
//
 
36
// KDevProjectEditor interface
 
37
//
 
38
    virtual Features features() const 
 
39
    { return Features(Folders | Files); }
 
40
    
 
41
    virtual bool addFolder(ProjectFolderDom folder, ProjectFolderDom parent);
 
42
    virtual bool addTarget(ProjectTargetDom target, ProjectFolderDom parent);
 
43
    virtual bool addFile(ProjectFileDom file, ProjectFolderDom parent);
 
44
    virtual bool addFile(ProjectFileDom file, ProjectTargetDom parent);
 
45
    
 
46
    virtual bool removeFolder(ProjectFolderDom folder, ProjectFolderDom parent);
 
47
    virtual bool removeTarget(ProjectTargetDom target, ProjectFolderDom parent);
 
48
    virtual bool removeFile(ProjectFileDom file, ProjectFolderDom parent);
 
49
    virtual bool removeFile(ProjectFileDom file, ProjectTargetDom parent);
 
50
    bool createProjectFile( const QString &folder );
 
51
    bool configureFolder( ProjectFolderDom folder);
 
52
//
 
53
// KDevProjectImporter interface
 
54
//
 
55
    virtual KDevProject *project() const;
 
56
    
 
57
    virtual ProjectFolderList parse(ProjectFolderDom item);    
 
58
    virtual ProjectItemDom import(ProjectModel *model, const QString &fileName);
 
59
    virtual QString findMakefile(ProjectFolderDom dom) const;
 
60
    virtual QStringList findMakefiles(ProjectFolderDom dom) const;
 
61
 
 
62
private:
 
63
    bool isValid(const QFileInfo &fileName) const;
 
64
    
 
65
private:
 
66
    KDevProject *m_project;
 
67
    
 
68
    static const QString &customImporter;
 
69
    QStringList includes;
 
70
    QStringList excludes;
 
71
};
 
72
 
 
73
#endif // KDEVCUSTOMIMPORTER_H