13 #ifndef MAGICSMOKE_CUSTOMERDLG_H
14 #define MAGICSMOKE_CUSTOMERDLG_H
19 #include <QItemDelegate>
21 #include <QScrollArea>
23 #include "MOCustomerInfo"
30 class QSortFilterProxyModel;
31 class QStandardItemModel;
51 void deleteCustomer();
54 QList<MOCustomerInfo> m_list;
56 QStandardItemModel*m_listmodel;
57 QSortFilterProxyModel*m_proxymodel;
61 void updateList(
int id=-1);
182 void addAddr(
const MOAddress&,
bool vis=
false);
185 QList<MOAddress>m_addr;
189 QGridLayout*m_layout;
217 void updateCustomer();
222 bool m_needupdate,m_unsel;
224 QHBoxLayout*m_btnlayout;
242 void selectCountry();
244 QLineEdit *m_name,*m_addr1,*m_addr2,*m_city,*m_state,*m_zip,*m_country;
265 void removeContact();
273 QLineEdit*m_name,*m_fname,*m_title;
277 QTableView*m_contact;
278 QStandardItemModel*m_contactmodel;
288 QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
289 const QModelIndex &index)
const;
291 void setEditorData(QWidget *editor,
const QModelIndex &index)
const;
292 void setModelData(QWidget *editor, QAbstractItemModel *model,
293 const QModelIndex &index)
const;
297 mutable QList<MOContactType>m_typelist;
314 void updateCountry(QString
id=QString());
317 QComboBox*m_title,*m_city,*m_state,*m_country;
318 QLineEdit*m_name,*m_fname,*m_addr1,*m_zipcode;
319 QList<MOContactType>m_typelist;
320 QList<MOCountry>m_countrylist;
321 QList<QLineEdit*>m_contact;
shows a list of customers, lets the user select and offers to alter/create customers ...
Definition: customerdlg.h:35
qint64 addressId() const
returns the ID of the chosen address or -1 if the unselect button was used
Definition: customerdlg.cpp:854
Definition: customer.h:24
Definition: customerinfo.h:22
MCustomerListDialog(QWidget *, bool isselect=false, qint64 selected=-1)
creates a new customer list dialog; expects a usable webrequest object and a parent, if isselect is set to true it offers a select button, if selected is set to a matching customerID it will be pre-selected
Definition: customerdlg.cpp:53
dialog for editing exactly one address
Definition: customerdlg.h:228
void preselect(const MOAddress &)
pre-select an address
Definition: customerdlg.cpp:878
edit a specific customer
Definition: customerdlg.h:249
MCustomerDialog(MOCustomer, QWidget *)
creates a new customer dialog
Definition: customerdlg.cpp:231
MOCustomer getCustomer()
returns the customer as currently entered
Definition: customerdlg.cpp:343
static MOCountry createNewCountry(QWidget *parent=0)
helper function to create a new country, used by MAddressDialog and MNewCustomerWizard returns a vali...
Definition: customerdlg.cpp:743
MNewCustomerWizard(QWidget *parent=0, Qt::WindowFlags f=0)
Definition: customerdlg.cpp:891
MAddressChoiceDialog(QWidget *, const MOCustomer &)
creates the dialog
Definition: customerdlg.cpp:814
MOAddress address() const
returns the chosen address or an invalid address if none was chosen
Definition: customerdlg.cpp:848
Wizard for creating a new customer.
Definition: customerdlg.h:302
wrapper dialog to chose an address; updates the customer is there is a change
Definition: customerdlg.h:193
MOCustomer customer() const
returns the (modified) customer object
Definition: customerdlg.h:207
static MOCustomer getNewCustomer(QWidget *parent=0)
Definition: customerdlg.cpp:1091
MOAddress address()
returns the address
Definition: customerdlg.cpp:726
MOCustomer customer() const
Definition: customerdlg.h:308
Definition: srcMOCountry.h:14
MAddressDialog(QWidget *parent=0, MOAddress addr=MOAddress())
creates the dialog, if no valid address is given it displays as "create address" otherwise as "edit a...
Definition: customerdlg.cpp:689
void addUnselectButton(const QString &)
add an unselect button
Definition: customerdlg.cpp:840
MOCustomerInfo getCustomer()
returns the selected customer
Definition: customerdlg.cpp:146