SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
smtk::extension::qtAttributeView Class Reference

Qt implementation for an Attribute View. More...

#include <qtAttributeView.h>

Inheritance diagram for smtk::extension::qtAttributeView:
[legend]
Collaboration diagram for smtk::extension::qtAttributeView:
[legend]

Public Types

enum  enumViewBy { VIEWBY_Attribute = 0, VIEWBY_PROPERTY }
 

Public Slots

void onViewBy ()
 
void onViewByWithDefinition (smtk::attribute::DefinitionPtr attDef)
 
void updateUI () override
 
void onShowCategory () override
 
void onListBoxSelectionChanged ()
 
void onAttributeValueChanged (QTableWidgetItem *)
 
void onAttributeNameChanged (QStandardItem *)
 
void onCreateNew ()
 
void onCopySelected ()
 
void onDeleteSelected ()
 
void updateAssociationEnableState (smtk::attribute::AttributePtr)
 
void updateModelAssociation () override
 
void onListBoxClicked (const QModelIndex &item)
 
void onAttributeItemChanged (QStandardItem *item)
 
void childrenResized () override
 
void showAdvanceLevelOverlay (bool show) override
 
void associationsChanged ()
 
void onItemChanged (qtItem *item)
 
void onDefinitionChanged (int)
 
- Public Slots inherited from smtk::extension::qtBaseAttributeView
virtual void updateModelAssociation ()
 
virtual void valueChanged (smtk::attribute::ItemPtr)
 
virtual void attributeCreated (const smtk::attribute::AttributePtr &)
 Invoke the Signal dummy operation to indicate an attribute has been created.
 
virtual void attributeChanged (const smtk::attribute::AttributePtr &, std::vector< std::string > items=std::vector< std::string >())
 Invoke the Signal dummy operation to indicate an attribute has been changed (renamed).
 
virtual void attributeRemoved (const smtk::attribute::AttributePtr &)
 Invoke the Signal dummy operation to indicate an attribute has been removed.
 
void showAdvanceLevel (int i) override
 
void enableShowBy (int) override
 
void onInfo () override
 
virtual void requestModelEntityAssociation ()
 
- Public Slots inherited from smtk::extension::qtBaseView
virtual void updateUI ()
 Have the view update its contents. More...
 
virtual void childrenResized ()
 
virtual void showAdvanceLevelOverlay (bool val)
 
virtual void showAdvanceLevel (int)
 Have the view update its contents based on a new advance level.
 
virtual void enableShowBy (int)
 
virtual void onInfo ()
 Display view information (i.e., help text)
 
virtual void onShowCategory ()
 

Signals

void numOfAttributesChanged ()
 
void attColorChanged ()
 
void attAssociationChanged ()
 
void attributeSelected (smtk::attribute::AttributePtr att)
 
void definitionSelected (smtk::attribute::DefinitionPtr def)
 
- Signals inherited from smtk::extension::qtBaseAttributeView
void modified (smtk::attribute::ItemPtr)
 
- Signals inherited from smtk::extension::qtBaseView
void aboutToDestroy ()
 
void modified ()
 

Public Member Functions

 smtkTypenameMacro (qtAttributeView)
 
 qtAttributeView (const smtk::view::Information &info)
 
const QMap< QString, QList< smtk::attribute::DefinitionPtr > > & attDefinitionMap () const
 
QStandardItem * getSelectedItem ()
 
int currentViewBy ()
 
virtual void createNewAttribute (smtk::attribute::DefinitionPtr attDef)
 
bool isEmpty () const override
 Return true if the view does not contain any information to display. More...
 
bool isValid () const override
 Return true if the view's contents are valid.
 
void setSearchBoxText (const std::string &text)
 
const std::string & searchBoxText () const
 
void setSearchBoxVisibility (bool mode)
 
bool searchBoxVisibility () const
 
void setHideAssociations (bool mode)
 
bool hideAssociations () const
 
void setRequireAllAssociated (bool mode)
 
bool requireAllAssociated () const
 
void setAttributeNamesConstant (bool mode)
 
