![]() |
Home · Modules · Classes · Namespaces · Functions |
The QxtTabWidget class is an extended QTabWidget. More...
#include <QxtTabWidget>
Inherits QTabWidget.
The QxtTabWidget class is an extended QTabWidget.
QxtTabWidget provides some convenience for handling tab specific context menus and animations.
Example usage:
QxtTabWidget* tabWidget = new QxtTabWidget(); tabWidget->addTab(tab0, "1"); tabWidget->addTab(tab1, "2"); QList<QAction*> actions0; actions0 << new QAction("Quisque", tab0) << new QAction("Aenean", tab0); QList<QAction*> actions1; actions1 << new QAction("Phasellus", tab1) << new QAction("Maecenas", tab1); tabWidget->setTabContextMenuPolicy(Qt::ActionsContextMenu); tabWidget->addTabActions(0, actions0); tabWidget->addTabActions(1, actions1);
Constructs a new QxtTabWidget with parent.
Destructs the tab widget.
Appends the action to the list of actions of the tab at index.
See also removeTabAction(), insertTabAction(), and tabActions().
This convenience function creates a new action with text. The function adds the newly created action to the list of actions of the tab at index, and returns it.
See also addTabAction().
This convenience function creates a new action with icon and text. The function adds the newly created action to the list of actions of the tab at index, and returns it.
See also addTabAction().
This convenience function creates a new action with text and an optional shortcut. The action's triggered() signal is connected to the receiver's member slot. The function adds the newly created action to the list of actions of the tab at index, and returns it.
Note: In order to make it possible for the shortcut to work even when the context menu is not open, the action must be added to a visible widget. The corresponding tab is a good alternative.
QWidget* tab = createNewTab(); tabWidget->addTab(tab, title); QAction* action = tabWidget->addTabAction(index, tr("Close"), this, SLOT(closeCurrentTab()), tr("Ctrl+W")); tab->addAction(act);
See also addTabAction() and QWidget::addAction().
This convenience function creates a new action with icon, text and an optional shortcut. The action's triggered() signal is connected to the receiver's member slot. The function adds the newly created action to the list of actions of the tab at index, and returns it.
See also addTabAction().
Appends the actions to the list of actions of the tab at index.
See also removeTabAction() and addTabAction().
See also setAlwaysShowTabBar().
Clears the list of actions of the tab at index.
Note: Only actions owned by the tab widget are deleted.
See also removeTabAction() and addTabAction().
Inserts the action to the list of actions of the tab at index, before the action before. It appends the action if before is 0.
See also removeTabAction(), addTabAction(), tabContextMenuPolicy, and tabActions().
Inserts the actions to the list of actions of the tab at index, before the action before. It appends the action if before is 0.
See also removeAction(), QMenu, insertAction(), and contextMenuPolicy.
Removes the action action from the list of actions of the tab at index.
Note: The removed action is not deleted.
See also insertTabAction(), tabActions(), and insertTabAction().
See also alwaysShowTabBar().
Sets the animation of the tab at index and optionally start the animation.
See also tabAnimation().
This is an overloaded member function, provided for convenience.
The QMovie animation is constructed from fileName with this as parent. The animation is started if start is true.
See also setTabAnimation().
See also tabContextMenuPolicy().
Returns the (possibly empty) list of actions for the tab at index.
See also tabContextMenuPolicy, insertTabAction(), and removeTabAction().
Returns the animation of the tab at index or 0 if no animation has been set.
See also setTabAnimation().
This event handler, for event event, can be reimplemented in a subclass to receive context menu events for the tab at index.
The handler is called when tabContextMenuPolicy is Qt::DefaultContextMenu.
The default implementation ignores the context menu event.
See also tabContextMenuPolicy and tabContextMenuRequested().
See also setTabContextMenuPolicy().
This signal is emitted whenever the context menu is requested over tab at index at globalPos.
Removes the animation of the tab at index and returns it.
See also tabAnimation().
Copyright © 2007-2010 Qxt Foundation |
Qxt 0.6.1 |