mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 19:07:57 +00:00
Interface mockup 4
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "PropertiesPanelWidget.h"
|
||||
|
||||
#include "../../components/CollapsibleSection.h"
|
||||
#include "../../components/Section.h"
|
||||
#include "../../components/SvgIcon.h"
|
||||
|
||||
#include <QFormLayout>
|
||||
@@ -157,13 +157,6 @@ void PropertiesPanelWidget::setState(const PropertiesPanelState& state) {
|
||||
entity_layout->addWidget(entity_icon, 0, Qt::AlignVCenter);
|
||||
entity_layout->addWidget(entity_text, 1, Qt::AlignVCenter);
|
||||
|
||||
auto* entity_wrapper = new QWidget(content);
|
||||
entity_wrapper->setObjectName("inspectorSectionBody");
|
||||
auto* entity_wrapper_layout = new QVBoxLayout(entity_wrapper);
|
||||
entity_wrapper_layout->setContentsMargins(10, 0, 10, 0);
|
||||
entity_wrapper_layout->setSpacing(0);
|
||||
entity_wrapper_layout->addWidget(entity_card);
|
||||
|
||||
QList<QWidget*> property_set_widgets;
|
||||
for (const auto& property_set : state.property_sets) {
|
||||
property_set_widgets.append(makePropertySetPanel(property_set, content));
|
||||
@@ -174,16 +167,18 @@ void PropertiesPanelWidget::setState(const PropertiesPanelState& state) {
|
||||
quantity_set_widgets.append(makePropertySetPanel(property_set, content));
|
||||
}
|
||||
|
||||
auto* attributes_section = new components::inspector::CollapsibleSection("Attributes", "", content);
|
||||
auto* entity_section = new components::Section("", components::SectionHeaderMode::Hidden, "", content);
|
||||
entity_section->addBodyWidget(entity_card);
|
||||
auto* attributes_section = new components::Section("Attributes", components::SectionHeaderMode::Visible, "", content);
|
||||
attributes_section->addBodyWidget(makeAttributeList(state.attributes, content));
|
||||
auto* relationships_section = new components::inspector::CollapsibleSection("Relationships", "", content);
|
||||
auto* relationships_section = new components::Section("Relationships", components::SectionHeaderMode::Visible, "", content);
|
||||
relationships_section->addBodyWidget(makeRelationshipList(state.relationships, content));
|
||||
auto* properties_section = new components::inspector::CollapsibleSection("Properties", "Filter properties or sets", content);
|
||||
auto* properties_section = new components::Section("Properties", components::SectionHeaderMode::Visible, "Filter properties or sets", content);
|
||||
for (auto* widget : property_set_widgets) properties_section->addBodyWidget(widget);
|
||||
auto* quantities_section = new components::inspector::CollapsibleSection("Quantities", "Filter quantities or sets", content);
|
||||
auto* quantities_section = new components::Section("Quantities", components::SectionHeaderMode::Visible, "Filter quantities or sets", content);
|
||||
for (auto* widget : quantity_set_widgets) quantities_section->addBodyWidget(widget);
|
||||
|
||||
content_layout->addWidget(entity_wrapper);
|
||||
content_layout->addWidget(entity_section);
|
||||
content_layout->addWidget(attributes_section);
|
||||
content_layout->addWidget(relationships_section);
|
||||
content_layout->addWidget(properties_section);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "SpatialHierarchyPanelWidget.h"
|
||||
|
||||
#include "../../components/Section.h"
|
||||
#include "../../components/SvgIcon.h"
|
||||
|
||||
#include <QHeaderView>
|
||||
@@ -36,7 +37,9 @@ SpatialHierarchyPanelWidget::SpatialHierarchyPanelWidget(QWidget* parent)
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setSpacing(0);
|
||||
|
||||
tree_ = new QTreeWidget(this);
|
||||
auto* section = new components::Section("", components::SectionHeaderMode::Hidden, "", this);
|
||||
|
||||
tree_ = new QTreeWidget(section);
|
||||
tree_->setColumnCount(2);
|
||||
tree_->setHeaderLabels({"Spatial Item", ""});
|
||||
tree_->setIconSize(QSize(16, 16));
|
||||
@@ -47,7 +50,8 @@ SpatialHierarchyPanelWidget::SpatialHierarchyPanelWidget(QWidget* parent)
|
||||
tree_->header()->setSectionResizeMode(1, QHeaderView::Fixed);
|
||||
tree_->header()->resizeSection(1, 28);
|
||||
tree_->header()->hide();
|
||||
layout->addWidget(tree_);
|
||||
section->addBodyWidget(tree_);
|
||||
layout->addWidget(section);
|
||||
|
||||
connect(tree_, &QTreeWidget::itemClicked, this, [this](QTreeWidgetItem* item, int column) {
|
||||
if (!item || column != 1) return;
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
// This file was generated with the assistance of an AI coding tool.
|
||||
/********************************************************************************
|
||||
* *
|
||||
* This file is part of IfcOpenShell. *
|
||||
* *
|
||||
* IfcOpenShell is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the Lesser GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3.0 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* IfcOpenShell is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* Lesser GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the Lesser GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
********************************************************************************/
|
||||
|
||||
#include "TodoPanelWidget.h"
|
||||
|
||||
#include "../../components/Section.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace ifcinterface::panels::todo {
|
||||
|
||||
TodoPanelWidget::TodoPanelWidget(const QString& title, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
auto* layout = new QVBoxLayout(this);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setSpacing(0);
|
||||
|
||||
auto* section = new components::Section("", components::SectionHeaderMode::Hidden, "", this);
|
||||
|
||||
auto* body = new QWidget(section);
|
||||
auto* body_layout = new QVBoxLayout(body);
|
||||
body_layout->setContentsMargins(0, 12, 0, 12);
|
||||
body_layout->setSpacing(12);
|
||||
|
||||
auto* heading = new QLabel(title, body);
|
||||
heading->setObjectName("todoPanelTitle");
|
||||
|
||||
auto* content = new QLabel("Coming soon", body);
|
||||
content->setObjectName("todoPanelBody");
|
||||
content->setAlignment(Qt::AlignCenter);
|
||||
|
||||
body_layout->addWidget(heading);
|
||||
body_layout->addStretch(1);
|
||||
body_layout->addWidget(content);
|
||||
body_layout->addStretch(1);
|
||||
|
||||
section->addBodyWidget(body);
|
||||
layout->addWidget(section);
|
||||
}
|
||||
|
||||
} // namespace ifcinterface::panels::todo
|
||||
@@ -0,0 +1,36 @@
|
||||
// This file was generated with the assistance of an AI coding tool.
|
||||
/********************************************************************************
|
||||
* *
|
||||
* This file is part of IfcOpenShell. *
|
||||
* *
|
||||
* IfcOpenShell is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the Lesser GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3.0 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* IfcOpenShell is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* Lesser GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the Lesser GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef IFCINTERFACE_PANELS_TODO_TODOPANELWIDGET_H
|
||||
#define IFCINTERFACE_PANELS_TODO_TODOPANELWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace ifcinterface::panels::todo {
|
||||
|
||||
class TodoPanelWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TodoPanelWidget(const QString& title, QWidget* parent = nullptr);
|
||||
};
|
||||
|
||||
} // namespace ifcinterface::panels::todo
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user