From 0cda0a4071098958bab6e8c26f80442005803259 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 17 Jan 2017 13:10:37 +0100 Subject: [PATCH] AppFwk : Added flag to control visibility of header text above table editor --- Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp | 8 ++++++++ Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h | 1 + Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp | 9 +++++++++ Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.h | 1 + 4 files changed, 19 insertions(+) diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp index 6b96a90e40..61c39a3cb0 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp @@ -119,6 +119,14 @@ void PdmUiTableView::enableDefaultContextMenu(bool enable) m_listViewEditor->enableDefaultContextMenu(enable); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiTableView::enableHeaderText(bool enable) +{ + m_listViewEditor->enableHeaderText(enable); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h index b34c10865c..f0257fe673 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h @@ -71,6 +71,7 @@ public: void setListField(PdmChildArrayFieldHandle* object); void enableDefaultContextMenu(bool enable); + void enableHeaderText(bool enable); void setSelectionRole(SelectionManager::SelectionRole role); QTableView* tableView(); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp index 2ac77b50c5..40dbc54f7b 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp @@ -269,6 +269,15 @@ void PdmUiTableViewEditor::enableDefaultContextMenu(bool enable) updateContextMenuSignals(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiTableViewEditor::enableHeaderText(bool enable) +{ + m_tableHeading->setVisible(enable); + m_tableHeadingIcon->setVisible(enable); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.h index 34396e6136..cb2a592f82 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.h @@ -74,6 +74,7 @@ public: ~PdmUiTableViewEditor(); void enableDefaultContextMenu(bool enable); + void enableHeaderText(bool enable); void setSelectionRole(SelectionManager::SelectionRole role); PdmObjectHandle* pdmObjectFromModelIndex(const QModelIndex& mi);