diff --git a/ImmuNoattri.hpp b/ImmuNoattri.hpp new file mode 100644 index 0000000..bd1b9e1 --- /dev/null +++ b/ImmuNoattri.hpp @@ -0,0 +1,43 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include +#include +#include + +#include "sqliteInterface.hpp" + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow { + Q_OBJECT + + public: + /** + * @brief MainWindow Constructor + * @param parent Parent Handle + */ + explicit MainWindow(QWidget* parent = 0); + ~MainWindow(); + + private slots: + // GUI Events + void on_pushMano_clicked(); + void on_actionNuovo_triggered(); + void on_actionApri_triggered(); + void on_lineTessera_textEdited(const QString& text); + void on_lineTessera_timer_timeout(); + + private: + Ui::MainWindow* ui; + QFile* csv_file; + QTimer lineTessera_timer; + SqliteInterface sqliteInterface; + + void closeEvent(QCloseEvent *event); +}; + +#endif \ No newline at end of file diff --git a/sqliteInterface.hpp b/sqliteInterface.hpp new file mode 100644 index 0000000..0a9c75e --- /dev/null +++ b/sqliteInterface.hpp @@ -0,0 +1,18 @@ +#ifndef __SQLITEINTERFACE_HPP__ +#define __SQLITEINTERFACE_HPP__ + +#include +#include + +class SqliteInterface { + public: + SqliteInterface(const QString& path); + bool cleanup(); + bool addVisitor(const QString& codfis, const QString& anagrafica); + int count(); + + private: + QSqlDatabase m_db; +}; + +#endif \ No newline at end of file