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

Ebauche d'implémentation d'une bibliothèque de structures, ajout d'un dossier...

Ebauche d'implémentation d'une bibliothèque de structures, ajout d'un dossier patterns/ contenant quelques structures d'exemple
parent 202e1d3c
Pipeline #78250 passed with stages
in 17 seconds
...@@ -223,296 +223,333 @@ pattern recorded :</string> ...@@ -223,296 +223,333 @@ pattern recorded :</string>
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="settingsLayout"> <widget class="QTabWidget" name="tabWidget">
<item> <property name="sizePolicy">
<widget class="QGroupBox" name="gridPatternGroupBox"> <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<property name="sizePolicy"> <horstretch>0</horstretch>
<sizepolicy hsizetype="Fixed" vsizetype="Preferred"> <verstretch>0</verstretch>
<horstretch>0</horstretch> </sizepolicy>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="currentIndex">
</property> <number>1</number>
<property name="title"> </property>
<string>Grid and patterns</string> <widget class="QWidget" name="tab">
</property> <attribute name="title">
<layout class="QVBoxLayout" name="verticalLayout_3"> <string>Automaton</string>
<item> </attribute>
<widget class="QLabel" name="gridDimLabel"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="sizePolicy"> <item>
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <layout class="QVBoxLayout" name="settingsLayout">
<horstretch>0</horstretch> <item>
<verstretch>0</verstretch> <widget class="QGroupBox" name="gridPatternGroupBox">
</sizepolicy> <property name="sizePolicy">
</property> <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<property name="text"> <horstretch>0</horstretch>
<string>Grid dimension</string> <verstretch>0</verstretch>
</property> </sizepolicy>
</widget> </property>
</item> <property name="title">
<item> <string>Grid and patterns</string>
<layout class="QFormLayout" name="gridDimLayout"> </property>
<item row="0" column="0"> <layout class="QVBoxLayout" name="verticalLayout_3">
<widget class="QLabel" name="widthLabel">
<property name="text">
<string>Width :</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="heightLabel">
<property name="text">
<string>Height :</string>
</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>
<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="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>
</layout>
</item>
<item>
<layout class="QGridLayout" name="patternSettingsLayout">
<item row="0" column="0">
<widget class="QPushButton" name="randomPatternButton">
<property name="text">
<string>Random starting pattern</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="savePatternButton">
<property name="text">
<string>Save current pattern</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="openPatternButton">
<property name="text">
<string>(file) Open pattern</string>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="drawCellLayout">
<item> <item>
<widget class="QPushButton" name="drawCellButton"> <widget class="QLabel" name="gridDimLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Draw cell</string> <string>Grid dimension</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="nbrStateComboBox"> <layout class="QFormLayout" name="gridDimLayout">
<item> <item row="0" column="0">
<property name="text"> <widget class="QLabel" name="widthLabel">
<string>0</string> <property name="text">
</property> <string>Width :</string>
</property>
</widget>
</item> </item>
<item> <item row="1" column="0">
<property name="text"> <widget class="QLabel" name="heightLabel">
<string>1</string> <property name="text">
</property> <string>Height :</string>
</property>
</widget>
</item> </item>
</widget> <item row="2" column="1">
</item> <widget class="QPushButton" name="validateGridDim">
</layout> <property name="enabled">
</item> <bool>false</bool>
</layout> </property>
</item> <property name="text">
</layout> <string>OK</string>
</widget> </property>
</item> </widget>
<item> </item>
<widget class="QGroupBox" name="rulesGroupBox"> <item row="1" column="1">
<property name="sizePolicy"> <widget class="QSpinBox" name="heightSpinBox">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred"> <property name="minimum">
<horstretch>0</horstretch> <number>1</number>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="maximum">
</property> <number>9999</number>
<property name="title"> </property>
<string>Rules</string> <property name="value">
</property> <number>10</number>
<layout class="QVBoxLayout" name="verticalLayout_4"> </property>
<item> </widget>
<widget class="QPushButton" name="openRuleButton"> </item>
<property name="text"> <item row="0" column="1">
<string>(file) Open rule</string> <widget class="QSpinBox" name="widthSpinBox">
</property> <property name="minimum">
</widget> <number>1</number>
</item> </property>
<item> <property name="maximum">
<layout class="QGridLayout" name="statesNeighborhoodLayout_3"> <number>9999</number>
<item row="1" column="0"> </property>
<widget class="QLabel" name="neighborhoodLabel"> <property name="value">
<property name="text"> <number>10</number>
<string>Neighborhood :</string> </property>
</property> </widget>
</widget> </item>
</item> </layout>
<item row="1" column="1">
<widget class="QComboBox" name="neighborhoodComboBox">
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Von Neumann</string>
</property>
</item>
<item>
<property name="text">
<string>Moore</string>
</property>
</item> </item>
<item> <item>
<property name="text"> <layout class="QGridLayout" name="patternSettingsLayout">
<string>Custom</string> <item row="0" column="0">
</property> <widget class="QPushButton" name="randomPatternButton">
</item> <property name="text">
</widget> <string>Random starting pattern</string>
</item> </property>
<item row="0" column="2"> </widget>
<widget class="QPushButton" name="statesSettingsButton"> </item>
<property name="text"> <item row="1" column="1">
<string>States settings (color...)</string> <widget class="QPushButton" name="savePatternButton">
</property> <property name="text">
</widget> <string>Save current pattern</string>
</item> </property>
<item row="1" column="2"> </widget>
<widget class="QPushButton" name="cusumNeighborhoodButton"> </item>
<property name="enabled"> <item row="0" column="1">
<bool>false</bool> <widget class="QPushButton" name="openPatternButton">
</property> <property name="text">
<property name="text"> <string>(file) Open pattern</string>
<string>Custom neighborhood</string> </property>
</property> </widget>
</widget> </item>
</item> <item row="1" column="0">
<item row="0" column="1"> <layout class="QHBoxLayout" name="drawCellLayout">
<widget class="QComboBox" name="nbrStatesComboBox"> <item>
<item> <widget class="QPushButton" name="drawCellButton">
<property name="text"> <property name="text">
<string>2</string> <string>Draw cell</string>
</property> </property>
</widget>
</item>
<item>
<widget class="QComboBox" name="nbrStateComboBox">
<item>
<property name="text">
<string>0</string>
</property>
</item>
<item>
<property name="text">
<string>1</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</item> </item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="rulesGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Rules</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item> <item>
<property name="text"> <widget class="QPushButton" name="openRuleButton">
<string>3</string> <property name="text">
</property> <string>(file) Open rule</string>
</property>
</widget>
</item> </item>
<item> <item>
<property name="text"> <layout class="QGridLayout" name="statesNeighborhoodLayout_3">
<string>4</string> <item row="1" column="0">
</property> <widget class="QLabel" name="neighborhoodLabel">
<property name="text">
<string>Neighborhood :</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="neighborhoodComboBox">
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Von Neumann</string>
</property>
</item>
<item>
<property name="text">
<string>Moore</string>
</property>
</item>
<item>
<property name="text">
<string>Custom</string>
</property>
</item>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="statesSettingsButton">
<property name="text">
<string>States settings (color...)</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="cusumNeighborhoodButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Custom neighborhood</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="nbrStatesComboBox">
<item>
<property name="text">
<string>2</string>
</property>
</item>
<item>
<property name="text">
<string>3</string>
</property>
</item>
<item>
<property name="text">
<string>4</string>
</property>
</item>
<item>
<property name="text">
<string>5</string>
</property>
</item>
<item>
<property name="text">
<string>6</string>
</property>
</item>
<item>
<property name="text">
<string>7</string>
</property>
</item>
<item>
<property name="text">
<string>8</string>
</property>
</item>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="nbrStatesLabel">
<property name="text">
<string>Number of states :</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="radiusLabel">
<property name="text">
<string>Radius r :</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QSpinBox" name="radiusSpinBox">
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<property name="text"> <widget class="QLabel" name="transitionFunctionLabel">
<string>5</string> <property name="text">
</property> <string>Transition function :</string>
</property>
</widget>
</item> </item>
<item> <item>
<property name="text"> <widget class="QPlainTextEdit" name="transitionFunctionTextEdit"/>
<string>6</string>
</property>
</item> </item>
<item> <item>
<property name="text"> <widget class="QLabel" name="informationLabel">
<string>7</string> <property name="text">
</property> <string>New rule must be saved before running simulation</string>
</property>
</widget>
</item> </item>
<item> <item>
<property name="text"> <widget class="QPushButton" name="saveRuleButton">
<string>8</string> <property name="text">
</property> <string>Save rule</string>
</property>
</widget>
</item> </item>
</widget> </layout>
</item> </widget>
<item row="0" column="0"> </item>
<widget class="QLabel" name="nbrStatesLabel"> </layout>
<property name="text"> </item>
<string>Number of states :</string> </layout>
</property> </widget>
</widget> <widget class="QWidget" name="tab_2">
</item> <attribute name="title">
<item row="2" column="1"> <string>Structures</string>
<widget class="QLabel" name="radiusLabel"> </attribute>
<property name="text"> <layout class="QVBoxLayout" name="verticalLayout_2">
<string>Radius r :</string> <item>
</property> <widget class="StructureLibraryView" name="struct_library">
</widget> <property name="frameShape">
</item> <enum>QFrame::StyledPanel</enum>
<item row="2" column="2"> </property>
<widget class="QSpinBox" name="radiusSpinBox"> <property name="frameShadow">
<property name="minimum"> <enum>QFrame::Raised</enum>
<number>1</number> </property>
</property> </widget>
</widget> </item>
</item> </layout>
</layout> </widget>
</item> </widget>
<item>
<widget class="QLabel" name="transitionFunctionLabel">
<property name="text">
<string>Transition function :</string>
</property>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="transitionFunctionTextEdit"/>
</item>
<item>
<widget class="QLabel" name="informationLabel">
<property name="text">
<string>New rule must be saved before running simulation</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveRuleButton">
<property name="text">
<string>Save rule</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</item> </item>
...@@ -524,7 +561,7 @@ pattern recorded :</string> ...@@ -524,7 +561,7 @@ pattern recorded :</string>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1089</width> <width>1089</width>
<height>26</height> <height>20</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFichier"> <widget class="QMenu" name="menuFichier">
...@@ -564,6 +601,12 @@ pattern recorded :</string> ...@@ -564,6 +601,12 @@ pattern recorded :</string>
<header>gridview.hpp</header> <header>gridview.hpp</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>StructureLibraryView</class>
<extends>QFrame</extends>
<header>structurelibraryview.hpp</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
<connections/> <connections/>
......
<?xml version="1.0" encoding="UTF-8"?>