forked from arcnexus/RedFoX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb_table_view.h
72 lines (55 loc) · 1.67 KB
/
db_table_view.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef DB_TABLE_VIEW_H
#define DB_TABLE_VIEW_H
#include "../Auxiliares/Globlal_Include.h"
namespace Ui {
class Db_table_View;
}
class Db_table_View : public QDialog
{
Q_OBJECT
public:
explicit Db_table_View(QWidget *parent = 0);
~Db_table_View();
void set_db(QString db);
void set_table(QString tabla);
void set_table_headers(QStringList headers);
void set_relation(int colum, QSqlRelation relation);
void set_filter(QString filter);
void set_readOnly(bool state);
void set_selection(QString column_name);
void set_columnHide(int column);
void set_noInsertDeleteRows();
void set_printFile(QString file);
void set_tarifa(int tarifa);
QString selected_value;
private slots:
void on_btn_add_clicked();
void on_btn_remove_clicked();
void on_btn_save_clicked();
void on_btn_aceptar_clicked();
void on_resultado_list_clicked(const QModelIndex &index);
void on_btn_cancel_clicked();
void print_clicked();
void on_txtBuscar_textChanged(const QString &arg1);
void on_txtBuscar_editingFinished();
bool eventFilter(QObject *target, QEvent *event);
void on_resultado_list_doubleClicked(const QModelIndex &index);
protected:
void resizeEvent(QResizeEvent *);
private:
Ui::Db_table_View *ui;
QString db;
QSqlRelationalTableModel* model;
QString selection_column;
QString file;
QString tabla;
int tarifa;
QMenu * print_menu;
QAction* toPaper;
QAction* toPDF;
QStringList headers;
QVector<int> hide_headers;
int colums;
bool _readOnly;
};
#endif // DB_TABLE_VIEW_H