MagicSmoke  $VERSION$
payedit.h
Go to the documentation of this file.
1 //
2 // C++ Interface: shipping
3 //
4 // Description:
5 //
6 //
7 // Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2008-2011
8 //
9 // Copyright: See README/COPYING.GPL files that come with this distribution
10 //
11 //
12 
13 #ifndef MAGICSMOKE_PAYEDIT_H
14 #define MAGICSMOKE_PAYEDIT_H
15 
16 #include <QString>
17 #include <QDialog>
18 
19 class QLabel;
20 class QComboBox;
21 class QLineEdit;
22 class MCentSpinBox;
23 class QStandardItemModel;
24 class QTableView;
25 
26 #include "MOPaymentType"
27 
29 class MPaymentEditor:public QDialog
30 {
31  Q_OBJECT
32  public:
34  MPaymentEditor(QWidget*);
35 
36  private slots:
38  void changeDescription();
40  void changeData();
42  void changeAvail();
44  void changeDefault();
46  void addNew();
48  void deletePay();
50  void updateTable();
51 
52  private:
53  QList<MOPaymentType>all;
54  QStandardItemModel*model;
55  QTableView*table;
56  QLabel*deftype;
57 };
58 
60 class MPaymentDialog:public QDialog
61 {
62  Q_OBJECT
63  public:
65  MPaymentDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
66 
68  qint64 value()const;
69 
71  QString paytype()const;
73  QString paydata()const;
74 
75  public slots:
77  void setValue(qint64);
79  void setMaximum(qint64);
80 
81  private slots:
83  void setPType();
84  private:
85  MCentSpinBox*m_cent;
86  QComboBox*m_ptype;
87  QLineEdit*m_data;
88  QLabel*m_dlabel;
89 };
90 
91 #endif
MPaymentEditor(QWidget *)
instantiate the editor
Definition: payedit.cpp:46
qint64 value() const
returns the currently set money value in cents
Definition: payedit.cpp:361
void setMaximum(qint64)
set the maximum that can be entered
Definition: payedit.cpp:351
an editor for payment types, this is a direct interface to the paymenttype table on the server side ...
Definition: payedit.h:29
QString paytype() const
returns the selected payment type
Definition: payedit.cpp:366
Definition: centbox.h:22
simple dialog to enter payment data
Definition: payedit.h:60
QString paydata() const
returns the currently entered payment data
Definition: payedit.cpp:371
void setValue(qint64)
set the current money value in cents
Definition: payedit.cpp:356
MPaymentDialog(QWidget *parent=0, Qt::WindowFlags f=0)
instantiate the dialog
Definition: payedit.cpp:313