KDEUI
ktabwidget.cpp
Go to the documentation of this file.
95 ( m_parent->tabPosition() == QTabWidget::South && point.y() > (m_parent->height() - size.height() ) ) ) {
202 QString title = m_automaticResizeTabs ? m_tabNames[ index ] : m_parent->QTabWidget::tabText( index );
207 // Remove '&'s, which are indicators for keyboard shortcuts in tab titles. "&&" is replaced by '&'.
208 for ( int i = toolTipText.indexOf( '&' ); i >= 0 && i < toolTipText.length(); i = toolTipText.indexOf( '&', i + 1 ) )
217 title = KStringHandler::rsqueeze( title, m_currentTabLength ).leftJustified( m_minLength, ' ' );
247 connect(tabBar(), SIGNAL(testCanDecode(const QDragMoveEvent*,bool&)), SIGNAL(testCanDecode(const QDragMoveEvent*,bool&)));
248 connect(tabBar(), SIGNAL(receivedDropEvent(int,QDropEvent*)), SLOT(receivedDropEvent(int,QDropEvent*)));
264void KTabWidget::insertTab( QWidget *child, const QIcon& iconset, const QString &label, int index )
357 newTitle = KStringHandler::rsqueeze( newTitle, maxLength ).leftJustified( d->m_minLength, ' ' );
362 iw = tabBar()->tabIcon( i ).pixmap( style()->pixelMetric( QStyle::PM_SmallIconSize ), QIcon::Normal ).width() + 4;
411 kWarning(240) << "setTabText(" << index << ") called but d->m_tabNames has only" << d->m_tabNames.count() << "entries";
QT_MOC_COMPAT void setCloseButtonEnabled(bool)
If enabled, a close button is available for each tab.
Definition: ktabwidget.cpp:658
void setTabText(int, const QString &)
Reimplemented for internal reasons.
Definition: ktabwidget.cpp:398
bool isCloseButtonEnabled() const
Returns true if the close button is shown on tabs.
Definition: ktabwidget.cpp:665
virtual void moveTab(int, int)
Move a widget's tab from first to second specified index and emit signal movedTab( int,...
Definition: ktabwidget.cpp:556
void mouseDoubleClick()
A double left mouse button click was performed over empty space besides tabbar.
QColor tabTextColor(int index) const
Returns the tab color for the given widget.
Definition: ktabwidget.cpp:314
virtual void mouseDoubleClickEvent(QMouseEvent *)
Definition: ktabwidget.cpp:494
void receivedDropEvent(QDropEvent *)
Received an event in the empty space beside tabbar.
QT_MOC_COMPAT void setHoverCloseButtonDelayed(bool delayed)
If delayed is true, a close button will be shown on mouse hover over tab icons after mouse double cli...
Definition: ktabwidget.cpp:642
bool isTabReorderingEnabled() const
Returns true if tab ordering with the middle mouse button has been enabled.
Definition: ktabwidget.cpp:327
QT_MOC_COMPAT void setTabCloseActivatePrevious(bool previous)
If previous is true, closing the current tab activates the previous active tab instead of the one to ...
Definition: ktabwidget.cpp:334
QT_MOC_COMPAT void setHoverCloseButton(bool enable)
If enable is true, a close button will be shown on mouse hover over tab icons which will emit signal ...
Definition: ktabwidget.cpp:626
virtual void mouseReleaseEvent(QMouseEvent *)
Definition: ktabwidget.cpp:519
void setAutomaticResizeTabs(bool enable)
If enable is true, tabs will be resized to the width of the tab bar.
Definition: ktabwidget.cpp:671
void mouseMiddleClick()
A middle mouse button click was performed over empty space besides tabbar.
virtual void mousePressEvent(QMouseEvent *)
Definition: ktabwidget.cpp:507
virtual QT_MOC_COMPAT void removePage(QWidget *w)
Removes the widget, reimplemented for internal reasons (keeping labels in sync).
Definition: ktabwidget.cpp:600
void testCanDecode(const QDragMoveEvent *e, bool &accept)
Connect to this and set accept to true if you can and want to decode the event.
KTabWidget(QWidget *parent=0, Qt::WindowFlags flags=0)
Creates a new tab widget.
Definition: ktabwidget.cpp:233
virtual void removeTab(int index)
Removes the widget, reimplemented for internal reasons (keeping labels in sync).
Definition: ktabwidget.cpp:613
QT_MOC_COMPAT void setTabReorderingEnabled(bool enable)
If enable is true, tab reordering with middle button will be enabled.
Definition: ktabwidget.cpp:320
void initiateDrag(QWidget *)
Request to start a drag operation on the given tab.
bool isTabBarHidden() const
Returns true if the tabbar was hidden by a call to setTabBarHidden( true ).
Definition: ktabwidget.cpp:304
virtual void dragEnterEvent(QDragEnterEvent *)
Definition: ktabwidget.cpp:428
void contextMenu(const QPoint &)
The right mouse button was pressed over empty space besides tabbar.
void setTabBarHidden(bool hide)
If hide is true, the tabbar is hidden along with any corner widgets.
Definition: ktabwidget.cpp:284
void setTabTextColor(int index, const QColor &color)
Set the tab of the given widget to color.
Definition: ktabwidget.cpp:309
#define kWarning
KSharedConfigPtr config()
QString rsqueeze(const QString &str, int maxlen=40)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.