You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
599 B
27 lines
599 B
#ifndef MINESWEEPERBUTTON_H
|
|
#define MINESWEEPERBUTTON_H
|
|
|
|
#include<QPushButton>
|
|
|
|
class MineSweeperButton : public QPushButton
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
MineSweeperButton(QWidget* = 0);
|
|
MineSweeperButton(QString);
|
|
MineSweeperButton(int,int,QWidget* = 0);
|
|
int getRow() const;
|
|
int getColumn() const;
|
|
bool isFlaged() const;
|
|
void setFlaged(bool);
|
|
void setClicked(bool);
|
|
signals:
|
|
void rightButtonClicked();
|
|
protected:
|
|
void mousePressEvent(QMouseEvent*);
|
|
private:
|
|
int row,column;
|
|
bool flaged,clicked;
|
|
};
|
|
|
|
#endif // MINESWEEPERBUTTON_H
|
|
|