Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::VariableListView Class Reference

Implements a tree view (table) for a variable list. More...

#include <VariableListView.h>

Inheritance diagram for sf::VariableListView:
Collaboration diagram for sf::VariableListView:

Public Member Functions

 VariableListView (QWidget *parent=nullptr)
 Constructor.
 
bool isRequiredProperty (const QString &name) override
 Overridden from base class.
 
VariableListModelgetVariableListModel () const
 Gets the sf::VariableListModel attached to this instance.
 
int getNameLevel () const
 Gets the levels of names displayed of the variables in the list.
 
void setNameLevel (int level=-1) const
 Sets the levels of names displayed of the variables in the list.
 
void setRowCheckbox (bool enabled) const
 Enables the selection of rows. The sf::Variable::getData() returns true when selected.
 
bool hasRowCheckbox () const
 Gets if the row selection is enabled. By default, the row selection is enabled.
 
void setColumnResizeMode () const
 Sets the resize mode for the columns based column field assignment.
 
- Public Member Functions inherited from sf::ObjectExtension
virtual void addPropertyPages (PropertySheetDialog *sheet)
 Adds the pages specific for this object.
 
virtual bool getSaveChildren () const
 Gets if the children needs saving by the FormBuilder class.
 

Protected Member Functions

virtual void handleClipboard (bool flag)
 Called on clipboard copy and paste keyboard commands. Used to implement the copy and paste functionality. The base implementation copies the Variable ids which checkboxes a checked.
 
int editableColumn () const
 Gets the first editable column number.
 
bool editRow () const
 Edits the selected row when editable.
 
bool toggleRow ()
 Toggles the row check box in the view for the current selected row.
 
void keyPressEvent (QKeyEvent *event) override
 Overridden from base class.
 
void initSelection () const
 Initialize selection of the row.
 
- Protected Member Functions inherited from sf::ObjectExtension
 ObjectExtension (QObject *object)
 Protected constructor only. Inlined so no external libs are need for designer.
 
virtual ~ObjectExtension ()=default
 Virtual destructor.
 

Properties

int nameLevel
 
bool rowCheckbox
 

Additional Inherited Members

- Static Public Member Functions inherited from sf::ObjectExtension
static bool inDesigner ()
 Gets the designer status.
 
static QObject * getExtensionParent (QObject *obj, bool first=true)
 Return if the passed object has this type as parent. It starts by testing the passed object itself.
 

Detailed Description

Implements a tree view (table) for a variable list.

Constructor & Destructor Documentation

◆ VariableListView()

sf::VariableListView::VariableListView ( QWidget *  parent = nullptr)
explicit

Constructor.

Parameters
parentParent and owner of the instance.

Member Function Documentation

◆ editableColumn()

int sf::VariableListView::editableColumn ( ) const
protected

Gets the first editable column number.

Returns
-1 when no editable column was found.

◆ editRow()

bool sf::VariableListView::editRow ( ) const
protected

Edits the selected row when editable.

Returns
True when editable otherwise false.

◆ getNameLevel()

int sf::VariableListView::getNameLevel ( ) const

Gets the levels of names displayed of the variables in the list.

◆ getVariableListModel()

VariableListModel * sf::VariableListView::getVariableListModel ( ) const

Gets the sf::VariableListModel attached to this instance.

Returns
Model pointer.

◆ handleClipboard()

virtual void sf::VariableListView::handleClipboard ( bool  flag)
protectedvirtual

Called on clipboard copy and paste keyboard commands. Used to implement the copy and paste functionality. The base implementation copies the Variable ids which checkboxes a checked.

Parameters
flagWhen 'true' the clipboard is copied and with 'false' it is pasted.

Reimplemented in sf::AxesCoordEdit.

◆ hasRowCheckbox()

bool sf::VariableListView::hasRowCheckbox ( ) const

Gets if the row selection is enabled. By default, the row selection is enabled.

◆ initSelection()

void sf::VariableListView::initSelection ( ) const
protected

Initialize selection of the row.

◆ isRequiredProperty()

bool sf::VariableListView::isRequiredProperty ( const QString &  name)
overridevirtual

Overridden from base class.

Implements sf::ObjectExtension.

◆ keyPressEvent()

void sf::VariableListView::keyPressEvent ( QKeyEvent *  event)
overrideprotected

Overridden from base class.

◆ setColumnResizeMode()

void sf::VariableListView::setColumnResizeMode ( ) const

Sets the resize mode for the columns based column field assignment.

◆ setNameLevel()

void sf::VariableListView::setNameLevel ( int  level = -1) const

Sets the levels of names displayed of the variables in the list.

◆ setRowCheckbox()

void sf::VariableListView::setRowCheckbox ( bool  enabled) const

Enables the selection of rows. The sf::Variable::getData() returns true when selected.

◆ toggleRow()

bool sf::VariableListView::toggleRow ( )
protected

Toggles the row check box in the view for the current selected row.

Returns
True when actually toggled.

Property Documentation

◆ nameLevel

int sf::VariableListView::nameLevel
readwrite

◆ rowCheckbox

bool sf::VariableListView::rowCheckbox
readwrite

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