bool attributeNamesConstant () const
 
void setAttributeNameRegex (const std::string &pattern)
 
const std::string & attributeNameRegex () const
 
smtk::attribute::DefinitionPtr getCurrentDef () const
 
bool matchesDefinitions (const smtk::attribute::DefinitionPtr &def) const
 
- Public Member Functions inherited from smtk::extension::qtBaseAttributeView
 smtkTypenameMacro (qtBaseAttributeView)
 
 qtBaseAttributeView (const smtk::view::Information &info)
 
void setInitialCategory () override
 When category filtering is requested to be either on by default or is requested to be on permanently, we need to have a mechanism to force the views to display info based on the initial category. More...
 
virtual bool displayItem (smtk::attribute::ItemPtr) const
 Determines if an item should be displayed. More...
 
virtual bool displayItemDefinition (const smtk::attribute::ItemDefinitionPtr &) const
 
virtual bool isItemWriteable (const smtk::attribute::ItemPtr &) const
 Determines if an item can be modified.
 
virtual void getDefinitions (smtk::attribute::DefinitionPtr attDef, QList< smtk::attribute::DefinitionPtr > &defs)
 
int fixedLabelWidth ()
 
bool setFixedLabelWidth (int w)
 
bool advanceLevelVisible ()
 
bool useSelectionManager () const
 
int advanceLevel () const override
 
bool categoryEnabled () const override
 
std::string currentCategory () const override
 
bool isEmpty () const override
 Return true if the view does not contain any information to display. More...
 
void setIgnoreCategories (bool mode)
 
bool ignoreCategories () const
 
smtk::attribute::ResourcePtr attributeResource () const
 Return the attribute resource used by this View.
 
- Public Member Functions inherited from smtk::extension::qtBaseView
 smtkTypenameMacro (qtBaseView)
 
 qtBaseView (const smtk::view::Information &info)
 
const smtk::view::ConfigurationPtrconfiguration () const
 
QWidget * widget () const
 
QWidget * parentWidget () const
 
qtUIManageruiManager () const
 
bool isTopLevel () const
 
- Public Member Functions inherited from smtk::view::BaseView
 smtkTypenameMacroBase (BaseView)
 
virtual std::size_t index () const
 index is a compile-time intrinsic of the derived view; as such, it cannot be set.
 

Static Public Member Functions

static qtBaseViewcreateViewWidget (const smtk::view::Information &info)
 
- Static Public Member Functions inherited from smtk::extension::qtBaseAttributeView
static bool validateInformation (const smtk::view::Information &info)
 
- Static Public Member Functions inherited from smtk::extension::qtBaseView
static bool validateInformation (const smtk::view::Information &info)
 

Protected Member Functions

void createWidget () override
 Creates the main QT Widget that is associated with a View. More...
 
virtual smtk::extension::qtAssociationWidgetcreateAssociationWidget (QWidget *parent, qtBaseView *view)
 
smtk::attribute::AttributePtr getAttributeFromItem (const QStandardItem *item)
 
smtk::attribute::AttributePtr getAttributeFromIndex (const QModelIndex &index)
 
smtk::attribute::AttributegetRawAttributeFromItem (const QStandardItem *item)
 
smtk::attribute::AttributegetRawAttributeFromIndex (const QModelIndex &index)
 
QStandardItem * getItemFromAttribute (smtk::attribute::Attribute *attribute)
 
virtual bool deleteAttribute (smtk::attribute::AttributePtr att)
 Method used to delete an attribute from its resource.
 
smtk::attribute::AttributePtr getSelectedAttribute ()
 
QStandardItem * addAttributeListItem (smtk::attribute::AttributePtr childData)
 
void updateTableWithAttribute (smtk::attribute::AttributePtr dataItem)
 
void addComparativeProperty (QStandardItem *current, smtk::attribute::DefinitionPtr attDef)
 
void updateChildWidgetsEnableState (smtk::attribute::ItemPtr linkedData, QTableWidgetItem *item)
 
void updateItemWidgetsEnableState (smtk::attribute::ItemPtr linkedData, int &startRow, bool enabled)
 
