-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Добавлена вкладка просмотра и печати актов технического состояния обо…
…рудовния (редактор еще не реализован).
- Loading branch information
1 parent
32c2647
commit 72c7c15
Showing
38 changed files
with
2,345 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "stabletechreportsmodel.h" | ||
|
||
STableTechReportsModel::STableTechReportsModel(QObject *parent) : STableBaseModel(parent) | ||
{ | ||
|
||
} | ||
|
||
QVariant STableTechReportsModel::data(const QModelIndex &index, int role) const | ||
{ | ||
if(role == Qt::DisplayRole) | ||
{ | ||
switch(index.column()) | ||
{ | ||
case Columns::Company: return companyFromId(index); | ||
case Columns::User: return userFromId(index); | ||
case Columns::Created: return timestampLocal(index); | ||
default: break; | ||
} | ||
} | ||
return STableBaseModel::data(index, role); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef STABLETECHREPORTSMODEL_H | ||
#define STABLETECHREPORTSMODEL_H | ||
|
||
#include <QObject> | ||
#include "models/stablebasemodel.h" | ||
#include "global.h" | ||
|
||
class STableTechReportsModel : public STableBaseModel | ||
{ | ||
Q_OBJECT | ||
public: | ||
enum Columns{Id = 0, Num, Created, User, Company, Client, Device, InvNumber, SerialNumber, ProductionData, PurchaseDate, InitCost, ResidualCost, Fault, DiagResult, Conclusion, Notes}; | ||
explicit STableTechReportsModel(QObject *parent = nullptr); | ||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | ||
// Qt::ItemFlags flags(const QModelIndex& index) const override; | ||
private: | ||
QVariant clientName(const QModelIndex &index) const; | ||
QVariant dateTime(const QModelIndex &index) const; | ||
}; | ||
|
||
#endif // STABLETECHREPORTSMODEL_H |
Oops, something went wrong.