mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-05 04:53:54 -07:00
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check * 2/3 Run clang-format * 3/3 Fix compilation problems due to include reordering * 3bis/3 AfterControlStatement: false
This commit is contained in:
parent
8dbdd24c8e
commit
b29bd9e070
272 changed files with 13378 additions and 9535 deletions
|
|
@ -7,7 +7,8 @@ class Player;
|
|||
class QMenu;
|
||||
class QAction;
|
||||
|
||||
class AbstractCounter : public QObject, public QGraphicsItem {
|
||||
class AbstractCounter : public QObject, public QGraphicsItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QGraphicsItem)
|
||||
protected:
|
||||
|
|
@ -16,10 +17,11 @@ protected:
|
|||
QString name;
|
||||
int value;
|
||||
bool useNameForShortcut, hovered;
|
||||
|
||||
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
|
||||
private:
|
||||
QAction *aSet, *aDec, *aInc;
|
||||
QMenu *menu;
|
||||
|
|
@ -29,17 +31,39 @@ private slots:
|
|||
void refreshShortcuts();
|
||||
void incrementCounter();
|
||||
void setCounter();
|
||||
|
||||
public:
|
||||
AbstractCounter(Player *_player, int _id, const QString &_name, bool _shownInCounterArea, int _value, bool _useNameForShortcut = false, QGraphicsItem *parent = 0);
|
||||
AbstractCounter(Player *_player,
|
||||
int _id,
|
||||
const QString &_name,
|
||||
bool _shownInCounterArea,
|
||||
int _value,
|
||||
bool _useNameForShortcut = false,
|
||||
QGraphicsItem *parent = 0);
|
||||
~AbstractCounter();
|
||||
|
||||
QMenu *getMenu() const { return menu; }
|
||||
|
||||
QMenu *getMenu() const
|
||||
{
|
||||
return menu;
|
||||
}
|
||||
void retranslateUi();
|
||||
|
||||
int getId() const { return id; }
|
||||
QString getName() const { return name; }
|
||||
bool getShownInCounterArea() const { return shownInCounterArea; }
|
||||
int getValue() const { return value; }
|
||||
|
||||
int getId() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
QString getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
bool getShownInCounterArea() const
|
||||
{
|
||||
return shownInCounterArea;
|
||||
}
|
||||
int getValue() const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
void setValue(int _value);
|
||||
void delCounter();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue