Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 26 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,9 @@ if(UNIX)
endif()

# Qt
# e.g. QT_INSTALL_DIR = C:/Qt/6.5.2/msvc2019_64
# e.g. QT_INSTALL_DIR = C:/Qt/6.11.0/msvc2019_64
set(QT_INSTALL_DIR "" CACHE PATH "Path to Qt Install")
set(QT_VERSION "6.5.2" CACHE STRING "Qt target version, defaults to 6.5.2")
set(QT_VERSION "6.11.0" CACHE STRING "Qt target version, defaults to 6.11.0")

# For AboutBox, but also validates that the version is valid
string(TIMESTAMP CURRENT_YEAR "%Y")
Expand Down Expand Up @@ -558,7 +558,7 @@ find_file(qweb_resources NAMES qtwebengine_resources.pak PATHS "${QT_INSTALL_DIR
find_file(qweb_resources_devtools NAMES qtwebengine_devtools_resources.pak PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH)
find_file(qweb_resources_100 NAMES qtwebengine_resources_100p.pak PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH)
find_file(qweb_resources_200 NAMES qtwebengine_resources_200p.pak PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH)
#find_file(qweb_resources_v8_context_snapshot NAMES v8_context_snapshot.bin PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH)
find_file(qweb_resources_v8_context_snapshot NAMES v8_context_snapshot.bin PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH)

# QT_WEB_LIBS are linked by OS App and openstudio_lib but not by openstudio_modeleditor.so or openstudio_modeleditor
list(APPEND QT_WEB_LIBS Qt6::WebEngineCore)
Expand All @@ -581,6 +581,17 @@ if(NOT APPLE)
find_package(Qt6QmlModels ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt6::QmlModels)

# Qt 6.11+ splits QmlMeta and QmlWorkerScript into their own libraries (required by QtWebEngineProcess)
find_package(Qt6QmlMeta ${QT_VERSION} QUIET PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
if(Qt6QmlMeta_FOUND)
list(APPEND QT_WEB_LIBS Qt6::QmlMeta)
endif()

find_package(Qt6QmlWorkerScript ${QT_VERSION} QUIET PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
if(Qt6QmlWorkerScript_FOUND)
list(APPEND QT_WEB_LIBS Qt6::QmlWorkerScript)
endif()

find_package(Qt6Positioning ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt6::Positioning)

Expand All @@ -590,14 +601,19 @@ if(NOT APPLE)

find_library(QT_QXCBQPA NAMES libQt6XcbQpa.so.${QT_VERSION} PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)

find_library(QT_ICU icui18n REQUIRED PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
find_library(QT_ICUDATA icudata REQUIRED PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
find_library(QT_ICUUC icuuc REQUIRED PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
set(QT_ICU_LIBS
${QT_ICU}
${QT_ICUDATA}
${QT_ICUUC}
)
"${QT_INSTALL_DIR}/lib/libicui18n.so.73.2"
"${QT_INSTALL_DIR}/lib/libicuuc.so.73.2"
"${QT_INSTALL_DIR}/lib/libicudata.so.73.2"
)
# Ensure each ICU library exists
foreach(lib IN LISTS QT_ICU_LIBS)
if(NOT EXISTS "${lib}")
message(FATAL_ERROR "Qt ICU library not found: ${lib}")
elseif(IS_SYMLINK "${lib}")
message(FATAL_ERROR "Qt ICU library is a symlink, expected a real file: ${lib}")
endif()
endforeach()
Comment on lines 604 to +616
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't great to have it harcoded but I'm not sure a GLOB is a better idea.


list(APPEND QT_EXTRA_LIBS ${QT_QXCBQPA} ${QT_ICU_LIBS})
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ elseif( UNIX )
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_devtools} $<TARGET_FILE_DIR:${target_name}>/resources/
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_100} $<TARGET_FILE_DIR:${target_name}>/resources/
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_200} $<TARGET_FILE_DIR:${target_name}>/resources/
#COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_v8_context_snapshot} $<TARGET_FILE_DIR:${target_name}>/resources/
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_v8_context_snapshot} $<TARGET_FILE_DIR:${target_name}>/resources/
)

