Definition at line 48 of file VP1TabWidget.cxx.
◆ Private()
◆ isEmptyTabbarSpace()
| bool VP1TabWidget::Private::isEmptyTabbarSpace |
( |
const QPoint & | point | ) |
const |
Definition at line 79 of file VP1TabWidget.cxx.
80{
81 QSize size(
m_parent->tabBar()->sizeHint() );
82 if ( (
m_parent->tabPosition() == QTabWidget::North && point.y() < size.height() ) ||
83 (
m_parent->tabPosition() == QTabWidget::South && point.y() > (
m_parent->height() - size.height() ) ) ) {
84
85 QWidget *rightcorner =
m_parent->cornerWidget( Qt::TopRightCorner );
86 if ( rightcorner ) {
87 if ( point.x() >=
m_parent->width()-rightcorner->width() )
88 return false;
89 }
90
91 QWidget *leftcorner =
m_parent->cornerWidget( Qt::TopLeftCorner );
92 if ( leftcorner ) {
93 if ( point.x() <= leftcorner->width() )
94 return false;
95 }
96
98 if (
m_parent->tabBar()->tabRect( i ).contains(
m_parent->tabBar()->mapFromParent( point ) ) )
99 return false;
100
101 return true;
102 }
103
104 return false;
105}
◆ resizeTabs()
| void VP1TabWidget::Private::resizeTabs |
( |
int | changedTabIndex = -1 | ) |
|
Definition at line 107 of file VP1TabWidget.cxx.
108{
109 int newMaxLength;
111
113 int lcw = 0, rcw = 0;
114
115 int tabBarHeight =
m_parent->tabBar()->sizeHint().height();
116 if (
m_parent->cornerWidget( Qt::TopLeftCorner ) &&
m_parent->cornerWidget( Qt::TopLeftCorner )->isVisible() )
117 lcw = qMax(
m_parent->cornerWidget( Qt::TopLeftCorner )->width(), tabBarHeight );
118
119 if (
m_parent->cornerWidget( Qt::TopRightCorner ) &&
m_parent->cornerWidget( Qt::TopRightCorner )->isVisible() )
120 rcw = qMax(
m_parent->cornerWidget( Qt::TopRightCorner )->width(), tabBarHeight );
121
122 int maxTabBarWidth =
m_parent->width() - lcw - rcw;
123
124 for ( ; newMaxLength >
m_minLength; newMaxLength-- ) {
125 if (
m_parent->tabBarWidthForMaxChars( newMaxLength ) < maxTabBarWidth )
126 break;
127 }
128 } else
129 newMaxLength = 4711;
130
131
136 } else if ( changeTabIndex != -1 )
138}
◆ updateTab()
| void VP1TabWidget::Private::updateTab |
( |
int | index | ) |
|
Definition at line 140 of file VP1TabWidget.cxx.
141{
143 m_parent->setTabToolTip( index, QString() );
144
146 if ( Qt::mightBeRichText( title ) )
147
148 m_parent->setTabToolTip( index, QString(title).toHtmlEscaped() );
149 else
150 m_parent->setTabToolTip( index, title );
151 }
152
153
154
155 title.replace(
'&',
"&&" );
156
157 if (
m_parent->QTabWidget::tabText( index ) != title )
158 m_parent->QTabWidget::setTabText( index, title );
159}
◆ m_automaticResizeTabs
| bool VP1TabWidget::Private::m_automaticResizeTabs |
◆ m_currentMaxLength
| int VP1TabWidget::Private::m_currentMaxLength |
◆ m_maxLength
| int VP1TabWidget::Private::m_maxLength |
◆ m_minLength
| int VP1TabWidget::Private::m_minLength |
◆ m_parent
◆ m_tabNames
| QStringList VP1TabWidget::Private::m_tabNames |
The documentation for this class was generated from the following file: