summaryrefslogtreecommitdiffstats
path: root/src/libgui/project.h
blob: b8bf49170a6cefdafcad5ce78e4705dfe820d05d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/***************************************************************************
 *   Copyright (C) 2005 Nicolas Hadacek <[email protected]>                  *
 *   Copyright (C) 2003 Alain Gibaud <[email protected]>                *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/
#ifndef PROJECT_H
#define PROJECT_H

#include "devices/base/register.h"
#include "common/global/xml_data_file.h"
#include "tools/base/generic_tool.h"

class Project : public XmlDataFile
{
public:
  Project(const PURL::Url &url) : XmlDataFile(url, "piklab") {}
  virtual bool load(TQString &error);

  PURL::Directory directory() const { return url().directory(); }
  TQString name() const { return url().basename(); }
  PURL::UrlList absoluteFiles() const;
  TQString version() const;
  TQString description() const;
  Tool::OutputType outputType() const;
  PURL::UrlList openedFiles() const;
  PURL::Url customLinkerScript() const;
  TQValueList<Register::TypeData> watchedRegisters() const;
  TQString toSourceObject(const PURL::Url &url, const TQString &extension, bool forWindows) const;
  TQStringList objectsForLinker(const TQString &extension, bool forWindows) const;
  TQStringList librariesForLinker(const TQString &prefix, bool forWindows) const;
  TQValueList<uint> bookmarkLines(const PURL::Url &url) const; // absolute filepath

  void removeFile(const PURL::Url &url); // take absolute filepath (but inside project dir)
  void addFile(const PURL::Url &url); // take absolute filePath (but inside project dir)
  void clearFiles();
  void setVersion(const TQString &version);
  void setDescription(const TQString &description);
  void setOutputType(Tool::OutputType type);
  void setOpenedFiles(const PURL::UrlList &list);
  void setCustomLinkerScript(const PURL::Url &url);
  void setWatchedRegisters(const TQValueList<Register::TypeData> &watched);
  void setBookmarkLines(const PURL::Url &url, const TQValueList<uint> &lines); // absolute filepath
};

#endif