1 | /* |
2 | * Copyright (C) 2010 Parker Coates <coates@kde.org> |
3 | * |
4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU General Public License as |
6 | * published by the Free Software Foundation; either version 2 of |
7 | * the License, or (at your option) any later version. |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | * |
17 | */ |
18 | |
19 | #ifndef PATPILE_H |
20 | #define PATPILE_H |
21 | |
22 | class DealerScene; |
23 | |
24 | #include "KCardPile" |
25 | |
26 | |
27 | class PatPile : public KCardPile |
28 | { |
29 | public: |
30 | enum PileRole |
31 | { |
32 | NoRole, |
33 | Stock, |
34 | Waste, |
35 | Tableau, |
36 | TableauType1 = Tableau, |
37 | TableauType2, |
38 | TableauType3, |
39 | TableauType4, |
40 | Foundation, |
41 | FoundationType1 = Foundation, |
42 | FoundationType2, |
43 | FoundationType3, |
44 | FoundationType4, |
45 | Cell |
46 | }; |
47 | |
48 | PatPile( DealerScene * scene, int index, const QString & objectName = QString() ); |
49 | virtual ~PatPile(); |
50 | |
51 | int index() const; |
52 | |
53 | void setPileRole( PileRole role ); |
54 | PileRole pileRole() const; |
55 | bool isFoundation() const; |
56 | |
57 | virtual QList<QPointF> cardPositions() const; |
58 | |
59 | protected: |
60 | virtual void paintGraphic( QPainter * painter, qreal highlightedness ); |
61 | |
62 | private: |
63 | int m_index; |
64 | PileRole m_role; |
65 | }; |
66 | |
67 | #endif |
68 | |