]> ruin.nu Git - hbs.git/blob - bs/bsdoc.cpp
initial commit of the BSConf class.
[hbs.git] / bs / bsdoc.cpp
1 /***************************************************************************
2                           bcdoc.cpp  -  description
3                              -------------------
4     begin                : Sun May 27 22:13:58 CEST 2001
5     copyright            : (C) 2001 by Michael Andreen
6     email                : whale@linux.nu
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18 #include "bsdoc.h"
19
20
21 BSDoc::BSDoc()
22 {
23   modified = false;
24 }
25
26 BSDoc::~BSDoc()
27 {
28 }
29
30 void BSDoc::newDoc()
31 {
32 }
33
34 bool BSDoc::save()
35 {
36   return true;
37 }
38
39 bool BSDoc::saveAs(const QString &filename)
40 {
41   return true;
42 }
43
44 bool BSDoc::load(const QString &filename)
45 {
46   emit documentChanged();
47   return true;
48 }
49
50 bool BSDoc::isModified() const
51 {
52   return modified;
53 }
54
55 ///////////////////////////////////////////////////////////////////////////
56 //
57
58 int BSDoc::newBattle(QString name)
59 {
60         m_Battles[name]["Friendly"]["Home Planet"];
61         m_Battles[name]["Hostile"];
62
63         modified = true;
64         emit documentChanged();
65         return 0;
66 }
67
68 /////////////////////////////////////////////////////////////////////////
69 //
70
71 std::map<QString, std::map<QString, std::map<QString, Fleet> > >& BSDoc::Battles()
72 {
73         return m_Battles;
74 }
75