Add step btn
This commit is contained in:
parent
2f1b9b2097
commit
ffcb6fa203
@ -166,7 +166,12 @@ void MainWindow::addNewPath()
|
|||||||
|
|
||||||
void MainWindow::addNewStep()
|
void MainWindow::addNewStep()
|
||||||
{
|
{
|
||||||
|
this->on_validateBtn_clicked();
|
||||||
|
currentPath->getStep().append(Step());
|
||||||
|
ui->stepNumber->setMaximum(currentPath->getStep().length());
|
||||||
|
ui->stepNumber->setSuffix("/" + QString::number(currentPath->getStep().length()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::exportHTMLMap(int index)
|
void MainWindow::exportHTMLMap(int index)
|
||||||
{
|
{
|
||||||
std::ofstream file("./pages/parcours" + std::to_string(index) + ".html");
|
std::ofstream file("./pages/parcours" + std::to_string(index) + ".html");
|
||||||
@ -921,5 +926,8 @@ void MainWindow::on_actionFont_color_triggered()
|
|||||||
this->setColor();
|
this->setColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_addStep_clicked()
|
||||||
|
{
|
||||||
|
this->addNewStep();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -119,9 +119,9 @@ private slots:
|
|||||||
|
|
||||||
void on_actionNewFile_triggered();
|
void on_actionNewFile_triggered();
|
||||||
|
|
||||||
|
|
||||||
void on_actionFont_color_triggered();
|
void on_actionFont_color_triggered();
|
||||||
|
|
||||||
|
void on_addStep_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
|
|||||||
@ -79,7 +79,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::Shape::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||||
<item>
|
<item>
|
||||||
@ -333,7 +333,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::Shape::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
@ -341,9 +341,15 @@
|
|||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="stepNumber">
|
<widget class="QSpinBox" name="stepNumber">
|
||||||
|
<property name="suffix">
|
||||||
|
<string>/1</string>
|
||||||
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -478,7 +484,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>21</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
@ -579,7 +585,7 @@
|
|||||||
<string>New File</string>
|
<string>New File</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::NoRole</enum>
|
<enum>QAction::MenuRole::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionSaveFile">
|
<action name="actionSaveFile">
|
||||||
@ -591,7 +597,7 @@
|
|||||||
<string>Save</string>
|
<string>Save</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::NoRole</enum>
|
<enum>QAction::MenuRole::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionSaveAsFile">
|
<action name="actionSaveAsFile">
|
||||||
@ -603,7 +609,7 @@
|
|||||||
<string>Save as</string>
|
<string>Save as</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::NoRole</enum>
|
<enum>QAction::MenuRole::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionEditCopy">
|
<action name="actionEditCopy">
|
||||||
@ -615,7 +621,7 @@
|
|||||||
<string>Copy</string>
|
<string>Copy</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::NoRole</enum>
|
<enum>QAction::MenuRole::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionEditPaste">
|
<action name="actionEditPaste">
|
||||||
@ -627,7 +633,7 @@
|
|||||||
<string>Paste</string>
|
<string>Paste</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::NoRole</enum>
|
<enum>QAction::MenuRole::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionEditCut">
|
<action name="actionEditCut">
|
||||||
@ -639,7 +645,7 @@
|
|||||||
<string>Cut</string>
|
<string>Cut</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::NoRole</enum>
|
<enum>QAction::MenuRole::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionEditUndo">
|
<action name="actionEditUndo">
|
||||||
@ -651,7 +657,7 @@
|
|||||||
<string>Undo</string>
|
<string>Undo</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::NoRole</enum>
|
<enum>QAction::MenuRole::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionEditRedo">
|
<action name="actionEditRedo">
|
||||||
@ -663,7 +669,7 @@
|
|||||||
<string>Redo</string>
|
<string>Redo</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::NoRole</enum>
|
<enum>QAction::MenuRole::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionopenFile">
|
<action name="actionopenFile">
|
||||||
@ -675,7 +681,7 @@
|
|||||||
<string>Open file</string>
|
<string>Open file</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::NoRole</enum>
|
<enum>QAction::MenuRole::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionNew">
|
<action name="actionNew">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user