Choreonoid  1.8
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
cnoid::LinkDeviceTreeWidget Class Reference

#include <LinkDeviceTreeWidget.h>

Inheritance diagram for cnoid::LinkDeviceTreeWidget:
cnoid::TreeWidget

Public Types

enum  ListingMode { List, Tree, GroupedTree }
 
enum  NumberColumnMode { Index, Identifier }
 
typedef std::function< QVariant(const LinkDeviceTreeItem *item, int role)> ColumnDataGetter
 
typedef std::function< void(const LinkDeviceTreeItem *item, int role, const QVariant &value)> ColumnDataSetter
 
typedef std::function< QWidget *(const LinkDeviceTreeItem *item)> ColumnWidgetFunction
 

Public Member Functions

 LinkDeviceTreeWidget (QWidget *parent=0)
 
virtual ~LinkDeviceTreeWidget ()
 
void setListingMode (int mode)
 
int listingMode () const
 
void setLinkItemVisible (bool on)
 
bool isLinkItemVisible () const
 
void setVisibleLinkPredicate (std::function< bool(Link *link)> pred)
 
void setJointItemVisible (bool on)
 
bool isJointItemVisible () const
 
void setDeviceItemVisible (bool on)
 
bool isDeviceItemVisible () const
 
void setNumberColumnMode (int mode)
 
int numberColumnMode () const
 
void setDefaultExpansionLevel (int level)
 
void setCacheEnabled (bool on)
 
bool isCacheEnabled () const
 
int nameColumn () const
 
int numberColumn () const
 
int setNumColumns (int n)
 
int addColumn ()
 
int addColumn (const QString &headerText)
 
void setColumnStretchResizeMode (int column)
 
void setColumnInteractiveResizeMode (int column)
 
void setColumnResizeToContentsMode (int column)
 
void setNameColumnMarginEnabled (bool on)
 
void moveVisualColumnIndex (int column, int visualIndex)
 
void setColumnDataGetter (int column, ColumnDataGetter getter)
 
void setColumnDataSetter (int column, ColumnDataSetter func)
 
void setColumnWidgetFunction (int column, ColumnWidgetFunction func)
 
void setAlignedItemWidget (LinkDeviceTreeItem *item, int column, QWidget *widget, Qt::Alignment alignment=Qt::AlignCenter)
 
QWidget * alignedItemWidget (LinkDeviceTreeItem *item, int column)
 
void setBodyItem (BodyItem *bodyItem, bool forceTreeUpdate=false)
 
BodyItembodyItem ()
 
void updateTreeItems ()
 
void addCustomRow (LinkDeviceTreeItem *treeItem)
 
SignalProxy< void(bool isInitialCreation)> sigUpdateRequest ()
 
LinkDeviceTreeItemitemOfLink (int linkIndex)
 
int numLinkDeviceTreeItems ()
 
SignalProxy< void(LinkDeviceTreeItem *item, int column)> sigTreeItemChanged ()
 
SignalProxy< void()> sigLinkSelectionChanged ()
 
const std::vector< bool > & linkSelection () const
 
const std::vector< int > & selectedLinkIndices () const
 
SignalProxy< void()> sigSelectionChanged (BodyItem *bodyItem)
 
const std::vector< bool > & linkSelection (BodyItem *bodyItem)
 
const std::vector< int > & selectedLinkIndices (BodyItem *bodyItem)
 
void setLinkSelection (BodyItem *bodyItem, const std::vector< bool > &selection)
 
MenuManagerpopupMenuManager ()
 
bool storeState (Archive &archive)
 
bool restoreState (const Archive &archive)
 
- Public Member Functions inherited from cnoid::TreeWidget
 TreeWidget (QWidget *parent=nullptr)
 
 ~TreeWidget ()
 
void setHeaderSectionResizeMode (int column, QHeaderView::ResizeMode mode)
 
void setVerticalGridLineShown (bool on)
 
SignalProxy< void(QTreeWidgetItem *current, QTreeWidgetItem *previous)> sigCurrentItemChanged ()
 
SignalProxy< void(QTreeWidgetItem *item, int column)> sigItemActivated ()
 
SignalProxy< void(QTreeWidgetItem *item, int column)> sigItemChanged ()
 
SignalProxy< void(QTreeWidgetItem *item, int column)> sigItemClicked ()
 
