2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#ifndef TABLEEDITOR_H
|
|
|
|
#define TABLEEDITOR_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QDialogButtonBox;
|
|
|
|
class QPushButton;
|
|
|
|
class QSqlTableModel;
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
//! [0]
|
2011-04-27 17:16:41 +00:00
|
|
|
class TableEditor : public QWidget
|
2011-04-27 10:05:43 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-07-20 14:39:01 +00:00
|
|
|
explicit TableEditor(const QString &tableName, QWidget *parent = nullptr);
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void submit();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QPushButton *submitButton;
|
|
|
|
QPushButton *revertButton;
|
|
|
|
QPushButton *quitButton;
|
|
|
|
QDialogButtonBox *buttonBox;
|
|
|
|
QSqlTableModel *model;
|
|
|
|
};
|
|
|
|
//! [0]
|
|
|
|
|
|
|
|
#endif
|