ValidateBtn
This commit is contained in:
parent
f1d1578554
commit
591737118b
@ -257,6 +257,7 @@ void MainWindow::on_actionEditCut_triggered()
|
|||||||
void MainWindow::on_pathNumber_valueChanged(int arg1)
|
void MainWindow::on_pathNumber_valueChanged(int arg1)
|
||||||
{
|
{
|
||||||
this->loadPath(path.at(ui->pathNumber->value()-1));
|
this->loadPath(path.at(ui->pathNumber->value()-1));
|
||||||
|
currentPath = path.at(arg1-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -265,3 +266,19 @@ void MainWindow::on_stepNumber_valueChanged(int arg1)
|
|||||||
this->loadStep(currentPath->getStep().at(arg1-1));
|
this->loadStep(currentPath->getStep().at(arg1-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_validateBtn_clicked()
|
||||||
|
{
|
||||||
|
currentPath->setName(ui->titleEdit->text());
|
||||||
|
currentPath->setCity(ui->locEdit->text());
|
||||||
|
currentPath->setImage(ui->imagePath->text());
|
||||||
|
currentPath->setLength(ui->lengthSpin->value());
|
||||||
|
currentPath->setDifficulty(ui->diffSpin->value());
|
||||||
|
currentPath->setDuration(ui->durationSpin->value());
|
||||||
|
|
||||||
|
Step currentStep = currentPath->getStep().at(ui->stepNumber->value()-1);
|
||||||
|
|
||||||
|
currentStep.setTitle(ui->stepTitle->text());
|
||||||
|
currentStep.setResponse(ui->responseSpin->value());
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,6 @@ private slots:
|
|||||||
|
|
||||||
void on_actionopenFile_triggered();
|
void on_actionopenFile_triggered();
|
||||||
|
|
||||||
|
|
||||||
void on_actionEditCopy_triggered();
|
void on_actionEditCopy_triggered();
|
||||||
|
|
||||||
void on_actionEditPaste_triggered();
|
void on_actionEditPaste_triggered();
|
||||||
@ -49,6 +48,8 @@ private slots:
|
|||||||
|
|
||||||
void on_stepNumber_valueChanged(int arg1);
|
void on_stepNumber_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_validateBtn_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
QString currentFile;
|
QString currentFile;
|
||||||
|
|||||||
163
mainwindow.ui
163
mainwindow.ui
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>598</height>
|
<height>693</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -69,15 +69,15 @@
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Shadow::Raised</enum>
|
<enum>QFrame::Shadow::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget_8" native="true">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget_7" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||||
|
<item>
|
||||||
<widget class="QSpinBox" name="pathNumber">
|
<widget class="QSpinBox" name="pathNumber">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>45</width>
|
|
||||||
<height>27</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
@ -85,25 +85,15 @@
|
|||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLineEdit" name="titleEdit">
|
</item>
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
<widget class="QLineEdit" name="titleEdit"/>
|
||||||
<x>60</x>
|
</item>
|
||||||
<y>20</y>
|
</layout>
|
||||||
<width>391</width>
|
|
||||||
<height>26</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>60</y>
|
|
||||||
<width>441</width>
|
|
||||||
<height>45</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
@ -126,31 +116,9 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="imageLbl">
|
</item>
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
|
||||||
<x>470</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>281</width>
|
|
||||||
<height>191</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="scaledContents">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="widget_5" native="true">
|
<widget class="QWidget" name="widget_5" native="true">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>110</y>
|
|
||||||
<width>451</width>
|
|
||||||
<height>63</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
@ -161,6 +129,12 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget_2" native="true">
|
<widget class="QWidget" name="widget_2" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -184,6 +158,12 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget_3" native="true">
|
<widget class="QWidget" name="widget_3" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -210,6 +190,12 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget_4" native="true">
|
<widget class="QWidget" name="widget_4" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -238,15 +224,9 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
<widget class="QWidget" name="widget_6" native="true">
|
<widget class="QWidget" name="widget_6" native="true">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>180</y>
|
|
||||||
<width>451</width>
|
|
||||||
<height>44</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
@ -284,6 +264,27 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="imageLbl">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -316,15 +317,9 @@
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Shadow::Raised</enum>
|
<enum>QFrame::Shadow::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
<widget class="QWidget" name="steptitleFrame" native="true">
|
<widget class="QWidget" name="steptitleFrame" native="true">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>781</width>
|
|
||||||
<height>45</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="stepNumber">
|
<widget class="QSpinBox" name="stepNumber">
|
||||||
@ -349,15 +344,9 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
<widget class="QWidget" name="stepCoordinatesFrame" native="true">
|
<widget class="QWidget" name="stepCoordinatesFrame" native="true">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>60</y>
|
|
||||||
<width>781</width>
|
|
||||||
<height>63</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="latFrame" native="true">
|
<widget class="QWidget" name="latFrame" native="true">
|
||||||
@ -435,16 +424,22 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
<widget class="QPlainTextEdit" name="dialogEdit">
|
<widget class="QPlainTextEdit" name="dialogEdit">
|
||||||
<property name="geometry">
|
<property name="backgroundVisible">
|
||||||
<rect>
|
<bool>false</bool>
|
||||||
<x>10</x>
|
|
||||||
<y>130</y>
|
|
||||||
<width>761</width>
|
|
||||||
<height>81</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="validateBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Valider</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -466,13 +461,7 @@
|
|||||||
<addaction name="actionSave"/>
|
<addaction name="actionSave"/>
|
||||||
<addaction name="actionSave_as"/>
|
<addaction name="actionSave_as"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuEdit">
|
|
||||||
<property name="title">
|
|
||||||
<string>Edit</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<addaction name="menuFile"/>
|
<addaction name="menuFile"/>
|
||||||
<addaction name="menuEdit"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusbar"/>
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
<widget class="QToolBar" name="toolBar">
|
<widget class="QToolBar" name="toolBar">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user