#include <attributetablepanel.h>
◆ AttributeTablePanel()
| AttributeTablePanel::AttributeTablePanel |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
◆ ~AttributeTablePanel()
| AttributeTablePanel::~AttributeTablePanel |
( |
| ) |
|
|
override |
◆ categoryIsDeletable()
| bool AttributeTablePanel::categoryIsDeletable |
( |
| ) |
const |
True when the bound category maps to a deletable object kind (junction/outfall/storage/divider/conduit/pump/orifice/weir/outlet/ subcatchment/rain gage); false for data-object categories.
◆ copyAction()
| QAction * AttributeTablePanel::copyAction |
( |
| ) |
const |
|
inline |
The Copy action — surfaced on the panel toolbar and in the right-click menu. It carries no shortcut of its own: Ctrl+C is registered once, on the main window's actionCopy, which routes to the focused panel (a second registration here would make Qt's shortcut map treat Ctrl+C as ambiguous).
◆ copySelectionToClipboard
| void AttributeTablePanel::copySelectionToClipboard |
( |
| ) |
|
|
slot |
◆ deleteObjects()
| int AttributeTablePanel::deleteObjects |
( |
const QStringList & |
names | ) |
|
Delete the named objects of the current category from the model.
The non-interactive core behind the Delete key / right-click "Delete" (which add a confirmation dialog on top). When a map canvas + undo stack are present the deletes go through DeleteObjectCommand so they are undoable and cascade node→link exactly like the map; otherwise they fall back to the layer's applyXDelete helpers — the SAME mutation the undo command performs, minus the undo record. Names not present, or a non-deletable category (a read-only data-object list), are skipped. Returns the number actually deleted. Kept public and dialog-free so the delete path is unit-testable without a modal, mirroring selectionAsTsv().
◆ deleteSelectedFeatures()
| int AttributeTablePanel::deleteSelectedFeatures |
( |
| ) |
|
Delete the selected rows' features (undoable). Dialog-free, like deleteObjects, so the path is testable without a modal. Returns the number deleted; 0 when the source is not an editable feature layer.
◆ featureSourceIsEditable()
| bool AttributeTablePanel::featureSourceIsEditable |
( |
| ) |
const |
True when the active source is an editable FeatureLayer in an open edit session AND there is an undo stack to push onto. Gates cell editing and the Delete path for feature layers; every other vector source (shapefile, WFS, …) stays read-only.
◆ objectEdited
| void AttributeTablePanel::objectEdited |
( |
const QString & |
name | ) |
|
|
signal |
◆ onObjectEditedExternally
| void AttributeTablePanel::onObjectEditedExternally |
( |
const QString & |
name | ) |
|
|
slot |
Round-4 follow-up 2026-05-12 — refresh the row for name in response to an external edit (e.g. via the Property Browser). No-op if the named object isn't in the current category.
◆ refresh()
| void AttributeTablePanel::refresh |
( |
| ) |
|
Rebuild the category combo + reload the table model. Called on modelLoaded.
◆ refreshHeaders()
| void AttributeTablePanel::refreshHeaders |
( |
| ) |
|
Re-query the header strip without touching the data or the user's selection. Used when a render-time label changes (LINK_OFFSETS mode flips the offset columns to "… Elevation").
◆ selectionAsTsv()
| QString AttributeTablePanel::selectionAsTsv |
( |
| ) |
const |
The current selection rendered as TSV: a header line plus one line per selected row, in the view's current sort and column order, hidden columns skipped. Falls back to every visible row (i.e. what the query / show-selected-only filters leave) when no row is selected. Empty string when there is nothing to copy.
Kept separate from copySelectionToClipboard() so the format can be unit-tested without a platform clipboard. Reads through the proxy, so it works for both the SWMM model source and the Z.4 tabular-file source.
◆ setProject()
Bind to the active project — model layer + selection bus + canvas (used for "Zoom to selected"). Pass nulls to detach.
◆ setResultsSource()
Point the post-run "dynamics" columns at a loaded 1D output.
Wired by SWMMVis to the project window's ACTIVE results layer — the run chosen in the Analysis toolbar's "Results (1D)" combo — so the table's right-hand statistics block always describes the run the rest of the GUI is showing. Pass nullptr to fall back to the editing engine (which has no statistics; see SWMMAttributeTableModel::setResultsSource).
◆ showLayerSource()
Switch the source combo to layer's entry (a GIS feature layer or tabular layer). Model / results layers keep the current SWMM category selection — the panel is already bound to the model. Called from the layer tree's "Open Attribute Table" action.
The documentation for this class was generated from the following files: