Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 4973a618 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECLARE_OVERRIDE

parent b32e3f6f
......@@ -28,7 +28,7 @@ namespace Palapeli
class ThumbCreator : public ::ThumbCreator
{
public:
virtual bool create(const QString& path, int width, int height, QImage& image);
bool create(const QString& path, int width, int height, QImage& image) Q_DECL_OVERRIDE;
};
}
......
......@@ -37,35 +37,35 @@ class PresetMode : public GoldbergMode
{
public:
PresetMode() : GoldbergMode("preset", i18nc("Puzzle grid type", "Predefined settings")) {}
virtual void generateGrid(GoldbergEngine *e, int piece_count) const;
void generateGrid(GoldbergEngine *e, int piece_count) const Q_DECL_OVERRIDE;
};
class CairoMode : public GoldbergMode
{
public:
CairoMode() : GoldbergMode("cairo", i18nc("Puzzle grid type", "Cairo (pentagonal) grid")) {}
virtual void generateGrid(GoldbergEngine *e, int piece_count) const;
void generateGrid(GoldbergEngine *e, int piece_count) const Q_DECL_OVERRIDE;
};
class HexMode : public GoldbergMode
{
public:
HexMode() : GoldbergMode("hex", i18nc("Puzzle grid type", "Hexagonal grid")) {}
virtual void generateGrid(GoldbergEngine *e, int piece_count) const;
void generateGrid(GoldbergEngine *e, int piece_count) const Q_DECL_OVERRIDE;
};
class RectMode : public GoldbergMode
{
public:
RectMode() : GoldbergMode("rect", i18nc("Puzzle grid type", "Rectangular grid")) {}
virtual void generateGrid(GoldbergEngine *e, int piece_count) const;
void generateGrid(GoldbergEngine *e, int piece_count) const Q_DECL_OVERRIDE;
};
class RotrexMode : public GoldbergMode
{
public:
RotrexMode() : GoldbergMode("rotrex", i18nc("Puzzle grid type", "Rotrex (rhombi-trihexagonal) grid")) {}
virtual void generateGrid(GoldbergEngine *e, int piece_count) const;
void generateGrid(GoldbergEngine *e, int piece_count) const Q_DECL_OVERRIDE;
};
class IrregularMode : public GoldbergMode
......@@ -76,7 +76,7 @@ class IrregularMode : public GoldbergMode
/// Checks if qvoronoi executable is there.
static bool checkForQVoronoi();
virtual void generateGrid(GoldbergEngine *e, int piece_count) const;
void generateGrid(GoldbergEngine *e, int piece_count) const Q_DECL_OVERRIDE;
private:
void generateVoronoiGrid(GoldbergEngine *e, QList<QPointF> cell_centers) const;
};
......
......@@ -28,7 +28,7 @@ class GoldbergSlicer : public Pala::Slicer {
Q_OBJECT
public:
explicit GoldbergSlicer(QObject* parent = 0, const QVariantList& args = QVariantList());
virtual bool run(Pala::SlicerJob* job);
bool run(Pala::SlicerJob* job) Q_DECL_OVERRIDE;
private:
bool m_qvoronoi_available;
......
......@@ -39,7 +39,7 @@ class JigsawSlicer : public Pala::Slicer, public Pala::SimpleGridPropertySet
Q_OBJECT
public:
explicit JigsawSlicer(QObject* parent = 0, const QVariantList& args = QVariantList());
virtual bool run(Pala::SlicerJob* job);
bool run(Pala::SlicerJob* job) Q_DECL_OVERRIDE;
protected:
void addPlugToPath(QPainterPath& path, qreal plugNormLength, const QLineF& line, const QPointF& plugDirection, const JigsawPlugParams& parameters);
};
......
......@@ -29,7 +29,7 @@ class RectSlicer : public Pala::Slicer, public Pala::SimpleGridPropertySet
Q_OBJECT
public:
explicit RectSlicer(QObject* parent = 0, const QVariantList& args = QVariantList());
virtual bool run(Pala::SlicerJob* job);
bool run(Pala::SlicerJob* job) Q_DECL_OVERRIDE;
};
#endif // PALAPELISLICERS_RECTSLICER_H
......@@ -36,12 +36,12 @@ namespace Palapeli
enum SolutionSpace { Center, None, TopLeft, TopRight,
BottomLeft, BottomRight };
protected:
virtual bool hasChanged();
virtual bool isDefault();
virtual void updateSettings();
virtual void updateWidgets();
virtual void updateWidgetsDefault();
virtual void showEvent(QShowEvent* event);
bool hasChanged() Q_DECL_OVERRIDE;
bool isDefault() Q_DECL_OVERRIDE;
void updateSettings() Q_DECL_OVERRIDE;
void updateWidgets() Q_DECL_OVERRIDE;
void updateWidgetsDefault() Q_DECL_OVERRIDE;
void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
private Q_SLOTS:
void solutionAreaChange(int index);
private:
......
......@@ -28,13 +28,13 @@ namespace Palapeli
public:
ElidingLabel(QWidget* parent = 0);
virtual QSize minimumSizeHint() const;
virtual QSize sizeHint() const;
QSize minimumSizeHint() const Q_DECL_OVERRIDE;
QSize sizeHint() const Q_DECL_OVERRIDE;
QString fullText() const;
void setFullText(const QString& text);
protected:
virtual void resizeEvent(QResizeEvent* event);
void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE;
private:
QString m_fullText;
};
......
......@@ -33,7 +33,7 @@ namespace Palapeli
Q_OBJECT
public:
MouseInputButton(QWidget* parent = 0);
virtual QSize sizeHint() const;
QSize sizeHint() const Q_DECL_OVERRIDE;
///If unset, this button will not generate any wheel triggers.
bool isMouseAllowed() const;
......@@ -58,7 +58,7 @@ namespace Palapeli
void confirmTrigger(const Palapeli::Trigger& trigger);
void setTrigger(const Palapeli::Trigger& trigger);
protected:
bool event(QEvent* event);
bool event(QEvent* event) Q_DECL_OVERRIDE;
private:
void updateAppearance();
void applyTrigger(const Palapeli::Trigger& newTrigger);
......
......@@ -36,23 +36,23 @@ namespace Palapeli
Q_SIGNALS:
void clicked();
protected:
virtual void enterEvent(QEvent*)
void enterEvent(QEvent*) Q_DECL_OVERRIDE
{
//TODO: respect global icon size configuration
setPixmap(m_icon.pixmap(16, QIcon::Active));
}
virtual void leaveEvent(QEvent*)
void leaveEvent(QEvent*) Q_DECL_OVERRIDE
{
setPixmap(m_icon.pixmap(16, QIcon::Normal));
}
virtual void mousePressEvent(QMouseEvent* event)
void mousePressEvent(QMouseEvent* event) Q_DECL_OVERRIDE
{
if (event->button() == Qt::LeftButton)
event->accept();
else
QLabel::mousePressEvent(event);
}
virtual void mouseReleaseEvent(QMouseEvent* event)
void mouseReleaseEvent(QMouseEvent* event) Q_DECL_OVERRIDE
{
if (event->button() == Qt::LeftButton)
{
......
......@@ -43,13 +43,13 @@ namespace Palapeli
setCategorizedModel(true);
}
protected:
virtual int compareCategories(const QModelIndex& left, const QModelIndex& right) const
int compareCategories(const QModelIndex& left, const QModelIndex& right) const Q_DECL_OVERRIDE
{
const int categoryLeft = left.data(KCategorizedSortFilterProxyModel::CategorySortRole).value<int>();
const int categoryRight = right.data(KCategorizedSortFilterProxyModel::CategorySortRole).value<int>();
return categoryRight - categoryLeft;
}
virtual bool subSortLessThan(const QModelIndex& left, const QModelIndex& right) const
bool subSortLessThan(const QModelIndex& left, const QModelIndex& right) const Q_DECL_OVERRIDE
{
const QString textLeft = left.data(Qt::DisplayRole).toString();
const QString textRight = right.data(Qt::DisplayRole).toString();
......@@ -112,22 +112,22 @@ namespace Palapeli
m_calculator = new Palapeli::TriggerListDelegateWidget(view);
m_calculator->setVisible(false);
}
virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const Q_DECL_OVERRIDE
{
Q_UNUSED(index)
QApplication::style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &option, painter, 0);
}
virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const Q_DECL_OVERRIDE
{
updateItemWidgets(QList<QWidget*>() << m_calculator, option, index);
return m_calculator->minimumSizeHint();
}
protected:
virtual QList<QWidget*> createItemWidgets(const QModelIndex &index) const
QList<QWidget*> createItemWidgets(const QModelIndex &index) const Q_DECL_OVERRIDE
{
return QList<QWidget*>() << new Palapeli::TriggerListDelegateWidget(itemView());
}
virtual void updateItemWidgets(QList<QWidget*> widgets, const QStyleOptionViewItem& option, const QPersistentModelIndex& index) const
void updateItemWidgets(QList<QWidget*> widgets, const QStyleOptionViewItem& option, const QPersistentModelIndex& index) const Q_DECL_OVERRIDE
{
Palapeli::TriggerListDelegateWidget* widget = qobject_cast<Palapeli::TriggerListDelegateWidget*>(widgets[0]);
//adjust widget contents
......
......@@ -31,9 +31,9 @@ namespace Palapeli
{
public:
BooleanPropertyWidget();
virtual QVariant propertyValue() const;
QVariant propertyValue() const Q_DECL_OVERRIDE;
protected:
virtual void initialize(const Pala::SlicerProperty* property);
void initialize(const Pala::SlicerProperty* property) Q_DECL_OVERRIDE;
private:
QCheckBox* m_checkBox;
};
......@@ -42,9 +42,9 @@ namespace Palapeli
{
public:
IntegerPropertyWidget();
virtual QVariant propertyValue() const;
QVariant propertyValue() const Q_DECL_OVERRIDE;
protected:
virtual void initialize(const Pala::SlicerProperty* property);
void initialize(const Pala::SlicerProperty* property) Q_DECL_OVERRIDE;
private:
KComboBox* m_comboBox;
QSpinBox* m_spinBox;
......@@ -55,9 +55,9 @@ namespace Palapeli
{
public:
StringPropertyWidget();
virtual QVariant propertyValue() const;
QVariant propertyValue() const Q_DECL_OVERRIDE;
protected:
virtual void initialize(const Pala::SlicerProperty* property);
void initialize(const Pala::SlicerProperty* property) Q_DECL_OVERRIDE;
private:
KComboBox* m_comboBox;
KLineEdit* m_lineEdit;
......
......@@ -33,11 +33,11 @@ namespace Palapeli
{ if (noPainting) setFlag(QGraphicsItem::ItemHasNoContents); }
//empty QGraphicsItem reimplementation
virtual QRectF boundingRect() const { return QRectF(); }
virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) {}
QRectF boundingRect() const Q_DECL_OVERRIDE { return QRectF(); }
void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) Q_DECL_OVERRIDE {}
//enable qgraphicsitem_cast
enum { Type = QGraphicsItem::UserType + userType };
virtual int type() const { return Type; }
int type() const Q_DECL_OVERRIDE { return Type; }
};
enum GraphicsObjectUserTypes
......
......@@ -28,9 +28,9 @@ namespace Palapeli
public:
ConstraintInteractor(QGraphicsView* view);
protected:
virtual bool startInteraction(const Palapeli::MouseEvent& event);
virtual void continueInteraction(const Palapeli::MouseEvent& event);
virtual void stopInteraction(const Palapeli::MouseEvent& event);
bool startInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
void continueInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
void stopInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
private:
enum Side { LeftSide = 0, RightSide, TopSide, BottomSide };
QList<Side> touchingSides(const QPointF& scenePos) const;
......
......@@ -36,9 +36,9 @@ namespace Palapeli
public:
MovePieceInteractor(QGraphicsView* view);
protected:
virtual bool startInteraction(const Palapeli::MouseEvent& event);
virtual void continueInteraction(const Palapeli::MouseEvent& event);
virtual void stopInteraction(const Palapeli::MouseEvent& event);
bool startInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
void continueInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
void stopInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
protected Q_SLOTS:
void pieceReplacedBy(Palapeli::Piece* replacement);
private:
......@@ -58,8 +58,8 @@ namespace Palapeli
public:
SelectPieceInteractor(QGraphicsView* view);
protected:
virtual bool startInteraction(const Palapeli::MouseEvent& event);
virtual void stopInteraction(const Palapeli::MouseEvent& event);
bool startInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
void stopInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
private:
Palapeli::Piece* m_currentPiece;
};
......@@ -83,7 +83,7 @@ namespace Palapeli
public:
TeleportPieceInteractor(QGraphicsView* view);
protected:
virtual bool startInteraction(const Palapeli::MouseEvent& event);
bool startInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
};
//This interactor is assigned to RightButton;NoModifier by default.
......@@ -93,8 +93,8 @@ namespace Palapeli
public:
MoveViewportInteractor(QGraphicsView* view);
protected:
virtual bool startInteraction(const Palapeli::MouseEvent& event);
virtual void continueInteraction(const Palapeli::MouseEvent& event);
bool startInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
void continueInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
private:
QPoint m_lastPos;
};
......@@ -106,7 +106,7 @@ namespace Palapeli
public:
ToggleCloseUpInteractor(QGraphicsView* view);
protected:
virtual bool startInteraction(const Palapeli::MouseEvent& event);
bool startInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
};
//This interactor is assigned to wheel:Vertical;NoModifier by default.
......@@ -116,7 +116,7 @@ namespace Palapeli
public:
ZoomViewportInteractor(QGraphicsView* view);
protected:
virtual void doInteraction(const Palapeli::WheelEvent& event);
void doInteraction(const Palapeli::WheelEvent& event) Q_DECL_OVERRIDE;
};
//This interactor is assigned to nothing by default.
......@@ -126,7 +126,7 @@ namespace Palapeli
public:
ScrollViewportInteractor(Qt::Orientation orientation, QGraphicsView* view);
protected:
virtual void doInteraction(const Palapeli::WheelEvent& event);
void doInteraction(const Palapeli::WheelEvent& event) Q_DECL_OVERRIDE;
private:
Qt::Orientation m_orientation;
};
......@@ -139,8 +139,8 @@ namespace Palapeli
QRectF rect() const;
void setRect(const QRectF& rect);
virtual QRectF boundingRect() const;
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
QRectF boundingRect() const Q_DECL_OVERRIDE;
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) Q_DECL_OVERRIDE;
private:
QRectF m_rect;
};
......@@ -153,10 +153,10 @@ namespace Palapeli
RubberBandInteractor(QGraphicsView* view);
virtual ~RubberBandInteractor();
protected:
virtual void sceneChangeEvent(QGraphicsScene* oldScene, QGraphicsScene* newScene);
virtual bool startInteraction(const Palapeli::MouseEvent& event);
virtual void continueInteraction(const Palapeli::MouseEvent& event);
virtual void stopInteraction(const Palapeli::MouseEvent& event);
void sceneChangeEvent(QGraphicsScene* oldScene, QGraphicsScene* newScene) Q_DECL_OVERRIDE;
bool startInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
void continueInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
void stopInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
private:
Palapeli::RubberBandItem* m_item;
QPointF m_basePosition;
......@@ -169,7 +169,7 @@ namespace Palapeli
public:
ToggleConstraintInteractor(QGraphicsView* view);
protected:
virtual bool startInteraction(const Palapeli::MouseEvent& event);
bool startInteraction(const Palapeli::MouseEvent& event) Q_DECL_OVERRIDE;
};
}
......
......@@ -34,7 +34,7 @@ namespace Palapeli
{
}
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) Q_DECL_OVERRIDE
{
//suppress the ugly selection outline (we have much nicer selection indications in Palapeli::Piece)
QStyleOptionGraphicsItem opt(*option);
......@@ -44,7 +44,7 @@ namespace Palapeli
Q_SIGNALS:
void selectedChanged(bool selected);
protected:
virtual QVariant itemChange(GraphicsItemChange change, const QVariant& value)
QVariant itemChange(GraphicsItemChange change, const QVariant& value) Q_DECL_OVERRIDE
{
if (change == ItemSelectedChange)
emit selectedChanged(value.toBool());
......
......@@ -43,12 +43,12 @@ namespace Palapeli
void closing();
protected:
virtual void mouseMoveEvent(QMouseEvent* event);
virtual void enterEvent(QEvent* event);
virtual void leaveEvent(QEvent* event);
virtual void resizeEvent(QResizeEvent* event);
virtual void moveEvent(QMoveEvent *event);
virtual void closeEvent(QCloseEvent* event);
void mouseMoveEvent(QMouseEvent* event) Q_DECL_OVERRIDE;
void enterEvent(QEvent* event) Q_DECL_OVERRIDE;
void leaveEvent(QEvent* event) Q_DECL_OVERRIDE;
void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE;
void moveEvent(QMoveEvent *event) Q_DECL_OVERRIDE;
void closeEvent(QCloseEvent* event) Q_DECL_OVERRIDE;
void updateViewport();
private Q_SLOTS:
......
......@@ -59,12 +59,12 @@ namespace Palapeli
void zoomBy(int delta); //delta = 0 -> no change, delta < 0 -> zoom out, delta > 0 -> zoom in
void zoomTo(int level); //level = 100 -> actual size
protected:
virtual void keyPressEvent(QKeyEvent* event);
virtual void keyReleaseEvent(QKeyEvent* event);
virtual void mouseMoveEvent(QMouseEvent* event);
virtual void mousePressEvent(QMouseEvent* event);
virtual void mouseReleaseEvent(QMouseEvent* event);
virtual void wheelEvent(QWheelEvent* event);
void keyPressEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
void keyReleaseEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
void mouseMoveEvent(QMouseEvent* event) Q_DECL_OVERRIDE;
void mousePressEvent(QMouseEvent* event) Q_DECL_OVERRIDE;
void mouseReleaseEvent(QMouseEvent* event) Q_DECL_OVERRIDE;
void wheelEvent(QWheelEvent* event) Q_DECL_OVERRIDE;
Q_SIGNALS:
void zoomLevelChanged(int level);
void zoomAdjustable(bool adjustable);
......
......@@ -28,11 +28,11 @@ namespace Palapeli
public:
CollectionDelegate (QObject* parent = 0);
virtual void paint (QPainter* painter,
void paint (QPainter* painter,
const QStyleOptionViewItem& option,
const QModelIndex& index) const;
virtual QSize sizeHint (const QStyleOptionViewItem& option,
const QModelIndex& index) const;
const QModelIndex& index) const Q_DECL_OVERRIDE;
QSize sizeHint (const QStyleOptionViewItem& option,
const QModelIndex& index) const Q_DECL_OVERRIDE;
private:
QRect thumbnailRect (const QRect& baseRect) const;
......
......@@ -28,7 +28,7 @@ class KTempDir;
#define COMPONENT_SUBCLASS(mytype) \
public: \
enum { ComponentType = mytype }; \
virtual Type type() const { return mytype; }
Type type() const Q_DECL_OVERRIDE { return mytype; }
namespace Palapeli
{
......@@ -58,7 +58,7 @@ namespace Palapeli
CreationContextComponent(const Palapeli::PuzzleCreationContext& creationContext) : creationContext(creationContext) {}
Palapeli::PuzzleCreationContext creationContext;
virtual Palapeli::PuzzleComponent* cast(Type type) const;
Palapeli::PuzzleComponent* cast(Type type) const Q_DECL_OVERRIDE;
};
///This component copies the data (i.e. everything in puzzlestructs.h) from
......@@ -69,7 +69,7 @@ namespace Palapeli
public:
CopyComponent(Palapeli::Puzzle* puzzle);
virtual Palapeli::PuzzleComponent* cast(Type type) const;
Palapeli::PuzzleComponent* cast(Type type) const Q_DECL_OVERRIDE;
private:
Palapeli::Puzzle* m_puzzle;
};
......@@ -84,7 +84,7 @@ namespace Palapeli
virtual ~DirectoryStorageComponent();
QString directory() const;
virtual Palapeli::PuzzleComponent* cast(Type type) const;
Palapeli::PuzzleComponent* cast(Type type) const Q_DECL_OVERRIDE;
private:
KTempDir* m_dir;
};
......@@ -97,7 +97,7 @@ namespace Palapeli
ArchiveStorageComponent();
static Palapeli::ArchiveStorageComponent* fromData(Palapeli::Puzzle* puzzle);
virtual Palapeli::PuzzleComponent* cast(Type type) const;
Palapeli::PuzzleComponent* cast(Type type) const Q_DECL_OVERRIDE;
};
///This is a valid mainComponent.
......@@ -109,7 +109,7 @@ namespace Palapeli
CollectionStorageComponent(KConfigGroup* group);
virtual ~CollectionStorageComponent();
virtual Palapeli::PuzzleComponent* cast(Type type) const;
Palapeli::PuzzleComponent* cast(Type type) const Q_DECL_OVERRIDE;
private:
KConfigGroup* m_group;
};
......@@ -123,7 +123,7 @@ namespace Palapeli
public:
RetailStorageComponent(const QString& desktopFile);
virtual Palapeli::PuzzleComponent* cast(Type type) const;
Palapeli::PuzzleComponent* cast(Type type) const Q_DECL_OVERRIDE;
private:
QString m_desktopFile;
};
......
......@@ -29,9 +29,9 @@ namespace Palapeli
public:
LoadingWidget(QWidget* parent = 0);
protected:
virtual void showEvent(QShowEvent* event);
virtual void hideEvent(QHideEvent* event);
virtual void paintEvent(QPaintEvent* event);
void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
void hideEvent(QHideEvent* event) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE;
private:
QTimer* m_updateTimer;
int m_angleDegrees;
......
......@@ -36,7 +36,7 @@ namespace Palapeli
public:
MainWindow(const QString &path);
protected:
virtual bool queryClose();
bool queryClose() Q_DECL_OVERRIDE;
private Q_SLOTS:
void enableMessages();
private:
......
......@@ -51,8 +51,8 @@ namespace Palapeli
void setSelected(bool onOff);
QString name() { return windowTitle(); }
protected:
virtual void focusInEvent(QFocusEvent* e);
virtual void closeEvent(QCloseEvent* event);
void focusInEvent(QFocusEvent* e) Q_DECL_OVERRIDE;
void closeEvent(QCloseEvent* event) Q_DECL_OVERRIDE;
Q_SIGNALS:
void selected(PieceHolder* h);
void closing(PieceHolder* h);
......
......@@ -38,7 +38,7 @@ namespace Palapeli
public:
TextProgressBar(QWidget* parent = 0) : QProgressBar(parent) {}
virtual QString text() const { return m_text; }
QString text() const Q_DECL_OVERRIDE { return m_text; }
void setText(const QString& text) { m_text = text; update(); }
private:
QString m_text;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment