Adding icon
[impuzzle] / src / settings.cpp
1 #include "settings.h"
2 #include "defines.h"
3
4 Settings *Settings::instance_ = 0;
5
6 Settings::Settings(QObject *parent) :
7         QObject(parent)
8 {
9     pieceCount_ = EASY_PIECE_COUNT;
10     image_ = 0;
11 }
12
13 Settings *Settings::instance()
14 {
15     if(!instance_) {
16         instance_ = new Settings;
17     }
18
19     return instance_;
20 }
21
22 int Settings::pieceCount() const
23 {
24     return pieceCount_;
25 }
26
27 void Settings::setPieceCount(const int pieces)
28 {
29     pieceCount_ = pieces;
30 }
31
32 QPixmap Settings::image() const
33 {
34     return image_;
35 }
36
37 void Settings::setImage(const QPixmap &image)
38 {
39     image_ = image;
40 }