BiblioteQ: Source/biblioteq_copy_editor.h Source File

BiblioteQ

biblioteq_copy_editor.h
1 #ifndef _BIBLIOTEQ_COPY_EDITOR_H_
2 #define _BIBLIOTEQ_COPY_EDITOR_H_
3
4 #include "ui_biblioteq_copybrowser.h"
5
6 class QSpinBox;
7 class biblioteq;
8 class biblioteq_item;
9
10 class biblioteq_copy_editor: public QDialog
11 {
12 Q_OBJECT
13
14 public:
15 biblioteq_copy_editor(QWidget *parent, biblioteq *biblioteq);
16 biblioteq_copy_editor(QWidget *parent,
17 biblioteq *biblioteq,
18 biblioteq_item *bitemArg,
19 const bool showForLendingArg,
20 const int quantityArg,
21 const QString &ioidArg,
22 QSpinBox *spinboxArg,
23 const QFont &font,
24 const QString &itemTypeArg,
25 const QString &uniqueIdArg);
26 virtual ~biblioteq_copy_editor();
27 void populateCopiesEditor(void);
28
29 private:
30 class copy_class
31 {
32 public:
33 copy_class(const QString &copyid,
34 const QString &copynumber,
35 const QString &itemoid,
36 const QString &status)
37 {
38 m_copyid = copyid;
39 m_copynumber = copynumber;
40 m_itemoid = itemoid;
41 m_status = status;
42 };
43
44 public:
45 QString m_copyid;
46 QString m_copynumber;
47 QString m_itemoid;
48 QString m_status;
49 };
50
51 enum Columns
52 {
53 AVAILABILITY = 2,
54 BARCODE = 1,
55 COPY_NUMBER = 5,
56 MYOID = 4,
57 STATUS = 3,
58 TITLE = 0
59 };
60
61 QList<copy_class *> m_copies;
62 QSpinBox *m_spinbox;
63 QString m_ioid;
64 QString m_itemType;
65 QVector<QString> m_columnHeaderIndexes;
66 QWidget *m_parent;
67 Ui_copybrowser m_cb;
68 biblioteq *qmain;
69 biblioteq_item *m_bitem;
70 bool m_showForLending;
71 int m_quantity;
72 QString saveCopies(void);
73 void changeEvent(QEvent *event);
74 void clearCopiesList(void);
75 void closeEvent(QCloseEvent *event);
76 void keyPressEvent(QKeyEvent *event);
77
78 protected:
79 void setGlobalFonts(const QFont &font);
80
81 protected slots:
82 void slotCloseCopyEditor(void);
83
84 private slots:
85 void slotCheckoutCopy(void);
86 void slotDeleteCopy(void);
87 void slotSaveCopies(void);
88 };
89
90 #endif
biblioteq_copy_editor
Definition: biblioteq_copy_editor.h:10
biblioteq
Definition: biblioteq.h:179
biblioteq_item
Definition: biblioteq_item.h:42