BiblioteQ

biblioteq_item.h
1 #ifndef _BIBLIOTEQ_ITEM_H_
2 #define _BIBLIOTEQ_ITEM_H_
3
4 #include <QFont>
5 #include <QKeyEvent>
6 #include <QMainWindow>
7 #include <QPrintDialog>
8 #include <QPrinter>
9 #include <QProgressDialog>
10
11 class biblioteq;
12
13 class biblioteq_item_working_dialog: public QProgressDialog
14 {
15 Q_OBJECT
16
17 public:
18 biblioteq_item_working_dialog(QMainWindow *parent):QProgressDialog(parent)
19 {
20 }
21
22 ~biblioteq_item_working_dialog()
23 {
24 }
25
26 protected:
27 void closeEvent(QCloseEvent *event)
28 {
29 if(event)
30 event->ignore();
31 }
32
33 void keyPressEvent(QKeyEvent *event)
34 {
35 if(event && event->key() == Qt::Key_Escape)
36 event->ignore();
37 else
38 QProgressDialog::keyPressEvent(event);
39 }
40 };
41
42 class biblioteq_item
43 {
44 public:
45 biblioteq_item(const int rowArg);
46 biblioteq_item(void);
47 virtual ~biblioteq_item();
48 QString getID(void) const;
49 int getOldQ(void) const;
50 int getRow(void) const;
51 void setOldQ(const int q);
52 void updateQuantity(const int q);
53 void updateRow(const int rowArg);
54
55 protected:
56 QMainWindow *m_parentWid;
57 QMap<QString, QImage> m_imageValues;
58 QMap<QString, QString> m_widgetValues;
59 QString m_html;
60 QString m_oid;
61 biblioteq *qmain;
62 bool m_isQueryEnabled;
63 int m_oldq;
64 int m_row;
65 bool hasDataChanged(QMainWindow *window) const;
66 void print(QWidget *parent);
67 void setQMain(QMainWindow *window);
68 void setReadOnlyFields(QMainWindow *window, const bool state);
69 void storeData(QMainWindow *window);
70 void updateFont(const QFont &font, QWidget *window);
71 };
72
73 #endif
biblioteq_item_working_dialog
Definition: biblioteq_item.h:13
biblioteq
Definition: biblioteq.h:179
biblioteq_item
Definition: biblioteq_item.h:42