mirror of https://github.com/AxioDL/metaforce.git
Fix SysReqTableView for non-x86
This commit is contained in:
parent
ac5745429c
commit
75f0a416de
|
@ -26,6 +26,12 @@ set(BUILD_SHARED_LIBS OFF CACHE BOOL "")
|
||||||
set(QUAZIP_INSTALL OFF CACHE BOOL "")
|
set(QUAZIP_INSTALL OFF CACHE BOOL "")
|
||||||
add_subdirectory(quazip)
|
add_subdirectory(quazip)
|
||||||
|
|
||||||
|
if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
|
||||||
|
set(VectorISATableModel_HEADER VectorISATableModelIntel.hpp)
|
||||||
|
else ()
|
||||||
|
set(VectorISATableModel_HEADER "")
|
||||||
|
endif ()
|
||||||
|
|
||||||
add_executable(hecl-gui WIN32 MACOSX_BUNDLE
|
add_executable(hecl-gui WIN32 MACOSX_BUNDLE
|
||||||
ArgumentEditor.cpp
|
ArgumentEditor.cpp
|
||||||
ArgumentEditor.hpp
|
ArgumentEditor.hpp
|
||||||
|
@ -54,7 +60,7 @@ add_executable(hecl-gui WIN32 MACOSX_BUNDLE
|
||||||
SysReqTableView.cpp
|
SysReqTableView.cpp
|
||||||
SysReqTableView.hpp
|
SysReqTableView.hpp
|
||||||
VectorISATableModel.hpp
|
VectorISATableModel.hpp
|
||||||
VectorISATableModelIntel.hpp
|
${VectorISATableModel_HEADER}
|
||||||
VectorISATableView.cpp
|
VectorISATableView.cpp
|
||||||
VectorISATableView.hpp
|
VectorISATableView.hpp
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,11 @@ public:
|
||||||
const SysReqTableModel& getModel() const { return m_model; }
|
const SysReqTableModel& getModel() const { return m_model; }
|
||||||
const VectorISATableView& getVectorISATable() const { return m_vectorISATable; }
|
const VectorISATableView& getVectorISATable() const { return m_vectorISATable; }
|
||||||
bool willRun(const URDEVersion& v) const {
|
bool willRun(const URDEVersion& v) const {
|
||||||
return v.getArchitecture() == CurArchitecture && v.getPlatform() == CurPlatform &&
|
return v.getArchitecture() == CurArchitecture && v.getPlatform() == CurPlatform
|
||||||
m_vectorISATable.willRun(v.getVectorISA());
|
#if ZEUS_ARCH_X86_64 || ZEUS_ARCH_X86
|
||||||
|
&& m_vectorISATable.willRun(v.getVectorISA())
|
||||||
|
#endif
|
||||||
|
;
|
||||||
}
|
}
|
||||||
bool isBlenderVersionOk() const { return m_model.isBlenderVersionOk(); }
|
bool isBlenderVersionOk() const { return m_model.isBlenderVersionOk(); }
|
||||||
void updateFreeDiskSpace(const QString& path) { m_model.updateFreeDiskSpace(path); }
|
void updateFreeDiskSpace(const QString& path) { m_model.updateFreeDiskSpace(path); }
|
||||||
|
|
|
@ -16,8 +16,10 @@ void VectorISATableView::paintEvent(QPaintEvent* e) {
|
||||||
width += columnWidth(j);
|
width += columnWidth(j);
|
||||||
} else {
|
} else {
|
||||||
tableX = p->verticalHeader()->width() + columnViewportPosition(m_maxISA + 1);
|
tableX = p->verticalHeader()->width() + columnViewportPosition(m_maxISA + 1);
|
||||||
|
#if ZEUS_ARCH_X86_64 || ZEUS_ARCH_X86
|
||||||
for (int j = m_maxISA + 1; j < m_model.columnCount({}); ++j)
|
for (int j = m_maxISA + 1; j < m_model.columnCount({}); ++j)
|
||||||
width += columnWidth(j);
|
width += columnWidth(j);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget* w = std::get<0>(m_backgroundWidgets[i]);
|
QWidget* w = std::get<0>(m_backgroundWidgets[i]);
|
||||||
|
@ -40,6 +42,7 @@ void VectorISATableView::paintEvent(QPaintEvent* e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorISATableView::VectorISATableView(QWidget* parent) : QTableView(parent) {
|
VectorISATableView::VectorISATableView(QWidget* parent) : QTableView(parent) {
|
||||||
|
#if ZEUS_ARCH_X86_64 || ZEUS_ARCH_X86
|
||||||
setModel(&m_model);
|
setModel(&m_model);
|
||||||
|
|
||||||
for (int i = 0; i < m_model.columnCount({}); ++i) {
|
for (int i = 0; i < m_model.columnCount({}); ++i) {
|
||||||
|
@ -48,6 +51,7 @@ VectorISATableView::VectorISATableView(QWidget* parent) : QTableView(parent) {
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
horizontalHeader()->hide();
|
horizontalHeader()->hide();
|
||||||
horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||||
|
|
|
@ -20,6 +20,8 @@ class VectorISATableView : public QTableView {
|
||||||
public:
|
public:
|
||||||
VectorISATableView(QWidget* parent = Q_NULLPTR);
|
VectorISATableView(QWidget* parent = Q_NULLPTR);
|
||||||
void paintEvent(QPaintEvent* e) override;
|
void paintEvent(QPaintEvent* e) override;
|
||||||
|
#if ZEUS_ARCH_X86_64 || ZEUS_ARCH_X86
|
||||||
VectorISA getISA() const { return m_model.getISA(m_maxISA); }
|
VectorISA getISA() const { return m_model.getISA(m_maxISA); }
|
||||||
bool willRun(VectorISA visa) const { return m_model.willRun(visa); }
|
bool willRun(VectorISA visa) const { return m_model.willRun(visa); }
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue