Commit df4889d9 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: reindent

parent 3834b98e
......@@ -454,45 +454,45 @@ void StandardPLPanel::browseInto( input_item_t *p_input )
LocationBar::LocationBar( PLModel *m )
{
model = m;
mapper = new QSignalMapper( this );
CONNECT( mapper, mapped( int ), this, invoke( int ) );
model = m;
mapper = new QSignalMapper( this );
CONNECT( mapper, mapped( int ), this, invoke( int ) );
}
void LocationBar::setIndex( const QModelIndex &index )
{
clear();
QAction *prev = NULL;
QModelIndex i = index;
QFont font;
QFontMetrics metrics( font );
font.setBold( true );
while( true )
{
PLItem *item = model->getItem( i );
QToolButton *btn = new QToolButton;
char *fb_name = input_item_GetTitleFbName( item->inputItem() );
QString text = qfu(fb_name);
free(fb_name);
text = QString("/ ") + metrics.elidedText( text, Qt::ElideRight, 150 );
btn->setText( text );
btn->setFont( font );
prev = insertWidget( prev, btn );
mapper->setMapping( btn, item->id() );
CONNECT( btn, clicked( ), mapper, map( ) );
font = QFont();
if( i.isValid() ) i = i.parent();
else break;
}
clear();
QAction *prev = NULL;
QModelIndex i = index;
QFont font;
QFontMetrics metrics( font );
font.setBold( true );
while( true )
{
PLItem *item = model->getItem( i );
QToolButton *btn = new QToolButton;
char *fb_name = input_item_GetTitleFbName( item->inputItem() );
QString text = qfu(fb_name);
free(fb_name);
text = QString("/ ") + metrics.elidedText( text, Qt::ElideRight, 150 );
btn->setText( text );
btn->setFont( font );
prev = insertWidget( prev, btn );
mapper->setMapping( btn, item->id() );
CONNECT( btn, clicked( ), mapper, map( ) );
font = QFont();
if( i.isValid() ) i = i.parent();
else break;
}
}
void LocationBar::invoke( int i_id )
{
QModelIndex index = model->index( i_id, 0 );
setIndex( index );
emit invoked ( index );
QModelIndex index = model->index( i_id, 0 );
setIndex( index );
emit invoked ( index );
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment