2019-08-13 20:29:55 +00:00
|
|
|
#ifndef EDITWINDOW_H
|
|
|
|
#define EDITWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QtSql>
|
|
|
|
#include <QMessageBox>
|
|
|
|
#include <QtWidgets>
|
|
|
|
#include <QCloseEvent>
|
|
|
|
#include "db.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class EditWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class EditWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2019-08-16 13:34:25 +00:00
|
|
|
explicit EditWindow(int idSocio, QWidget* parent = nullptr);
|
2019-08-13 20:29:55 +00:00
|
|
|
~EditWindow();
|
|
|
|
|
|
|
|
bool doNotShow = false;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_pushButtonAnnulla_clicked();
|
|
|
|
|
|
|
|
void on_pushButtonSalva_clicked();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::EditWindow *ui;
|
2019-08-16 16:39:04 +00:00
|
|
|
QSqlRelationalTableModel *model = nullptr;
|
2019-08-13 20:29:55 +00:00
|
|
|
bool doNotShow_;
|
|
|
|
int professioneIdx;
|
|
|
|
int fonteIdx;
|
|
|
|
|
|
|
|
void showError(const QSqlError &err);
|
|
|
|
void closeEvent(QCloseEvent *event);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // EDITWINDOW_H
|