Merge branch 'dev' of https://iutbg-gitlab.iutbourg.univ-lyon1.fr/p2406187/sae201 into dev
This commit is contained in:
commit
b4f153888c
@ -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)
|
||||
{
|
||||
if (index < 0 || index >= path.size()) {
|
||||
@ -513,6 +518,7 @@ void MainWindow::setCurrentPath(Path *newCurrentPath)
|
||||
}
|
||||
|
||||
void MainWindow::saveFile(){
|
||||
on_validateBtn_clicked();
|
||||
QString fileName;
|
||||
if (currentFile.isEmpty()) {
|
||||
fileName = QFileDialog::getSaveFileName(this, "Save");
|
||||
@ -636,6 +642,7 @@ void MainWindow::on_actionEditCut_triggered()
|
||||
|
||||
void MainWindow::on_pathNumber_valueChanged(int arg1)
|
||||
{
|
||||
on_validateBtn_clicked();
|
||||
this->loadPath(path.at(ui->pathNumber->value()-1));
|
||||
currentPath = path.at(arg1-1);
|
||||
}
|
||||
@ -643,12 +650,14 @@ void MainWindow::on_pathNumber_valueChanged(int arg1)
|
||||
|
||||
void MainWindow::on_stepNumber_valueChanged(int arg1)
|
||||
{
|
||||
on_validateBtn_clicked();
|
||||
this->loadStep(currentPath->getStep().at(arg1-1));
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_validateBtn_clicked()
|
||||
{
|
||||
std::cout << "ok" << std::endl;
|
||||
this->currentPath->setName(ui->titleEdit->text());
|
||||
this->currentPath->setCity(ui->locEdit->text());
|
||||
this->currentPath->setImage(ui->imagePath->text());
|
||||
@ -902,6 +911,7 @@ void MainWindow::on_actionFont_size_triggered()
|
||||
|
||||
|
||||
void MainWindow::saveAsFile(){
|
||||
on_validateBtn_clicked();
|
||||
QString fileName = QFileDialog::getSaveFileName(this, "Save as");
|
||||
QFile file(fileName);
|
||||
|
||||
@ -952,6 +962,7 @@ void MainWindow::on_actionSave_as_triggered()
|
||||
|
||||
void MainWindow::on_exportHTMLBtn_clicked()
|
||||
{
|
||||
on_validateBtn_clicked();
|
||||
for(int i = 0; i < path.length(); i++) {
|
||||
this->exportHTMLMap(i);
|
||||
}
|
||||
@ -1019,3 +1030,9 @@ void MainWindow::on_actionFont_color_triggered()
|
||||
{
|
||||
this->setColor();
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_addStep_clicked()
|
||||
{
|
||||
this->addNewStep();
|
||||
}
|
||||
|
||||
@ -120,9 +120,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