MyBooks
dlgauthors.hpp
Go to the documentation of this file.
1 #ifndef DLGAUTHORS_HPP
2 #define DLGAUTHORS_HPP
3 
4 #include <QDialog>
5 #include <QEvent>
6 #include <QShowEvent>
7 #include <QCloseEvent>
8 #include <QResizeEvent>
9 #include <QCloseEvent>
10 #include <QWidget>
11 #include <QByteArray>
12 #include <QSqlDatabase>
13 #include <QSqlQuery>
14 #include <QSqlTableModel>
15 #include <QItemSelectionModel>
16 #include <QDataWidgetMapper>
17 
18 #include "ui_dlgauthors.h"
19 
20 class QModelIndex;
21 
22 namespace Ui {
23 class DlgAuthors;
24 }
25 
33 class DlgAuthors : public QDialog
34 {
35  Q_OBJECT
36 
37 public:
38  explicit DlgAuthors(QWidget *parent = 0);
39  ~DlgAuthors();
40 
41  bool edit = false;
42  int id = 0;
43 
44 protected:
45  void changeEvent(QEvent *e);
46  void showEvent(QShowEvent *);
47  void resizeEvent(QResizeEvent *);
48  void closeEvent(QCloseEvent *);
49 
50 private slots:
51  void slotAddRec();
52  void slotDelRec();
53  void slotUpdtRec();
54  void slotExit();
55  void slotRowSel();
56  void slotFindID(int id);
57 
58 private:
59  class AuthPrivate;
60 
61  AuthPrivate *d;
62  Ui::DlgAuthors *ui;
63 
64  void saveColSizes();
65  void clearForm();
66  void resetButtons();
67  void loadTable();
68  void connectGUIelements();
69  void setupModel();
70  void saveColWidths();
71  void saveDataFromForm();
72  void updateButtons();
73  void displaySettings();
74  void readSettings();
75  void saveSettings();
76 };
77 
78 #endif // DLGAUTHORS_HPP
Definition: reportpreview.h:30
Ui::DlgAuthors * ui
the local private *d-ptr pointer to private data
Definition: dlgauthors.hpp:62
Authors Database Maint. Dialog.
Definition: dlgauthors.hpp:33
AuthPrivate * d
Definition: dlgauthors.hpp:59
Definition: dlgauthors.cpp:20