1
/* This file is part of KDevelop
2
Copyright (C) 2004 Roberto Raggi <roberto@kdevelop.org>
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.
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.
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.
19
#ifndef AUTOMAKEPROJECTMODEL_H
20
#define AUTOMAKEPROJECTMODEL_H
22
#include <kdevprojectmodel.h>
24
class AutomakeFolderModel;
25
class AutomakeTargetModel;
26
class AutomakeFileModel;
28
typedef KSharedPtr<AutomakeFolderModel> AutomakeFolderDom;
29
typedef KSharedPtr<AutomakeTargetModel> AutomakeTargetDom;
30
typedef KSharedPtr<AutomakeFileModel> AutomakeFileDom;
32
typedef QValueList<AutomakeFolderDom> AutomakeFolderList;
33
typedef QValueList<AutomakeTargetDom> AutomakeTargetList;
34
typedef QValueList<AutomakeFileDom> AutomakeFileList;
36
class AutomakeTargetModel: public ProjectTargetModel
39
typedef AutomakeTargetDom Ptr;
42
AutomakeTargetModel(ProjectModel *projectModel)
43
: ProjectTargetModel(projectModel) {}
46
static AutomakeTargetDom from(ProjectTargetDom dom)
47
{ return AutomakeTargetDom(dynamic_cast<AutomakeTargetModel*>(dom.data())); }
49
// ### use attribute/setAttribute
60
friend class ProjectModel;
63
class AutomakeFileModel: public ProjectFileModel
66
typedef AutomakeFileDom Ptr;
69
AutomakeFileModel(ProjectModel *projectModel)
70
: ProjectFileModel(projectModel) {}
73
static AutomakeFileDom from(ProjectFileDom dom)
74
{ return AutomakeFileDom(dynamic_cast<AutomakeFileModel*>(dom.data())); }
77
friend class ProjectModel;
80
class AutomakeFolderModel: public ProjectFolderModel
83
typedef AutomakeFolderDom Ptr;
86
AutomakeFolderModel(ProjectModel *projectModel)
87
: ProjectFolderModel(projectModel) {}
90
static AutomakeFolderDom from(ProjectFolderDom dom)
91
{ return AutomakeFolderDom(dynamic_cast<AutomakeFolderModel*>(dom.data())); }
93
QStringList subdirs() const;
94
void addSubdir(const QString &path);
96
QMap<QString, QString> prefixes;
99
friend class ProjectModel;
102
#endif // AUTOMAKEPROJECTMODEL_H