#include <VP1TabWidget.h>
Definition at line 44 of file VP1TabWidget.h.
◆ VP1TabWidget()
VP1TabWidget::VP1TabWidget |
( |
QWidget * |
parent = 0 , |
|
|
Qt::WindowFlags |
flags = Qt::WindowFlags() |
|
) |
| |
|
explicit |
Definition at line 162 of file VP1TabWidget.cxx.
164 m_d(
new Private(
this ) )
166 setWindowFlags(
flags );
168 setObjectName(
"tabbar" );
169 setAcceptDrops(
true );
179 #ifndef QT_NO_WHEELEVENT
◆ ~VP1TabWidget()
VP1TabWidget::~VP1TabWidget |
( |
| ) |
|
|
virtual |
◆ automaticResizeTabs()
bool VP1TabWidget::automaticResizeTabs |
( |
| ) |
const |
◆ closeRequest [1/2]
void VP1TabWidget::closeRequest |
( |
int |
index | ) |
|
|
protectedvirtualslot |
◆ closeRequest [2/2]
void VP1TabWidget::closeRequest |
( |
QWidget * |
| ) |
|
|
signal |
◆ contextMenu [1/3]
void VP1TabWidget::contextMenu |
( |
const QPoint & |
| ) |
|
|
signal |
◆ contextMenu [2/3]
void VP1TabWidget::contextMenu |
( |
int |
index, |
|
|
const QPoint & |
point |
|
) |
| |
|
protectedvirtualslot |
◆ contextMenu [3/3]
void VP1TabWidget::contextMenu |
( |
QWidget * |
, |
|
|
const QPoint & |
|
|
) |
| |
|
signal |
◆ dragEnterEvent()
void VP1TabWidget::dragEnterEvent |
( |
QDragEnterEvent * |
event | ) |
|
|
protectedvirtual |
Definition at line 315 of file VP1TabWidget.cxx.
317 event->setAccepted(
true );
318 QTabWidget::dragEnterEvent(
event );
◆ dragMoveEvent()
void VP1TabWidget::dragMoveEvent |
( |
QDragMoveEvent * |
event | ) |
|
|
protectedvirtual |
Definition at line 321 of file VP1TabWidget.cxx.
329 event->setAccepted(
accept );
333 event->setAccepted(
false );
334 QTabWidget::dragMoveEvent(
event );
◆ dropEvent()
void VP1TabWidget::dropEvent |
( |
QDropEvent * |
event | ) |
|
|
protectedvirtual |
◆ getVP1TabBar()
◆ initiateDrag [1/2]
void VP1TabWidget::initiateDrag |
( |
int |
index | ) |
|
|
protectedvirtualslot |
◆ initiateDrag [2/2]
void VP1TabWidget::initiateDrag |
( |
QWidget * |
| ) |
|
|
signal |
◆ isTabBarHidden()
bool VP1TabWidget::isTabBarHidden |
( |
| ) |
const |
◆ isTabReorderingEnabled()
bool VP1TabWidget::isTabReorderingEnabled |
( |
| ) |
const |
◆ mouseDoubleClick [1/3]
void VP1TabWidget::mouseDoubleClick |
( |
| ) |
|
|
signal |
◆ mouseDoubleClick [2/3]
void VP1TabWidget::mouseDoubleClick |
( |
int |
index | ) |
|
|
protectedvirtualslot |
◆ mouseDoubleClick [3/3]
void VP1TabWidget::mouseDoubleClick |
( |
QWidget * |
| ) |
|
|
signal |
◆ mouseDoubleClickEvent()
void VP1TabWidget::mouseDoubleClickEvent |
( |
QMouseEvent * |
event | ) |
|
|
protectedvirtual |
◆ mouseMiddleClick [1/3]
void VP1TabWidget::mouseMiddleClick |
( |
| ) |
|
|
signal |
◆ mouseMiddleClick [2/3]
void VP1TabWidget::mouseMiddleClick |
( |
int |
index | ) |
|
|
protectedvirtualslot |
◆ mouseMiddleClick [3/3]
void VP1TabWidget::mouseMiddleClick |
( |
QWidget * |
| ) |
|
|
signal |
◆ mousePressEvent()
void VP1TabWidget::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
protectedvirtual |
Definition at line 390 of file VP1TabWidget.cxx.
392 if (
event->button() == Qt::RightButton ) {
397 }
else if (
event->button() == Qt::MiddleButton ) {
404 QTabWidget::mousePressEvent(
event );
◆ movedTab
void VP1TabWidget::movedTab |
( |
int |
, |
|
|
int |
|
|
) |
| |
|
signal |
◆ moveTab
void VP1TabWidget::moveTab |
( |
int |
from, |
|
|
int |
to |
|
) |
| |
|
virtualslot |
Definition at line 432 of file VP1TabWidget.cxx.
434 QString tablabel =
tabText( from );
435 QWidget *
w = widget( from );
437 QIcon tabiconset = tabIcon( from );
438 QString tabtooltip = tabToolTip( from );
439 bool current = ( from == currentIndex() );
440 bool enabled = isTabEnabled( from );
442 bool blocked = blockSignals(
true );
446 insertTab(
to,
w, tablabel );
448 if ( to < 0 || to >=
count() )
454 setTabIcon(
to, tabiconset );
456 setTabToolTip(
to, tabtooltip );
459 setCurrentIndex(
to );
460 setTabEnabled(
to, enabled );
461 blockSignals( blocked );
◆ receivedDropEvent [1/3]
void VP1TabWidget::receivedDropEvent |
( |
int |
index, |
|
|
QDropEvent * |
event |
|
) |
| |
|
protectedvirtualslot |
◆ receivedDropEvent [2/3]
void VP1TabWidget::receivedDropEvent |
( |
QDropEvent * |
| ) |
|
|
signal |
◆ receivedDropEvent [3/3]
void VP1TabWidget::receivedDropEvent |
( |
QWidget * |
, |
|
|
QDropEvent * |
|
|
) |
| |
|
signal |
◆ removePage
void VP1TabWidget::removePage |
( |
QWidget * |
w | ) |
|
|
virtualslot |
Definition at line 466 of file VP1TabWidget.cxx.
468 QTabWidget::removeTab( indexOf( widget ) );
◆ removeTab
void VP1TabWidget::removeTab |
( |
int |
index | ) |
|
|
virtualslot |
◆ resizeEvent()
void VP1TabWidget::resizeEvent |
( |
QResizeEvent * |
event | ) |
|
|
protectedvirtual |
◆ setAutomaticResizeTabs
void VP1TabWidget::setAutomaticResizeTabs |
( |
bool |
enable | ) |
|
|
slot |
◆ setTabBarHidden()
void VP1TabWidget::setTabBarHidden |
( |
bool |
hide | ) |
|
Definition at line 214 of file VP1TabWidget.cxx.
216 QWidget *rightcorner = cornerWidget( Qt::TopRightCorner );
217 QWidget *leftcorner = cornerWidget( Qt::TopLeftCorner );
220 if ( leftcorner ) leftcorner->hide();
221 if ( rightcorner ) rightcorner->hide();
225 if ( leftcorner ) leftcorner->show();
226 if ( rightcorner ) rightcorner->show();
◆ setTabCloseActivatePrevious
void VP1TabWidget::setTabCloseActivatePrevious |
( |
bool |
previous | ) |
|
|
slot |
◆ setTabReorderingEnabled
void VP1TabWidget::setTabReorderingEnabled |
( |
bool |
enable | ) |
|
|
slot |
◆ setTabText()
void VP1TabWidget::setTabText |
( |
int |
index, |
|
|
const QString & |
text |
|
) |
| |
◆ setTabTextColor()
void VP1TabWidget::setTabTextColor |
( |
int |
index, |
|
|
const QColor & |
color |
|
) |
| |
◆ tabBarWidthForMaxChars()
int VP1TabWidget::tabBarWidthForMaxChars |
( |
int |
| ) |
|
|
protected |
Definition at line 265 of file VP1TabWidget.cxx.
268 hframe = tabBar()->style()->pixelMetric( QStyle::PM_TabBarTabHSpace, 0L, tabBar() );
271 QFontMetrics fm = tabBar()->fontMetrics();
273 for (
int i = 0;
i <
count(); ++
i ) {
278 int lw = fm.horizontalAdvance( newTitle );
280 if ( !tabBar()->tabIcon(
i ).isNull() ){
281 iw = tabBar()->tabIcon(
i ).pixmap(
style()->pixelMetric( QStyle::PM_SmallIconSize ), QIcon::Normal ).width() + 4;
283 x += ( tabBar()->style()->sizeFromContents( QStyle::CT_TabBarTab, 0L,
284 QSize( qMax(
lw + hframe + iw, QApplication::globalStrut().
width() ), 0 ),
◆ tabCloseActivatePrevious()
bool VP1TabWidget::tabCloseActivatePrevious |
( |
| ) |
const |
◆ tabInserted()
void VP1TabWidget::tabInserted |
( |
int |
idx | ) |
|
|
protectedvirtual |
◆ tabRemoved()
void VP1TabWidget::tabRemoved |
( |
int |
idx | ) |
|
|
protectedvirtual |
◆ tabText()
QString VP1TabWidget::tabText |
( |
int |
index | ) |
const |
◆ tabTextColor()
QColor VP1TabWidget::tabTextColor |
( |
int |
index | ) |
const |
◆ testCanDecode
void VP1TabWidget::testCanDecode |
( |
const QDragMoveEvent * |
e, |
|
|
bool & |
accept |
|
) |
| |
|
signal |
◆ wheelDelta
void VP1TabWidget::wheelDelta |
( |
int |
delta | ) |
|
|
protectedvirtualslot |
◆ wheelEvent()
void VP1TabWidget::wheelEvent |
( |
QWheelEvent * |
event | ) |
|
|
protectedvirtual |
◆ m_d
◆ automaticResizeTabs
bool VP1TabWidget::automaticResizeTabs |
|
readwrite |
◆ tabCloseActivatePrevious
bool VP1TabWidget::tabCloseActivatePrevious |
|
readwrite |
◆ tabReorderingEnabled
bool VP1TabWidget::tabReorderingEnabled |
|
readwrite |
The documentation for this class was generated from the following files: