-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqlForeignKeyDelegate.h
More file actions
24 lines (19 loc) · 931 Bytes
/
sqlForeignKeyDelegate.h
File metadata and controls
24 lines (19 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//
// Created by viking on 9/16/18.
//
#ifndef SQL_SQLFOREIGNKEYDELEGATE_H
#define SQL_SQLFOREIGNKEYDELEGATE_H
#include "sqlsetup.h"
#include "columncombobox.h"
#include "Paper_Model.h"
class sqlForeignKeyDelegate: public QItemDelegate
{
Q_OBJECT
public:
explicit sqlForeignKeyDelegate(Paper_Model *model_area,QObject *parent=Q_NULLPTR ); // *areamodel is the model for the foreignkey
QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
Paper_Model *model_area{nullptr}; // alias of foreign key model which contains the foreign key data
QTableView *tableview{nullptr}; //alias of table view (from *parent) allows resizing of table
};
#endif //SQL_SQLFOREIGNKEYDELEGATE_H