virtual void getAllDefinitions ()
 
void initSelectAttCombo (smtk::attribute::DefinitionPtr attDef)
 
void insertTableColumn (QTableWidget *wTable, int insertCol, const QString &title, int advancedlevel)
 
void updateAttributeStatus (smtk::attribute::Attribute *att)
 
virtual int handleOperationEvent (const smtk::operation::Operation &op, smtk::operation::EventType event, smtk::operation::Operation::Result result)
 
QToolBar * toolBar ()
 
QAction * addAction ()
 
QAction * copyAction ()
 
QAction * deleteAction ()
 
void setTableItemDelegate (QAbstractItemDelegate *delegate)
 
void setTableColumnItemDelegate (int column, QAbstractItemDelegate *delegate)
 
void setTableRowItemDelegate (int row, QAbstractItemDelegate *delegate)
 
void triggerEdit (const QModelIndex &index)
 
int numOfAttributes ()
 
const smtk::view::Configuration::ComponentfindStyle (const smtk::attribute::DefinitionPtr &def, bool isOriginalDef=true)
 
- Protected Member Functions inherited from smtk::extension::qtBaseAttributeView
void buildUI () override
 Create the UI related to the view and assigns it to the parent widget.
 
void makeTopLevel () override
 Adds properties associated with respects to a top level view.
 
bool checkStatus (const smtk::attribute::Attribute *att) const
 Returns true if |att| is valid.
 
virtual bool categoryTest (const smtk::attribute::ItemPtr &) const
 Test for category filtering. More...
 
virtual bool advanceLevelTest (const smtk::attribute::ItemPtr &) const
 Test for advance level filtering. More...
 
void topLevelPrepCategories (const smtk::view::ConfigurationPtr &view, const smtk::attribute::ResourcePtr &attResource)
 
void topLevelPrepConfigurations (const smtk::view::ConfigurationPtr &view, const smtk::attribute::ResourcePtr &attResource)
 
void topLevelPrepAdvanceLevels (const smtk::view::ConfigurationPtr &view)
 
void prepConfigurationComboBox (const std::string &newConfigurationName)
 
void checkConfigurations (smtk::attribute::ItemPtr &item)
 
- Protected Member Functions inherited from smtk::extension::qtBaseView
virtual void setInfoToBeDisplayed ()
 Set the information to be displayed in the ViewInfoDialog.
 

Additional Inherited Members

- Protected Slots inherited from smtk::extension::qtBaseAttributeView
virtual void onAdvanceLevelChanged (int levelIdx)
 
void onConfigurationChanged (int levelIdx)
 
- Protected Attributes inherited from smtk::extension::qtBaseAttributeView
QScrollArea * m_ScrollArea
 
bool m_topLevelInitialized
 
bool m_topLevelCanCreateConfigurations
 
smtk::attribute::WeakDefinitionPtr m_topLevelConfigurationDef
 
bool m_ignoreCategories
 
std::string m_addressString
 
- Protected Attributes inherited from smtk::extension::qtBaseView
QWidget * Widget
 
bool m_isTopLevel
 
bool m_useSelectionManager
 
smtk::view::Information m_viewInfo
 
QPointer< qtViewInfoDialogm_infoDialog
 
bool m_advOverlayVisible
 

Detailed Description

Qt implementation for an Attribute View.

Attribute Views allow users to be able to create/modify/delete attributes based on a set of Definition types. Note that if a provided Definition is the base type for others, then all derived attributes can be displayed/created as well

Member Function Documentation

◆ createWidget()

void qtAttributeView::createWidget ( )
overrideprotectedvirtual

Creates the main QT Widget that is associated with a View.

Typically this is the only method a derived View needs to override.

Reimplemented from smtk::extension::qtBaseView.

◆ isEmpty()

bool qtAttributeView::isEmpty ( ) const
overridevirtual

Return true if the view does not contain any information to display.

Subclasses should override this method and return false by default unless they have specific knowledge that the view is vacuous.

Reimplemented from smtk::extension::qtBaseView.


The documentation for this class was generated from the following files: