Rename KIcon to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 53a028a0f6
commit fc02f656b0

@ -95,7 +95,7 @@ Module::Module(const Arts::ModuleInfo& minfo, Arts::StructureDesc structuredesc,
void Module::initModule() void Module::initModule()
{ {
TQString iconname; TQString iconname;
KIconLoader iconloader; TDEIconLoader iconloader;
_selected = false; _selected = false;
_visible = false; _visible = false;
@ -107,12 +107,12 @@ void Module::initModule()
iconname = _name + ".xpm"; iconname = _name + ".xpm";
_pixmap = new TQPixmap(iconloader.loadIcon(iconname, KIcon::User)); _pixmap = new TQPixmap(iconloader.loadIcon(iconname, TDEIcon::User));
if(!_pixmap->height()) if(!_pixmap->height())
{ {
iconname = _name + ".png"; iconname = _name + ".png";
delete _pixmap; delete _pixmap;
_pixmap = new TQPixmap( iconloader.loadIcon( iconname, KIcon::User ) ); _pixmap = new TQPixmap( iconloader.loadIcon( iconname, TDEIcon::User ) );
if( !_pixmap->height() ) if( !_pixmap->height() )
{ {
delete _pixmap; delete _pixmap;
@ -125,12 +125,12 @@ void Module::initModule()
{ {
iconname = iconname.mid(6); iconname = iconname.mid(6);
_pixmap = new TQPixmap(iconloader.loadIcon(iconname, KIcon::User)); _pixmap = new TQPixmap(iconloader.loadIcon(iconname, TDEIcon::User));
if(!_pixmap->height()) if(!_pixmap->height())
{ {
iconname.replace( iconname.length() - 4, 3, "png" ); iconname.replace( iconname.length() - 4, 3, "png" );
delete _pixmap; delete _pixmap;
_pixmap = new TQPixmap(iconloader.loadIcon(iconname, KIcon::User)); _pixmap = new TQPixmap(iconloader.loadIcon(iconname, TDEIcon::User));
if( !_pixmap->height() ) if( !_pixmap->height() )
{ {
delete _pixmap; delete _pixmap;

@ -114,13 +114,13 @@ PortPosDlg::PortPosDlg(TQWidget *parent, Structure *structure) :TQDialog(parent,
bbox->addButton(KStdGuiItem::help(), TQT_TQOBJECT(this), TQT_SLOT( help() )); bbox->addButton(KStdGuiItem::help(), TQT_TQOBJECT(this), TQT_SLOT( help() ));
bbox->addStretch(1); bbox->addStretch(1);
KIconLoader iconloader; TDEIconLoader iconloader;
TQButton *raise = bbox->addButton(i18n("&Raise")); TQButton *raise = bbox->addButton(i18n("&Raise"));
raise->setPixmap(iconloader.loadIcon("up", KIcon::Small)); raise->setPixmap(iconloader.loadIcon("up", TDEIcon::Small));
connect( raise, TQT_SIGNAL( clicked() ), TQT_SLOT( raise() )); connect( raise, TQT_SIGNAL( clicked() ), TQT_SLOT( raise() ));
TQButton *lower = bbox->addButton(i18n("&Lower")); TQButton *lower = bbox->addButton(i18n("&Lower"));
lower->setPixmap(iconloader.loadIcon("down", KIcon::Small)); lower->setPixmap(iconloader.loadIcon("down", TDEIcon::Small));
connect( lower, TQT_SIGNAL( clicked() ), TQT_SLOT( lower() )); connect( lower, TQT_SIGNAL( clicked() ), TQT_SLOT( lower() ));
TQButton *rename = bbox->addButton(i18n("R&ename...")); TQButton *rename = bbox->addButton(i18n("R&ename..."));

@ -93,7 +93,7 @@
<string>Clear the current cover search.</string> <string>Clear the current cover search.</string>
</property> </property>
</widget> </widget>
<widget class="KIconViewSearchLine"> <widget class="TDEIconViewSearchLine">
<property name="name"> <property name="name">
<cstring>m_searchLine</cstring> <cstring>m_searchLine</cstring>
</property> </property>
@ -133,7 +133,7 @@
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>KIconViewSearchLine</class> <class>TDEIconViewSearchLine</class>
<header location="global">kiconviewsearchline.h</header> <header location="global">kiconviewsearchline.h</header>
<sizehint> <sizehint>
<width>100</width> <width>100</width>

@ -19,21 +19,21 @@
using CoverUtility::CoverIconViewItem; using CoverUtility::CoverIconViewItem;
CoverIconViewItem::CoverIconViewItem(coverKey id, TQIconView *parent) : CoverIconViewItem::CoverIconViewItem(coverKey id, TQIconView *parent) :
KIconViewItem(parent), m_id(id) TDEIconViewItem(parent), m_id(id)
{ {
CoverDataPtr data = CoverManager::coverInfo(id); CoverDataPtr data = CoverManager::coverInfo(id);
setText(TQString("%1 - %2").arg(data->artist, data->album)); setText(TQString("%1 - %2").arg(data->artist, data->album));
setPixmap(data->thumbnail()); setPixmap(data->thumbnail());
} }
CoverIconView::CoverIconView(TQWidget *parent, const char *name) : KIconView(parent, name) CoverIconView::CoverIconView(TQWidget *parent, const char *name) : TDEIconView(parent, name)
{ {
setResizeMode(Adjust); setResizeMode(Adjust);
} }
CoverIconViewItem *CoverIconView::currentItem() const CoverIconViewItem *CoverIconView::currentItem() const
{ {
return static_cast<CoverIconViewItem *>(KIconView::currentItem()); return static_cast<CoverIconViewItem *>(TDEIconView::currentItem());
} }
TQDragObject *CoverIconView::dragObject() TQDragObject *CoverIconView::dragObject()

@ -26,7 +26,7 @@
// and such. // and such.
namespace CoverUtility namespace CoverUtility
{ {
class CoverIconViewItem : public KIconViewItem class CoverIconViewItem : public TDEIconViewItem
{ {
public: public:
CoverIconViewItem(coverKey id, TQIconView *parent); CoverIconViewItem(coverKey id, TQIconView *parent);
@ -41,12 +41,12 @@ namespace CoverUtility
using CoverUtility::CoverIconViewItem; using CoverUtility::CoverIconViewItem;
/** /**
* This class subclasses KIconView in order to provide cover drag-and-drop * This class subclasses TDEIconView in order to provide cover drag-and-drop
* support. * support.
* *
* @author Michael Pyne <michael.pyne@kdemail.net> * @author Michael Pyne <michael.pyne@kdemail.net>
*/ */
class CoverIconView : public KIconView class CoverIconView : public TDEIconView
{ {
public: public:
CoverIconView(TQWidget *parent, const char *name); CoverIconView(TQWidget *parent, const char *name);

@ -56,12 +56,12 @@ void DeleteWidget::slotShouldDelete(bool shouldDelete)
ddDeleteText->setText(i18n("<qt>These items will be <b>permanently " ddDeleteText->setText(i18n("<qt>These items will be <b>permanently "
"deleted</b> from your hard disk.</qt>")); "deleted</b> from your hard disk.</qt>"));
ddWarningIcon->setPixmap(TDEGlobal::iconLoader()->loadIcon("messagebox_warning", ddWarningIcon->setPixmap(TDEGlobal::iconLoader()->loadIcon("messagebox_warning",
KIcon::Desktop, KIcon::SizeLarge)); TDEIcon::Desktop, TDEIcon::SizeLarge));
} }
else { else {
ddDeleteText->setText(i18n("<qt>These items will be moved to the Trash Bin.</qt>")); ddDeleteText->setText(i18n("<qt>These items will be moved to the Trash Bin.</qt>"));
ddWarningIcon->setPixmap(TDEGlobal::iconLoader()->loadIcon("trashcan_full", ddWarningIcon->setPixmap(TDEGlobal::iconLoader()->loadIcon("trashcan_full",
KIcon::Desktop, KIcon::SizeLarge)); TDEIcon::Desktop, TDEIcon::SizeLarge));
} }
} }

@ -432,7 +432,7 @@ TQPixmap SystemTray::createPixmap(const TQString &pixName)
TQImage bgImage = bgPix.convertToImage(); // Probably 22x22 TQImage bgImage = bgPix.convertToImage(); // Probably 22x22
TQImage fgImage = fgPix.convertToImage(); // Should be 16x16 TQImage fgImage = fgPix.convertToImage(); // Should be 16x16
KIconEffect::semiTransparent(bgImage); TDEIconEffect::semiTransparent(bgImage);
copyImage(bgImage, fgImage, (bgImage.width() - fgImage.width()) / 2, copyImage(bgImage, fgImage, (bgImage.width() - fgImage.width()) / 2,
(bgImage.height() - fgImage.height()) / 2); (bgImage.height() - fgImage.height()) / 2);
@ -602,7 +602,7 @@ static bool copyImage(TQImage &dest, TQImage &src, int x, int y)
if((y + src.height()) >= dest.height()) if((y + src.height()) >= dest.height())
return false; return false;
// We want to use KIconEffect::overlay to do this, since it handles // We want to use TDEIconEffect::overlay to do this, since it handles
// alpha, but the images need to be the same size. We can handle that. // alpha, but the images need to be the same size. We can handle that.
TQImage large_src(dest); TQImage large_src(dest);
@ -628,7 +628,7 @@ static bool copyImage(TQImage &dest, TQImage &src, int x, int y)
// Apply effect to image // Apply effect to image
KIconEffect::overlay(dest, large_src); TDEIconEffect::overlay(dest, large_src);
return true; return true;
} }

@ -48,7 +48,7 @@ WebImageFetcherDialog::WebImageFetcherDialog(const WebImageList &imageList,
TQWidget *mainBox = new TQWidget(this); TQWidget *mainBox = new TQWidget(this);
TQBoxLayout *mainLayout = new TQVBoxLayout(mainBox); TQBoxLayout *mainLayout = new TQVBoxLayout(mainBox);
m_iconWidget = new KIconView(mainBox); m_iconWidget = new TDEIconView(mainBox);
m_iconWidget->setResizeMode(TQIconView::Adjust); m_iconWidget->setResizeMode(TQIconView::Adjust);
m_iconWidget->setSpacing(10); m_iconWidget->setSpacing(10);
m_iconWidget->setFixedSize(500,550); m_iconWidget->setFixedSize(500,550);
@ -185,7 +185,7 @@ TQPixmap WebImageFetcherDialog::pixmapFromURL(const KURL &url) const
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CoverIconViewItem::CoverIconViewItem(TQIconView *parent, const WebImage &image) : CoverIconViewItem::CoverIconViewItem(TQIconView *parent, const WebImage &image) :
TQObject(parent), KIconViewItem(parent, parent->lastItem(), image.size()), m_job(0) TQObject(parent), TDEIconViewItem(parent, parent->lastItem(), image.size()), m_job(0)
{ {
// Set up the iconViewItem // Set up the iconViewItem

@ -62,7 +62,7 @@ private:
TQPixmap m_pixmap; TQPixmap m_pixmap;
WebImageList m_imageList; WebImageList m_imageList;
KIconView *m_iconWidget; TDEIconView *m_iconWidget;
FileHandle m_file; FileHandle m_file;
}; };
@ -71,7 +71,7 @@ namespace TDEIO
class TransferJob; class TransferJob;
} }
class CoverIconViewItem : public TQObject, public KIconViewItem class CoverIconViewItem : public TQObject, public TDEIconViewItem
{ {
Q_OBJECT Q_OBJECT

@ -53,11 +53,11 @@ DockWidget::DockWidget( KSCD* parent, const char *name)
// popup menu for right mouse button // popup menu for right mouse button
TQPopupMenu* popup = contextMenu(); TQPopupMenu* popup = contextMenu();
popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_play", KIcon::Small), i18n("Play/Pause"), parent, TQT_SLOT(playClicked())); popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_play", TDEIcon::Small), i18n("Play/Pause"), parent, TQT_SLOT(playClicked()));
popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_stop", KIcon::Small), i18n("Stop"), parent, TQT_SLOT(stopClicked())); popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_stop", TDEIcon::Small), i18n("Stop"), parent, TQT_SLOT(stopClicked()));
popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_end", KIcon::Small), i18n("Next"), parent, TQT_SLOT(nextClicked())); popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_end", TDEIcon::Small), i18n("Next"), parent, TQT_SLOT(nextClicked()));
popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_start", KIcon::Small), i18n("Previous"), parent, TQT_SLOT(prevClicked())); popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_start", TDEIcon::Small), i18n("Previous"), parent, TQT_SLOT(prevClicked()));
popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_eject", KIcon::Small), i18n("Eject"), parent, TQT_SLOT(ejectClicked())); popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_eject", TDEIcon::Small), i18n("Eject"), parent, TQT_SLOT(ejectClicked()));
TQToolTip::add(this, kapp->aboutData()->programName()); TQToolTip::add(this, kapp->aboutData()->programName());
} }

@ -116,7 +116,7 @@ void EffectView::init(void)
TQHBoxLayout *topTopLayout = new TQHBoxLayout(topTopFrame, 0, KDialog::spacingHint()); TQHBoxLayout *topTopLayout = new TQHBoxLayout(topTopFrame, 0, KDialog::spacingHint());
topTopLayout->setAutoAdd(true); topTopLayout->setAutoAdd(true);
available = new KComboBox(false, topTopFrame); available = new KComboBox(false, topTopFrame);
TQToolButton *add = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Add"), TQT_TQOBJECT(this), TQT_SLOT(addEffect()), topTopFrame); TQToolButton *add = newButton(BarIconSet("down", TDEIcon::SizeSmall), i18n("Add"), TQT_TQOBJECT(this), TQT_SLOT(addEffect()), topTopFrame);
// Active // Active
TQHGroupBox *bottomBox = new TQHGroupBox(i18n("Active Effects"), box); TQHGroupBox *bottomBox = new TQHGroupBox(i18n("Active Effects"), box);
@ -153,10 +153,10 @@ void EffectView::init(void)
// the buttons // the buttons
TQFrame *bottomLeftFrame = new TQFrame(bottomBox); TQFrame *bottomLeftFrame = new TQFrame(bottomBox);
TQVBoxLayout *bottomLeftLayout = new TQVBoxLayout(bottomLeftFrame, 0, KDialog::spacingHint()); TQVBoxLayout *bottomLeftLayout = new TQVBoxLayout(bottomLeftFrame, 0, KDialog::spacingHint());
up = newButton(BarIconSet("up", KIcon::SizeSmall), i18n("Up"), TQT_TQOBJECT(this), TQT_SLOT(moveUp()), bottomLeftFrame); up = newButton(BarIconSet("up", TDEIcon::SizeSmall), i18n("Up"), TQT_TQOBJECT(this), TQT_SLOT(moveUp()), bottomLeftFrame);
down = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Down"), TQT_TQOBJECT(this), TQT_SLOT(moveDown()), bottomLeftFrame); down = newButton(BarIconSet("down", TDEIcon::SizeSmall), i18n("Down"), TQT_TQOBJECT(this), TQT_SLOT(moveDown()), bottomLeftFrame);
configure = newButton(BarIconSet("configure", KIcon::SizeSmall), i18n("Configure"), TQT_TQOBJECT(this), TQT_SLOT(configureEffect()), bottomLeftFrame); configure = newButton(BarIconSet("configure", TDEIcon::SizeSmall), i18n("Configure"), TQT_TQOBJECT(this), TQT_SLOT(configureEffect()), bottomLeftFrame);
remove = newButton(BarIconSet("remove", KIcon::SizeSmall), i18n("Remove"), TQT_TQOBJECT(this), TQT_SLOT(removeEffect()), bottomLeftFrame); remove = newButton(BarIconSet("remove", TDEIcon::SizeSmall), i18n("Remove"), TQT_TQOBJECT(this), TQT_SLOT(removeEffect()), bottomLeftFrame);
bottomLeftLayout->addWidget(up); bottomLeftLayout->addWidget(up);
bottomLeftLayout->addWidget(down); bottomLeftLayout->addWidget(down);
bottomLeftLayout->addWidget(configure); bottomLeftLayout->addWidget(configure);

@ -56,7 +56,7 @@ void NoatunPreferences::remove(CModule *page)
CModule::CModule(const TQString &name, const TQString &description, const TQString &icon, TQObject *owner) CModule::CModule(const TQString &name, const TQString &description, const TQString &icon, TQObject *owner)
: TQWidget(napp->preferencesBox()->addPage(name, description, TDEGlobal::iconLoader()->loadIcon( : TQWidget(napp->preferencesBox()->addPage(name, description, TDEGlobal::iconLoader()->loadIcon(
icon, KIcon::Small,0, KIcon::DefaultState,0, true))) icon, TDEIcon::Small,0, TDEIcon::DefaultState,0, true)))
{ {
if (owner) if (owner)
connect(owner, TQT_SIGNAL(destroyed()), TQT_SLOT(ownerDeleted())); connect(owner, TQT_SIGNAL(destroyed()), TQT_SLOT(ownerDeleted()));

@ -67,7 +67,7 @@ void Editor::open(const PlaylistItem & file)
mFile->setText("<nobr><b>" + file.url().fileName(false) + "</b></nobr>"); mFile->setText("<nobr><b>" + file.url().fileName(false) + "</b></nobr>");
TQToolTip::add(mFile, file.url().prettyURL()); TQToolTip::add(mFile, file.url().prettyURL());
mFileIcon-> mFileIcon->
setPixmap(KMimeType::pixmapForURL(file.url(), 0, KIcon::Small)); setPixmap(KMimeType::pixmapForURL(file.url(), 0, TDEIcon::Small));
if (file.url().isLocalFile()) { if (file.url().isLocalFile()) {
TQFileInfo file_info(file.file()); TQFileInfo file_info(file.file());

@ -49,7 +49,7 @@ void PropertiesDialog::setPlayObject( PlaylistItem pi, Arts::PlayObject po )
setCaption( i18n("Properties for %1").arg(pi.url().fileName()) ); setCaption( i18n("Properties for %1").arg(pi.url().fileName()) );
TDESharedPtr<KMimeType> mime = KMimeType::mimeType( pi.mimetype() ); TDESharedPtr<KMimeType> mime = KMimeType::mimeType( pi.mimetype() );
iconLabel->setPixmap( mime->pixmap( KIcon::Desktop, KIcon::SizeMedium ) ); iconLabel->setPixmap( mime->pixmap( TDEIcon::Desktop, TDEIcon::SizeMedium ) );
nameField->setText( pi.url().fileName() ); nameField->setText( pi.url().fileName() );
typeLabel->setText( pi.mimetype() ); typeLabel->setText( pi.mimetype() );

Loading…
Cancel
Save