LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
ICoreTabWidget Class Referenceabstract

This interface is used to represent LeechCraft's core tab widget. More...

#include "icoretabwidget.h"

Public Member Functions

virtual ~ICoreTabWidget ()
 
virtual QObject * GetQObject ()=0
 Returns the pointer to tab widget as a QObject. More...
 
virtual int WidgetCount () const =0
 Returns the number of widgets associated with tabs. More...
 
virtual QWidget * Widget (int index) const =0
 Returns the tab page at index position index or 0. if the index is out of range. More...
 
virtual int IndexOf (QWidget *page) const =0
 Returns the index of the given page. More...
 
virtual QMenu * GetTabMenu (int index)=0
 Returns the tab menu for the given tab index. More...
 
virtual QList< QAction * > GetPermanentActions () const =0
 Returns the list of actions witch always shows in context menu. of the tab. More...
 
virtual QString TabText (int index) const =0
 Returns the text of the tab at position index, or an empty string if index is out of range. More...
 
virtual void SetTabText (int index, const QString &text)=0
 Sets the text of the tab at position index to text. of the tabs. More...
 
virtual QIcon TabIcon (int index) const =0
 Returns the icon of the tab at position index, or a null icon if index is out of range. More...
 
virtual QWidget * TabButton (int index, QTabBar::ButtonPosition position) const =0
 Returns the widget set a tab index and position or 0 if one is not set. More...
 
virtual QTabBar::ButtonPosition GetCloseButtonPosition () const =0
 Returns the position of close button. More...
 
virtual void SetTabClosable (int index, bool closable, QWidget *closeButton=0)=0
 Sets tab closable. More...
 
virtual int CurrentIndex () const =0
 Returns the index of the tab bar's visible tab. More...
 
virtual void MoveTab (int from, int to)=0
 Moves the item at index position from to index position to. More...
 
virtual void setCurrentTab (int index)=0
 Sets the current tab index to specified index. More...
 
virtual void setCurrentWidget (QWidget *widget)=0
 Sets the current tab index to specified associated widget. More...
 
virtual QWidget * GetPreviousWidget () const =0
 Returns the previous active widget if it exists. More...
 

Protected Member Functions

virtual void tabInserted (int index)=0
 This signal is emitted after new tab was inserted. More...
 
virtual void currentChanged (int index)=0
 This signal is emitted when the tab widget's current tab changes. The new current has the given index, or -1 if there isn't a new one. More...
 
virtual void tabWasMoved (int from, int to)=0
 This signal is emitted when tab at from moves to position to. More...
 

Detailed Description

This interface is used to represent LeechCraft's core tab widget.

This interface is for communication with the core tab widget.

Definition at line 24 of file icoretabwidget.h.

Constructor & Destructor Documentation

◆ ~ICoreTabWidget()

virtual ICoreTabWidget::~ICoreTabWidget ( )
inlinevirtual

Definition at line 27 of file icoretabwidget.h.

Member Function Documentation

◆ currentChanged()

virtual void ICoreTabWidget::currentChanged ( int  index)
protectedpure virtual

This signal is emitted when the tab widget's current tab changes. The new current has the given index, or -1 if there isn't a new one.

Parameters
[out]indexThe index of current tab.
See also
GetQObject()

◆ CurrentIndex()

virtual int ICoreTabWidget::CurrentIndex ( ) const
pure virtual

Returns the index of the tab bar's visible tab.

Returns
tab index.

◆ GetCloseButtonPosition()

virtual QTabBar::ButtonPosition ICoreTabWidget::GetCloseButtonPosition ( ) const
pure virtual

Returns the position of close button.

Returns
close button position.

◆ GetPermanentActions()

virtual QList<QAction*> ICoreTabWidget::GetPermanentActions ( ) const
pure virtual

Returns the list of actions witch always shows in context menu. of the tab.

Returns
list of actions.

◆ GetPreviousWidget()

