40 lines
770 B
C++
40 lines
770 B
C++
#ifndef FSINGLEGRID_H
|
|
#define FSINGLEGRID_H
|
|
|
|
#include <QWidget>
|
|
#include <QTableWidget>
|
|
#include "udatabase.h"
|
|
|
|
namespace Ui {
|
|
class FSingleGrid;
|
|
}
|
|
|
|
class FSingleGrid : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FSingleGrid(QWidget *parent = nullptr);
|
|
~FSingleGrid();
|
|
void initForm(QString aBlockName, QString aNewName, bool btnOpen = false);
|
|
void toGrid(QString aName, QString aFile);
|
|
QTableWidget* tableWidget() const;
|
|
void setDatabase(uDataBase *database);
|
|
private slots:
|
|
void on_btnAdd_clicked();
|
|
|
|
void on_btnDel_clicked();
|
|
|
|
void on_btnEdt_clicked();
|
|
|
|
void on_btnOpen_clicked();
|
|
|
|
void on_sg_cellClicked(int row, int column);
|
|
|
|
private:
|
|
Ui::FSingleGrid *ui;
|
|
uDataBase *db = nullptr;
|
|
};
|
|
|
|
#endif // FSINGLEGRID_H
|