blob: 668fda730487e4081b06e71b8a715fe13cc94e65 (
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
|
#ifndef OPIE_DATE_BOOK_MANAGER_TEMPLATE_H
#define OPIE_DATE_BOOK_MANAGER_TEMPLATE_H
#include <qdialog.h>
#include <qstring.h>
namespace Datebook {
/**
* ManagerTemplate is a template which manages
* all kind of managers :)
*/
template<class T>
class ManagerTemplate {
public:
ManagerTemplate();
~ManagerTemplate();
virtual void add( const QString&, const T& t );
void remove( const QString& );
bool load();
bool save();
QStringList names();
T value(const QString&)const;
protected:
QMap<QString, T> m_map;
private:
virtual bool doSave() = 0;
virtual bool doLoad() = 0;
};
}
#endif
|