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>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="settingsLayout">
<item>
<widget class="QGroupBox" name="gridPatternGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Grid and patterns</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="gridDimLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Grid dimension</string>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="gridDimLayout">
<item row="0" column="0">
<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">
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Automaton</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QVBoxLayout" name="settingsLayout">
<item>
<widget class="QGroupBox" name="gridPatternGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Grid and patterns</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<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">
<string>Draw cell</string>
<string>Grid dimension</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="nbrStateComboBox">
<item>
<property name="text">
<string>0</string>
</property>
<layout class="QFormLayout" name="gridDimLayout">
<item row="0" column="0">
<widget class="QLabel" name="widthLabel">
<property name="text">
<string>Width :</string>
</property>
</widget>
</item>
<item>
<property name="text">
<string>1</string>
</property>
<item row="1" column="0">
<widget class="QLabel" name="heightLabel">
<property name="text">
<string>Height :</string>
</property>
</widget>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</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>
<widget class="QPushButton" name="openRuleButton">
<property name="text">
<string>(file) Open rule</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="statesNeighborhoodLayout_3">
<item row="1" column="0">
<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 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>
<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>
<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>
<widget class="QPushButton" name="drawCellButton">
<property name="text">
<string>Draw cell</string>
</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>
</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>
<property name="text">
<string>3</string>
</property>
<widget class="QPushButton" name="openRuleButton">
<property name="text">
<string>(file) Open rule</string>
</property>
</widget>
</item>
<item>
<property name="text">
<string>4</string>
</property>
<layout class="QGridLayout" name="statesNeighborhoodLayout_3">
<item row="1" column="0">
<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>
<property name="text">
<string>5</string>
</property>
<widget class="QLabel" name="transitionFunctionLabel">
<property name="text">
<string>Transition function :</string>
</property>
</widget>
</item>
<item>
<property name="text">
<string>6</string>
</property>
<widget class="QPlainTextEdit" name="transitionFunctionTextEdit"/>
</item>
<item>
<property name="text">
<string>7</string>
</property>
<widget class="QLabel" name="informationLabel">
<property name="text">
<string>New rule must be saved before running simulation</string>
</property>
</widget>
</item>
<item>
<property name="text">
<string>8</string>
</property>
<widget class="QPushButton" name="saveRuleButton">
<property name="text">
<string>Save rule</string>
</property>
</widget>
</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>
<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>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Structures</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="StructureLibraryView" name="struct_library">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
......@@ -524,7 +561,7 @@ pattern recorded :</string>
<x>0</x>
<y>0</y>
<width>1089</width>
<height>26</height>
<height>20</height>
</rect>
</property>
<widget class="QMenu" name="menuFichier">
......@@ -564,6 +601,12 @@ pattern recorded :</string>
<header>gridview.hpp</header>
<container>1</container>
</customwidget>
<customwidget>
<class>StructureLibraryView</class>
<extends>QFrame</extends>
<header>structurelibraryview.hpp</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
......
<?xml version="1.0" encoding="UTF-8"?>