virtual QWidget* ICoreTabWidget::GetPreviousWidget ( ) const
pure virtual

Returns the previous active widget if it exists.

Returns
previous widget.

◆ GetQObject()

virtual QObject* ICoreTabWidget::GetQObject ( )
pure virtual

Returns the pointer to tab widget as a QObject.

You can connect to signals of this class via the object returned from this function, for example.

Returns
The core tab widget as a QObject.

◆ GetTabMenu()

virtual QMenu* ICoreTabWidget::GetTabMenu ( int  index)
pure virtual

Returns the tab menu for the given tab index.

Ownership of the menu goes to the caller — it's his responsibility to delete the menu when done.

Parameters
[in]indextab index.
Returns
tab menu for that index, or null if index is invalid.

◆ IndexOf()

virtual int ICoreTabWidget::IndexOf ( QWidget *  page) const
pure virtual

Returns the index of the given page.

Parameters
[in]pagepage to find.
Returns
the index of that page, or -1 if not found.

◆ MoveTab()

virtual void ICoreTabWidget::MoveTab ( int  from,
int  to 
)
pure virtual

Moves the item at index position from to index position to.

Parameters
[in]fromsource position.
[in]todestination position.

◆ setCurrentTab()

virtual void ICoreTabWidget::setCurrentTab ( int  index)
pure virtual

Sets the current tab index to specified index.

Parameters
[in]indexnew tab index.

◆ setCurrentWidget()

virtual void ICoreTabWidget::setCurrentWidget ( QWidget *  widget)
pure virtual

Sets the current tab index to specified associated widget.

Parameters
[in]widgetpage.

◆ SetTabClosable()

virtual void ICoreTabWidget::SetTabClosable ( int  index,
bool  closable,
QWidget *  closeButton = 0 
)
pure virtual

Sets tab closable.

Parameters
[in]indextab index.
[in]closableset tab closable.
[in]closeButtonset close button.

◆ SetTabText()

virtual void ICoreTabWidget::SetTabText ( int  index,
const QString &  text 
)
pure virtual

Sets the text of the tab at position index to text. of the tabs.

Parameters
[in]indextab index.
[in]textnew tab text.

◆ TabButton()

virtual QWidget* ICoreTabWidget::TabButton ( int  index,
QTabBar::ButtonPosition  position 
) const
pure virtual

Returns the widget set a tab index and position or 0 if one is not set.

Parameters
[in]indextab index.
[in]positionposition of widget.
Returns
widget in tab.

◆ TabIcon()

virtual QIcon ICoreTabWidget::TabIcon ( int  index) const
pure virtual

Returns the icon of the tab at position index, or a null icon if index is out of range.

Parameters
[in]indextab index.
Returns
specified tab icon.

◆ tabInserted()

virtual void ICoreTabWidget::tabInserted ( int  index)
protectedpure virtual

This signal is emitted after new tab was inserted.

Parameters
[out]indexThe index of new tab.
See also
GetQObject()

◆ TabText()

virtual QString ICoreTabWidget::TabText ( int  index) const
pure virtual

Returns the text of the tab at position index, or an empty string if index is out of range.

Parameters
[in]indextab index.
Returns
specified tab text.

◆ tabWasMoved()

virtual void ICoreTabWidget::tabWasMoved ( int  from,
int  to 
)
protectedpure virtual

This signal is emitted when tab at from moves to position to.

Parameters
[out]fromPrevious index of the tab that has just moved.
[out]toThe new position of the tab.
See also
GetQObject()

◆ Widget()

virtual QWidget* ICoreTabWidget::Widget ( int  index) const
pure virtual

Returns the tab page at index position index or 0. if the index is out of range.

Parameters
[in]indextab index.
Returns
the page at inted position.

◆ WidgetCount()

virtual int ICoreTabWidget::WidgetCount ( ) const
pure virtual

Returns the number of widgets associated with tabs.

Returns
pages count.

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