blob: e8a3eaf844ca81369b3e882e727e55f3cf113f1d (
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
|
/*
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 SMUBERMODELSINGLETON_H
#define SMUBERMODELSINGLETON_H
#include <QHash>
class QAbstractItemModel;
class SmModelSingleton : public QObject {
Q_OBJECT
public:
~SmModelSingleton();
static SmModelSingleton *instance();
QAbstractItemModel *model(const QString &which);
private:
SmModelSingleton() {}
SmModelSingleton(const SmModelSingleton &other);
SmModelSingleton &operator=(const SmModelSingleton &other);
static SmModelSingleton *mInstance;
QHash<QString, QAbstractItemModel*> mModels;
};
#endif
|