From def9175668355962466420f7abd86bf13dc54616 Mon Sep 17 00:00:00 2001 From: giuliof Date: Mon, 8 Jun 2020 22:40:44 +0200 Subject: [PATCH] Forgot .hpp --- ImmuNoattri.hpp | 43 +++++++++++++++++++++++++++++++++++++++++++ sqliteInterface.hpp | 18 ++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 ImmuNoattri.hpp create mode 100644 sqliteInterface.hpp 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