Rev 1221 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | |||
671 | werner | 2 | /******************************************************************************************** |
3 | ** iLand - an individual based forest landscape and disturbance model |
||
4 | ** http://iland.boku.ac.at |
||
5 | ** Copyright (C) 2009- Werner Rammer, Rupert Seidl |
||
6 | ** |
||
7 | ** This program is free software: you can redistribute it and/or modify |
||
8 | ** it under the terms of the GNU General Public License as published by |
||
9 | ** the Free Software Foundation, either version 3 of the License, or |
||
10 | ** (at your option) any later version. |
||
11 | ** |
||
12 | ** This program is distributed in the hope that it will be useful, |
||
13 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
14 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
15 | ** GNU General Public License for more details. |
||
16 | ** |
||
17 | ** You should have received a copy of the GNU General Public License |
||
18 | ** along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
19 | ********************************************************************************************/ |
||
20 | |||
340 | werner | 21 | #ifndef TIMEEVENTS_H |
22 | #define TIMEEVENTS_H |
||
23 | #include <QtCore> |
||
24 | /** */ |
||
25 | class TimeEvents |
||
26 | { |
||
27 | public: |
||
28 | TimeEvents(); |
||
341 | werner | 29 | // setup |
340 | werner | 30 | void clear() { mData.clear(); } |
31 | bool loadFromString(const QString &source); |
||
32 | bool loadFromFile(const QString &fileName); |
||
341 | werner | 33 | // excecute |
34 | void run(); ///< execute all settings |
||
977 | werner | 35 | /// read value for key 'key' and year 'year' from the list of items. Return QVariant() if not found. |
36 | QVariant value(int year, const QString &key) const; |
||
340 | werner | 37 | |
38 | private: |
||
39 | QMultiMap<int, QPair<QString, QVariant> > mData; |
||
40 | }; |
||
41 | |||
42 | #endif // TIMEEVENTS_H |