2018-10-07 03:41:18 +00:00
|
|
|
#pragma once
|
2017-12-25 21:53:37 +00:00
|
|
|
|
|
|
|
#include <QTableView>
|
|
|
|
#include "VectorISATableView.hpp"
|
|
|
|
|
|
|
|
class QSequentialAnimationGroup;
|
|
|
|
|
|
|
|
class SysReqTableModel : public QAbstractTableModel
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
uint64_t m_cpuSpeed = 0;
|
|
|
|
QString m_cpuSpeedStr;
|
|
|
|
uint64_t m_memorySize = 0;
|
|
|
|
QString m_memorySizeStr;
|
2018-01-10 06:19:48 +00:00
|
|
|
qint64 m_freeDiskSpace = 0;
|
|
|
|
QString m_freeDiskSpaceStr = QStringLiteral("<Set Working Directory>");
|
2017-12-25 21:53:37 +00:00
|
|
|
#if __APPLE__
|
|
|
|
int m_macosMajor = 0;
|
|
|
|
int m_macosMinor = 0;
|
|
|
|
int m_macosPatch = 0;
|
2017-12-27 04:10:44 +00:00
|
|
|
#elif _WIN32
|
|
|
|
bool m_win7SP1OrGreater = false;
|
2017-12-25 21:53:37 +00:00
|
|
|
#endif
|
|
|
|
QString m_osVersion;
|
2018-01-10 06:19:48 +00:00
|
|
|
int m_blendMajor = 0;
|
|
|
|
int m_blendMinor = 0;
|
|
|
|
QString m_blendVersionStr;
|
2017-12-25 21:53:37 +00:00
|
|
|
public:
|
|
|
|
SysReqTableModel(QObject* parent = Q_NULLPTR);
|
|
|
|
int rowCount(const QModelIndex& parent = QModelIndex()) const;
|
|
|
|
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
|
|
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
|
|
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
2018-01-10 06:19:48 +00:00
|
|
|
bool isBlenderVersionOk() const
|
|
|
|
{ return m_blendMajor > 2 || (m_blendMajor == 2 && m_blendMinor >= 78); }
|
|
|
|
void updateFreeDiskSpace(const QString& path);
|
2017-12-25 21:53:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class SysReqTableView : public QTableView
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
SysReqTableModel m_model;
|
|
|
|
VectorISATableView m_vectorISATable;
|
2018-01-10 06:19:48 +00:00
|
|
|
std::tuple<QWidget*, QSequentialAnimationGroup*, bool> m_backgroundWidgets[6] = {};
|
2017-12-25 21:53:37 +00:00
|
|
|
public:
|
|
|
|
SysReqTableView(QWidget* parent = Q_NULLPTR);
|
|
|
|
void paintEvent(QPaintEvent* e) Q_DECL_OVERRIDE;
|
2017-12-27 00:48:34 +00:00
|
|
|
const SysReqTableModel& getModel() const { return m_model; }
|
|
|
|
const VectorISATableView& getVectorISATable() const { return m_vectorISATable; }
|
|
|
|
bool willRun(const URDEVersion& v) const
|
|
|
|
{
|
|
|
|
return v.getArchitecture() == CurArchitecture && v.getPlatform() == CurPlatform &&
|
|
|
|
m_vectorISATable.willRun(v.getVectorISA());
|
|
|
|
}
|
2018-01-10 06:19:48 +00:00
|
|
|
bool isBlenderVersionOk() const { return m_model.isBlenderVersionOk(); }
|
|
|
|
void updateFreeDiskSpace(const QString& path) { m_model.updateFreeDiskSpace(path); }
|
2017-12-25 21:53:37 +00:00
|
|
|
};
|
|
|
|
|