BigBlueBox
An Inventory Management System for a NYLT Course or other Boy Scout Programs
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
_filewriter.h
Go to the documentation of this file.
1 #ifndef _FILEWRITER_H
2 #define _FILEWRITER_H
3 //*************************************************************************************
4 #include <QFile>
5 #include <QTextStream>
6 #include <QXmlStreamWriter>
7 #include <QStandardPaths>
8 #include <QDir>
9 
10 #include <QVector>
11 #include <QStringList>
12 
13 #include <QDebug>
14 #include "item.h"
15 #include "_filereader.h"
16 //*************************************************************************************
17 
18 
19 namespace bbb {
20 //*********************************************************************************
26 //*********************************************************************************
28 {
29 private:
30  //**********************************************************
33  _FileWriter();
34  //**********************************************************
35 
36  //**********************************************************
39  //**********************************************************
40 
41  // todo - change this to getFileWriterPathFromDirHandler() &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
42  //**********************************************************
44  QString getReportsPath();
45  //**********************************************************
46 
47 
48 
49 public:
50  //**********************************************************
63  {
65  Low,
69  };
70  //**********************************************************
71 
72 
73  //**********************************************************
77  ~_FileWriter();
78  //**********************************************************
79 
80  //**********************************************************
84  static _FileWriter* getInstance();
85  //**********************************************************
86 
87  //**********************************************************
92  // every option should also have a output to .csv option as well
93  // can be controled via combo box dropdown in reports veiw.
94  void makeTxtInvReport(QVector<Item> inventory, ReportType type = Full);
95  //**********************************************************
96 
97  //**********************************************************
102  void makeXmlInvReport(QVector<Item> inventory, ReportType type = Full);
103  //**********************************************************
104 
105 
106 
107  static void writeDbFileLoc(QString path);
108  static void writeReportsDir(QString path);
109 
110 }; // end class
111 //*********************************************************************************
112 } // end namespace
113 
114 
115 #endif // _FILEWRITER_H
ReportType
This enum discribes the various reports to be printed.
Definition: _filewriter.h:62
QString getReportsPath()
Gets the path to desktop.
Definition: _filewriter.cpp:37
static _FileWriter * instance
Singleton Pointer.
Definition: _filewriter.h:38
Output File Stream Handler : Singleton.
Definition: _filewriter.h:27
~_FileWriter()
Default non-args de-constructor.
Definition: _filewriter.cpp:18
Definition: _filewriter.h:64
Definition: _filewriter.h:65
Definition: _filewriter.h:66
_FileWriter()
Default no-args constructor.
Definition: _filewriter.cpp:11
void makeTxtInvReport(QVector< Item > inventory, ReportType type=Full)
Writes a Inventory Report to txt file.
Definition: _filewriter.cpp:51
void makeXmlInvReport(QVector< Item > inventory, ReportType type=Full)
Writes Inventory Report to xml file.
Definition: _filewriter.cpp:198
Definition: _filewriter.h:68
static _FileWriter * getInstance()
Singleton pointer return function.
Definition: _filewriter.cpp:26
Definition: _filewriter.h:67
static void writeReportsDir(QString path)
Definition: _filewriter.cpp:383
static void writeDbFileLoc(QString path)
Definition: _filewriter.cpp:357