SignalProxy< void(QTreeWidgetItem *item)> sigItemCollapsed ()
 
SignalProxy< void(QTreeWidgetItem *item, int column)> sigItemDoubleClicked ()
 
SignalProxy< void(QTreeWidgetItem *item, int column)> sigItemEntered ()
 
SignalProxy< void(QTreeWidgetItem *item)> sigItemExpanded ()
 
SignalProxy< void(QTreeWidgetItem *item, int column)> sigItemPressed ()
 
SignalProxy< void()> sigItemSelectionChanged ()
 
SignalProxy< void(const QModelIndex &parent, int first, int last)> sigRowsAboutToBeRemoved ()
 
SignalProxy< void(const QModelIndex &parent, int first, int last)> sigRowsRemoved ()
 
SignalProxy< void(const QModelIndex &parent, int first, int last)> sigRowsInserted ()
 
SignalProxy< void(int logicalIndex, int oldSize, int newSize)> sigSectionResized ()
 

Protected Member Functions

virtual void changeEvent (QEvent *event) override
 
- Protected Member Functions inherited from cnoid::TreeWidget
virtual void paintEvent (QPaintEvent *event)
 
virtual void scrollContentsBy (int dx, int dy)
 

Friends

class LinkDeviceTreeItem
 

Member Typedef Documentation

◆ ColumnDataGetter

typedef std::function<QVariant(const LinkDeviceTreeItem* item, int role)> cnoid::LinkDeviceTreeWidget::ColumnDataGetter

◆ ColumnDataSetter

typedef std::function<void(const LinkDeviceTreeItem* item, int role, const QVariant& value)> cnoid::LinkDeviceTreeWidget::ColumnDataSetter

◆ ColumnWidgetFunction

typedef std::function<QWidget*(const LinkDeviceTreeItem* item)> cnoid::LinkDeviceTreeWidget::ColumnWidgetFunction

Member Enumeration Documentation

◆ ListingMode

Enumerator
List 
Tree 
GroupedTree 

◆ NumberColumnMode

Enumerator
Index 
Identifier 

Constructor & Destructor Documentation

◆ LinkDeviceTreeWidget()

LinkDeviceTreeWidget::LinkDeviceTreeWidget ( QWidget *  parent = 0)

◆ ~LinkDeviceTreeWidget()

LinkDeviceTreeWidget::~LinkDeviceTreeWidget ( )
virtual

Member Function Documentation

◆ addColumn() [1/2]

int LinkDeviceTreeWidget::addColumn ( )

◆ addColumn() [2/2]

int LinkDeviceTreeWidget::addColumn ( const QString &  headerText)

◆ addCustomRow()

void LinkDeviceTreeWidget::addCustomRow ( LinkDeviceTreeItem treeItem)

◆ alignedItemWidget()

QWidget * LinkDeviceTreeWidget::alignedItemWidget ( LinkDeviceTreeItem item,
int  column 
)

◆ bodyItem()

BodyItem * LinkDeviceTreeWidget::bodyItem ( )

◆ changeEvent()

void LinkDeviceTreeWidget::changeEvent ( QEvent *  event)
overrideprotectedvirtual

◆ isCacheEnabled()

bool LinkDeviceTreeWidget::isCacheEnabled ( ) const

◆ isDeviceItemVisible()

bool LinkDeviceTreeWidget::isDeviceItemVisible ( ) const

◆ isJointItemVisible()

bool LinkDeviceTreeWidget::isJointItemVisible ( ) const

◆ isLinkItemVisible()

bool LinkDeviceTreeWidget::isLinkItemVisible ( ) const

◆ itemOfLink()

LinkDeviceTreeItem * LinkDeviceTreeWidget::itemOfLink ( int  linkIndex)

◆ linkSelection() [1/2]

const std::vector< bool > & LinkDeviceTreeWidget::linkSelection ( ) const

◆ linkSelection() [2/2]

const std::vector< bool > & LinkDeviceTreeWidget::linkSelection ( BodyItem bodyItem)

◆ listingMode()

int LinkDeviceTreeWidget::listingMode ( ) const

◆ moveVisualColumnIndex()

void LinkDeviceTreeWidget::moveVisualColumnIndex ( int  column,
int  visualIndex 
)

◆ nameColumn()

int LinkDeviceTreeWidget::nameColumn ( ) const

◆ numberColumn()

