diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
commit | e69e8b1d09fb579316595b4e6a850e717358a8b1 (patch) | |
tree | a24fc20865f65772f530d16177520190594ffdd2 /kghostview/marklist.cpp | |
parent | eecec9afb81fdebb0f22e9da22635874c403f854 (diff) | |
download | tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip |
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kghostview/marklist.cpp')
-rw-r--r-- | kghostview/marklist.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/kghostview/marklist.cpp b/kghostview/marklist.cpp index df06bd9d..50aa4cbc 100644 --- a/kghostview/marklist.cpp +++ b/kghostview/marklist.cpp @@ -32,8 +32,8 @@ #include "kgv_miniwidget.h" -MarkListItem::MarkListItem(TQWidget *parent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget* miniW, int pageNum) - : TQWidget( parent ), +MarkListItem::MarkListItem(TQWidget *tqparent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget* miniW, int pageNum) + : TQWidget( tqparent ), _miniWidget( miniW ), _pageNum( pageNum ), _requested( false ) @@ -43,7 +43,7 @@ MarkListItem::MarkListItem(TQWidget *parent, const TQString &text, const TQStrin _thumbnailW = new TQWidget( this ); _checkBox = new TQCheckBox( text, this ); l->addWidget( _thumbnailW, 1 ); - l->addWidget( _checkBox, 0, Qt::AlignHCenter ); + l->addWidget( _checkBox, 0, TQt::AlignHCenter ); TQWhatsThis::add( _checkBox, i18n( "Using this checkbox you can select pages for printing." ) ); setFixedHeight( 100 ); _backgroundColor = color; @@ -72,22 +72,27 @@ void MarkListItem::setPixmap( TQPixmap thumbnail ) // The line below is needed to work around certain "features" of styles such as liquid // see bug:61711 for more info (LPC, 20 Aug '03) _thumbnailW->setBackgroundOrigin( TQWidget::WidgetOrigin ); - _thumbnailW->setPaletteBackgroundPixmap( thumbnail.convertToImage().smoothScale( _thumbnailW->size() ) ); + TQPixmap pm; + pm.convertFromImage( thumbnail.convertToImage().smoothScale( _thumbnailW->size() ) ); + _thumbnailW->setPaletteBackgroundPixmap( pm ); _requested = false; } void MarkListItem::setSelected( bool selected ) { if (selected) - setPaletteBackgroundColor( TQApplication::palette().active().highlight() ); + setPaletteBackgroundColor( TQApplication::tqpalette().active().highlight() ); else setPaletteBackgroundColor( _backgroundColor ); } void MarkListItem::resizeEvent( TQResizeEvent * ) { - if ( _thumbnailW->paletteBackgroundPixmap() ) - _thumbnailW->setPaletteBackgroundPixmap( _thumbnailW->paletteBackgroundPixmap()->convertToImage().smoothScale( _thumbnailW->size() ) ); + if ( _thumbnailW->paletteBackgroundPixmap() ) { + TQPixmap pm; + pm.convertFromImage( _thumbnailW->paletteBackgroundPixmap()->convertToImage().smoothScale( _thumbnailW->size() ) ); + _thumbnailW->setPaletteBackgroundPixmap( pm ); + } } void MarkListItem::paintEvent( TQPaintEvent* ) @@ -100,7 +105,7 @@ void MarkListItem::paintEvent( TQPaintEvent* ) */ if ( _requested ) return; if ( !_thumbnailW->paletteBackgroundPixmap() || _thumbnailW->paletteBackgroundPixmap()->isNull() ) { - _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, this, TQT_SLOT( setPixmap( TQPixmap ) ) ); + _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, TQT_TQOBJECT(this), TQT_SLOT( setPixmap( TQPixmap ) ) ); _requested = true; } } @@ -108,8 +113,8 @@ void MarkListItem::paintEvent( TQPaintEvent* ) /* MarkList */ -MarkList::MarkList( TQWidget* parent, const char* name, KGVMiniWidget* mini) - : TQTable( parent, name ), +MarkList::MarkList( TQWidget* tqparent, const char* name, KGVMiniWidget* mini) + : TQTable( tqparent, name ), _selected ( -1 ), _miniWidget( mini ) { |