Forgot .hpp
This commit is contained in:
parent
9055bc1b14
commit
def9175668
|
@ -0,0 +1,43 @@
|
||||||
|
#ifndef MAINWINDOW_H
|
||||||
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
|
#include <QFile>
|
||||||
|
#include <QMainWindow>
|
||||||
|
#include <QTimer>
|
||||||
|
#include <QCloseEvent>
|
||||||
|
|
||||||
|
#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
|
|
@ -0,0 +1,18 @@
|
||||||
|
#ifndef __SQLITEINTERFACE_HPP__
|
||||||
|
#define __SQLITEINTERFACE_HPP__
|
||||||
|
|
||||||
|
#include <QSqlDatabase>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
class SqliteInterface {
|
||||||
|
public:
|
||||||
|
SqliteInterface(const QString& path);
|
||||||
|
bool cleanup();
|
||||||
|
bool addVisitor(const QString& codfis, const QString& anagrafica);
|
||||||
|
int count();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QSqlDatabase m_db;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue