The following (sub-)directories exist:
.
- main build directory, contains main widget and some global classes
+ main build directory, contains main application stub
wbase
Web object base classes.
//
//
-#include "customer.h"
+#include "customerdlg.h"
#include "msinterface.h"
#include <QBoxLayout>
#define req (MSInterface::instance())
-MCustomer::MCustomer(qint64 i)
-{
- MTGetCustomer gc=req->queryGetCustomer(i);
- if(gc.stage()==gc.Success)
- operator=(gc.getcustomer().value());
-}
-
-bool MCustomer::isValid()
-{
- //TODO: reconsider isValid
- return id()>-1;
-}
-
-QString MCustomer::address(int i)
-{
- if(i<0)return "";
- QList<MOAddress>adrs=addresses();
- if(i>=adrs.size())return "";
- QString ret;
- MOAddress adr=adrs[i];
- if(adr.name().isNull())ret=name();
- else ret=adr.name().value();
- ret+="\n";
- if(!adr.company().isNull())ret+=adr.company().value()+"\n";
- if(!adr.addr1().isNull())ret+=adr.addr1().value()+"\n";
- if(!adr.addr2().isNull())ret+=adr.addr2().value()+"\n";
- if(!adr.city().isNull())ret+=adr.city().value()+"\n";
- if(!adr.state().isNull())ret+=adr.state().value()+"\n";
- if(!adr.zipcode().isNull())ret+=adr.zipcode().value()+"\n";
- if(!adr.country().isNull())ret+=adr.country().value().name();
- return ret;
-}
-
-
-/*********************************************************/
-
MCustomerListDialog::MCustomerListDialog(QWidget*par,bool isselect,qint64 presel)
:QDialog(par)
{
//
//
-#ifndef MAGICSMOKE_CUSTOMER_H
-#define MAGICSMOKE_CUSTOMER_H
+#ifndef MAGICSMOKE_CUSTOMERDLG_H
+#define MAGICSMOKE_CUSTOMERDLG_H
#include <QString>
#include <QDialog>
#include <QList>
-#include "MOCustomerShort.h"
-#include "MOCustomer.h"
-
-/**this class expands on MOCustomer to add some convenience methods*/
-class MCustomer:public MOCustomer
-{
- public:
- /**creates an empty/invalid customer*/
- MCustomer(){}
- /**fetches customer from the Database*/
- MCustomer(qint64);
- /**copies a customer*/
- MCustomer(const MCustomer&c):MOCustomer(c){}
- MCustomer(const MOCustomer&c):MOCustomer(c){}
-
- /**copies a customer*/
- MCustomer& operator=(const MCustomer&c){MOCustomer::operator=(c);return *this;}
- MCustomer& operator=(const MOCustomer&c){MOCustomer::operator=(c);return *this;}
-
- /**returns whether the customer is valid*/
- bool isValid();
-
- /**returns the address of the customer*/
- QString address(int i=0);
-};
+#include "customer.h"
class QListView;
class QStandardItemModel;
dialogs/orderwin.h \
dialogs/moneylog.h \
dialogs/login.h \
+ dialogs/shipping.h \
+ dialogs/customerdlg.h \
dialogs/passwdchg.h
SOURCES += \
dialogs/orderwin.cpp \
dialogs/moneylog.cpp \
dialogs/login.cpp \
+ dialogs/shipping.cpp \
+ dialogs/customerdlg.cpp \
dialogs/passwdchg.cpp
INCLUDEPATH += ./dialogs
\ No newline at end of file
--- /dev/null
+//
+// C++ Implementation: customer
+//
+// Description:
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2008
+//
+// Copyright: See README/COPYING files that come with this distribution
+//
+//
+
+#include "customer.h"
+#include "msinterface.h"
+
+#define req (MSInterface::instance())
+
+MCustomer::MCustomer(qint64 i)
+{
+ MTGetCustomer gc=req->queryGetCustomer(i);
+ if(gc.stage()==gc.Success)
+ operator=(gc.getcustomer().value());
+}
+
+bool MCustomer::isValid()
+{
+ //TODO: reconsider isValid
+ return id()>-1;
+}
+
+QString MCustomer::address(int i)
+{
+ if(i<0)return "";
+ QList<MOAddress>adrs=addresses();
+ if(i>=adrs.size())return "";
+ QString ret;
+ MOAddress adr=adrs[i];
+ if(adr.name().isNull())ret=name();
+ else ret=adr.name().value();
+ ret+="\n";
+ if(!adr.company().isNull())ret+=adr.company().value()+"\n";
+ if(!adr.addr1().isNull())ret+=adr.addr1().value()+"\n";
+ if(!adr.addr2().isNull())ret+=adr.addr2().value()+"\n";
+ if(!adr.city().isNull())ret+=adr.city().value()+"\n";
+ if(!adr.state().isNull())ret+=adr.state().value()+"\n";
+ if(!adr.zipcode().isNull())ret+=adr.zipcode().value()+"\n";
+ if(!adr.country().isNull())ret+=adr.country().value().name();
+ return ret;
+}
--- /dev/null
+//
+// C++ Interface: customer
+//
+// Description:
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2008
+//
+// Copyright: See README/COPYING files that come with this distribution
+//
+//
+
+#ifndef MAGICSMOKE_CUSTOMER_H
+#define MAGICSMOKE_CUSTOMER_H
+
+#include <QString>
+
+#include "MOCustomerShort.h"
+#include "MOCustomer.h"
+
+/**this class expands on MOCustomer to add some convenience methods*/
+class MCustomer:public MOCustomer
+{
+ public:
+ /**creates an empty/invalid customer*/
+ MCustomer(){}
+ /**fetches customer from the Database*/
+ MCustomer(qint64);
+ /**copies a customer*/
+ MCustomer(const MCustomer&c):MOCustomer(c){}
+ MCustomer(const MOCustomer&c):MOCustomer(c){}
+
+ /**copies a customer*/
+ MCustomer& operator=(const MCustomer&c){MOCustomer::operator=(c);return *this;}
+ MCustomer& operator=(const MOCustomer&c){MOCustomer::operator=(c);return *this;}
+
+ /**returns whether the customer is valid*/
+ bool isValid();
+
+ /**returns the address of the customer*/
+ QString address(int i=0);
+};
+
+#endif
HEADERS += \
iface/msinterface.h \
- iface/sslexception.h
+ iface/event.h \
+ iface/order.h \
+ iface/sslexception.h \
+ iface/customer.h
SOURCES += \
iface/msinterface.cpp \
- iface/sslexception.cpp
+ iface/event.cpp \
+ iface/order.cpp \
+ iface/sslexception.cpp \
+ iface/customer.cpp
INCLUDEPATH += ./iface
\ No newline at end of file
RCC_DIR = .ctmp
-SOURCES = \
- main.cpp \
- event.cpp \
- order.cpp \
- shipping.cpp \
- customer.cpp
-
-HEADERS = \
- main.h \
- event.h \
- order.h \
- shipping.h \
- customer.h
+SOURCES = main.cpp
+HEADERS = main.h
RESOURCES += images/files.qrc