forked from madtreat/qt-dynamic-layout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
layoutprofile.h
48 lines (33 loc) · 1010 Bytes
/
layoutprofile.h
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
37
38
39
40
41
42
43
44
45
46
47
/*
* File: layoutprofile.h
* Author: madtreat
*
* Created on July 13, 2015, 1:39 PM
*/
#ifndef LAYOUTPROFILE_H
#define LAYOUTPROFILE_H
#include <QObject>
#include <QString>
#include "layoutitem.h"
class QSettings;
class LayoutProfile : public QObject {
Q_OBJECT;
public:
LayoutProfile(QString _filepath, QObject* _parent=0);
LayoutProfile(const LayoutProfile& orig) = delete;
virtual ~LayoutProfile();
int getGridWidth() const { return width; }
int getGridHeight() const { return height; }
int numItems() const { return itemList.size(); }
ItemList getItemlist() const { return itemList; }
LayoutItem* itemAt(int i) const { return itemList.at(i); }
LayoutItem* getItemByName(QString name) const;
private:
QString filepath; // filename including full path
QSettings* settings;
int width; // layout grid width
int height; // layout grid height
ItemList itemList;
void loadLayoutProfile();
};
#endif /* LAYOUTPROFILE_H */