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

#include <ItemTreeView.h>

Inheritance diagram for cnoid::ItemTreeView:
cnoid::View cnoid::Widget

Public Types

enum  CheckId { ID_ANY = Item::LogicalSumOfAllChecks }
 
- Public Types inherited from cnoid::View
enum  LayoutArea {
  TopLeftArea = 0, MiddleLeftArea = 1, BottomLeftArea = 2, TopCenterArea = 3,
  CenterArea = 4, BottomCenterArea = 5, TopRightArea = 6, MiddleRightArea = 7,
  BottomRightArea = 8, NumLayoutAreas = 9, LEFT = TopLeftArea, LEFT_TOP = TopLeftArea,
  LEFT_BOTTOM = BottomLeftArea, CENTER = CenterArea, RIGHT = TopRightArea, BOTTOM = BottomCenterArea
}
 

Public Member Functions

 ItemTreeView ()
 
 ~ItemTreeView ()
 
ItemTreeWidgetitemTreeWidget ()
 
template<class ItemType >
void customizeContextMenu (std::function< void(ItemType *item, MenuManager &menuManager, ItemFunctionDispatcher menuFunction)> func)
 
void setExpanded (Item *item, bool on=true)
 
template<class ItemType >
ItemList< ItemType > selectedItems () const
 
const ItemListselectedItems () const
 
template<class ItemType >
ItemType * selectedItem (bool fromMultiItems=false) const
 
template<class ItemType >
ItemList< ItemType > selectedSubItems (const Item *topItem) const
 
template<class ItemType >
ItemType * selectedSubItem (Item *topItem, bool fromMultiItems=false) const
 
bool isItemSelected (const Item *item) const
 
bool selectItem (Item *item, bool on=true)
 
void selectAllItems ()
 
void clearSelection ()
 
template<class ItemType >
ItemList< ItemType > checkedItems (int checkId=Item::PrimaryCheck) const
 
bool isItemChecked (const Item *item, int checkId=Item::PrimaryCheck) const
 
bool checkItem (Item *item, bool on=true, int checkId=Item::PrimaryCheck)
 
SignalProxy< void(const ItemList<> &)> sigSelectionChanged () const
 
SignalProxy< void(Item *item, bool isChecked)> sigCheckToggled (int checkId=Item::PrimaryCheck) const
 
SignalProxy< void(bool isChecked)> sigCheckToggled (Item *item, int checkId=Item::PrimaryCheck) const
 
- Public Member Functions inherited from cnoid::View
 View ()
 
virtual ~View ()
 
ViewClassviewClass () const
 
const std::string & name () const
 
virtual void setName (const std::string &name)
 
void setTitleFormat (const std::string &title)
 
void resetTitleFormat ()
 
const std::string & titleFormat () const
 
ViewAreaviewArea () const
 
bool isActive () const
 
bool hasFocus () const
 
void bringToFront ()
 
SignalProxy< void()> sigActivated ()
 
SignalProxy< void()> sigDeactivated ()
 
SignalProxy< void()> sigResized ()
 
SignalProxy< void()> sigRemoved ()
 
void setDefaultLayoutArea (LayoutArea area)
 
LayoutArea defaultLayoutArea () const
 
void setLayout (QLayout *layout, double marginRatio=0.0)
 
void setLayout (QLayout *layout, double leftMarginRatio, double topMarginRatio, double rightMarginRatio, double bottomMarginRatio)
 
QPoint viewAreaPos () const
 
virtual QWidget * indicatorOnInfoBar ()
 
void enableFontSizeZoomKeys (bool on)
 
- Public Member Functions inherited from cnoid::Widget
 Widget (QWidget *parent=0)
 
SignalProxy< void(std::string name)> sigObjectNameChanged ()
 
SignalProxy< void(std::string title)> sigWindowTitleChanged ()
 

Static Public Member Functions

static void initializeClass (ExtensionManager *ext)
 
static ItemTreeViewinstance ()
 
static ItemTreeViewmainInstance ()
 
- Static Public Member Functions inherited from cnoid::View
static ViewlastFocusView ()
 

Protected Member Functions

virtual bool storeState (Archive &archive) override
 
virtual bool restoreState (const Archive &archive) override
 
- Protected Member Functions inherited from cnoid::View
void setLayoutContentsMarginRatio (QLayout *layout, double leftMarginRatio, double topMarginRatio, double rightMarginRatio, double bottomMarginRatio)
 
void zoomFontSize (int zoom)
 
virtual void onActivated ()
 
virtual void onDeactivated ()
 
virtual void onFocusChanged (bool on)
 
virtual void onAttachedMenuRequest (MenuManager &menuManager)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 

Member Enumeration Documentation

◆ CheckId

Enumerator
ID_ANY 

Constructor & Destructor Documentation

◆ ItemTreeView()

ItemTreeView::ItemTreeView ( )

◆ ~ItemTreeView()

ItemTreeView::~ItemTreeView ( )

Member Function Documentation

◆ checkedItems()

template<class ItemType >
ItemList<ItemType> cnoid::ItemTreeView::checkedItems ( int  checkId = Item::PrimaryCheck) const
inline

◆ checkItem()

bool cnoid::ItemTreeView::checkItem ( Item item,
bool  on = true,
int  checkId = Item::PrimaryCheck 
)
inline

◆ clearSelection()

void cnoid::ItemTreeView::clearSelection ( )
inline

◆ customizeContextMenu()

template<class ItemType >
void cnoid::ItemTreeView::customizeContextMenu ( std::function< void(ItemType *item, MenuManager &menuManager, ItemFunctionDispatcher menuFunction)>  func)
inline

◆ initializeClass()

void ItemTreeView::initializeClass ( ExtensionManager ext)
static

◆ instance()

ItemTreeView * ItemTreeView::instance ( )
static

◆ isItemChecked()

bool cnoid::ItemTreeView::isItemChecked ( const Item item,
int  checkId = Item::PrimaryCheck 
) const
inline

◆ isItemSelected()

bool cnoid::ItemTreeView::isItemSelected ( const Item item) const
inline

◆ itemTreeWidget()

ItemTreeWidget * ItemTreeView::itemTreeWidget ( )

◆ mainInstance()

static ItemTreeView* cnoid::ItemTreeView::mainInstance ( )
inlinestatic

◆ restoreState()

bool ItemTreeView::restoreState ( const Archive archive)
overrideprotectedvirtual

Reimplemented from cnoid::View.

◆ selectAllItems()

void cnoid::ItemTreeView::selectAllItems ( )
inline

◆ selectedItem()

template<class ItemType >
ItemType* cnoid::ItemTreeView::selectedItem ( bool  fromMultiItems = false) const
inline

◆ selectedItems() [1/2]

template<class ItemType >
ItemList<ItemType> cnoid::ItemTreeView::selectedItems ( ) const
inline

◆ selectedItems() [2/2]

const ItemList& cnoid::ItemTreeView::selectedItems ( ) const
inline

◆ selectedSubItem()

template<class ItemType >
ItemType* cnoid::ItemTreeView::selectedSubItem ( Item topItem,
bool  fromMultiItems = false 
) const
inline

◆ selectedSubItems()

template<class ItemType >
ItemList<ItemType> cnoid::ItemTreeView::selectedSubItems ( const Item topItem) const
inline

◆ selectItem()

bool cnoid::ItemTreeView::selectItem ( Item item,
bool  on = true 
)
inline

◆ setExpanded()

void ItemTreeView::setExpanded ( Item item,
bool  on = true 
)

◆ sigCheckToggled() [1/2]

SignalProxy<void(Item* item, bool isChecked)> cnoid::ItemTreeView::sigCheckToggled ( int  checkId = Item::PrimaryCheck) const
inline

◆ sigCheckToggled() [2/2]

SignalProxy<void(bool isChecked)> cnoid::ItemTreeView::sigCheckToggled ( Item item,
int  checkId = Item::PrimaryCheck 
) const
inline

◆ sigSelectionChanged()

SignalProxy<void(const ItemList<>&)> cnoid::ItemTreeView::sigSelectionChanged ( ) const
inline

◆ storeState()

bool ItemTreeView::storeState ( Archive archive)
overrideprotectedvirtual

Reimplemented from cnoid::View.


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