|
|
|
@ -448,8 +448,8 @@ void K3bListViewItem::paintProgressBar( TQPainter* p, const TQColorGroup& cgh, i
|
|
|
|
|
// some styles use the widget's tqgeometry
|
|
|
|
|
s_dummyProgressBar->setGeometry( r );
|
|
|
|
|
|
|
|
|
|
listView()->tqstyle().tqdrawControl(TQStyle::CE_ProgressBarContents, &dbPainter, s_dummyProgressBar, r, cgh, flags );
|
|
|
|
|
listView()->tqstyle().tqdrawControl(TQStyle::CE_ProgressBarLabel, &dbPainter, s_dummyProgressBar, r, cgh, flags );
|
|
|
|
|
listView()->tqstyle().drawControl(TQStyle::CE_ProgressBarContents, &dbPainter, s_dummyProgressBar, r, cgh, flags );
|
|
|
|
|
listView()->tqstyle().drawControl(TQStyle::CE_ProgressBarLabel, &dbPainter, s_dummyProgressBar, r, cgh, flags );
|
|
|
|
|
|
|
|
|
|
// now we really paint the progress in the listview
|
|
|
|
|
p->drawPixmap( 0, 0, *doubleBuffer );
|
|
|
|
@ -508,7 +508,7 @@ void K3bCheckListViewItem::paintK3bCell( TQPainter* p, const TQColorGroup& cg, i
|
|
|
|
|
|
|
|
|
|
if( col == 0 ) {
|
|
|
|
|
if( m_checked ) {
|
|
|
|
|
TQRect r( 0, marginVertical(), width, /*listView()->tqstyle().tqpixelMetric( TQStyle::PM_CheckListButtonSize )*/height()-2*marginVertical() );
|
|
|
|
|
TQRect r( 0, marginVertical(), width, /*listView()->tqstyle().pixelMetric( TQStyle::PM_CheckListButtonSize )*/height()-2*marginVertical() );
|
|
|
|
|
|
|
|
|
|
TQStyle::SFlags flags = TQStyle::Style_Default;
|
|
|
|
|
if( listView()->isEnabled() )
|
|
|
|
@ -666,7 +666,7 @@ void K3bListView::showEditor( K3bListViewItem* item, int col )
|
|
|
|
|
void K3bListView::placeEditor( K3bListViewItem* item, int col )
|
|
|
|
|
{
|
|
|
|
|
ensureItemVisible( item );
|
|
|
|
|
TQRect r = tqitemRect( item );
|
|
|
|
|
TQRect r = itemRect( item );
|
|
|
|
|
|
|
|
|
|
r.setX( contentsToViewport( TQPoint(header()->sectionPos( col ), 0) ).x() );
|
|
|
|
|
r.setWidth( header()->sectionSize( col ) - 1 );
|
|
|
|
@ -699,7 +699,7 @@ void K3bListView::placeEditor( K3bListViewItem* item, int col )
|
|
|
|
|
|
|
|
|
|
if( TQWidget* editor = prepareEditor( item, col ) ) {
|
|
|
|
|
editor->resize( r.size() );
|
|
|
|
|
// editor->resize( TQSize( r.width(), editor->tqminimumSizeHint().height() ) );
|
|
|
|
|
// editor->resize( TQSize( r.width(), editor->minimumSizeHint().height() ) );
|
|
|
|
|
moveChild( editor, r.x(), r.y() );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1143,7 +1143,7 @@ bool K3bListView::eventFilter( TQObject* o, TQEvent* e )
|
|
|
|
|
TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->spinBoxLineEdit) ||
|
|
|
|
|
TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editorComboBox) ) {
|
|
|
|
|
// make sure we did not lose the focus to one of the edit widgets' tqchildren
|
|
|
|
|
if( !tqApp->tqfocusWidget() || TQT_BASE_OBJECT(tqApp->tqfocusWidget()->parentWidget()) != TQT_BASE_OBJECT(o) ) {
|
|
|
|
|
if( !tqApp->focusWidget() || TQT_BASE_OBJECT(tqApp->focusWidget()->parentWidget()) != TQT_BASE_OBJECT(o) ) {
|
|
|
|
|
doRename();
|
|
|
|
|
hideEditor();
|
|
|
|
|
}
|
|
|
|
@ -1170,7 +1170,7 @@ void K3bListView::viewportResizeEvent( TQResizeEvent* e )
|
|
|
|
|
TQPixmap bgPix( size );
|
|
|
|
|
|
|
|
|
|
// FIXME: let the user specify the color
|
|
|
|
|
bgPix.fill( tqcolorGroup().base() );
|
|
|
|
|
bgPix.fill( colorGroup().base() );
|
|
|
|
|
|
|
|
|
|
if( bgPix.width() < m_backgroundPixmap.width() ||
|
|
|
|
|
bgPix.height() < m_backgroundPixmap.height() ) {
|
|
|
|
@ -1227,7 +1227,7 @@ KPixmap K3bListView::createDragPixmap( const TQPtrList<TQListViewItem>& items )
|
|
|
|
|
int width = header()->width();
|
|
|
|
|
int height = 0;
|
|
|
|
|
for( TQPtrListIterator<TQListViewItem> it( items ); *it; ++it ) {
|
|
|
|
|
TQRect r = tqitemRect( *it );
|
|
|
|
|
TQRect r = itemRect( *it );
|
|
|
|
|
|
|
|
|
|
if( r.isValid() ) {
|
|
|
|
|
height += ( *it )->height();
|
|
|
|
@ -1256,13 +1256,13 @@ KPixmap K3bListView::createDragPixmap( const TQPtrList<TQListViewItem>& items )
|
|
|
|
|
// FIXME: items on other than the top level have a smaller first column
|
|
|
|
|
// the same goes for all items if root is decorated
|
|
|
|
|
bool alreadyDrawing = false;
|
|
|
|
|
TQRect r = tqitemRect( item );
|
|
|
|
|
TQRect r = itemRect( item );
|
|
|
|
|
if( r.isValid() ) {
|
|
|
|
|
if( items.containsRef( item ) ) {
|
|
|
|
|
// paint all columns
|
|
|
|
|
int x = 0;
|
|
|
|
|
for( int i = 0; i < columns(); ++i ) {
|
|
|
|
|
item->paintCell( &p, tqcolorGroup(), i, columnWidth( i ), columnAlignment( i ) );
|
|
|
|
|
item->paintCell( &p, colorGroup(), i, columnWidth( i ), columnAlignment( i ) );
|
|
|
|
|
p.translate( columnWidth( i ), 0 );
|
|
|
|
|
x += columnWidth( i );
|
|
|
|
|
}
|
|
|
|
@ -1274,7 +1274,7 @@ KPixmap K3bListView::createDragPixmap( const TQPtrList<TQListViewItem>& items )
|
|
|
|
|
else if( alreadyDrawing )
|
|
|
|
|
p.translate( 0, item->height() );
|
|
|
|
|
|
|
|
|
|
if( p.tqworldMatrix().dy() >= pix.height() )
|
|
|
|
|
if( p.worldMatrix().dy() >= pix.height() )
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|