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*)));
264 void 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";
virtual void mouseReleaseEvent(QMouseEvent *)
Definition: ktabwidget.cpp:519
void mouseDoubleClick()
A double left mouse button click was performed over empty space besides tabbar.
QString rsqueeze(const QString &str, int maxlen=40)
bool hoverCloseButtonDelayed() const
Returns true if the close button is shown on tabs after a delay.
bool isTabReorderingEnabled() const
Returns true if tab ordering with the middle mouse button has been enabled.
Definition: ktabwidget.cpp:327
bool isTabBarHidden() const
Returns true if the tabbar was hidden by a call to setTabBarHidden( true ).
Definition: ktabwidget.cpp:304
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
void mouseMiddleClick()
A middle mouse button click was performed over empty space besides tabbar.
KTabWidget(QWidget *parent=0, Qt::WindowFlags flags=0)
Creates a new tab widget.
Definition: ktabwidget.cpp:233
KSharedConfigPtr config()
void contextMenu(const QPoint &)
The right mouse button was pressed over empty space besides tabbar.
bool hoverCloseButton() const
Returns true if the close button is shown on tabs when mouse is hovering over them.
virtual void dragEnterEvent(QDragEnterEvent *)
Definition: ktabwidget.cpp:428
QT_MOC_COMPAT void setTabReorderingEnabled(bool enable)
If enable is true, tab reordering with middle button will be enabled.
Definition: ktabwidget.cpp:320
void setTabTextColor(int index, const QColor &color)
Set the tab of the given widget to color.
Definition: ktabwidget.cpp:309
void setTabBarHidden(bool hide)
If hide is true, the tabbar is hidden along with any corner widgets.
Definition: ktabwidget.cpp:284
void testCanDecode(const QDragMoveEvent *e, bool &accept)
Connect to this and set accept to true if you can and want to decode the event.
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
bool tabCloseActivatePrevious() const
Returns true if closing the current tab activates the previous actice tab instead of the one to the r...
virtual void mouseDoubleClickEvent(QMouseEvent *)
Definition: ktabwidget.cpp:494
void initiateDrag(QWidget *)
Request to start a drag operation on the given tab.
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
bool isCloseButtonEnabled() const
Returns true if the close button is shown on tabs.
Definition: ktabwidget.cpp:665
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
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void setAutomaticResizeTabs(bool enable)
If enable is true, tabs will be resized to the width of the tab bar.
Definition: ktabwidget.cpp:671
QColor tabTextColor(int index) const
Returns the tab color for the given widget.
Definition: ktabwidget.cpp:314
virtual void removeTab(int index)
Removes the widget, reimplemented for internal reasons (keeping labels in sync).
Definition: ktabwidget.cpp:613
QT_MOC_COMPAT void setCloseButtonEnabled(bool)
If enabled, a close button is available for each tab.
Definition: ktabwidget.cpp:658
void receivedDropEvent(QDropEvent *)
Received an event in the empty space beside tabbar.
virtual QT_MOC_COMPAT void removePage(QWidget *w)
Removes the widget, reimplemented for internal reasons (keeping labels in sync).
Definition: ktabwidget.cpp:600
virtual void mousePressEvent(QMouseEvent *)
Definition: ktabwidget.cpp:507
void setTabText(int, const QString &)
Reimplemented for internal reasons.
Definition: ktabwidget.cpp:398
bool automaticResizeTabs() const
Returns true if calling setTitle() will resize tabs to the width of the tab bar.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.