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 // KCardGame
23 #include <KCardPile>
24 
25 class DealerScene;
26 
27 
28 
29 class PatPile : public KCardPile
30 {
31 public:
32     enum PileRole
33     {
34         NoRole,
35         Stock,
36         Waste,
37         Tableau,
38         TableauType1 = Tableau,
39         TableauType2,
40         TableauType3,
41         TableauType4,
42         Foundation,
43         FoundationType1 = Foundation,
44         FoundationType2,
45         FoundationType3,
46         FoundationType4,
47         Cell
48     };
49 
50     PatPile( DealerScene * scene, int index, const QString & objectName = QString() );
51     virtual ~PatPile();
52 
53     int index() const;
54 
55     void setPileRole( PileRole role );
56     PileRole pileRole() const;
57     bool isFoundation() const;
58 
59     QList<QPointF> cardPositions() const override;
60 
61 protected:
62     void paintGraphic( QPainter * painter, qreal highlightedness ) override;
63 
64 private:
65     int m_index;
66     PileRole m_role;
67 };
68 
69 #endif
70