BigBlueBox
An Inventory Management System for a NYLT Course or other Boy Scout Programs
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
reportsView.h
Go to the documentation of this file.
1 #ifndef REPORTSVIEW_H
2 #define REPORTSVIEW_H
3 
4 #include <QWidget>
5 #include <QPair>
6 #include <QMessageBox>
7 
8 #include "dbconnect.h"
9 #include "item.h"
10 #include "_regex.h"
11 #include "_filewriter.h"
12 
13 namespace Ui {
14 class ReportsView;
15 }
16 
17 class ReportsView : public QWidget
18 {
19  Q_OBJECT
20 
21 public:
22  explicit ReportsView(QWidget *parent = 0);
23  ~ReportsView();
24 
25 private slots:
26 
27  void on_tableWidget_inv_cellDoubleClicked(int row, int column);
28 
30 
32 
33  void on_comboBox_currentIndexChanged(int index);
34 
35  void on_comboBox_addDel_activated(int index);
36 
38 
39  void on_comboBox_addDel_currentIndexChanged(const QString &arg1);
40 
42 
43 private:
44  Ui::ReportsView *ui;
45  //**********************************************************
48  void sendRowToToolBox(QStringList row);
49  //**********************************************************
50 
51  //**********************************************************
54  void initTableInv();
55  //**********************************************************
56 
57  //**********************************************************
60  void fillTableInv();
61  //**********************************************************
62 
63  void clearTable();
64 
65  QVector<bbb::Item> fullInventory;
66 
67  void addItem();
68  void deleteItem();
69 
70  // 5 col size
71  QString orgItemName;
72 
73  QString getOrgItemNameFromToolBox();
75  QPair<QString, bbb::Row> makePair(QString orgName, bbb::Row r2);
76  QPair<QString, bbb::Row> rowForUpdate;
77 
78  void updateStoredVector(QPair<QString, bbb::Row> rowForUpdate);
79  void updateDataBase(QPair<QString, bbb::Row> rowForUpdate);
80 
81 
82 };
83 
84 #endif // REPORTSVIEW_H
void on_checkBox_editsOn_clicked()
Definition: reportsView.cpp:214
void updateDataBase(QPair< QString, bbb::Row > rowForUpdate)
Ui::ReportsView * ui
Definition: reportsView.h:44
void addItem()
Definition: reportsView.cpp:413
void on_comboBox_addDel_activated(int index)
Definition: reportsView.cpp:259
void on_comboBox_addDel_currentIndexChanged(const QString &arg1)
Definition: reportsView.cpp:313
void clearTable()
Definition: reportsView.cpp:229
void deleteItem()
Definition: reportsView.cpp:432
void initTableInv()
Sets up the inventoy table.
Definition: reportsView.cpp:89
void sendRowToToolBox(QStringList row)
Sends the doubleclicked row to the tool box.
Definition: reportsView.cpp:50
QString orgItemName
Definition: reportsView.h:71
void updateStoredVector(QPair< QString, bbb::Row > rowForUpdate)
QString getOrgItemNameFromToolBox()
Definition: reportsView.cpp:235
Definition: reportsView.h:17
ReportsView(QWidget *parent=0)
Definition: reportsView.cpp:5
bbb::Row getNewRowFromToolBox()
Definition: reportsView.cpp:240
QPair< QString, bbb::Row > rowForUpdate
Definition: reportsView.h:76
void on_comboBox_currentIndexChanged(int index)
Definition: reportsView.cpp:252
Ui Object Layer : Inventory Table Row.
Definition: item.h:78
QPair< QString, bbb::Row > makePair(QString orgName, bbb::Row r2)
void on_tableWidget_inv_cellDoubleClicked(int row, int column)
Definition: reportsView.cpp:31
void on_pushButton_edit_clicked()
Definition: reportsView.cpp:138
void on_pushButton_makeReport_clicked()
Definition: reportsView.cpp:285
void on_pushButton_addDelete_clicked()
Definition: reportsView.cpp:320
~ReportsView()
Definition: reportsView.cpp:24
QVector< bbb::Item > fullInventory
Definition: reportsView.h:65
void fillTableInv()
Fills the inventory table from the database.
Definition: reportsView.cpp:104