# Note: JM: Qt 6.3.0, I can no longer access $<TARGET_FILE:Qt6::QXcbIntegrationPlugin>
Expand Down
1 change: 0 additions & 1 deletion src/openstudio_app/OpenStudioApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,6 @@ void OpenStudioApp::showAbout() {
QMessageBox about(parent);
about.setText(OPENSTUDIOAPP_ABOUTBOX);
about.setDetailedText(details);
about.setStyleSheet("qproperty-alignment: AlignLeft;");
about.setWindowTitle("About " + applicationName());

about.setIconPixmap(QPixmap(":/images/os_128.png"));
Expand Down
1 change: 0 additions & 1 deletion src/openstudio_lib/ConstructionsTabController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ void ConstructionsTabController::setSubTab(int index) {
}

if (m_currentController) {
m_currentController->disconnect();
delete m_currentController;
}

Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/DesignDayGridView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void DesignDayGridController::addColumns(const QString& /*category*/, std::vecto
} else if (field == SELECTED) {
auto checkbox = QSharedPointer<OSSelectAllCheckBox>(new OSSelectAllCheckBox());
checkbox->setToolTip(tr("Check to select all rows"));
connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &DesignDayGridController::onSelectAllStateChanged);
connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &DesignDayGridController::onSelectAllStateChanged);
connect(this, &DesignDayGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged);
addSelectColumn(Heading(SELECTED, false, false, checkbox), "Check to select this row");
}
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/FacilityExteriorEquipmentGridView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void FacilityExteriorEquipmentGridController::addColumns(const QString& category

auto checkbox = QSharedPointer<OSSelectAllCheckBox>(new OSSelectAllCheckBox());
checkbox->setToolTip("Check to select all rows");
connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &FacilityExteriorEquipmentGridController::onSelectAllStateChanged);
connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &FacilityExteriorEquipmentGridController::onSelectAllStateChanged);
connect(this, &FacilityExteriorEquipmentGridController::gridRowSelectionChanged, checkbox.data(),
&OSSelectAllCheckBox::onGridRowSelectionChanged);
addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row");
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/FacilityShadingGridView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ void FacilityShadingGridController::addColumns(const QString& category, std::vec
if (field == SELECTED) {
auto checkbox = QSharedPointer<OSSelectAllCheckBox>(new OSSelectAllCheckBox());
checkbox->setToolTip("Check to select all rows");
connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &FacilityShadingGridController::onSelectAllStateChanged);
connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &FacilityShadingGridController::onSelectAllStateChanged);
connect(this, &FacilityShadingGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged);
addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row", DataSource(allShadingSurfaces, true));
} else if (field == SHADINGSURFACENAME) {
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/FacilityStoriesGridView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ void FacilityStoriesGridController::addColumns(const QString& category, std::vec
} else if (field == SELECTED) {
auto checkbox = QSharedPointer<OSSelectAllCheckBox>(new OSSelectAllCheckBox());
checkbox->setToolTip("Check to select all rows");
connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &FacilityStoriesGridController::onSelectAllStateChanged);
connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &FacilityStoriesGridController::onSelectAllStateChanged);
connect(this, &FacilityStoriesGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged);
addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row");
} else if (field == NOMINALZCOORDINATE) {
Expand Down
1 change: 0 additions & 1 deletion src/openstudio_lib/FacilityTabController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ void FacilityTabController::setSubTab(int index) {
}

if (m_currentView) {
m_currentView->disconnect();
delete m_currentView;
}

Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/GeometryEditorView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ EditorWebView::EditorWebView(bool isIP, const openstudio::model::Model& model, Q
connect(m_mergeBtn, &QPushButton::clicked, this, &EditorWebView::mergeClicked);
connect(m_debugBtn, &QPushButton::clicked, this, &EditorWebView::debugClicked);

auto* hLayout = new QHBoxLayout(this);
auto* hLayout = new QHBoxLayout();
mainLayout->addLayout(hLayout);

auto* label = new QLabel(this);
Expand Down
4 changes: 2 additions & 2 deletions src/openstudio_lib/GeometryPreviewView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ PreviewWebView::PreviewWebView(bool isIP, const model::Model& model, QWidget* t_
connect(m_document.get(), &OSDocument::toggleUnitsClicked, this, &PreviewWebView::onUnitSystemChange);
connect(m_refreshBtn, &QPushButton::clicked, this, &PreviewWebView::refreshClicked);

auto* hLayout = new QHBoxLayout(this);
auto* hLayout = new QHBoxLayout();
mainLayout->addLayout(hLayout);

hLayout->addStretch();
Expand Down Expand Up @@ -220,7 +220,7 @@ PreviewWebView::PreviewWebView(bool isIP, const model::Model& model, QWidget* t_
m_geometryDiagnosticsBox->setToolTip(
"Enables adjacency issues. Enables checks for Surface/Space Convexity, due to this the ThreeJS export is slightly slower");
connect(m_geometryDiagnosticsBox, &QCheckBox::clicked, mainWindow, &MainWindow::toggleGeometryDiagnostics);
connect(m_geometryDiagnosticsBox, &QCheckBox::stateChanged, [this](int state) {
connect(m_geometryDiagnosticsBox, &QCheckBox::checkStateChanged, [this](Qt::CheckState state) {
if (state == Qt::Checked && !m_includeGeometryDiagnostics) {
// Old m_json didn't contain the geometry diagnostics, so we need to include it, so we should set m_json to empty so the
// ThreeJSForwardTranslator is called again
Expand Down
1 change: 0 additions & 1 deletion src/openstudio_lib/GeometryTabController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ void GeometryTabController::setSubTab(int index) {
}

if (m_currentController) {
m_currentController->disconnect();
delete m_currentController;
}

Expand Down
1 change: 0 additions & 1 deletion src/openstudio_lib/LocationTabController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ void LocationTabController::setSubTab(int index) {
m_currentIndex = index;

if (m_currentView != nullptr) {
m_currentView->disconnect();
delete m_currentView;
}

Expand Down
2 changes: 2 additions & 0 deletions src/openstudio_lib/OSCollapsibleItemList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ OSCollapsibleItemList::OSCollapsibleItemList(bool addScrollArea, QWidget* parent
outerVLayout->addWidget(scrollArea);
scrollArea->setWidget(outerWidget);
scrollArea->setWidgetResizable(true);
scrollArea->viewport()->setAutoFillBackground(false);
outerWidget->setAutoFillBackground(false);
} else {
outerVLayout->addWidget(outerWidget);
}
Expand Down
2 changes: 2 additions & 0 deletions src/openstudio_lib/OSInspectorView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ OSInspectorView::OSInspectorView(bool addScrollArea, QWidget* parent) : QWidget(
outerVLayout->addWidget(scrollArea);
scrollArea->setWidget(m_stackedWidget);
scrollArea->setWidgetResizable(true);
scrollArea->viewport()->setAutoFillBackground(false);
m_stackedWidget->setAutoFillBackground(false);
} else {
outerVLayout->addWidget(m_stackedWidget);
}
Expand Down
2 changes: 2 additions & 0 deletions src/openstudio_lib/OSItemList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ OSItemList::OSItemList(OSVectorController* vectorController, bool addScrollArea,
outerVLayout->addWidget(scrollArea);
scrollArea->setWidget(outerWidget);
scrollArea->setWidgetResizable(true);
scrollArea->viewport()->setAutoFillBackground(false);
outerWidget->setAutoFillBackground(false);
} else {
outerVLayout->addWidget(outerWidget);
}
Expand Down
4 changes: 2 additions & 2 deletions src/openstudio_lib/RefrigerationGridView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void RefrigerationCaseGridController::addColumns(const QString& /*category*/, st
} else if (field == SELECTED) {
auto checkbox = QSharedPointer<OSSelectAllCheckBox>(new OSSelectAllCheckBox());
checkbox->setToolTip("Check to select all rows");
connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &RefrigerationCaseGridController::onSelectAllStateChanged);
connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &RefrigerationCaseGridController::onSelectAllStateChanged);
connect(this, &RefrigerationCaseGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged);
addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row");
} else if (field == RATEDAMBIENTRELATIVEHUMIDITY) {
Expand Down Expand Up @@ -645,7 +645,7 @@ void RefrigerationWalkInGridController::addColumns(const QString& /*category*/,
} else if (field == SELECTED) {
auto checkbox = QSharedPointer<OSSelectAllCheckBox>(new OSSelectAllCheckBox());
checkbox->setToolTip("Check to select all rows");
connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &RefrigerationWalkInGridController::onSelectAllStateChanged);
connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &RefrigerationWalkInGridController::onSelectAllStateChanged);
connect(this, &RefrigerationWalkInGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged);
addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row");
} else if (field == DEFROSTCONTROLTYPE) {
Expand Down
20 changes: 10 additions & 10 deletions src/openstudio_lib/SimSettingsView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,27 +490,27 @@ QWidget* SimSettingsView::createRunControlWidget() {
m_runSimWeatherFiles = new QCheckBox("Run Simulation for Weather File");
layout->addWidget(m_runSimWeatherFiles);

connect(m_runSimWeatherFiles, &QCheckBox::stateChanged, this, &SimSettingsView::on_runSimWeatherFiles);
connect(m_runSimWeatherFiles, &QCheckBox::checkStateChanged, this, &SimSettingsView::on_runSimWeatherFiles);

m_runSimDesignDays = new QCheckBox("Run Simulation for Design Days");
layout->addWidget(m_runSimDesignDays);

connect(m_runSimDesignDays, &QCheckBox::stateChanged, this, &SimSettingsView::on_runSimDesignDays);
connect(m_runSimDesignDays, &QCheckBox::checkStateChanged, this, &SimSettingsView::on_runSimDesignDays);

m_performZoneSizing = new QCheckBox("Perform Zone Sizing");
layout->addWidget(m_performZoneSizing);

connect(m_performZoneSizing, &QCheckBox::stateChanged, this, &SimSettingsView::on_performZoneSizing);
connect(m_performZoneSizing, &QCheckBox::checkStateChanged, this, &SimSettingsView::on_performZoneSizing);

m_performSystemSizing = new QCheckBox("Perform System Sizing");
layout->addWidget(m_performSystemSizing);

connect(m_performSystemSizing, &QCheckBox::stateChanged, this, &SimSettingsView::on_performSystemSizing);
connect(m_performSystemSizing, &QCheckBox::checkStateChanged, this, &SimSettingsView::on_performSystemSizing);

m_performPlantSizing = new QCheckBox("Perform Plant Sizing");
layout->addWidget(m_performPlantSizing);

connect(m_performPlantSizing, &QCheckBox::stateChanged, this, &SimSettingsView::on_performPlantSizing);
connect(m_performPlantSizing, &QCheckBox::checkStateChanged, this, &SimSettingsView::on_performPlantSizing);

auto* widget = new QWidget();
widget->setLayout(mainLayout);
Expand Down Expand Up @@ -2193,22 +2193,22 @@ void SimSettingsView::on_endDateChanged(const QDate& date) {
m_runPeriod->setEndDayOfMonth(m_endDateEdit->date().day());
}

void SimSettingsView::on_runSimWeatherFiles(int state) {
void SimSettingsView::on_runSimWeatherFiles(Qt::CheckState state) {
// TODO
}
void SimSettingsView::on_runSimDesignDays(int state) {
void SimSettingsView::on_runSimDesignDays(Qt::CheckState state) {
// TODO
}

void SimSettingsView::on_performZoneSizing(int state) {
void SimSettingsView::on_performZoneSizing(Qt::CheckState state) {
// TODO
}

void SimSettingsView::on_performSystemSizing(int state) {
void SimSettingsView::on_performSystemSizing(Qt::CheckState state) {
// TODO
}

void SimSettingsView::on_performPlantSizing(int state) {
void SimSettingsView::on_performPlantSizing(Qt::CheckState state) {
// TODO
}

Expand Down
10 changes: 5 additions & 5 deletions src/openstudio_lib/SimSettingsView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,15 @@ class SimSettingsView

void on_radianceGroupClicked(int idx);

void on_runSimWeatherFiles(int state);
void on_runSimWeatherFiles(Qt::CheckState state);

void on_runSimDesignDays(int state);
void on_runSimDesignDays(Qt::CheckState state);

void on_performZoneSizing(int state);
void on_performZoneSizing(Qt::CheckState state);

void on_performSystemSizing(int state);
void on_performSystemSizing(Qt::CheckState state);

void on_performPlantSizing(int state);
void on_performPlantSizing(Qt::CheckState state);

void toggleUnits(bool displayIP);

Expand Down
8 changes: 5 additions & 3 deletions src/openstudio_lib/SpaceTypesGridView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ SpaceTypesGridView::SpaceTypesGridView(bool isIP, const model::Model& model, QWi
m_filters = new QComboBox();
m_filters->setFixedWidth(1.5 * OSItem::ITEM_WIDTH);

{ m_filters->addItem(SHOWALLLOADS); }
{
m_filters->addItem(SHOWALLLOADS);
}

{
auto* pixMap = new QPixmap(":/images/mini_icons/internal_mass.png");
Expand Down Expand Up @@ -452,7 +454,7 @@ void SpaceTypesGridController::addColumns(const QString& category, std::vector<Q
} else if (field == SELECTED && category != "Loads") {
auto checkbox = QSharedPointer<OSSelectAllCheckBox>(new OSSelectAllCheckBox());
checkbox->setToolTip("Check to select all rows");
connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpaceTypesGridController::onSelectAllStateChanged);
connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpaceTypesGridController::onSelectAllStateChanged);
connect(this, &SpaceTypesGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged);

addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row");
Expand Down Expand Up @@ -1057,7 +1059,7 @@ void SpaceTypesGridController::addColumns(const QString& category, std::vector<Q
} else if (field == SELECTED) {
auto checkbox = QSharedPointer<OSSelectAllCheckBox>(new OSSelectAllCheckBox());
checkbox->setToolTip("Check to select all rows");
connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpaceTypesGridController::onSelectAllStateChanged);
connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpaceTypesGridController::onSelectAllStateChanged);
connect(this, &SpaceTypesGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged);
addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row", DataSource(allLoads, true));
} else if (field == MULTIPLIER) {
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/SpacesDaylightingGridView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void SpacesDaylightingGridController::addColumns(const QString& category, std::v
if (field == SELECTED) {
auto checkbox = QSharedPointer<OSSelectAllCheckBox>(new OSSelectAllCheckBox());
checkbox->setToolTip("Check to select all rows");
connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpacesDaylightingGridController::onSelectAllStateChanged);
connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpacesDaylightingGridController::onSelectAllStateChanged);
connect(this, &SpacesDaylightingGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged);
addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row");
//addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row",
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/SpacesInteriorPartitionsGridView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void SpacesInteriorPartitionsGridController::addColumns(const QString& category,
if (field == SELECTED) {
auto checkbox = QSharedPointer<OSSelectAllCheckBox>(new OSSelectAllCheckBox());
checkbox->setToolTip("Check to select all rows");
connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpacesInteriorPartitionsGridController::onSelectAllStateChanged);
connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpacesInteriorPartitionsGridController::onSelectAllStateChanged);
connect(this, &SpacesInteriorPartitionsGridController::gridRowSelectionChanged, checkbox.data(),
&OSSelectAllCheckBox::onGridRowSelectionChanged);
addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row",
Expand Down
Loading
Loading