Choreonoid
1.8
|
#include <LinkDeviceTreeWidget.h>
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) |
BodyItem * | bodyItem () |
void | updateTreeItems () |
void | addCustomRow (LinkDeviceTreeItem *treeItem) |
SignalProxy< void(bool isInitialCreation)> | sigUpdateRequest () |
LinkDeviceTreeItem * | itemOfLink (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) |
MenuManager & | popupMenuManager () |
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 |
typedef std::function<QVariant(const LinkDeviceTreeItem* item, int role)> cnoid::LinkDeviceTreeWidget::ColumnDataGetter |
typedef std::function<void(const LinkDeviceTreeItem* item, int role, const QVariant& value)> cnoid::LinkDeviceTreeWidget::ColumnDataSetter |
typedef std::function<QWidget*(const LinkDeviceTreeItem* item)> cnoid::LinkDeviceTreeWidget::ColumnWidgetFunction |
LinkDeviceTreeWidget::LinkDeviceTreeWidget | ( | QWidget * | parent = 0 | ) |
|
virtual |
int LinkDeviceTreeWidget::addColumn | ( | ) |
int LinkDeviceTreeWidget::addColumn | ( | const QString & | headerText | ) |
void LinkDeviceTreeWidget::addCustomRow | ( | LinkDeviceTreeItem * | treeItem | ) |
QWidget * LinkDeviceTreeWidget::alignedItemWidget | ( | LinkDeviceTreeItem * | item, |
int | column | ||
) |
BodyItem * LinkDeviceTreeWidget::bodyItem | ( | ) |
|
overrideprotectedvirtual |
bool LinkDeviceTreeWidget::isCacheEnabled | ( | ) | const |
bool LinkDeviceTreeWidget::isDeviceItemVisible | ( | ) | const |
bool LinkDeviceTreeWidget::isJointItemVisible | ( | ) | const |
bool LinkDeviceTreeWidget::isLinkItemVisible | ( | ) | const |
LinkDeviceTreeItem * LinkDeviceTreeWidget::itemOfLink | ( | int | linkIndex | ) |
const std::vector< bool > & LinkDeviceTreeWidget::linkSelection | ( | ) | const |
const std::vector< bool > & LinkDeviceTreeWidget::linkSelection | ( | BodyItem * | bodyItem | ) |
int LinkDeviceTreeWidget::listingMode | ( | ) | const |
void LinkDeviceTreeWidget::moveVisualColumnIndex | ( | int | column, |
int | visualIndex | ||
) |
int LinkDeviceTreeWidget::nameColumn | ( | ) | const |
int LinkDeviceTreeWidget::numberColumn | ( | ) | const |
int LinkDeviceTreeWidget::numberColumnMode | ( | ) | const |
int LinkDeviceTreeWidget::numLinkDeviceTreeItems | ( | ) |
MenuManager & LinkDeviceTreeWidget::popupMenuManager | ( | ) |
bool LinkDeviceTreeWidget::restoreState | ( | const Archive & | archive | ) |
const std::vector< int > & LinkDeviceTreeWidget::selectedLinkIndices | ( | ) | const |
const std::vector< int > & LinkDeviceTreeWidget::selectedLinkIndices | ( | BodyItem * | bodyItem | ) |
void LinkDeviceTreeWidget::setAlignedItemWidget | ( | LinkDeviceTreeItem * | item, |
int | column, | ||
QWidget * | widget, | ||
Qt::Alignment | alignment = Qt::AlignCenter |
||
) |
void LinkDeviceTreeWidget::setBodyItem | ( | BodyItem * | bodyItem, |
bool | forceTreeUpdate = false |
||
) |
void LinkDeviceTreeWidget::setCacheEnabled | ( | bool | on | ) |
void LinkDeviceTreeWidget::setColumnDataGetter | ( | int | column, |
ColumnDataGetter | getter | ||
) |
void LinkDeviceTreeWidget::setColumnDataSetter | ( | int | column, |
ColumnDataSetter | func | ||
) |
void LinkDeviceTreeWidget::setColumnInteractiveResizeMode | ( | int | column | ) |
void LinkDeviceTreeWidget::setColumnResizeToContentsMode | ( | int | column | ) |
void LinkDeviceTreeWidget::setColumnStretchResizeMode | ( | int | column | ) |
void LinkDeviceTreeWidget::setColumnWidgetFunction | ( | int | column, |
ColumnWidgetFunction | func | ||
) |
void LinkDeviceTreeWidget::setDefaultExpansionLevel | ( | int | level | ) |
void LinkDeviceTreeWidget::setDeviceItemVisible | ( | bool | on | ) |
void LinkDeviceTreeWidget::setJointItemVisible | ( | bool | on | ) |
void LinkDeviceTreeWidget::setLinkItemVisible | ( | bool | on | ) |
void LinkDeviceTreeWidget::setLinkSelection | ( | BodyItem * | bodyItem, |
const std::vector< bool > & | selection | ||
) |
void LinkDeviceTreeWidget::setListingMode | ( | int | mode | ) |
void LinkDeviceTreeWidget::setNameColumnMarginEnabled | ( | bool | on | ) |
void LinkDeviceTreeWidget::setNumberColumnMode | ( | int | mode | ) |
int LinkDeviceTreeWidget::setNumColumns | ( | int | n | ) |
void LinkDeviceTreeWidget::setVisibleLinkPredicate | ( | std::function< bool(Link *link)> | pred | ) |
SignalProxy< void()> LinkDeviceTreeWidget::sigLinkSelectionChanged | ( | ) |
SignalProxy< void()> LinkDeviceTreeWidget::sigSelectionChanged | ( | BodyItem * | bodyItem | ) |
SignalProxy< void(LinkDeviceTreeItem *item, int column)> LinkDeviceTreeWidget::sigTreeItemChanged | ( | ) |
SignalProxy< void(bool isInitialCreation)> LinkDeviceTreeWidget::sigUpdateRequest | ( | ) |
bool LinkDeviceTreeWidget::storeState | ( | Archive & | archive | ) |
void LinkDeviceTreeWidget::updateTreeItems | ( | ) |
|
friend |