Coding conventions
This commit is contained in:
@@ -83,7 +83,8 @@ void TabWidget::addTab( QWidget * w, const QString & name, const char *pixmap, i
|
||||
m_widgets[idx] = d;
|
||||
|
||||
// Position tab's window
|
||||
if(!m_resizable) {
|
||||
if (!m_resizable)
|
||||
{
|
||||
w->setFixedSize( width() - 4, height() - m_tabbarHeight );
|
||||
}
|
||||
w->move( 2, m_tabbarHeight - 1 );
|
||||
@@ -193,9 +194,9 @@ void TabWidget::mousePressEvent( QMouseEvent * me )
|
||||
|
||||
void TabWidget::resizeEvent( QResizeEvent * )
|
||||
{
|
||||
if(!m_resizable)
|
||||
if (!m_resizable)
|
||||
{
|
||||
for( widgetStack::iterator it = m_widgets.begin();
|
||||
for ( widgetStack::iterator it = m_widgets.begin();
|
||||
it != m_widgets.end(); ++it )
|
||||
{
|
||||
( *it ).w->setFixedSize( width() - 4, height() - m_tabbarHeight );
|
||||
@@ -312,10 +313,10 @@ void TabWidget::wheelEvent( QWheelEvent * we )
|
||||
// Let parent widgets know how much space this tab widget needs
|
||||
QSize TabWidget::minimumSizeHint() const
|
||||
{
|
||||
if(m_resizable)
|
||||
if (m_resizable)
|
||||
{
|
||||
int maxWidth = 0, maxHeight = 0;
|
||||
for( widgetStack::const_iterator it = m_widgets.begin();
|
||||
for ( widgetStack::const_iterator it = m_widgets.begin();
|
||||
it != m_widgets.end(); ++it )
|
||||
{
|
||||
maxWidth = std::max(maxWidth, it->w->width());
|
||||
@@ -326,9 +327,7 @@ QSize TabWidget::minimumSizeHint() const
|
||||
// moved up by 1 pixel
|
||||
return QSize(maxWidth + 4, maxHeight + m_tabbarHeight - 1);
|
||||
}
|
||||
else {
|
||||
return QWidget::minimumSizeHint();
|
||||
}
|
||||
else { return QWidget::minimumSizeHint(); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user