Rename KIcon to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 7a5d9e94f1
commit 2ed05c014f

@ -89,13 +89,13 @@ void Smb4KNetworkBrowserItem::setIcon()
{ {
if ( m_mounted ) if ( m_mounted )
{ {
m_desktop_icon = DesktopIcon( "folder_open", 0, KIcon::ActiveState ); m_desktop_icon = DesktopIcon( "folder_open", 0, TDEIcon::ActiveState );
setPixmap( 0, SmallIcon( "folder_open", 0, KIcon::ActiveState ) ); setPixmap( 0, SmallIcon( "folder_open", 0, TDEIcon::ActiveState ) );
} }
else else
{ {
m_desktop_icon = DesktopIcon( "folder", 0, KIcon::DefaultState ); m_desktop_icon = DesktopIcon( "folder", 0, TDEIcon::DefaultState );
setPixmap( 0, SmallIcon( "folder", 0, KIcon::DefaultState ) ); setPixmap( 0, SmallIcon( "folder", 0, TDEIcon::DefaultState ) );
} }
} }
break; break;

@ -94,10 +94,10 @@ void Smb4KPreviewDialog::setupView()
TQFrame *frame = plainPage(); TQFrame *frame = plainPage();
TQGridLayout *layout = new TQGridLayout( frame ); TQGridLayout *layout = new TQGridLayout( frame );
m_view = new KIconView( frame, 0, 0 ); m_view = new TDEIconView( frame, 0, 0 );
m_view->setItemTextPos( KIconView::Right ); m_view->setItemTextPos( TDEIconView::Right );
m_view->setResizeMode( KIconView::Adjust ); m_view->setResizeMode( TDEIconView::Adjust );
m_view->setArrangement( KIconView::TopToBottom ); m_view->setArrangement( TDEIconView::TopToBottom );
m_view->setSpacing( 1 ); m_view->setSpacing( 1 );
m_view->setGridX( 200 ); m_view->setGridX( 200 );
m_view->setWordWrapIconText( false ); m_view->setWordWrapIconText( false );
@ -188,7 +188,7 @@ void Smb4KPreviewDialog::slotReceivedData( Smb4KPreviewItem *item )
{ {
case Smb4KPreviewItem::File: case Smb4KPreviewItem::File:
{ {
KIconViewItem *view_item = new KIconViewItem( m_view, (*it).second, SmallIcon( "file" ) ); TDEIconViewItem *view_item = new TDEIconViewItem( m_view, (*it).second, SmallIcon( "file" ) );
view_item->setKey( TQString( "[file]_%1" ).arg( (*it).second ) ); view_item->setKey( TQString( "[file]_%1" ).arg( (*it).second ) );
break; break;
@ -198,7 +198,7 @@ void Smb4KPreviewDialog::slotReceivedData( Smb4KPreviewItem *item )
// We do not want to show the '.' and '..' directories. // We do not want to show the '.' and '..' directories.
if ( TQString::compare( (*it).second, "." ) != 0 && TQString::compare( (*it).second, ".." ) != 0 ) if ( TQString::compare( (*it).second, "." ) != 0 && TQString::compare( (*it).second, ".." ) != 0 )
{ {
KIconViewItem *view_item = new KIconViewItem( m_view, (*it).second, SmallIcon( "folder" ) ); TDEIconViewItem *view_item = new TDEIconViewItem( m_view, (*it).second, SmallIcon( "folder" ) );
view_item->setKey( TQString( "[directory]_%1" ).arg( (*it).second ) ); view_item->setKey( TQString( "[directory]_%1" ).arg( (*it).second ) );
} }
@ -208,7 +208,7 @@ void Smb4KPreviewDialog::slotReceivedData( Smb4KPreviewItem *item )
{ {
if ( Smb4KSettings::previewHiddenItems() ) if ( Smb4KSettings::previewHiddenItems() )
{ {
KIconViewItem *view_item = new KIconViewItem( m_view, (*it).second, SmallIcon( "file" ) ); TDEIconViewItem *view_item = new TDEIconViewItem( m_view, (*it).second, SmallIcon( "file" ) );
view_item->setKey( TQString( "[file]_%1" ).arg( (*it).second ) ); view_item->setKey( TQString( "[file]_%1" ).arg( (*it).second ) );
} }
@ -219,7 +219,7 @@ void Smb4KPreviewDialog::slotReceivedData( Smb4KPreviewItem *item )
if ( Smb4KSettings::previewHiddenItems() && if ( Smb4KSettings::previewHiddenItems() &&
TQString::compare( (*it).second, "." ) != 0 && TQString::compare( (*it).second, ".." ) != 0 ) TQString::compare( (*it).second, "." ) != 0 && TQString::compare( (*it).second, ".." ) != 0 )
{ {
KIconViewItem *view_item = new KIconViewItem( m_view, (*it).second, SmallIcon( "folder" ) ); TDEIconViewItem *view_item = new TDEIconViewItem( m_view, (*it).second, SmallIcon( "folder" ) );
view_item->setKey( TQString( "[directory]_%1" ).arg( (*it).second ) ); view_item->setKey( TQString( "[directory]_%1" ).arg( (*it).second ) );
} }

@ -132,7 +132,7 @@ class Smb4KPreviewDialog : public KDialogBase
/** /**
* The icon view. * The icon view.
*/ */
KIconView *m_view; TDEIconView *m_view;
/** /**
* The toolbar. * The toolbar.

@ -39,17 +39,17 @@
Smb4KSharesIconView::Smb4KSharesIconView( TQWidget *parent, const char *name ) Smb4KSharesIconView::Smb4KSharesIconView( TQWidget *parent, const char *name )
: KIconView( parent, name ) : TDEIconView( parent, name )
{ {
setSelectionMode( KIconView::Single ); // If this is changed, revise dragObject() function. setSelectionMode( TDEIconView::Single ); // If this is changed, revise dragObject() function.
setResizeMode( KIconView::Adjust ); setResizeMode( TDEIconView::Adjust );
setAutoArrange( true ); setAutoArrange( true );
setSorting( true, true ); setSorting( true, true );
setItemsMovable( false ); setItemsMovable( false );
setAcceptDrops( true ); setAcceptDrops( true );
setItemTextPos( KIconView::Bottom ); setItemTextPos( TDEIconView::Bottom );
setMaxItemWidth( 150 ); setMaxItemWidth( 150 );
setArrangement( KIconView::LeftToRight ); setArrangement( TDEIconView::LeftToRight );
setWordWrapIconText( true ); setWordWrapIconText( true );
m_tooltip = NULL; m_tooltip = NULL;
@ -108,7 +108,7 @@ void Smb4KSharesIconView::startDrag()
return; return;
} }
KIconView::startDrag(); TDEIconView::startDrag();
} }
@ -224,7 +224,7 @@ void Smb4KSharesIconView::contentsMouseMoveEvent( TQMouseEvent *e )
} }
} }
KIconView::contentsMouseMoveEvent( e ); TDEIconView::contentsMouseMoveEvent( e );
} }

@ -48,7 +48,7 @@ class Smb4KSharesIconViewToolTip;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de> * @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/ */
class Smb4KSharesIconView : public KIconView class Smb4KSharesIconView : public TDEIconView
{ {
Q_OBJECT Q_OBJECT
@ -112,7 +112,7 @@ class Smb4KSharesIconView : public KIconView
protected slots: protected slots:
/** /**
* This slot is connected to KIconView::pressed() and clears the selection * This slot is connected to TDEIconView::pressed() and clears the selection
* if the user clicked on the viewport. * if the user clicked on the viewport.
* *
* @param item The TQIconViewItem that the user clicked or NULL * @param item The TQIconViewItem that the user clicked or NULL

@ -193,7 +193,7 @@ void Smb4KSharesIconViewPart::customEvent( TQCustomEvent *e )
} }
case EVENT_SET_FOCUS: case EVENT_SET_FOCUS:
{ {
KIconView *view = static_cast<KIconView *>( m_widget ); TDEIconView *view = static_cast<TDEIconView *>( m_widget );
if ( view->count() != 0 ) if ( view->count() != 0 )
{ {

@ -36,13 +36,13 @@
Smb4KSharesIconViewItem::Smb4KSharesIconViewItem( Smb4KShare *share, bool mountpoint, Smb4KSharesIconViewItem::Smb4KSharesIconViewItem( Smb4KShare *share, bool mountpoint,
Smb4KSharesIconView *parent ) Smb4KSharesIconView *parent )
: KIconViewItem( parent, TQString() ), m_share( *share ), m_mountpoint( mountpoint ), : TDEIconViewItem( parent, TQString() ), m_share( *share ), m_mountpoint( mountpoint ),
m_initial_setup( false ) m_initial_setup( false )
{ {
setDropEnabled( true ); setDropEnabled( true );
setDragEnabled( true ); setDragEnabled( true );
m_loader = new KIconLoader(); m_loader = new TDEIconLoader();
setupItem( m_share, m_mountpoint ); setupItem( m_share, m_mountpoint );
} }
@ -88,16 +88,16 @@ void Smb4KSharesIconViewItem::setupItem( const Smb4KShare &share, bool mountpoin
{ {
if ( !m_initial_setup || m_share.isBroken() != share.isBroken() ) if ( !m_initial_setup || m_share.isBroken() != share.isBroken() )
{ {
int icon_state = m_share.isForeign() ? KIcon::DisabledState : KIcon::DefaultState; int icon_state = m_share.isForeign() ? TDEIcon::DisabledState : TDEIcon::DefaultState;
if ( m_share.isBroken() ) if ( m_share.isBroken() )
{ {
TQImage over = m_loader->loadIcon( "button_cancel", KIcon::Desktop, TQImage over = m_loader->loadIcon( "button_cancel", TDEIcon::Desktop,
0, icon_state, 0L, false ).convertToImage(); 0, icon_state, 0L, false ).convertToImage();
TQImage src = m_loader->loadIcon( "hdd_mount", KIcon::Desktop, TQImage src = m_loader->loadIcon( "hdd_mount", TDEIcon::Desktop,
0, icon_state, 0L, false ).convertToImage(); 0, icon_state, 0L, false ).convertToImage();
KIconEffect e; TDEIconEffect e;
e.semiTransparent( over ); e.semiTransparent( over );
e.overlay( src, over ); e.overlay( src, over );
@ -105,7 +105,7 @@ void Smb4KSharesIconViewItem::setupItem( const Smb4KShare &share, bool mountpoin
} }
else else
{ {
m_pixmap = m_loader->loadIcon( "hdd_mount", KIcon::Desktop, m_pixmap = m_loader->loadIcon( "hdd_mount", TDEIcon::Desktop,
0, icon_state, 0L, false ); 0, icon_state, 0L, false );
} }

@ -51,7 +51,7 @@ class Smb4KSharesIconView;
* @author Alexander Reinholdt <dustpuppy@users.berlios.de> * @author Alexander Reinholdt <dustpuppy@users.berlios.de>
*/ */
class Smb4KSharesIconViewItem : public KIconViewItem class Smb4KSharesIconViewItem : public TDEIconViewItem
{ {
public: public:
/** /**
@ -161,7 +161,7 @@ class Smb4KSharesIconViewItem : public KIconViewItem
/** /**
* The icon loader for this item. * The icon loader for this item.
*/ */
KIconLoader *m_loader; TDEIconLoader *m_loader;
/** /**
* The desktop pixmap * The desktop pixmap

@ -44,7 +44,7 @@ Smb4KSharesListViewItem::Smb4KSharesListViewItem( Smb4KShare *share, bool mountp
setDropEnabled( true ); setDropEnabled( true );
setDragEnabled( true ); setDragEnabled( true );
m_loader = new KIconLoader(); m_loader = new TDEIconLoader();
setupItem( m_share, m_mountpoint ); setupItem( m_share, m_mountpoint );
} }
@ -67,21 +67,21 @@ void Smb4KSharesListViewItem::setupItem( const Smb4KShare &share, bool mountpoin
{ {
TQPixmap pix; TQPixmap pix;
int icon_state = m_share.isForeign() ? KIcon::DisabledState : KIcon::DefaultState; int icon_state = m_share.isForeign() ? TDEIcon::DisabledState : TDEIcon::DefaultState;
if ( m_share.isBroken() ) if ( m_share.isBroken() )
{ {
TQImage over = m_loader->loadIcon( "button_cancel", KIcon::Small, TQImage over = m_loader->loadIcon( "button_cancel", TDEIcon::Small,
0, icon_state, 0L, false ).convertToImage(); 0, icon_state, 0L, false ).convertToImage();
TQImage src = m_loader->loadIcon( "hdd_mount", KIcon::Small, TQImage src = m_loader->loadIcon( "hdd_mount", TDEIcon::Small,
0, icon_state, 0L, false ).convertToImage(); 0, icon_state, 0L, false ).convertToImage();
TQImage over_desk = m_loader->loadIcon( "button_cancel", KIcon::Desktop, TQImage over_desk = m_loader->loadIcon( "button_cancel", TDEIcon::Desktop,
0, icon_state, 0L, false ).convertToImage(); 0, icon_state, 0L, false ).convertToImage();
TQImage src_desk = m_loader->loadIcon( "hdd_mount", KIcon::Desktop, TQImage src_desk = m_loader->loadIcon( "hdd_mount", TDEIcon::Desktop,
0, icon_state, 0L, false ).convertToImage(); 0, icon_state, 0L, false ).convertToImage();
KIconEffect e; TDEIconEffect e;
e.semiTransparent( over ); e.semiTransparent( over );
e.overlay( src, over ); e.overlay( src, over );
e.semiTransparent( over_desk ); e.semiTransparent( over_desk );
@ -92,10 +92,10 @@ void Smb4KSharesListViewItem::setupItem( const Smb4KShare &share, bool mountpoin
} }
else else
{ {
pix = m_loader->loadIcon( "hdd_mount", KIcon::Small, pix = m_loader->loadIcon( "hdd_mount", TDEIcon::Small,
0, icon_state, 0L, false ); 0, icon_state, 0L, false );
m_desktop_pixmap = m_loader->loadIcon( "hdd_mount", KIcon::Desktop, m_desktop_pixmap = m_loader->loadIcon( "hdd_mount", TDEIcon::Desktop,
0, icon_state, 0L, false ); 0, icon_state, 0L, false );
} }

@ -192,7 +192,7 @@ class Smb4KSharesListViewItem : public TDEListViewItem
/** /**
* The icon loader for this item. * The icon loader for this item.
*/ */
KIconLoader *m_loader; TDEIconLoader *m_loader;
/** /**
* The desktop pixmap * The desktop pixmap

@ -94,7 +94,7 @@ void Smb4KSearchDialogItem::setIcon()
{ {
if ( m_is_known ) if ( m_is_known )
{ {
KIconEffect e; TDEIconEffect e;
TQImage over = SmallIcon( "button_ok" ).convertToImage(); TQImage over = SmallIcon( "button_ok" ).convertToImage();
TQImage src = SmallIcon( "server" ).convertToImage(); TQImage src = SmallIcon( "server" ).convertToImage();
e.semiTransparent( over ); e.semiTransparent( over );

@ -755,18 +755,18 @@ void Smb4KSystemTray::slotSetupSharesMenu()
// Create a new TDEAction menu: // Create a new TDEAction menu:
TQIconSet set; TQIconSet set;
TQPixmap pix; TQPixmap pix;
KIconLoader loader; TDEIconLoader loader;
int icon_state = (*it)->isForeign() ? KIcon::DisabledState : KIcon::DefaultState; int icon_state = (*it)->isForeign() ? TDEIcon::DisabledState : TDEIcon::DefaultState;
if ( (*it)->isBroken() ) if ( (*it)->isBroken() )
{ {
TQImage over = loader.loadIcon( "button_cancel", KIcon::Small, TQImage over = loader.loadIcon( "button_cancel", TDEIcon::Small,
0, icon_state, 0L, false ).convertToImage(); 0, icon_state, 0L, false ).convertToImage();
TQImage src = loader.loadIcon( "hdd_mount", KIcon::Small, TQImage src = loader.loadIcon( "hdd_mount", TDEIcon::Small,
0, icon_state, 0L, false ).convertToImage(); 0, icon_state, 0L, false ).convertToImage();
KIconEffect e; TDEIconEffect e;
e.semiTransparent( over ); e.semiTransparent( over );
e.overlay( src, over ); e.overlay( src, over );
@ -774,7 +774,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
} }
else else
{ {
pix = loader.loadIcon( "hdd_mount", KIcon::Small, pix = loader.loadIcon( "hdd_mount", TDEIcon::Small,
0, icon_state, 0L, false ); 0, icon_state, 0L, false );
} }
@ -845,16 +845,16 @@ void Smb4KSystemTray::slotSetupSharesMenu()
{ {
TQIconSet set; TQIconSet set;
TQPixmap pix; TQPixmap pix;
KIconLoader loader; TDEIconLoader loader;
int icon_state = (*it)->isForeign() ? KIcon::DisabledState : KIcon::DefaultState; int icon_state = (*it)->isForeign() ? TDEIcon::DisabledState : TDEIcon::DefaultState;
TQImage over = loader.loadIcon( "button_cancel", KIcon::Small, TQImage over = loader.loadIcon( "button_cancel", TDEIcon::Small,
0, icon_state, 0L, false ).convertToImage(); 0, icon_state, 0L, false ).convertToImage();
TQImage src = loader.loadIcon( "hdd_mount", KIcon::Small, TQImage src = loader.loadIcon( "hdd_mount", TDEIcon::Small,
0, icon_state, 0L, false ).convertToImage(); 0, icon_state, 0L, false ).convertToImage();
KIconEffect e; TDEIconEffect e;
e.semiTransparent( over ); e.semiTransparent( over );
e.overlay( src, over ); e.overlay( src, over );

Loading…
Cancel
Save