This repository has been archived by the owner on Sep 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ajout du petit manuel d'utilisation, ajout des directives de préproce…
…sseur pour enlever l'affichage. Pour l'instant le makefile contient le flag -DDEBUG, mais il suffit de l'enlever dans le makefile pour que les calculs ne génèrent plus aucun message, modification de la fonction createSortedList pour qu'elle reçoive un tableau en argument
- Loading branch information
Showing
60 changed files
with
2,705 additions
and
1,045 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#Cahier de charges | ||
##Description générale : | ||
L'utilisateur possède un certain nombre de barres/cylindres/baguettes de même dimensions et souhaite les découper en un certain nombre de tronçons de différentes longueurs qu'il définira. | ||
Le programme doit calculer la meilleure combinaison des coupes de manière à obtenir le moins de chutes possible. | ||
|
||
###Interface : | ||
L’interface comportera 3 champs : | ||
* "de combien de pièces disposez-vous ?" | ||
* "quelle en est leur taille" (taille unique de toutes les barres) | ||
* "veuillez entrer les tailles des morceaux que vous voulez obtenir, séparés par des virgules.Vous pouvez utiliser le symbole * pour indiquer que vous en voulez plusieurs de cette taille. Exemple de format : 12.5, 7.8*3, 9 ,47, 36*2" | ||
|
||
###Présentation des résultats : | ||
Soit sous forme écrite : morceau1 : 12, 15,12.5,7 morceau2 : 50 etc., soit sous forme graphique avec un schéma de découpe de chaque morceau. Il faudra aussi faire figurer le pourcentage de chutes et le nombre de poutres non entamées. | ||
La page des résultats devrait comporter un lien vers le formulaire de départ pour pouvoir commencer une nouvelle simulation à tout moment. | ||
Gestion des exceptions : | ||
Seront détectés les problèmes suivants : | ||
* Tronçon demandé plus grand que la longueur des tronçons de départ. | ||
* Trop de tronçons demandés par rapport à la quantité disponible au départ. Possibilité d’augmenter le nombre de poutres disponibles « en cours de route »… | ||
* Mauvais format d’entrée des tailles de tronçons voulues. L’utilisateur est invité à ressaisir les données selon le bon format. | ||
* Bien entendu, vérifier que les chiffres ne sont pas négatifs et définir un nombre maximal de poutres pour ne pas que l’utilisateur ne s’amuse à faire planter le programme en entrant un nombre aberrant. | ||
|
||
###Moteur de calcul : | ||
|
||
Il combine les différentes possibilités pour tomber sur la ou les solutions qui donnent le moins de chutes possibles. Doit-il proposer 2 solutions au choix si elles sont équivalentes ? | ||
|
||
|
||
##Langages de programmation : | ||
La programmation se fera en c++. | ||
|
||
## Informations diverses | ||
###Date du début de projet : | ||
inconnue | ||
###Objectifs et timing : | ||
à discuter | ||
###Partage des tâches : | ||
Pierre-Emmanuel s’occupe de la partie interface graphique et Rébecca, du moteur de calcul. La partie gestion des erreurs de l’utilisateur : à discuter… |
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
110 changes: 110 additions & 0 deletions
110
build-OptimiseurDeCoupe-Desktop-Debug/moc_fenetreprincipale.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/**************************************************************************** | ||
** Meta object code from reading C++ file 'fenetreprincipale.h' | ||
** | ||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.2.1) | ||
** | ||
** WARNING! All changes made in this file will be lost! | ||
*****************************************************************************/ | ||
|
||
#include "../gui/fenetreprincipale.h" | ||
#include <QtCore/qbytearray.h> | ||
#include <QtCore/qmetatype.h> | ||
#if !defined(Q_MOC_OUTPUT_REVISION) | ||
#error "The header file 'fenetreprincipale.h' doesn't include <QObject>." | ||
#elif Q_MOC_OUTPUT_REVISION != 67 | ||
#error "This file was generated using the moc from 5.2.1. It" | ||
#error "cannot be used with the include files from this version of Qt." | ||
#error "(The moc has changed too much.)" | ||
#endif | ||
|
||
QT_BEGIN_MOC_NAMESPACE | ||
struct qt_meta_stringdata_FenetrePrincipale_t { | ||
QByteArrayData data[3]; | ||
char stringdata[38]; | ||
}; | ||
#define QT_MOC_LITERAL(idx, ofs, len) \ | ||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ | ||
offsetof(qt_meta_stringdata_FenetrePrincipale_t, stringdata) + ofs \ | ||
- idx * sizeof(QByteArrayData) \ | ||
) | ||
static const qt_meta_stringdata_FenetrePrincipale_t qt_meta_stringdata_FenetrePrincipale = { | ||
{ | ||
QT_MOC_LITERAL(0, 0, 17), | ||
QT_MOC_LITERAL(1, 18, 17), | ||
QT_MOC_LITERAL(2, 36, 0) | ||
}, | ||
"FenetrePrincipale\0traiterFormulaire\0" | ||
"\0" | ||
}; | ||
#undef QT_MOC_LITERAL | ||
|
||
static const uint qt_meta_data_FenetrePrincipale[] = { | ||
|
||
// content: | ||
7, // revision | ||
0, // classname | ||
0, 0, // classinfo | ||
1, 14, // methods | ||
0, 0, // properties | ||
0, 0, // enums/sets | ||
0, 0, // constructors | ||
0, // flags | ||
0, // signalCount | ||
|
||
// slots: name, argc, parameters, tag, flags | ||
1, 0, 19, 2, 0x0a, | ||
|
||
// slots: parameters | ||
QMetaType::Void, | ||
|
||
0 // eod | ||
}; | ||
|
||
void FenetrePrincipale::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
if (_c == QMetaObject::InvokeMetaMethod) { | ||
FenetrePrincipale *_t = static_cast<FenetrePrincipale *>(_o); | ||
switch (_id) { | ||
case 0: _t->traiterFormulaire(); break; | ||
default: ; | ||
} | ||
} | ||
Q_UNUSED(_a); | ||
} | ||
|
||
const QMetaObject FenetrePrincipale::staticMetaObject = { | ||
{ &QWidget::staticMetaObject, qt_meta_stringdata_FenetrePrincipale.data, | ||
qt_meta_data_FenetrePrincipale, qt_static_metacall, 0, 0} | ||
}; | ||
|
||
|
||
const QMetaObject *FenetrePrincipale::metaObject() const | ||
{ | ||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; | ||
} | ||
|
||
void *FenetrePrincipale::qt_metacast(const char *_clname) | ||
{ | ||
if (!_clname) return 0; | ||
if (!strcmp(_clname, qt_meta_stringdata_FenetrePrincipale.stringdata)) | ||
return static_cast<void*>(const_cast< FenetrePrincipale*>(this)); | ||
return QWidget::qt_metacast(_clname); | ||
} | ||
|
||
int FenetrePrincipale::qt_metacall(QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
_id = QWidget::qt_metacall(_c, _id, _a); | ||
if (_id < 0) | ||
return _id; | ||
if (_c == QMetaObject::InvokeMetaMethod) { | ||
if (_id < 1) | ||
qt_static_metacall(this, _c, _id, _a); | ||
_id -= 1; | ||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { | ||
if (_id < 1) | ||
*reinterpret_cast<int*>(_a[0]) = -1; | ||
_id -= 1; | ||
} | ||
return _id; | ||
} | ||
QT_END_MOC_NAMESPACE |
Binary file not shown.
113 changes: 113 additions & 0 deletions
113
build-OptimiseurDeCoupe-Desktop-Debug/moc_groupesaisie.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
/**************************************************************************** | ||
** Meta object code from reading C++ file 'groupesaisie.h' | ||
** | ||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.2.1) | ||
** | ||
** WARNING! All changes made in this file will be lost! | ||
*****************************************************************************/ | ||
|
||
#include "../gui/groupesaisie.h" | ||
#include <QtCore/qbytearray.h> | ||
#include <QtCore/qmetatype.h> | ||
#if !defined(Q_MOC_OUTPUT_REVISION) | ||
#error "The header file 'groupesaisie.h' doesn't include <QObject>." | ||
#elif Q_MOC_OUTPUT_REVISION != 67 | ||
#error "This file was generated using the moc from 5.2.1. It" | ||
#error "cannot be used with the include files from this version of Qt." | ||
#error "(The moc has changed too much.)" | ||
#endif | ||
|
||
QT_BEGIN_MOC_NAMESPACE | ||
struct qt_meta_stringdata_GroupeSaisie_t { | ||
QByteArrayData data[4]; | ||
char stringdata[39]; | ||
}; | ||
#define QT_MOC_LITERAL(idx, ofs, len) \ | ||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ | ||
offsetof(qt_meta_stringdata_GroupeSaisie_t, stringdata) + ofs \ | ||
- idx * sizeof(QByteArrayData) \ | ||
) | ||
static const qt_meta_stringdata_GroupeSaisie_t qt_meta_stringdata_GroupeSaisie = { | ||
{ | ||
QT_MOC_LITERAL(0, 0, 12), | ||
QT_MOC_LITERAL(1, 13, 11), | ||
QT_MOC_LITERAL(2, 25, 0), | ||
QT_MOC_LITERAL(3, 26, 11) | ||
}, | ||
"GroupeSaisie\0ajoutSaisie\0\0supprSaisie\0" | ||
}; | ||
#undef QT_MOC_LITERAL | ||
|
||
static const uint qt_meta_data_GroupeSaisie[] = { | ||
|
||
// content: | ||
7, // revision | ||
0, // classname | ||
0, 0, // classinfo | ||
2, 14, // methods | ||
0, 0, // properties | ||
0, 0, // enums/sets | ||
0, 0, // constructors | ||
0, // flags | ||
0, // signalCount | ||
|
||
// slots: name, argc, parameters, tag, flags | ||
1, 0, 24, 2, 0x0a, | ||
3, 0, 25, 2, 0x0a, | ||
|
||
// slots: parameters | ||
QMetaType::Void, | ||
QMetaType::Void, | ||
|
||
0 // eod | ||
}; | ||
|
||
void GroupeSaisie::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
if (_c == QMetaObject::InvokeMetaMethod) { | ||
GroupeSaisie *_t = static_cast<GroupeSaisie *>(_o); | ||
switch (_id) { | ||
case 0: _t->ajoutSaisie(); break; | ||
case 1: _t->supprSaisie(); break; | ||
default: ; | ||
} | ||
} | ||
Q_UNUSED(_a); | ||
} | ||
|
||
const QMetaObject GroupeSaisie::staticMetaObject = { | ||
{ &QWidget::staticMetaObject, qt_meta_stringdata_GroupeSaisie.data, | ||
qt_meta_data_GroupeSaisie, qt_static_metacall, 0, 0} | ||
}; | ||
|
||
|
||
const QMetaObject *GroupeSaisie::metaObject() const | ||
{ | ||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; | ||
} | ||
|
||
void *GroupeSaisie::qt_metacast(const char *_clname) | ||
{ | ||
if (!_clname) return 0; | ||
if (!strcmp(_clname, qt_meta_stringdata_GroupeSaisie.stringdata)) | ||
return static_cast<void*>(const_cast< GroupeSaisie*>(this)); | ||
return QWidget::qt_metacast(_clname); | ||
} | ||
|
||
int GroupeSaisie::qt_metacall(QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
_id = QWidget::qt_metacall(_c, _id, _a); | ||
if (_id < 0) | ||
return _id; | ||
if (_c == QMetaObject::InvokeMetaMethod) { | ||
if (_id < 2) | ||
qt_static_metacall(this, _c, _id, _a); | ||
_id -= 2; | ||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { | ||
if (_id < 2) | ||
*reinterpret_cast<int*>(_a[0]) = -1; | ||
_id -= 2; | ||
} | ||
return _id; | ||
} | ||
QT_END_MOC_NAMESPACE |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/**************************************************************************** | ||
** Meta object code from reading C++ file 'saisie.h' | ||
** | ||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.2.1) | ||
** | ||
** WARNING! All changes made in this file will be lost! | ||
*****************************************************************************/ | ||
|
||
#include "../gui/saisie.h" | ||
#include <QtCore/qbytearray.h> | ||
#include <QtCore/qmetatype.h> | ||
#if !defined(Q_MOC_OUTPUT_REVISION) | ||
#error "The header file 'saisie.h' doesn't include <QObject>." | ||
#elif Q_MOC_OUTPUT_REVISION != 67 | ||
#error "This file was generated using the moc from 5.2.1. It" | ||
#error "cannot be used with the include files from this version of Qt." | ||
#error "(The moc has changed too much.)" | ||
#endif | ||
|
||
QT_BEGIN_MOC_NAMESPACE | ||
struct qt_meta_stringdata_Saisie_t { | ||
QByteArrayData data[1]; | ||
char stringdata[8]; | ||
}; | ||
#define QT_MOC_LITERAL(idx, ofs, len) \ | ||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ | ||
offsetof(qt_meta_stringdata_Saisie_t, stringdata) + ofs \ | ||
- idx * sizeof(QByteArrayData) \ | ||
) | ||
static const qt_meta_stringdata_Saisie_t qt_meta_stringdata_Saisie = { | ||
{ | ||
QT_MOC_LITERAL(0, 0, 6) | ||
}, | ||
"Saisie\0" | ||
}; | ||
#undef QT_MOC_LITERAL | ||
|
||
static const uint qt_meta_data_Saisie[] = { | ||
|
||
// content: | ||
7, // revision | ||
0, // classname | ||
0, 0, // classinfo | ||
0, 0, // methods | ||
0, 0, // properties | ||
0, 0, // enums/sets | ||
0, 0, // constructors | ||
0, // flags | ||
0, // signalCount | ||
|
||
0 // eod | ||
}; | ||
|
||
void Saisie::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
Q_UNUSED(_o); | ||
Q_UNUSED(_id); | ||
Q_UNUSED(_c); | ||
Q_UNUSED(_a); | ||
} | ||
|
||
const QMetaObject Saisie::staticMetaObject = { | ||
{ &QWidget::staticMetaObject, qt_meta_stringdata_Saisie.data, | ||
qt_meta_data_Saisie, qt_static_metacall, 0, 0} | ||
}; | ||
|
||
|
||
const QMetaObject *Saisie::metaObject() const | ||
{ | ||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; | ||
} | ||
|
||
void *Saisie::qt_metacast(const char *_clname) | ||
{ | ||
if (!_clname) return 0; | ||
if (!strcmp(_clname, qt_meta_stringdata_Saisie.stringdata)) | ||
return static_cast<void*>(const_cast< Saisie*>(this)); | ||
return QWidget::qt_metacast(_clname); | ||
} | ||
|
||
int Saisie::qt_metacall(QMetaObject::Call _c, int _id, void **_a) | ||
{ | ||
_id = QWidget::qt_metacall(_c, _id, _a); | ||
if (_id < 0) | ||
return _id; | ||
return _id; | ||
} | ||
QT_END_MOC_NAMESPACE |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.