Call to save updater, confirm final input of a day
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 4.12.4, 2020-08-28T14:45:30. -->
|
<!-- Written by QtCreator 4.12.4, 2020-09-24T10:51:57. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.0 MSVC2019 64bit</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.0 MSVC2019 64bit</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.0 MSVC2019 64bit</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.0 MSVC2019 64bit</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5150.win64_msvc2019_64_kit</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5150.win64_msvc2019_64_kit</value>
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
@@ -320,7 +320,7 @@
|
|||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/Users/robof/OneDrive/Documents/build-Chronos-Desktop_Qt_5_15_0_MSVC2019_64bit-Release</value>
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/Users/robof/OneDrive/Documents/build-Chronos-Desktop_Qt_5_15_0_MSVC2019_64bit-Debug</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
|
|||||||
BIN
icon.ico
BIN
icon.ico
Binary file not shown.
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 125 KiB |
@@ -5,5 +5,6 @@
|
|||||||
<file>pictures/calendar.png</file>
|
<file>pictures/calendar.png</file>
|
||||||
<file>pictures/about.png</file>
|
<file>pictures/about.png</file>
|
||||||
<file>pictures/banner.png</file>
|
<file>pictures/banner.png</file>
|
||||||
|
<file>pictures/validate.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 50 KiB |
BIN
pictures/validate.png
Normal file
BIN
pictures/validate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
@@ -28,6 +28,10 @@ void Day::set_time_break(double value)
|
|||||||
time_break = value;
|
time_break = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Day::set_validate(bool value) {
|
||||||
|
validate = value;
|
||||||
|
}
|
||||||
|
|
||||||
QTime Day::get_start()
|
QTime Day::get_start()
|
||||||
{
|
{
|
||||||
return start;
|
return start;
|
||||||
@@ -48,7 +52,8 @@ QJsonObject Day::to_json()
|
|||||||
QJsonObject obj{
|
QJsonObject obj{
|
||||||
{KEY_START, start.toString(Qt::DateFormat::ISODate)},
|
{KEY_START, start.toString(Qt::DateFormat::ISODate)},
|
||||||
{KEY_END, end.toString(Qt::DateFormat::ISODate)},
|
{KEY_END, end.toString(Qt::DateFormat::ISODate)},
|
||||||
{KEY_BREAK, time_break}
|
{KEY_BREAK, time_break},
|
||||||
|
{KEY_VALIDATE, validate}
|
||||||
};
|
};
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
@@ -61,6 +66,11 @@ Day Day::from_json(QJsonObject obj)
|
|||||||
result.start = QTime::fromString(obj[KEY_START].toString(), Qt::DateFormat::ISODate);
|
result.start = QTime::fromString(obj[KEY_START].toString(), Qt::DateFormat::ISODate);
|
||||||
result.end = QTime::fromString(obj[KEY_END].toString(), Qt::DateFormat::ISODate);
|
result.end = QTime::fromString(obj[KEY_END].toString(), Qt::DateFormat::ISODate);
|
||||||
result.time_break = obj[KEY_BREAK].toDouble();
|
result.time_break = obj[KEY_BREAK].toDouble();
|
||||||
|
result.validate = obj[KEY_VALIDATE].toBool();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Day::get_validate() {
|
||||||
|
return validate;
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#define KEY_START "start"
|
#define KEY_START "start"
|
||||||
#define KEY_END "end"
|
#define KEY_END "end"
|
||||||
#define KEY_BREAK "break"
|
#define KEY_BREAK "break"
|
||||||
|
#define KEY_VALIDATE "validate"
|
||||||
|
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
@@ -16,6 +17,7 @@ private:
|
|||||||
QTime start;
|
QTime start;
|
||||||
QTime end;
|
QTime end;
|
||||||
double time_break;
|
double time_break;
|
||||||
|
bool validate;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Day();
|
Day();
|
||||||
@@ -23,10 +25,12 @@ public:
|
|||||||
void set_start(QTime value);
|
void set_start(QTime value);
|
||||||
void set_end(QTime value);
|
void set_end(QTime value);
|
||||||
void set_time_break(double value);
|
void set_time_break(double value);
|
||||||
|
void set_validate(bool);
|
||||||
|
|
||||||
QTime get_start();
|
QTime get_start();
|
||||||
QTime get_end();
|
QTime get_end();
|
||||||
double get_time_break();
|
double get_time_break();
|
||||||
|
bool get_validate();
|
||||||
QJsonObject to_json();
|
QJsonObject to_json();
|
||||||
|
|
||||||
double get_total();
|
double get_total();
|
||||||
|
|||||||
@@ -67,8 +67,9 @@ void MainWindow::init() {
|
|||||||
connect(ui->wed_button, &QPushButton::clicked, this, &MainWindow::edit);
|
connect(ui->wed_button, &QPushButton::clicked, this, &MainWindow::edit);
|
||||||
connect(ui->thu_button, &QPushButton::clicked, this, &MainWindow::edit);
|
connect(ui->thu_button, &QPushButton::clicked, this, &MainWindow::edit);
|
||||||
connect(ui->fri_button, &QPushButton::clicked, this, &MainWindow::edit);
|
connect(ui->fri_button, &QPushButton::clicked, this, &MainWindow::edit);
|
||||||
|
todayWeekNumber = QDate::currentDate().weekNumber();
|
||||||
highlightDayOfWeek();
|
dayOfWeek = QDate::currentDate().dayOfWeek();
|
||||||
|
saveLoaded = false;
|
||||||
|
|
||||||
if (QFile::exists(get_save_file_path())) {
|
if (QFile::exists(get_save_file_path())) {
|
||||||
open_save();
|
open_save();
|
||||||
@@ -77,34 +78,42 @@ void MainWindow::init() {
|
|||||||
w.exec();
|
w.exec();
|
||||||
week_template = w.get_result();
|
week_template = w.get_result();
|
||||||
}
|
}
|
||||||
set_date_to_now();
|
if (saveLoaded) {
|
||||||
compute_time();
|
set_date_to_now();
|
||||||
|
compute_time();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::highlightDayOfWeek() {
|
void MainWindow::highlightDayOfWeek() {
|
||||||
int dayOfWeek = QDate::currentDate().dayOfWeek();
|
ui->monLabel->setText("Lundi");
|
||||||
switch (dayOfWeek) {
|
ui->tueLabel->setText("Mardi");
|
||||||
case 1: {
|
ui->wedLabel->setText("Mercredi");
|
||||||
ui->monLabel->setText(QString("> %1 <").arg(ui->monLabel->text()));
|
ui->thuLabel->setText("Jeudi");
|
||||||
break;
|
ui->friLabel->setText("Friday");
|
||||||
|
if (todayWeekNumber == current_week.getWeekNumber()) {
|
||||||
|
switch (dayOfWeek) {
|
||||||
|
case 1: {
|
||||||
|
ui->monLabel->setText(QString("> %1 <").arg(ui->monLabel->text()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2: {
|
||||||
|
ui->tueLabel->setText(QString("> %1 <").arg(ui->tueLabel->text()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3: {
|
||||||
|
ui->wedLabel->setText(QString("> %1 <").arg(ui->wedLabel->text()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 4: {
|
||||||
|
ui->thuLabel->setText(QString("> %1 <").arg(ui->thuLabel->text()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 5: {
|
||||||
|
ui->friLabel->setText(QString("> %1 <").arg(ui->friLabel->text()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
case 2: {
|
|
||||||
ui->tueLabel->setText(QString("> %1 <").arg(ui->tueLabel->text()));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 3: {
|
|
||||||
ui->wedLabel->setText(QString("> %1 <").arg(ui->wedLabel->text()));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 4: {
|
|
||||||
ui->thuLabel->setText(QString("> %1 <").arg(ui->thuLabel->text()));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 5: {
|
|
||||||
ui->friLabel->setText(QString("> %1 <").arg(ui->friLabel->text()));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,18 +136,30 @@ void MainWindow::open_save() {
|
|||||||
for (QJsonValue val : arr) {
|
for (QJsonValue val : arr) {
|
||||||
weeks[val.toObject()["weekNumber"].toInt()] = Week::from_json(val.toObject());
|
weeks[val.toObject()["weekNumber"].toInt()] = Week::from_json(val.toObject());
|
||||||
}
|
}
|
||||||
|
saveLoaded = true;
|
||||||
|
} else if (obj[KEY_SAVE_FILE_VERSION].toInt() < SAVE_FILE_VERSION) {
|
||||||
|
QString updater = QCoreApplication::applicationDirPath() + "/save-updater.exe";
|
||||||
|
if (QFile::exists(updater)) {
|
||||||
|
QProcess* process = new QProcess(this);
|
||||||
|
process->execute(updater, QStringList({"update"}));
|
||||||
|
delete process;
|
||||||
|
open_save();
|
||||||
|
} else {
|
||||||
|
panic_dialog("Cette application n'a pas pu démarrer car save-updater.exe est introuvable.\n"
|
||||||
|
"La réinstallation de cette application peut corriger ce problème");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
QMessageBox msgBox;
|
panic_dialog("Votre fichier de sauvegarde a été enregistré depuis une version plus récente de Chronos\n"
|
||||||
msgBox.setText("Le fichier de sauvegarde n'est pas à jour, "
|
"Mettez à jour Chronos pour pouvoir utiliser ce fichier");
|
||||||
"des changements ont été apporté a la structure du fichier lors de la dernière mise à jour");
|
|
||||||
msgBox.setInformativeText("Mettez à jour votre fichier de sauvegarde puis relancez l'application");
|
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
|
||||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
|
||||||
msgBox.exec();
|
|
||||||
QTimer::singleShot(0, this, &MainWindow::close);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::panic_dialog(QString text) {
|
||||||
|
QMessageBox::critical(this, tr("Chronos"), text,
|
||||||
|
QMessageBox::Ok, QMessageBox::Ok);
|
||||||
|
QTimer::singleShot(0, this, &MainWindow::close);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::save_to_file() {
|
void MainWindow::save_to_file() {
|
||||||
QJsonArray arr;
|
QJsonArray arr;
|
||||||
for (Week w : weeks) {
|
for (Week w : weeks) {
|
||||||
@@ -178,6 +199,7 @@ void MainWindow::compute_week_number(const QDateTime &dt) {
|
|||||||
save_to_file();
|
save_to_file();
|
||||||
}
|
}
|
||||||
compute_time();
|
compute_time();
|
||||||
|
highlightDayOfWeek();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::compute_time() {
|
void MainWindow::compute_time() {
|
||||||
@@ -190,6 +212,7 @@ void MainWindow::compute_time() {
|
|||||||
updateStartLabel();
|
updateStartLabel();
|
||||||
updateBreakLabel();
|
updateBreakLabel();
|
||||||
updateEndLabel();
|
updateEndLabel();
|
||||||
|
updateValidIcon();
|
||||||
|
|
||||||
double late = 0.0;
|
double late = 0.0;
|
||||||
double overtime = 0.0;
|
double overtime = 0.0;
|
||||||
@@ -205,6 +228,14 @@ void MainWindow::compute_time() {
|
|||||||
ui->overtime_time_label->setText(Tools::double_to_string_time((overtime > 0.0) ? overtime : 0.0));
|
ui->overtime_time_label->setText(Tools::double_to_string_time((overtime > 0.0) ? overtime : 0.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::updateValidIcon() {
|
||||||
|
ui->mondayValidate->setVisible(current_week.getMon().get_validate());
|
||||||
|
ui->tuesdayValidate->setVisible(current_week.getTue().get_validate());
|
||||||
|
ui->wednesdayValidate->setVisible(current_week.getWed().get_validate());
|
||||||
|
ui->thurdayValidate->setVisible(current_week.getThu().get_validate());
|
||||||
|
ui->fridayValidate->setVisible(current_week.getFri().get_validate());
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::updateStartLabel() {
|
void MainWindow::updateStartLabel() {
|
||||||
ui->monStartLabel->setText(current_week.getMon().get_start().toString("HH:mm"));
|
ui->monStartLabel->setText(current_week.getMon().get_start().toString("HH:mm"));
|
||||||
ui->tueStartLabel->setText(current_week.getTue().get_start().toString("HH:mm"));
|
ui->tueStartLabel->setText(current_week.getTue().get_start().toString("HH:mm"));
|
||||||
@@ -254,7 +285,8 @@ void MainWindow::edit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Day MainWindow::modify_value(Day d) {
|
Day MainWindow::modify_value(Day d) {
|
||||||
SetDayDialog sdd(d, this);
|
bool isNotValidable = (current_week.getWeekNumber() > todayWeekNumber);
|
||||||
|
SetDayDialog sdd(d, isNotValidable, this);
|
||||||
int result = sdd.exec();
|
int result = sdd.exec();
|
||||||
if (result == QDialog::Accepted) {
|
if (result == QDialog::Accepted) {
|
||||||
return sdd.get_result();
|
return sdd.get_result();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#define KEY_TEMPLATE "template"
|
#define KEY_TEMPLATE "template"
|
||||||
#define KEY_WEEKS "weeks"
|
#define KEY_WEEKS "weeks"
|
||||||
#define SAVE_FILENAME "data.json"
|
#define SAVE_FILENAME "data.json"
|
||||||
#define SAVE_FILE_VERSION 1
|
#define SAVE_FILE_VERSION 2
|
||||||
#define KEY_SAVE_FILE_VERSION "version"
|
#define KEY_SAVE_FILE_VERSION "version"
|
||||||
|
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
@@ -19,6 +19,8 @@
|
|||||||
#include <QMapIterator>
|
#include <QMapIterator>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QProcess>
|
||||||
|
#include <QDir>
|
||||||
|
|
||||||
#include "week.h"
|
#include "week.h"
|
||||||
#include "welcome.h"
|
#include "welcome.h"
|
||||||
@@ -45,12 +47,14 @@ private:
|
|||||||
void init();
|
void init();
|
||||||
void open_save();
|
void open_save();
|
||||||
void save_to_file();
|
void save_to_file();
|
||||||
|
void panic_dialog(QString text);
|
||||||
|
|
||||||
// UI Update
|
// UI Update
|
||||||
void updateStartLabel();
|
void updateStartLabel();
|
||||||
void updateBreakLabel();
|
void updateBreakLabel();
|
||||||
void updateEndLabel();
|
void updateEndLabel();
|
||||||
void highlightDayOfWeek();
|
void highlightDayOfWeek();
|
||||||
|
void updateValidIcon();
|
||||||
|
|
||||||
QString get_save_file_path();
|
QString get_save_file_path();
|
||||||
Identifier get_identifier(QString objectName);
|
Identifier get_identifier(QString objectName);
|
||||||
@@ -60,6 +64,9 @@ private:
|
|||||||
Week current_week;
|
Week current_week;
|
||||||
QMap<int, Week> weeks;
|
QMap<int, Week> weeks;
|
||||||
QMap<QString, Identifier> objectId;
|
QMap<QString, Identifier> objectId;
|
||||||
|
int todayWeekNumber;
|
||||||
|
int dayOfWeek;
|
||||||
|
bool saveLoaded;
|
||||||
|
|
||||||
void mousePressEvent(QMouseEvent *event);
|
void mousePressEvent(QMouseEvent *event);
|
||||||
void mouseMoveEvent(QMouseEvent *event);
|
void mouseMoveEvent(QMouseEvent *event);
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
#include "setdaydialog.h"
|
#include "setdaydialog.h"
|
||||||
#include "ui_setdaydialog.h"
|
#include "ui_setdaydialog.h"
|
||||||
|
|
||||||
SetDayDialog::SetDayDialog(Day d, QWidget *parent) :
|
SetDayDialog::SetDayDialog(Day d, bool isNotValidable, QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
ui(new Ui::SetDayDialog)
|
ui(new Ui::SetDayDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->validateButton->setEnabled(!isNotValidable);
|
||||||
this->d = d;
|
this->d = d;
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
@@ -21,6 +22,7 @@ void SetDayDialog::init() {
|
|||||||
ui->break_edit->setValue(d.get_time_break());
|
ui->break_edit->setValue(d.get_time_break());
|
||||||
connect(ui->start_edit, &QTimeEdit::timeChanged, this, &SetDayDialog::compute_time);
|
connect(ui->start_edit, &QTimeEdit::timeChanged, this, &SetDayDialog::compute_time);
|
||||||
connect(ui->end_edit, &QTimeEdit::timeChanged, this, &SetDayDialog::compute_time);
|
connect(ui->end_edit, &QTimeEdit::timeChanged, this, &SetDayDialog::compute_time);
|
||||||
|
connect(ui->validateButton, &QPushButton::clicked, this, &SetDayDialog::validate);
|
||||||
connect(ui->break_edit, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged), this, &SetDayDialog::compute_time);
|
connect(ui->break_edit, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged), this, &SetDayDialog::compute_time);
|
||||||
ui->total_label->setText(Tools::double_to_string_time(d.get_total()));
|
ui->total_label->setText(Tools::double_to_string_time(d.get_total()));
|
||||||
}
|
}
|
||||||
@@ -35,3 +37,8 @@ void SetDayDialog::compute_time() {
|
|||||||
Day SetDayDialog::get_result() {
|
Day SetDayDialog::get_result() {
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetDayDialog::validate() {
|
||||||
|
d.set_validate(true);
|
||||||
|
accept();
|
||||||
|
}
|
||||||
|
|||||||
@@ -15,13 +15,14 @@ class SetDayDialog : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SetDayDialog(Day d, QWidget *parent = nullptr);
|
explicit SetDayDialog(Day d, bool isNotValidable, QWidget *parent = nullptr);
|
||||||
~SetDayDialog();
|
~SetDayDialog();
|
||||||
|
|
||||||
Day get_result();
|
Day get_result();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void compute_time();
|
void compute_time();
|
||||||
|
void validate();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::SetDayDialog *ui;
|
Ui::SetDayDialog *ui;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ void Welcome::edit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Day Welcome::modify_value(Day d) {
|
Day Welcome::modify_value(Day d) {
|
||||||
SetDayDialog sdd(d, this);
|
SetDayDialog sdd(d, true, this);
|
||||||
int result = sdd.exec();
|
int result = sdd.exec();
|
||||||
if (result == QDialog::Accepted) {
|
if (result == QDialog::Accepted) {
|
||||||
return sdd.get_result();
|
return sdd.get_result();
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
<string notr="true">font-size: 12px;</string>
|
<string notr="true">font-size: 12px;</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Version: 1.0.0 (Beta 4)</string>
|
<string>Version: 1.0.0 (Beta 5)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
|
|||||||
275
ui/mainwindow.ui
275
ui/mainwindow.ui
@@ -394,6 +394,61 @@ color: white;</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_21">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="mondayValidate">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border-image: url(:/clock/pictures/validate.png) 0 0 0 0 stretch stretch;</string>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_8">
|
<widget class="Line" name="line_8">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@@ -592,6 +647,61 @@ color: white;</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_22">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="tuesdayValidate">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border-image: url(:/clock/pictures/validate.png) 0 0 0 0 stretch stretch;</string>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_19">
|
<widget class="Line" name="line_19">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@@ -790,6 +900,61 @@ color: white;</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_23">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_7">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="wednesdayValidate">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border-image: url(:/clock/pictures/validate.png) 0 0 0 0 stretch stretch;</string>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_8">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_20">
|
<widget class="Line" name="line_20">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@@ -988,6 +1153,61 @@ color: white;</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_24">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_9">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="thurdayValidate">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border-image: url(:/clock/pictures/validate.png) 0 0 0 0 stretch stretch;</string>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_10">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_21">
|
<widget class="Line" name="line_21">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@@ -1186,6 +1406,61 @@ color: white;</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_20">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="fridayValidate">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border-image: url(:/clock/pictures/validate.png) 0 0 0 0 stretch stretch;</string>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_22">
|
<widget class="Line" name="line_22">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|||||||
@@ -34,14 +34,17 @@
|
|||||||
<widget class="QPushButton" name="pushButton">
|
<widget class="QPushButton" name="pushButton">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>320</x>
|
<x>214</x>
|
||||||
<y>140</y>
|
<y>110</y>
|
||||||
<width>75</width>
|
<width>181</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font-size: 12px</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Valider</string>
|
<string>Enregistrer la modification</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QTimeEdit" name="start_edit">
|
<widget class="QTimeEdit" name="start_edit">
|
||||||
@@ -219,6 +222,22 @@ color: white;</string>
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QPushButton" name="validateButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>214</x>
|
||||||
|
<y>140</y>
|
||||||
|
<width>181</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font-size: 12px</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Définir l'horaire comme valide</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
|||||||
Reference in New Issue
Block a user