Commit b2fbd2f9 authored by Yann Boucher's avatar Yann Boucher
Browse files

Fixed what the fix broke

parent b54d8ad4
Pipeline #78761 passed with stages
in 17 seconds
......@@ -619,7 +619,7 @@ EXCLUDE_PATTERNS =
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# AClass::ANamespace, ANamespace::*Test
EXCLUDE_SYMBOLS =
EXCLUDE_SYMBOLS = detail
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
......
......@@ -29,7 +29,26 @@ Cette classe représente le widget utilisé pour l'affichage et l'interaction av
namespace detail
{
class Graphics_view_zoom;
//! \class Graphics_view_zoom
//! Classe permettant l'implémentation d'un zoom au travers d'un event filter.
//! Détail d'implémentation.
//! based on https://stackoverflow.com/questions/19113532/qgraphicsview-zooming-in-and-out-under-mouse-position-using-mouse-wheel
class Graphics_view_zoom : public QObject {
Q_OBJECT
public:
Graphics_view_zoom(QGraphicsView* view);
void gentle_zoom(double factor);
void set_zoom_factor_base(double value);
private:
QGraphicsView* _view;
double _zoom_factor_base;
QPointF target_scene_pos, target_viewport_pos;
bool eventFilter(QObject* object, QEvent* event);
signals:
void zoomed();
};
}
class GridItem;
class GridView;
......
......@@ -72,7 +72,6 @@ private:
std::string m_data;
};
//! \class RLEStructureReader
//! \brief Lit une structure au format Extended RLE de Golly (https://www.conwaylife.com/wiki/Run_Length_Encoded)
class RLEStructureReader : public StructureReader
{
......@@ -87,7 +86,6 @@ private:
void read_comment_line(Structure& s);
};
//! \class StructureReader
//! \brief Lit une structure au format JSON.
class JSONStructureReader : public StructureReader
{
......
......@@ -17,7 +17,7 @@ Fichier contenant la classe StructureWrite et ses filles, permettant de sauvegar
#include "structure.hpp"
//! \class StructureWrite
//! \class StructureWriter
//! \brief Classe abstraite permettant de sauvegarder une Structure sous différents formats de fichier.
class StructureWriter
{
......@@ -29,7 +29,7 @@ public:
virtual std::string save_structure(const Structure& s) const = 0;
};
//! \class RLEStructureWrite
//! \class RLEStructureWriter
//! \brief Sauvegarde une structure au format Extended RLE de Golly (https://www.conwaylife.com/wiki/Run_Length_Encoded)
class RLEStructureWriter : public StructureWriter
{
......@@ -46,7 +46,7 @@ private:
mutable unsigned m_x, m_y;
};
//! \class JSONStructureWrite
//! \class JSONStructureWriter
//! \brief Sauvegarde une structure au format JSON
class JSONStructureWriter : public StructureWriter
{
......
......@@ -38,27 +38,6 @@ static QColor stateColor_to_QColor(const stateColor& sc)
namespace detail
{
//! \class Graphics_view_zoom
//! Classe permettant l'implémentation d'un zoom au travers d'un event filter.
//! Détail d'implémentation.
//! based on https://stackoverflow.com/questions/19113532/qgraphicsview-zooming-in-and-out-under-mouse-position-using-mouse-wheel
class Graphics_view_zoom : public QObject {
Q_OBJECT
public:
Graphics_view_zoom(QGraphicsView* view);
void gentle_zoom(double factor);
void set_zoom_factor_base(double value);
private:
QGraphicsView* _view;
double _zoom_factor_base;
QPointF target_scene_pos, target_viewport_pos;
bool eventFilter(QObject* object, QEvent* event);
signals:
void zoomed();
};
Graphics_view_zoom::Graphics_view_zoom(QGraphicsView* view)
: QObject(view), _view(view)
{
......
......@@ -52,6 +52,7 @@ HEADERS += \
../include/neighborhood.hpp \
../include/factory.hpp \
../include/structurereader.hpp \
../include/structurewriter.hpp \
../include/gridview.hpp \
../include/interface.hpp \
../include/grid.h \
......
Supports Markdown
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