Changeset View
Changeset View
Standalone View
Standalone View
dealer.h
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | |||||
66 | public: | 66 | public: | ||
67 | enum { None = 0, Hint = 1, Demo = 2, Draw = 4, Deal = 8, Redeal = 16 } Actions; | 67 | enum { None = 0, Hint = 1, Demo = 2, Draw = 4, Deal = 8, Redeal = 16 } Actions; | ||
68 | 68 | | |||
69 | explicit DealerScene( const DealerInfo * di ); | 69 | explicit DealerScene( const DealerInfo * di ); | ||
70 | ~DealerScene(); | 70 | ~DealerScene(); | ||
71 | 71 | | |||
72 | virtual void initialize() = 0; | 72 | virtual void initialize() = 0; | ||
73 | 73 | | |||
74 | void relayoutScene() Q_DECL_OVERRIDE; | 74 | void relayoutScene() override; | ||
75 | void updateWonItem(); | 75 | void updateWonItem(); | ||
76 | 76 | | |||
77 | void addPatPile( PatPile * pile ); | 77 | void addPatPile( PatPile * pile ); | ||
78 | void removePatPile( PatPile * pile ); | 78 | void removePatPile( PatPile * pile ); | ||
79 | QList<PatPile*> patPiles() const; | 79 | QList<PatPile*> patPiles() const; | ||
80 | 80 | | |||
81 | void setAutoDropEnabled( bool enabled ); | 81 | void setAutoDropEnabled( bool enabled ); | ||
82 | bool autoDropEnabled() const; | 82 | bool autoDropEnabled() const; | ||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 142 | public slots: | |||
146 | void redo(); | 146 | void redo(); | ||
147 | 147 | | |||
148 | void stop(); | 148 | void stop(); | ||
149 | 149 | | |||
150 | void drawDealRowOrRedeal(); | 150 | void drawDealRowOrRedeal(); | ||
151 | virtual bool tryAutomaticMove( KCard * card ); | 151 | virtual bool tryAutomaticMove( KCard * card ); | ||
152 | 152 | | |||
153 | protected: | 153 | protected: | ||
154 | bool allowedToAdd(const KCardPile * pile, const QList<KCard*> & cards) const Q_DECL_OVERRIDE; | 154 | bool allowedToAdd(const KCardPile * pile, const QList<KCard*> & cards) const override; | ||
155 | bool allowedToRemove(const KCardPile * pile, const KCard * card) const Q_DECL_OVERRIDE; | 155 | bool allowedToRemove(const KCardPile * pile, const KCard * card) const override; | ||
156 | 156 | | |||
157 | virtual bool checkAdd( const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards ) const; | 157 | virtual bool checkAdd( const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards ) const; | ||
158 | virtual bool checkRemove( const PatPile * pile, const QList<KCard*> & cards ) const; | 158 | virtual bool checkRemove( const PatPile * pile, const QList<KCard*> & cards ) const; | ||
159 | virtual bool checkPrefering( const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards ) const; | 159 | virtual bool checkPrefering( const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards ) const; | ||
160 | 160 | | |||
161 | void cardsMoved( const QList<KCard*> & cards, KCardPile * oldPile, KCardPile * newPile ) Q_DECL_OVERRIDE; | 161 | void cardsMoved( const QList<KCard*> & cards, KCardPile * oldPile, KCardPile * newPile ) override; | ||
162 | 162 | | |||
163 | void mouseDoubleClickEvent( QGraphicsSceneMouseEvent * mouseEvent ) Q_DECL_OVERRIDE; | 163 | void mouseDoubleClickEvent( QGraphicsSceneMouseEvent * mouseEvent ) override; | ||
164 | void mousePressEvent( QGraphicsSceneMouseEvent * mouseEvent ) Q_DECL_OVERRIDE; | 164 | void mousePressEvent( QGraphicsSceneMouseEvent * mouseEvent ) override; | ||
165 | void mouseReleaseEvent( QGraphicsSceneMouseEvent * mouseEvent ) Q_DECL_OVERRIDE; | 165 | void mouseReleaseEvent( QGraphicsSceneMouseEvent * mouseEvent ) override; | ||
166 | 166 | | |||
167 | virtual void restart( const QList<KCard*> & cards ) = 0; | 167 | virtual void restart( const QList<KCard*> & cards ) = 0; | ||
168 | 168 | | |||
169 | void setSolver( SolverInterface * solver ); | 169 | void setSolver( SolverInterface * solver ); | ||
170 | 170 | | |||
171 | virtual QList<MoveHint> getHints(); | 171 | virtual QList<MoveHint> getHints(); | ||
172 | 172 | | |||
173 | // reimplement these to store and load game-specific information in the state structure | 173 | // reimplement these to store and load game-specific information in the state structure | ||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |