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