Debian Codegraph @

src/theme.h

raw symbols SCIP
1 /***************************************************************************
2 * Copyright (C) 2002-2003 Andi Peredri *
3 * [email protected] *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20
21 #ifndef THEME_H
22 #define THEME_H
23
24 #include <QtWidgets>
25 #include <qpixmap.h>
26
27 class Theme : public QObject {
28 Q_OBJECT
29
30 public:
31 Theme(QObject*, const QString&, int);
32
33 QPixmap& getMan1(bool);
34 QPixmap& getMan2(bool);
35 QPixmap& getKing1(bool);
36 QPixmap& getKing2(bool);
37
38 QPixmap& getChecker(int, bool);
39
40 QPixmap& getPattern1();
41 QPixmap& getPattern2();
42 QPixmap& getPattern(int);
43 QPixmap& getFrame();
44
45 void setTargetSize(int);
46 int getFieldWidth();
47 int getFieldHeight();
48
49 bool getIsResizeable();
50
51 bool isValid();
52 void reset();
53
54 const QString name();
55
56 private:
57
58 void render(const QString&, QPixmap& result, bool&);
59 QSettings* settings;
60
61 QString m_path;
62 int m_target_size;
63
64 QString m_man_white_path;
65 QString m_man_black_path;
66 QString m_king_white_path;
67 QString m_king_black_path;
68
69 QString m_pat1_path;
70 QString m_pat2_path;
71 QString m_frame_path;
72
73 QPixmap m_man_white;
74 bool m_man_white_valid;
75 QPixmap m_man_black;
76 bool m_man_black_valid;
77 QPixmap m_king_white;
78 bool m_king_white_valid;
79 QPixmap m_king_black;
80 bool m_king_black_valid;
81
82 QPixmap m_pattern1;
83 bool m_pattern1_valid;
84 QPixmap m_pattern2;
85 bool m_pattern2_valid;
86 QPixmap m_frame;
87 bool m_frame_valid;
88
89 QPixmap m_empty_pixmap;
90
91 };
92
93 #endif