Commit 06cff8e2 authored by Yann Boucher's avatar Yann Boucher
Browse files

uniformisation de l'utilisation de l'extension .hpp

parent 6a77e363
Pipeline #79835 passed with stages
in 16 seconds
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>NeighborhoodWidget</class>
<widget class="QWidget" name="NeighborhoodWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>993</width>
<height>518</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QHBoxLayout" name="mainLayout" stretch="1,0">
<item>
<widget class="QWidget" name="grid" native="true">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="GridView" name="grid_view">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="settingsLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<layout class="QFormLayout" name="gridDimLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::FieldsStayAtSizeHint</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="widthLabel">
<property name="text">
<string>Width :</string>
</property>
<property name="buddy">
<cstring>widthSpinBox</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="widthSpinBox">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>9999</number>
</property>
<property name="value">
<number>10</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="heightLabel">
<property name="text">
<string>Height :</string>
</property>
<property name="buddy">
<cstring>heightSpinBox</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="heightSpinBox">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>9999</number>
</property>
<property name="value">
<number>10</number>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="validateGridDim">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>GridView</class>
<extends>QFrame</extends>
<header>gridview.hpp</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
...@@ -10,7 +10,7 @@ Cette classe représente un automate cellulaire. ...@@ -10,7 +10,7 @@ Cette classe représente un automate cellulaire.
#include "neighborhoodrule.hpp" #include "neighborhoodrule.hpp"
#include "transitionrule.hpp" #include "transitionrule.hpp"
#include "grid.h" #include "grid.hpp"
#include "alphabet.hpp" #include "alphabet.hpp"
//! \brief Représente une configuration d'un automate à un instant t : ses règles de voisinage et transition et son réseau. //! \brief Représente une configuration d'un automate à un instant t : ses règles de voisinage et transition et son réseau.
......
...@@ -24,8 +24,8 @@ Cette classe représente le widget utilisé pour l'affichage et l'interaction av ...@@ -24,8 +24,8 @@ Cette classe représente le widget utilisé pour l'affichage et l'interaction av
#include "structure.hpp" #include "structure.hpp"
#include "alphabet.hpp" #include "alphabet.hpp"
#include "grid.h" #include "grid.hpp"
#include "history.h" #include "history.hpp"
namespace detail namespace detail
{ {
......
...@@ -12,7 +12,7 @@ Cette classe représente un historique de Grids. ...@@ -12,7 +12,7 @@ Cette classe représente un historique de Grids.
#ifndef HISTORY_H #ifndef HISTORY_H
#define HISTORY_H #define HISTORY_H
#include "grid.h" #include "grid.hpp"
#include <string> #include <string>
#include <deque> #include <deque>
#include <exception> #include <exception>
......
...@@ -16,7 +16,7 @@ Cette classe peut aussi fournir l'ensemble des positions de voisins qu'elle peut ...@@ -16,7 +16,7 @@ Cette classe peut aussi fournir l'ensemble des positions de voisins qu'elle peut
#include <vector> #include <vector>
#include "coord.hpp" #include "coord.hpp"
#include "grid.h" #include "grid.hpp"
#include "neighborhood.hpp" #include "neighborhood.hpp"
#include "factory.hpp" #include "factory.hpp"
#include "property.hpp" #include "property.hpp"
......
...@@ -9,8 +9,8 @@ Cette classe représente un automate cellulaire dans le temps. ...@@ -9,8 +9,8 @@ Cette classe représente un automate cellulaire dans le temps.
#ifndef SIMULATION_HPP #ifndef SIMULATION_HPP
#define SIMULATION_HPP #define SIMULATION_HPP
#include "history.h" #include "history.hpp"
#include "grid.h" #include "grid.hpp"
#include "automaton.hpp" #include "automaton.hpp"
//! \brief Cette classe représente un automate cellulaire dans le temps. //! \brief Cette classe représente un automate cellulaire dans le temps.
......
#include "colorlabel.h" #include "colorlabel.hpp"
#include "ui_colorlabel.h" #include "ui_colorlabel.h"
#include "state.hpp" #include "state.hpp"
#include "stateColor.hpp" #include "stateColor.hpp"
......
...@@ -9,7 +9,7 @@ Cette classe représente un réseau de cellules. ...@@ -9,7 +9,7 @@ Cette classe représente un réseau de cellules.
**/ **/
#include "grid.h" #include "grid.hpp"
#include "structure.hpp" #include "structure.hpp"
......
...@@ -9,7 +9,7 @@ Cette classe représente un historique de Grids. ...@@ -9,7 +9,7 @@ Cette classe représente un historique de Grids.
**/ **/
#include "history.h" #include "history.hpp"
#include <cassert> #include <cassert>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "modelloadingdialog.hpp" #include "modelloadingdialog.hpp"
#include "configurationloadingdialog.hpp" #include "configurationloadingdialog.hpp"
#include "neighborhoodDialog.hpp" #include "neighborhoodDialog.hpp"
#include "colorlabel.h" #include "colorlabel.hpp"
#include "gif/gifenc.h" #include "gif/gifenc.h"
......
...@@ -193,9 +193,9 @@ int eval_math(const std::string &in_expr, const std::map<char, int> &variables) ...@@ -193,9 +193,9 @@ int eval_math(const std::string &in_expr, const std::map<char, int> &variables)
std::array<int8_t, 26> variable_map; std::array<int8_t, 26> variable_map;
for (const auto& pair : variables) for (const auto& pair : variables)
{ {
if (pair.second < 'a' || pair.second > 'z') if (pair.first < 'a' || pair.first > 'z')
throw MathExprException("Invalid variable name"); throw MathExprException("Invalid variable name");
variable_map[pair.first] = pair.second - 'a'; variable_map[pair.first - 'a'] = pair.second;
} }
return evaluate_rpl_input(rpl_stack, variable_map); return evaluate_rpl_input(rpl_stack, variable_map);
} }
......
...@@ -11,7 +11,7 @@ Représente un voisinage arbitraire, défini par l'utilisateur. ...@@ -11,7 +11,7 @@ Représente un voisinage arbitraire, défini par l'utilisateur.
#include "arbitraryneighborhoodrule.hpp" #include "arbitraryneighborhoodrule.hpp"
#include "neighborhood.hpp" #include "neighborhood.hpp"
#include "grid.h" #include "grid.hpp"
REGISTER_FACTORY_ENTRY(NeighborhoodRule, ArbitraryNeighborhoodRule, "Arbitrary"); REGISTER_FACTORY_ENTRY(NeighborhoodRule, ArbitraryNeighborhoodRule, "Arbitrary");
......
...@@ -51,13 +51,13 @@ SOURCES += \ ...@@ -51,13 +51,13 @@ SOURCES += \
HEADERS += \ HEADERS += \
../include/colorlabel.h \ ../include/colorlabel.hpp \
../include/automaton.hpp \ ../include/automaton.hpp \
../include/coord.hpp \ ../include/coord.hpp \
../include/neighborhood_rules/mooreNeighborhoodRule.hpp \ ../include/neighborhood_rules/mooreNeighborhoodRule.hpp \
../include/neighborhood_rules/margolusNeighborhoodRule.hpp \ ../include/neighborhood_rules/margolusNeighborhoodRule.hpp \
../include/savingdialog.hpp \ ../include/savingdialog.hpp \
../include/transition_rules/lifegametransition.h \ ../include/transition_rules/lifegametransition.hpp \
../include/neighborhoodrule.hpp \ ../include/neighborhoodrule.hpp \
../include/neighborhood_rules/arbitraryneighborhoodrule.hpp \ ../include/neighborhood_rules/arbitraryneighborhoodrule.hpp \
../include/neighborhood_rules/mooreNeighborhoodRule.hpp \ ../include/neighborhood_rules/mooreNeighborhoodRule.hpp \
...@@ -72,11 +72,11 @@ HEADERS += \ ...@@ -72,11 +72,11 @@ HEADERS += \
../include/structurewriter.hpp \ ../include/structurewriter.hpp \
../include/gridview.hpp \ ../include/gridview.hpp \
../include/interface.hpp \ ../include/interface.hpp \
../include/grid.h \ ../include/grid.hpp \
../include/alphabet.hpp \ ../include/alphabet.hpp \
../include/stateColor.hpp \ ../include/stateColor.hpp \
../include/state.hpp \ ../include/state.hpp \
../include/history.h \ ../include/history.hpp \
../include/constantes.hpp \ ../include/constantes.hpp \
../include/structurelibraryview.hpp \ ../include/structurelibraryview.hpp \
../include/transitionrule.hpp \ ../include/transitionrule.hpp \
...@@ -93,7 +93,6 @@ FORMS += \ ...@@ -93,7 +93,6 @@ FORMS += \
../forms/savingdialog.ui \ ../forms/savingdialog.ui \
../forms/structurelibraryview.ui \ ../forms/structurelibraryview.ui \
../forms/modelloadingdialog.ui \ ../forms/modelloadingdialog.ui \
../forms/neighborhoodWidget.ui \
../forms/neighborhoodDialog.ui \ ../forms/neighborhoodDialog.ui \
../forms/configurationloadingdialog.ui ../forms/configurationloadingdialog.ui
......
#include "lifegametransition.h" #include "lifegametransition.hpp"
#include "neighborhoodrule.hpp" #include "neighborhoodrule.hpp"
REGISTER_FACTORY_ENTRY(TransitionRule, LifeGameTransition, "Game of Life"); REGISTER_FACTORY_ENTRY(TransitionRule, LifeGameTransition, "Game of Life");
......
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <algorithm> #include <algorithm>
#include "cellulut_tests.hpp" #include "cellulut_tests.hpp"
#include "grid.h" #include "grid.hpp"
void CellulutTests::test_grid() void CellulutTests::test_grid()
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include <algorithm> #include <algorithm>
#include "cellulut_tests.hpp" #include "cellulut_tests.hpp"
#include "history.h" #include "history.hpp"
void CellulutTests::test_history() void CellulutTests::test_history()
{ {
......
#include "cellulut_tests.hpp" #include "cellulut_tests.hpp"
#include "lifegametransition.h" #include "lifegametransition.hpp"
void CellulutTests::test_lifegametransition() void CellulutTests::test_lifegametransition()
{ {
......
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