fix: finalize non sql logic
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
#define LICENSEMANAGER_LICENSEMODEL_H
|
||||
|
||||
// Qt
|
||||
#include <QAbstractTableModel>
|
||||
#include <QAbstractItemModel>
|
||||
#include <QtSql/QSqlDatabase>
|
||||
|
||||
class LicenseModel : public QAbstractTableModel
|
||||
class LicenseModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
QString patronymic;
|
||||
QString phone;
|
||||
QString yourCompany;
|
||||
QString createdAtUtc;
|
||||
QString comment;
|
||||
};
|
||||
|
||||
@@ -38,13 +39,17 @@ public:
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QModelIndex parent(const QModelIndex &index) const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
Status getStatus();
|
||||
QString getStatusText();
|
||||
bool prepareDatabase();
|
||||
void addClient(const LicenseItem &item);
|
||||
void deleteClient(int index);
|
||||
void editClient(const LicenseItem &item, int index);
|
||||
void updateModel();
|
||||
LicenseItem getItem(int index) const;
|
||||
private:
|
||||
bool checkTables();
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user