int LinkDeviceTreeWidget::numberColumn ( ) const

◆ numberColumnMode()

int LinkDeviceTreeWidget::numberColumnMode ( ) const

◆ numLinkDeviceTreeItems()

int LinkDeviceTreeWidget::numLinkDeviceTreeItems ( )

◆ popupMenuManager()

MenuManager & LinkDeviceTreeWidget::popupMenuManager ( )

◆ restoreState()

bool LinkDeviceTreeWidget::restoreState ( const Archive archive)

◆ selectedLinkIndices() [1/2]

const std::vector< int > & LinkDeviceTreeWidget::selectedLinkIndices ( ) const

◆ selectedLinkIndices() [2/2]

const std::vector< int > & LinkDeviceTreeWidget::selectedLinkIndices ( BodyItem bodyItem)

◆ setAlignedItemWidget()

void LinkDeviceTreeWidget::setAlignedItemWidget ( LinkDeviceTreeItem item,
int  column,
QWidget *  widget,
Qt::Alignment  alignment = Qt::AlignCenter 
)

◆ setBodyItem()

void LinkDeviceTreeWidget::setBodyItem ( BodyItem bodyItem,
bool  forceTreeUpdate = false 
)

◆ setCacheEnabled()

void LinkDeviceTreeWidget::setCacheEnabled ( bool  on)

◆ setColumnDataGetter()

void LinkDeviceTreeWidget::setColumnDataGetter ( int  column,
ColumnDataGetter  getter 
)

◆ setColumnDataSetter()

void LinkDeviceTreeWidget::setColumnDataSetter ( int  column,
ColumnDataSetter  func 
)

◆ setColumnInteractiveResizeMode()

void LinkDeviceTreeWidget::setColumnInteractiveResizeMode ( int  column)

◆ setColumnResizeToContentsMode()

void LinkDeviceTreeWidget::setColumnResizeToContentsMode ( int  column)

◆ setColumnStretchResizeMode()

void LinkDeviceTreeWidget::setColumnStretchResizeMode ( int  column)

◆ setColumnWidgetFunction()

void LinkDeviceTreeWidget::setColumnWidgetFunction ( int  column,
ColumnWidgetFunction  func 
)

◆ setDefaultExpansionLevel()

void LinkDeviceTreeWidget::setDefaultExpansionLevel ( int  level)

◆ setDeviceItemVisible()

void LinkDeviceTreeWidget::setDeviceItemVisible ( bool  on)

◆ setJointItemVisible()

void LinkDeviceTreeWidget::setJointItemVisible ( bool  on)

◆ setLinkItemVisible()

void LinkDeviceTreeWidget::setLinkItemVisible ( bool  on)

◆ setLinkSelection()

void LinkDeviceTreeWidget::setLinkSelection ( BodyItem bodyItem,
const std::vector< bool > &  selection 
)

◆ setListingMode()

void LinkDeviceTreeWidget::setListingMode ( int  mode)

◆ setNameColumnMarginEnabled()

void LinkDeviceTreeWidget::setNameColumnMarginEnabled ( bool  on)

◆ setNumberColumnMode()

void LinkDeviceTreeWidget::setNumberColumnMode ( int  mode)

◆ setNumColumns()

int LinkDeviceTreeWidget::setNumColumns ( int  n)

◆ setVisibleLinkPredicate()

void LinkDeviceTreeWidget::setVisibleLinkPredicate ( std::function< bool(Link *link)>  pred)

◆ sigLinkSelectionChanged()

SignalProxy< void()> LinkDeviceTreeWidget::sigLinkSelectionChanged ( )

◆ sigSelectionChanged()

SignalProxy< void()> LinkDeviceTreeWidget::sigSelectionChanged ( BodyItem bodyItem)

◆ sigTreeItemChanged()

SignalProxy< void(LinkDeviceTreeItem *item, int column)> LinkDeviceTreeWidget::sigTreeItemChanged ( )

◆ sigUpdateRequest()

SignalProxy< void(bool isInitialCreation)> LinkDeviceTreeWidget::sigUpdateRequest ( )

◆ storeState()

bool LinkDeviceTreeWidget::storeState ( Archive archive)

◆ updateTreeItems()

void LinkDeviceTreeWidget::updateTreeItems ( )

Friends And Related Function Documentation

◆ LinkDeviceTreeItem

friend class LinkDeviceTreeItem
friend

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