Simplify RiuPlotMainWindowTools (#9211)

* Janitor: Add and use onObjectAppended()
* Janitor: Simplify API
This commit is contained in:
Magne Sjaastad authored and GitHub committed 2022-08-18 12:37:51 +02:00
1 parent febbdcf7a0
commit a1e7b64d92
34 files changed
+66 -93

No files matched your search

@@ -31,9 +31,15 @@ class RiuPlotMainWindowTools
public:
static void showPlotMainWindow();
static void setActiveViewer( QWidget* subWindow );
static void setExpanded( const caf::PdmUiItem* uiItem, bool expanded = true );
static void selectAsCurrentItem( const caf::PdmObject* object, bool allowActiveViewChange = true );
static void toggleItemInSelection( const caf::PdmObject* object, bool allowActiveViewChange = true );
static void setExpanded( const caf::PdmUiItem* uiItem );
static void selectAsCurrentItem( const caf::PdmObject* object );
static void selectOrToggleObject( const caf::PdmObject* object, bool toggle );
static void refreshToolbars();
// Use this function to select (and expand) an object in the project tree and update tool bars. Use the second
// parameter to expand a different object than the object to be selected.
static void onObjectAppended( const caf::PdmObject* objectToSelect, const caf::PdmObject* objectToExpand = nullptr );
private:
static void toggleItemInSelection( const caf::PdmObject* object );
};