diff --git a/src/LicenseModel/LicenseModel.cpp b/src/LicenseModel/LicenseModel.cpp index 4ade85a..9997e92 100644 --- a/src/LicenseModel/LicenseModel.cpp +++ b/src/LicenseModel/LicenseModel.cpp @@ -45,13 +45,14 @@ LicenseModel::~LicenseModel() int LicenseModel::rowCount(const QModelIndex &parent) const { - return 0; + return m_data.size(); } int LicenseModel::columnCount(const QModelIndex &parent) const { return COLUMN_COUNT; } + QVariant LicenseModel::data(const QModelIndex &index, int role) const { switch (role) @@ -147,3 +148,18 @@ bool LicenseModel::prepareDatabase() return true; } + +void LicenseModel::addClient(const LicenseItem &item) +{ + +} + +void LicenseModel::deleteClient(const LicenseItem &item) +{ + +} + +void LicenseModel::editClient(const LicenseItem &item) +{ + +} diff --git a/src/LicenseModel/LicenseModel.h b/src/LicenseModel/LicenseModel.h index 11df3b1..808f8bf 100644 --- a/src/LicenseModel/LicenseModel.h +++ b/src/LicenseModel/LicenseModel.h @@ -1,6 +1,7 @@ #ifndef LICENSEMANAGER_LICENSEMODEL_H #define LICENSEMANAGER_LICENSEMODEL_H +// Qt #include #include @@ -38,15 +39,14 @@ public: 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; - Status getStatus(); QString getStatusText(); - bool prepareDatabase(); - + void addClient(const LicenseItem &item); + void deleteClient(const LicenseItem &item); + void editClient(const LicenseItem &item); private: bool checkTables(); - private: QList m_data; Status m_status = Status::None; @@ -54,5 +54,4 @@ private: QSqlDatabase m_db; }; - #endif // LICENSEMANAGER_LICENSEMODEL_H