source: src/mvc/activity.h @ 807cbdb

qt5
Last change on this file since 807cbdb was 807cbdb, checked in by korrco <korrco@…>, 12 years ago

static allocation instead of dynamic added when creating activity map

  • Property mode set to 100644
File size: 759 bytes
Line 
1/*
2 * activity.h
3 *
4 *  Created on: Dec 27, 2009
5 *      Author: Pavol Korinek
6 */
7
8#ifndef ACTIVITY_H_
9#define ACTIVITY_H_
10
11#include <ormrecord.h>
12
13class Activity : public OrmRecord<Activity>
14{
15public:
16    static const QSqlRecord sColumns;
17    static QString const sTableName;
18    static const int sTableColCount;
19public:
20    static QMap<int, Activity> mIdToActivity;
21public:
22    static QList<Activity> getAll();
23    int id() const { return value("id").toInt(); }
24    void setId(int id) { setValue("id", id); }
25    QString name() const { return value("name").toString(); }
26    void setName(const QString & type) { setValue("name", type); }
27public:
28    static void updateActivityMap();
29    static QString getActivityName(int id);
30};
31
32#endif /* ACTIVITY_H_ */
Note: See TracBrowser for help on using the repository browser.