2018-10-07 03:41:18 +00:00
|
|
|
#pragma once
|
2017-12-25 21:53:37 +00:00
|
|
|
|
|
|
|
#include <QTableView>
|
|
|
|
|
|
|
|
class QSequentialAnimationGroup;
|
|
|
|
|
2018-12-08 05:19:40 +00:00
|
|
|
class SysReqTableModel : public QAbstractTableModel {
|
|
|
|
Q_OBJECT
|
|
|
|
uint64_t m_memorySize = 0;
|
|
|
|
QString m_memorySizeStr;
|
|
|
|
qint64 m_freeDiskSpace = 0;
|
2019-08-30 06:38:10 +00:00
|
|
|
QString m_freeDiskSpaceStr = tr("<Set Working Directory>");
|
2017-12-25 21:53:37 +00:00
|
|
|
#if __APPLE__
|
2018-12-08 05:19:40 +00:00
|
|
|
int m_macosMajor = 0;
|
|
|
|
int m_macosMinor = 0;
|
|
|
|
int m_macosPatch = 0;
|
2017-12-27 04:10:44 +00:00
|
|
|
#elif _WIN32
|
2018-12-08 05:19:40 +00:00
|
|
|
bool m_win7SP1OrGreater = false;
|
2017-12-25 21:53:37 +00:00
|
|
|
#endif
|
2018-12-08 05:19:40 +00:00
|
|
|
QString m_osVersion;
|
|
|
|
int m_blendMajor = 0;
|
|
|
|
int m_blendMinor = 0;
|
|
|
|
QString m_blendVersionStr;
|
|
|
|
|
2017-12-25 21:53:37 +00:00
|
|
|
public:
|
2018-12-08 05:19:40 +00:00
|
|
|
SysReqTableModel(QObject* parent = Q_NULLPTR);
|
2019-08-30 07:40:25 +00:00
|
|
|
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 override;
|
2021-02-28 20:33:28 +00:00
|
|
|
bool isBlenderVersionOk() const;
|
2018-12-08 05:19:40 +00:00
|
|
|
void updateFreeDiskSpace(const QString& path);
|
2022-01-09 01:56:28 +00:00
|
|
|
void updateBlender();
|
2017-12-25 21:53:37 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:19:40 +00:00
|
|
|
class SysReqTableView : public QTableView {
|
|
|
|
Q_OBJECT
|
|
|
|
SysReqTableModel m_model;
|
|
|
|
std::tuple<QWidget*, QSequentialAnimationGroup*, bool> m_backgroundWidgets[6] = {};
|
|
|
|
|
2017-12-25 21:53:37 +00:00
|
|
|
public:
|
2018-12-08 05:19:40 +00:00
|
|
|
SysReqTableView(QWidget* parent = Q_NULLPTR);
|
2019-08-30 07:40:25 +00:00
|
|
|
void paintEvent(QPaintEvent* e) override;
|
2018-12-08 05:19:40 +00:00
|
|
|
const SysReqTableModel& getModel() const { return m_model; }
|
|
|
|
bool isBlenderVersionOk() const { return m_model.isBlenderVersionOk(); }
|
|
|
|
void updateFreeDiskSpace(const QString& path) { m_model.updateFreeDiskSpace(path); }
|
2022-01-09 01:56:28 +00:00
|
|
|
void updateBlender() { m_model.updateBlender(); }
|
2017-12-25 21:53:37 +00:00
|
|
|
};
|