|
|
Source code |
1 2 |
Program received signal SIGSEGV, Segmentation fault. 0x00007ffff797d120 in QString::QString(QString const&) () from /usr/lib/libqt-mt.so.3 |
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
**************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
** Qt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
**************************************************/
#include "data.h"
#include <qcombobox.h>
#include <qvalidator.h>
void Art::init() {
for (uint i = 0; i < Cats.count(); ++i)
ArtCat->insertItem( Cats.at(i)->name );
ArtPuht->setValidator( new QDoubleValidator(0.0, 9999999.0, 2, ArtPuht) );
ArtStock->setValidator(new QIntValidator(1, 9999999, ArtStock));
ArtVendu->setValidator(new QIntValidator(1, 9999999, ArtVendu));
}
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
#include <qstring.h>
#include <qptrlist.h>
#include <qdatetime.h>
#ifndef __DATA_H__
#define __DATA_H__
class hArt {
public:
QString ref;
QString desc;
float puht;
uint stock;
uint vendu;
hArt() : puht(0.0), stock(0), vendu(0) {};
hArt(QString r, QString d, QString p, QString s, QString v) {
ref=r;
desc=d;
puht=p.toFloat();
stock=s.toUInt();
vendu=v.toUInt();
};
~hArt() {};
};
class hCat {
public:
QString name;
QString desc;
QPtrList articles;
hCat() {};
hCat(QString n, QString d) : name(n), desc(d) {};
~hCat() { articles.clear(); };
};
class hAchat {
public:
QString ref;
QString desc;
uint quantite;
float puht;
float pht;
int remise;
hAchat() : quantite(0), puht(0.0), pht(0.0), remise(0) {};
~hAchat() {};
};
class hFacture {
public:
QDate date;
QString ref;
QString intitule;
QString client;
QPtrList achats;
int paiement;
enum typePaiement {
ESPECE,
CHEQUE,
CB,
AUTRE
};
QString comment;
float sumHT;
float tva;
float sumTVA;
float sumTTC;
hFacture() :
sumHT(0.0),tva(0.0),sumTVA(0.0),sumTTC(0.0) {
date = QDate::currentDate ();
};
~hFacture() {};
};
class hClient {
public:
enum clientTypeInfo {
NOM=0,
ADRESSE,
CP,
VILLE,
PAYS,
TEL,
FAX,
MOBILE,
EMAIL,
SITE,
COMMENTAIRE,
MAX_INFO
};
QString info[ MAX_INFO ];
// pour clientResult in Facture
int finded;
hClient() : finded(0) {};
~hClient() {};
};
extern QPtrList Cats;
extern QPtrList Clients;
|