Code adaptation because of changes on libraries related to revision 719630

svn path=/trunk/KDE/kdebase/apps/; revision=719642
This commit is contained in:
Rafael Fernández López 2007-10-01 15:09:41 +00:00
parent 37f9ffda00
commit 59283c43c1
31 changed files with 140 additions and 146 deletions

View file

@ -114,11 +114,11 @@ void ColumnViewSettingsPage::applySettings()
{
ColumnModeSettings* settings = DolphinSettings::instance().columnModeSettings();
int iconSize = K3Icon::SizeSmall;
int iconSize = KIconLoader::SizeSmall;
if (m_mediumIconSize->isChecked()) {
iconSize = K3Icon::SizeMedium;
iconSize = KIconLoader::SizeMedium;
} else if (m_largeIconSize->isChecked()) {
iconSize = K3Icon::SizeLarge;
iconSize = KIconLoader::SizeLarge;
}
settings->setIconSize(iconSize);
@ -144,15 +144,15 @@ void ColumnViewSettingsPage::loadSettings()
ColumnModeSettings* settings = DolphinSettings::instance().columnModeSettings();
switch (settings->iconSize()) {
case K3Icon::SizeLarge:
case KIconLoader::SizeLarge:
m_largeIconSize->setChecked(true);
break;
case K3Icon::SizeMedium:
case KIconLoader::SizeMedium:
m_mediumIconSize->setChecked(true);
break;
case K3Icon::SizeSmall:
case KIconLoader::SizeSmall:
default:
m_smallIconSize->setChecked(true);
}

View file

@ -123,11 +123,11 @@ void DetailsViewSettingsPage::applySettings()
settings->setShowGroup(m_groupBox->isChecked());
settings->setShowType(m_typeBox->isChecked());
int iconSize = K3Icon::SizeSmall;
int iconSize = KIconLoader::SizeSmall;
if (m_mediumIconSize->isChecked()) {
iconSize = K3Icon::SizeMedium;
iconSize = KIconLoader::SizeMedium;
} else if (m_largeIconSize->isChecked()) {
iconSize = K3Icon::SizeLarge;
iconSize = KIconLoader::SizeLarge;
}
settings->setIconSize(iconSize);
@ -156,15 +156,15 @@ void DetailsViewSettingsPage::loadSettings()
m_typeBox->setChecked(settings->showType());
switch (settings->iconSize()) {
case K3Icon::SizeLarge:
case KIconLoader::SizeLarge:
m_largeIconSize->setChecked(true);
break;
case K3Icon::SizeMedium:
case KIconLoader::SizeMedium:
m_mediumIconSize->setChecked(true);
break;
case K3Icon::SizeSmall:
case KIconLoader::SizeSmall:
default:
m_smallIconSize->setChecked(true);
}

View file

@ -23,7 +23,7 @@
</entry>
<entry name="IconSize" type="Int">
<label context="@label">Icon size</label>
<default code="true">K3Icon::SizeSmall</default>
<default code="true">KIconLoader::SizeSmall</default>
</entry>
<entry name="ColumnWidth" type="Int">
<label context="@label">Column width</label>

View file

@ -23,7 +23,7 @@
</entry>
<entry name="IconSize" type="Int">
<label context="@label">Icon size</label>
<default code="true">K3Icon::SizeSmall</default>
<default code="true">KIconLoader::SizeSmall</default>
</entry>
<entry name="ShowDate" type="Bool">
<label context="@label">Show date</label>

View file

@ -32,7 +32,7 @@
check 'void IconsViewSettingsPage::applySettings()' as reference (iconsviewsettingspage.cpp):
itemHeight += fontHeight * numberOfTextlines + 16;
/-->
<default code="true">K3Icon::SizeMedium + (QFontMetrics(KGlobalSettings::generalFont()).height() * 2) + 16</default>
<default code="true">KIconLoader::SizeMedium + (QFontMetrics(KGlobalSettings::generalFont()).height() * 2) + 16</default>
</entry>
<entry name="ItemWidth" type="Int">
<label context="@label">Item width</label>
@ -48,7 +48,7 @@
</entry>
<entry name="IconSize" type="Int">
<label context="@label">Icon size</label>
<default code="true">K3Icon::SizeMedium</default>
<default code="true">KIconLoader::SizeMedium</default>
</entry>
<entry name="NumberOfTextlines" type="Int">
<label context="@label">Number of textlines</label>
@ -56,7 +56,7 @@
</entry>
<entry name="PreviewSize" type="Int">
<label context="@label">Preview size</label>
<default code="true">K3Icon::SizeHuge</default>
<default code="true">KIconLoader::SizeHuge</default>
</entry>
</group>
</kcfg>

View file

@ -52,7 +52,7 @@ void DolphinCategoryDrawer::drawCategory(const QModelIndex &index, int sortRole,
{
QRect starRect = option.rect;
int iconSize = KIconLoader::global()->currentSize(K3Icon::Small);
int iconSize = KIconLoader::global()->currentSize(KIconLoader::Small);
QVariant categoryVariant = index.model()->data(index, KCategorizedSortFilterProxyModel::CategoryRole);
if (!categoryVariant.isValid())
@ -177,7 +177,7 @@ void DolphinCategoryDrawer::drawCategory(const QModelIndex &index, int sortRole,
}
else
{
icon = KIconLoader::global()->loadIcon("user", K3Icon::NoGroup, option.fontMetrics.height());
icon = KIconLoader::global()->loadIcon("user", KIconLoader::NoGroup, option.fontMetrics.height());
}
opt.rect.setTop(opt.rect.top() - icon.height());
@ -199,7 +199,7 @@ void DolphinCategoryDrawer::drawCategory(const QModelIndex &index, int sortRole,
// so the group icon drawn is that one particularly. This way assures the drawn
// icon is the one of the mimetype of the group itself. (ereslibre)
icon = KIconLoader::global()->loadMimeTypeIcon(item.mimeTypePtr()->iconName(),
K3Icon::NoGroup, option.fontMetrics.height());
KIconLoader::NoGroup, option.fontMetrics.height());
opt.rect.setTop(opt.rect.top() - icon.height());
@ -214,9 +214,9 @@ void DolphinCategoryDrawer::drawCategory(const QModelIndex &index, int sortRole,
starRect.setTop(option.rect.top() + (option.rect.height() / 2) - (iconSize / 2));
starRect.setSize(QSize(iconSize, iconSize));
QPixmap pixmap = KIconLoader::global()->loadIcon("rating", K3Icon::Small);
QPixmap smallPixmap = KIconLoader::global()->loadIcon("rating", K3Icon::NoGroup, iconSize / 2);
QPixmap disabledPixmap = KIconLoader::global()->loadIcon("rating", K3Icon::Small);
QPixmap pixmap = KIconLoader::global()->loadIcon("rating", KIconLoader::Small);
QPixmap smallPixmap = KIconLoader::global()->loadIcon("rating", KIconLoader::NoGroup, iconSize / 2);
QPixmap disabledPixmap = KIconLoader::global()->loadIcon("rating", KIconLoader::Small);
QImage img = disabledPixmap.toImage();
Blitz::grayscale(img);
@ -330,7 +330,7 @@ void DolphinCategoryDrawer::drawCategory(const QModelIndex &index, int sortRole,
int DolphinCategoryDrawer::categoryHeight(const QStyleOption &option) const
{
int iconSize = KIconLoader::global()->currentSize(K3Icon::Small);
int iconSize = KIconLoader::global()->currentSize(KIconLoader::Small);
return qMax(option.fontMetrics.height() + (iconSize / 4) * 2 + 2, iconSize + (iconSize / 4) * 2 + 2) /* 2 gradient */;
}

View file

@ -734,10 +734,9 @@ void DolphinColumnView::zoomIn()
{
if (isZoomInPossible()) {
ColumnModeSettings* settings = DolphinSettings::instance().columnModeSettings();
// TODO: get rid of K3Icon sizes
switch (settings->iconSize()) {
case K3Icon::SizeSmall: settings->setIconSize(K3Icon::SizeMedium); break;
case K3Icon::SizeMedium: settings->setIconSize(K3Icon::SizeLarge); break;
case KIconLoader::SizeSmall: settings->setIconSize(KIconLoader::SizeMedium); break;
case KIconLoader::SizeMedium: settings->setIconSize(KIconLoader::SizeLarge); break;
default: Q_ASSERT(false); break;
}
updateDecorationSize();
@ -748,10 +747,9 @@ void DolphinColumnView::zoomOut()
{
if (isZoomOutPossible()) {
ColumnModeSettings* settings = DolphinSettings::instance().columnModeSettings();
// TODO: get rid of K3Icon sizes
switch (settings->iconSize()) {
case K3Icon::SizeLarge: settings->setIconSize(K3Icon::SizeMedium); break;
case K3Icon::SizeMedium: settings->setIconSize(K3Icon::SizeSmall); break;
case KIconLoader::SizeLarge: settings->setIconSize(KIconLoader::SizeMedium); break;
case KIconLoader::SizeMedium: settings->setIconSize(KIconLoader::SizeSmall); break;
default: Q_ASSERT(false); break;
}
updateDecorationSize();
@ -842,13 +840,13 @@ void DolphinColumnView::slotDirListerCompleted()
bool DolphinColumnView::isZoomInPossible() const
{
ColumnModeSettings* settings = DolphinSettings::instance().columnModeSettings();
return settings->iconSize() < K3Icon::SizeLarge;
return settings->iconSize() < KIconLoader::SizeLarge;
}
bool DolphinColumnView::isZoomOutPossible() const
{
ColumnModeSettings* settings = DolphinSettings::instance().columnModeSettings();
return settings->iconSize() > K3Icon::SizeSmall;
return settings->iconSize() > KIconLoader::SizeSmall;
}
void DolphinColumnView::setActiveColumnIndex(int index)

View file

@ -381,10 +381,9 @@ void DolphinDetailsView::zoomIn()
{
if (isZoomInPossible()) {
DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings();
// TODO: get rid of K3Icon sizes
switch (settings->iconSize()) {
case K3Icon::SizeSmall: settings->setIconSize(K3Icon::SizeMedium); break;
case K3Icon::SizeMedium: settings->setIconSize(K3Icon::SizeLarge); break;
case KIconLoader::SizeSmall: settings->setIconSize(KIconLoader::SizeMedium); break;
case KIconLoader::SizeMedium: settings->setIconSize(KIconLoader::SizeLarge); break;
default: Q_ASSERT(false); break;
}
updateDecorationSize();
@ -395,10 +394,9 @@ void DolphinDetailsView::zoomOut()
{
if (isZoomOutPossible()) {
DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings();
// TODO: get rid of K3Icon sizes
switch (settings->iconSize()) {
case K3Icon::SizeLarge: settings->setIconSize(K3Icon::SizeMedium); break;
case K3Icon::SizeMedium: settings->setIconSize(K3Icon::SizeSmall); break;
case KIconLoader::SizeLarge: settings->setIconSize(KIconLoader::SizeMedium); break;
case KIconLoader::SizeMedium: settings->setIconSize(KIconLoader::SizeSmall); break;
default: Q_ASSERT(false); break;
}
updateDecorationSize();
@ -459,13 +457,13 @@ void DolphinDetailsView::configureColumns(const QPoint& pos)
bool DolphinDetailsView::isZoomInPossible() const
{
DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings();
return settings->iconSize() < K3Icon::SizeLarge;
return settings->iconSize() < KIconLoader::SizeLarge;
}
bool DolphinDetailsView::isZoomOutPossible() const
{
DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings();
return settings->iconSize() > K3Icon::SizeSmall;
return settings->iconSize() > KIconLoader::SizeSmall;
}
void DolphinDetailsView::updateDecorationSize()

View file

@ -303,26 +303,25 @@ bool DolphinIconsView::isZoomInPossible() const
{
IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings();
const int size = m_controller->showPreview() ? settings->previewSize() : settings->iconSize();
return size < K3Icon::SizeEnormous;
return size < KIconLoader::SizeEnormous;
}
bool DolphinIconsView::isZoomOutPossible() const
{
IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings();
const int size = m_controller->showPreview() ? settings->previewSize() : settings->iconSize();
return size > K3Icon::SizeSmall;
return size > KIconLoader::SizeSmall;
}
int DolphinIconsView::increasedIconSize(int size) const
{
// TODO: get rid of K3Icon sizes
int incSize = 0;
switch (size) {
case K3Icon::SizeSmall: incSize = K3Icon::SizeSmallMedium; break;
case K3Icon::SizeSmallMedium: incSize = K3Icon::SizeMedium; break;
case K3Icon::SizeMedium: incSize = K3Icon::SizeLarge; break;
case K3Icon::SizeLarge: incSize = K3Icon::SizeHuge; break;
case K3Icon::SizeHuge: incSize = K3Icon::SizeEnormous; break;
case KIconLoader::SizeSmall: incSize = KIconLoader::SizeSmallMedium; break;
case KIconLoader::SizeSmallMedium: incSize = KIconLoader::SizeMedium; break;
case KIconLoader::SizeMedium: incSize = KIconLoader::SizeLarge; break;
case KIconLoader::SizeLarge: incSize = KIconLoader::SizeHuge; break;
case KIconLoader::SizeHuge: incSize = KIconLoader::SizeEnormous; break;
default: Q_ASSERT(false); break;
}
return incSize;
@ -330,14 +329,13 @@ int DolphinIconsView::increasedIconSize(int size) const
int DolphinIconsView::decreasedIconSize(int size) const
{
// TODO: get rid of K3Icon sizes
int decSize = 0;
switch (size) {
case K3Icon::SizeSmallMedium: decSize = K3Icon::SizeSmall; break;
case K3Icon::SizeMedium: decSize = K3Icon::SizeSmallMedium; break;
case K3Icon::SizeLarge: decSize = K3Icon::SizeMedium; break;
case K3Icon::SizeHuge: decSize = K3Icon::SizeLarge; break;
case K3Icon::SizeEnormous: decSize = K3Icon::SizeHuge; break;
case KIconLoader::SizeSmallMedium: decSize = KIconLoader::SizeSmall; break;
case KIconLoader::SizeMedium: decSize = KIconLoader::SizeSmallMedium; break;
case KIconLoader::SizeLarge: decSize = KIconLoader::SizeMedium; break;
case KIconLoader::SizeHuge: decSize = KIconLoader::SizeLarge; break;
case KIconLoader::SizeEnormous: decSize = KIconLoader::SizeHuge; break;
default: Q_ASSERT(false); break;
}
return decSize;

View file

@ -524,7 +524,7 @@ void DolphinView::showPreview(const KFileItem& item, const QPixmap& pixmap)
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
if (KonqMimeData::decodeIsCutSelection(mimeData) && isCutItem(item)) {
KIconEffect iconEffect;
const QPixmap cutPixmap = iconEffect.apply(pixmap, K3Icon::Desktop, K3Icon::DisabledState);
const QPixmap cutPixmap = iconEffect.apply(pixmap, KIconLoader::Desktop, KIconLoader::DisabledState);
m_dolphinModel->setData(idx, QIcon(cutPixmap), Qt::DecorationRole);
} else {
m_dolphinModel->setData(idx, QIcon(pixmap), Qt::DecorationRole);
@ -919,7 +919,7 @@ void DolphinView::applyCutItemEffect()
// apply icon effect to the cut item
KIconEffect iconEffect;
pixmap = iconEffect.apply(pixmap, K3Icon::Desktop, K3Icon::DisabledState);
pixmap = iconEffect.apply(pixmap, KIconLoader::Desktop, KIconLoader::DisabledState);
m_dolphinModel->setData(index, QIcon(pixmap), Qt::DecorationRole);
}
}

View file

@ -76,8 +76,8 @@ IconSizeDialog::IconSizeDialog(QWidget* parent) :
new QLabel(i18nc("@item:inrange Icon Size", "Large"), iconSizeHBox);
m_iconSizeViewer = new PixmapViewer(iconSizeBox, PixmapViewer::SizeTransition);
m_iconSizeViewer->setMinimumWidth(K3Icon::SizeEnormous);
m_iconSizeViewer->setFixedHeight(K3Icon::SizeEnormous);
m_iconSizeViewer->setMinimumWidth(KIconLoader::SizeEnormous);
m_iconSizeViewer->setFixedHeight(KIconLoader::SizeEnormous);
QPalette p = m_iconSizeViewer->palette();
p.setColor(m_iconSizeViewer->backgroundRole(), iconBackgroundColor);
m_iconSizeViewer->setPalette(p);
@ -104,8 +104,8 @@ IconSizeDialog::IconSizeDialog(QWidget* parent) :
new QLabel(i18nc("@item:inrange Preview Size", "Large"), previewSizeHBox);
m_previewSizeViewer = new PixmapViewer(previewSizeBox, PixmapViewer::SizeTransition);
m_previewSizeViewer->setMinimumWidth(K3Icon::SizeEnormous);
m_previewSizeViewer->setFixedHeight(K3Icon::SizeEnormous);
m_previewSizeViewer->setMinimumWidth(KIconLoader::SizeEnormous);
m_previewSizeViewer->setFixedHeight(KIconLoader::SizeEnormous);
p = m_previewSizeViewer->palette();
p.setColor(m_previewSizeViewer->backgroundRole(), iconBackgroundColor);
m_previewSizeViewer->setPalette(p);
@ -142,7 +142,7 @@ void IconSizeDialog::slotButtonClicked(int button)
void IconSizeDialog::updateIconSize(int value)
{
m_iconSizeViewer->setPixmap(KIconLoader::global()->loadIcon("folder", K3Icon::Desktop, iconSize(value)));
m_iconSizeViewer->setPixmap(KIconLoader::global()->loadIcon("folder", KIconLoader::Desktop, iconSize(value)));
if (m_previewSizeSlider != 0) {
updatePreviewSize(m_previewSizeSlider->value());
}
@ -155,19 +155,19 @@ void IconSizeDialog::updatePreviewSize(int value)
// assure that the preview size is never smaller than the icon size
value = iconSizeValue;
}
m_previewSizeViewer->setPixmap(KIconLoader::global()->loadIcon("preview", K3Icon::Desktop, iconSize(value)));
m_previewSizeViewer->setPixmap(KIconLoader::global()->loadIcon("preview", KIconLoader::Desktop, iconSize(value)));
}
int IconSizeDialog::iconSize(int sliderValue) const
{
int size = K3Icon::SizeMedium;
int size = KIconLoader::SizeMedium;
switch (sliderValue) {
case 0: size = K3Icon::SizeSmall; break;
case 1: size = K3Icon::SizeSmallMedium; break;
case 2: size = K3Icon::SizeMedium; break;
case 3: size = K3Icon::SizeLarge; break;
case 4: size = K3Icon::SizeHuge; break;
case 5: size = K3Icon::SizeEnormous; break;
case 0: size = KIconLoader::SizeSmall; break;
case 1: size = KIconLoader::SizeSmallMedium; break;
case 2: size = KIconLoader::SizeMedium; break;
case 3: size = KIconLoader::SizeLarge; break;
case 4: size = KIconLoader::SizeHuge; break;
case 5: size = KIconLoader::SizeEnormous; break;
}
return size;
}
@ -176,12 +176,12 @@ int IconSizeDialog::sliderValue(int iconSize) const
{
int value = 0;
switch (iconSize) {
case K3Icon::SizeSmall: value = 0; break;
case K3Icon::SizeSmallMedium: value = 1; break;
case K3Icon::SizeMedium: value = 2; break;
case K3Icon::SizeLarge: value = 3; break;
case K3Icon::SizeHuge: value = 4; break;
case K3Icon::SizeEnormous: value = 5; break;
case KIconLoader::SizeSmall: value = 0; break;
case KIconLoader::SizeSmallMedium: value = 1; break;
case KIconLoader::SizeMedium: value = 2; break;
case KIconLoader::SizeLarge: value = 3; break;
case KIconLoader::SizeHuge: value = 4; break;
case KIconLoader::SizeEnormous: value = 5; break;
default: break;
}
return value;

View file

@ -66,8 +66,8 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) :
// preview
m_preview = new PixmapViewer(this);
m_preview->setMinimumWidth(K3Icon::SizeEnormous);
m_preview->setFixedHeight(K3Icon::SizeEnormous);
m_preview->setMinimumWidth(KIconLoader::SizeEnormous);
m_preview->setFixedHeight(KIconLoader::SizeEnormous);
// name
m_nameLabel = new QLabel(this);
@ -188,8 +188,8 @@ void InfoSidebarPage::showItemInfo()
if (itemCount > 1) {
KIconLoader iconLoader;
QPixmap icon = iconLoader.loadIcon("exec",
K3Icon::NoGroup,
K3Icon::SizeEnormous);
KIconLoader::NoGroup,
KIconLoader::SizeEnormous);
m_preview->setPixmap(icon);
m_nameLabel->setText(i18ncp("@info", "%1 item selected", "%1 items selected", selectedItems.count()));
} else if (!applyPlace(file)) {
@ -202,7 +202,7 @@ void InfoSidebarPage::showItemInfo()
KIO::PreviewJob* job = KIO::filePreview(list,
m_preview->width(),
K3Icon::SizeEnormous,
KIconLoader::SizeEnormous,
0,
0,
true,
@ -233,7 +233,7 @@ void InfoSidebarPage::showIcon(const KFileItem& item)
{
m_pendingPreview = false;
if (!applyPlace(item.url())) {
m_preview->setPixmap(item.pixmap(K3Icon::SizeEnormous));
m_preview->setPixmap(item.pixmap(KIconLoader::SizeEnormous));
}
}

View file

@ -30,8 +30,8 @@ PixmapViewer::PixmapViewer(QWidget* parent, Transition transition) :
m_transition(transition),
m_animationStep(0)
{
setMinimumWidth(K3Icon::SizeEnormous);
setMinimumHeight(K3Icon::SizeEnormous);
setMinimumWidth(KIconLoader::SizeEnormous);
setMinimumHeight(KIconLoader::SizeEnormous);
m_animation.setDuration(150);
m_animation.setCurveShape(QTimeLine::LinearCurve);

View file

@ -42,7 +42,7 @@ StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) :
m_timer(0),
m_closeButton(0)
{
setMinimumHeight(K3Icon::SizeSmall);
setMinimumHeight(KIconLoader::SizeSmall);
QPalette palette;
palette.setColor(QPalette::Background, Qt::transparent);

View file

@ -226,7 +226,7 @@ void TopLevel::slotScan()
else
item = new Q3CheckListItem( mListView, desktop.readName(), Q3CheckListItem::CheckBox );
item->setPixmap( 0, loader->loadIcon( desktop.readIcon(), K3Icon::Small ) );
item->setPixmap( 0, loader->loadIcon( desktop.readIcon(), KIconLoader::Small ) );
item->setText( 1, desktop.readGenericName() );
item->setText( 2, desktop.desktopGroup().readPathEntry( "Exec" ) );
if ( desktop.desktopGroup().readEntry( "X-StandardInstall" , false) )

View file

@ -556,31 +556,31 @@ static int directCommand(KCmdLineArgs *args)
if (args->count() >= 1) {
contextStr = args->arg(0);
}
K3Icon::Group group = K3Icon::NoGroup;
KIconLoader::Group group = KIconLoader::NoGroup;
if ( groupStr == QLatin1String( "Desktop" ) )
group = K3Icon::Desktop;
group = KIconLoader::Desktop;
else if ( groupStr == QLatin1String( "Toolbar" ) )
group = K3Icon::Toolbar;
group = KIconLoader::Toolbar;
else if ( groupStr == QLatin1String( "MainToolbar" ) )
group = K3Icon::MainToolbar;
group = KIconLoader::MainToolbar;
else if ( groupStr == QLatin1String( "Small" ) )
group = K3Icon::Small;
group = KIconLoader::Small;
else if ( groupStr == QLatin1String( "Panel" ) )
group = K3Icon::Panel;
group = KIconLoader::Panel;
else if ( groupStr == QLatin1String( "User" ) )
group = K3Icon::User;
K3Icon::Context context = K3Icon::Any;
group = KIconLoader::User;
KIconLoader::Context context = KIconLoader::Any;
// From kicontheme.cpp
if ( contextStr == QLatin1String( "Devices" ) )
context = K3Icon::Device;
context = KIconLoader::Device;
else if ( contextStr == QLatin1String( "MimeTypes" ) )
context = K3Icon::MimeType;
context = KIconLoader::MimeType;
else if ( contextStr == QLatin1String( "FileSystems" ) )
context = K3Icon::FileSystem;
context = KIconLoader::FileSystem;
else if ( contextStr == QLatin1String( "Applications" ) )
context = K3Icon::Application;
context = KIconLoader::Application;
else if ( contextStr == QLatin1String( "Actions" ) )
context = K3Icon::Action;
context = KIconLoader::Action;
KIconDialog dlg((QWidget*)0L);
kapp->setTopWidget( &dlg );

View file

@ -661,7 +661,7 @@ void ActionsImpl::slotSetAsToolbar() {
void ActionsImpl::slotChangeIcon() {
KEBApp::self()->bkInfo()->commitChanges();
KBookmark bk = KEBApp::self()->firstSelected();
QString newIcon = KIconDialog::getIcon(K3Icon::Small, K3Icon::FileSystem);
QString newIcon = KIconDialog::getIcon(KIconLoader::Small, KIconLoader::FileSystem);
if (newIcon.isEmpty())
return;
EditCommand *cmd = new EditCommand(bk.address(), -1, newIcon);

View file

@ -335,7 +335,7 @@ KfindTabWidget::KfindTabWidget(QWidget *parent)
it != m_types.end(); ++it )
{
KMimeType::Ptr typ = *it;
typeBox->addItem(KIconLoader::global()->loadMimeTypeIcon( typ->iconName(), K3Icon::Small ), typ->comment());
typeBox->addItem(KIconLoader::global()->loadMimeTypeIcon( typ->iconName(), KIconLoader::Small ), typ->comment());
}
if ( editRegExp ) {

View file

@ -95,15 +95,15 @@ QString KonqAboutPageFactory::launch()
return res;
KIconLoader *iconloader = KIconLoader::global();
int iconSize = iconloader->currentSize(K3Icon::Desktop);
QString home_icon_path = iconloader->iconPath("go-home", K3Icon::Desktop );
QString storage_icon_path = iconloader->iconPath("system", K3Icon::Desktop );
QString remote_icon_path = iconloader->iconPath("network-wired", K3Icon::Desktop );
QString wastebin_icon_path = iconloader->iconPath("user-trash-full", K3Icon::Desktop );
QString applications_icon_path = iconloader->iconPath("kmenu", K3Icon::Desktop );
QString settings_icon_path = iconloader->iconPath("kcontrol", K3Icon::Desktop );
int iconSize = iconloader->currentSize(KIconLoader::Desktop);
QString home_icon_path = iconloader->iconPath("go-home", KIconLoader::Desktop );
QString storage_icon_path = iconloader->iconPath("system", KIconLoader::Desktop );
QString remote_icon_path = iconloader->iconPath("network-wired", KIconLoader::Desktop );
QString wastebin_icon_path = iconloader->iconPath("user-trash-full", KIconLoader::Desktop );
QString applications_icon_path = iconloader->iconPath("kmenu", KIconLoader::Desktop );
QString settings_icon_path = iconloader->iconPath("kcontrol", KIconLoader::Desktop );
QString home_folder = QDir::homePath();
QString continue_icon_path = QApplication::isRightToLeft()?iconloader->iconPath("arrow-left", K3Icon::Small ):iconloader->iconPath("arrow-right", K3Icon::Small );
QString continue_icon_path = QApplication::isRightToLeft()?iconloader->iconPath("arrow-left", KIconLoader::Small ):iconloader->iconPath("arrow-right", KIconLoader::Small );
res = res.arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage.css" ) );
if ( kapp->layoutDirection() == Qt::RightToLeft )
@ -146,7 +146,7 @@ QString KonqAboutPageFactory::launch()
.arg( i18n( "Settings" ) )
.arg( i18n( "Desktop configuration" ) )
.arg( continue_icon_path )
.arg( K3Icon::SizeSmall ).arg( K3Icon::SizeSmall )
.arg( KIconLoader::SizeSmall ).arg( KIconLoader::SizeSmall )
.arg( i18n( "Next: An Introduction to Konqueror" ) )
;
i18n("Search the Web");//i18n for possible future use
@ -166,9 +166,9 @@ QString KonqAboutPageFactory::intro()
return res;
KIconLoader *iconloader = KIconLoader::global();
QString back_icon_path = QApplication::isRightToLeft()?iconloader->iconPath("go-next", K3Icon::Small ):iconloader->iconPath("go-previous", K3Icon::Small );
QString gohome_icon_path = iconloader->iconPath("go-home", K3Icon::Small );
QString continue_icon_path = QApplication::isRightToLeft()?iconloader->iconPath("arrow-left", K3Icon::Small ):iconloader->iconPath("arrow-right", K3Icon::Small );
QString back_icon_path = QApplication::isRightToLeft()?iconloader->iconPath("go-next", KIconLoader::Small ):iconloader->iconPath("go-previous", KIconLoader::Small );
QString gohome_icon_path = iconloader->iconPath("go-home", KIconLoader::Small );
QString continue_icon_path = QApplication::isRightToLeft()?iconloader->iconPath("arrow-left", KIconLoader::Small ):iconloader->iconPath("arrow-right", KIconLoader::Small );
res = res.arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage.css" ) );
if ( kapp->layoutDirection() == Qt::RightToLeft )
@ -221,7 +221,7 @@ QString KonqAboutPageFactory::specs()
KIconLoader *iconloader = KIconLoader::global();
QString res = loadFile( KStandardDirs::locate( "data", "konqueror/about/specs.html" ));
QString continue_icon_path = QApplication::isRightToLeft()?iconloader->iconPath("arrow-left", K3Icon::Small ):iconloader->iconPath("arrow-right", K3Icon::Small );
QString continue_icon_path = QApplication::isRightToLeft()?iconloader->iconPath("arrow-left", KIconLoader::Small ):iconloader->iconPath("arrow-right", KIconLoader::Small );
if ( res.isEmpty() )
return res;
@ -307,20 +307,20 @@ QString KonqAboutPageFactory::tips()
KIconLoader *iconloader = KIconLoader::global();
QString viewmag_icon_path =
iconloader->iconPath("zoom-original", K3Icon::Small );
iconloader->iconPath("zoom-original", KIconLoader::Small );
QString history_icon_path =
iconloader->iconPath("history", K3Icon::Small );
iconloader->iconPath("history", KIconLoader::Small );
QString openterm_icon_path =
iconloader->iconPath("openterm", K3Icon::Small );
iconloader->iconPath("openterm", KIconLoader::Small );
QString locationbar_erase_rtl_icon_path =
iconloader->iconPath("clear-left", K3Icon::Small );
iconloader->iconPath("clear-left", KIconLoader::Small );
QString locationbar_erase_icon_path =
iconloader->iconPath("locationbar-erase", K3Icon::Small );
iconloader->iconPath("locationbar-erase", KIconLoader::Small );
QString window_fullscreen_icon_path =
iconloader->iconPath("view-fullscreen", K3Icon::Small );
iconloader->iconPath("view-fullscreen", KIconLoader::Small );
QString view_left_right_icon_path =
iconloader->iconPath("view-left-right", K3Icon::Small );
QString continue_icon_path = QApplication::isRightToLeft()?iconloader->iconPath("arrow-left", K3Icon::Small ):iconloader->iconPath("arrow-right", K3Icon::Small );
iconloader->iconPath("view-left-right", KIconLoader::Small );
QString continue_icon_path = QApplication::isRightToLeft()?iconloader->iconPath("arrow-left", KIconLoader::Small ):iconloader->iconPath("arrow-right", KIconLoader::Small );
res = res.arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage.css" ) );
if ( kapp->layoutDirection() == Qt::RightToLeft )

View file

@ -40,7 +40,7 @@ FileTypeDetails::FileTypeDetails( QWidget * parent )
firstLayout->addLayout(hBox, 1);
iconButton = new KIconButton(firstWidget);
iconButton->setIconType(K3Icon::Desktop, K3Icon::MimeType);
iconButton->setIconType(KIconLoader::Desktop, KIconLoader::MimeType);
connect(iconButton, SIGNAL(iconChanged(QString)), SLOT(updateIcon(QString)));
iconButton->setFixedSize(70, 70);

View file

@ -79,7 +79,7 @@ void TypesListItem::setup()
{
if (m_mimetype)
{
setPixmap(0, KIconLoader::global()->loadMimeTypeIcon(m_mimetype->iconName(),K3Icon::Small, IconSize(K3Icon::Small)));
setPixmap(0, KIconLoader::global()->loadMimeTypeIcon(m_mimetype->iconName(),KIconLoader::Small, IconSize(KIconLoader::Small)));
}
Q3ListViewItem::setup();
}

View file

@ -51,7 +51,7 @@ KManualProxyDlg::KManualProxyDlg( QWidget* parent, const char* name )
mDlg = new ManualProxyDlgUI (this);
setMainWidget( mDlg );
mDlg->pbCopyDown->setPixmap( BarIcon("go-down", K3Icon::SizeSmall) );
mDlg->pbCopyDown->setPixmap( BarIcon("go-down", KIconLoader::SizeSmall) );
QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed,
mDlg->pbCopyDown->sizePolicy().hasHeightForWidth() );
mDlg->pbCopyDown->setSizePolicy( sizePolicy );

View file

@ -65,8 +65,8 @@ public:
// to accelators, replace them with two ampersands.
serviceName.replace("&", "&&");
QPixmap normal = KIconLoader::global()->loadIcon(s->icon(), K3Icon::Small,
0, K3Icon::DefaultState, QStringList(), 0L, true);
QPixmap normal = KIconLoader::global()->loadIcon(s->icon(), KIconLoader::Small,
0, KIconLoader::DefaultState, QStringList(), 0L, true);
// make sure they are not larger than 16x16
if (normal.width() > 16 || normal.height() > 16) {

View file

@ -529,7 +529,7 @@ void Sidebar_Widget::slotSetURL( )
void Sidebar_Widget::slotSetIcon( )
{
// kicd.setStrictIconSize(true);
QString iconname=KIconDialog::getIcon(K3Icon::Small);
QString iconname=KIconDialog::getIcon(KIconLoader::Small);
kDebug()<<"New Icon Name:"<<iconname;
if (!iconname.isEmpty())
{

View file

@ -93,7 +93,7 @@ void KonqSidebarDirTreeItem::setOpen( bool open )
MYMODULE->openSubFolder( this );
else if ( hasStandardIcon() )
{
int size = KIconLoader::global()->currentSize( K3Icon::Small );
int size = KIconLoader::global()->currentSize( KIconLoader::Small );
if ( open )
setPixmap( 0, DesktopIcon( "folder-open", size ) );
else

View file

@ -326,7 +326,7 @@ void KonqSidebarDirTreeModule::openSubFolder( KonqSidebarTreeItem *item )
if ( !item->isTopLevelItem() &&
static_cast<KonqSidebarDirTreeItem *>(item)->hasStandardIcon() )
{
int size = KIconLoader::global()->currentSize( K3Icon::Small );
int size = KIconLoader::global()->currentSize( KIconLoader::Small );
QPixmap pix = DesktopIcon( "folder-open", size );
m_pTree->startAnimation( item, "kde", 6, &pix );
}
@ -359,7 +359,7 @@ void KonqSidebarDirTreeModule::listDirectory( KonqSidebarTreeItem *item )
{
// We have this directory listed already, just copy the entries as we
// can't use the dirlister, it would invalidate the old entries
int size = KIconLoader::global()->currentSize( K3Icon::Small );
int size = KIconLoader::global()->currentSize( KIconLoader::Small );
KonqSidebarTreeItem * parentItem = item;
KonqSidebarDirTreeItem *oldItem = static_cast<KonqSidebarDirTreeItem *> (openItem->firstChild());
while(oldItem)
@ -427,7 +427,7 @@ void KonqSidebarDirTreeModule::slotNewItems( const KFileItemList& entries )
}
kDebug()<<"number of additional parent items:"<< (parentItemList?parentItemList->count():0);
int size = KIconLoader::global()->currentSize( K3Icon::Small );
int size = KIconLoader::global()->currentSize( KIconLoader::Small );
do
{
kDebug()<<"Parent Item URL:"<<parentItem->externalURL();
@ -463,7 +463,7 @@ void KonqSidebarDirTreeModule::slotNewItems( const KFileItemList& entries )
void KonqSidebarDirTreeModule::slotRefreshItems( const QList<QPair<KFileItem, KFileItem> >&entries )
{
int size = KIconLoader::global()->currentSize( K3Icon::Small );
int size = KIconLoader::global()->currentSize( KIconLoader::Small );
kDebug(1201) << "KonqSidebarDirTreeModule::slotRefreshItems " << entries.count() << " entries. First: " << entries.first().second.url().url();

View file

@ -332,7 +332,7 @@ void KonqCombo::loadItems()
item = *it;
if ( !item.isEmpty() ) { // only insert non-empty items
if( first ) {
insertItem( KonqPixmapProvider::self()->pixmapFor( item, K3Icon::SizeSmall ),
insertItem( KonqPixmapProvider::self()->pixmapFor( item, KIconLoader::SizeSmall ),
item, i++, titleOfURL( item ) );
}
else
@ -352,7 +352,7 @@ void KonqCombo::slotSetIcon( int index )
if( pixmap( index ).isNull())
// on-demand icon loading
updateItem( KonqPixmapProvider::self()->pixmapFor( itemText( index ),
K3Icon::SizeSmall ), itemText( index ), index,
KIconLoader::SizeSmall ), itemText( index ), index,
titleOfURL( itemText( index ) ) );
update();
}
@ -376,7 +376,7 @@ void KonqCombo::popup()
{
// on-demand icon loading
updateItem( KonqPixmapProvider::self()->pixmapFor( itemText( i ),
K3Icon::SizeSmall), itemText( i ), i, titleOfURL( itemText( i ) ) );
KIconLoader::SizeSmall), itemText( i ), i, titleOfURL( itemText( i ) ) );
}
}
KHistoryComboBox::showPopup();
@ -584,7 +584,7 @@ void KonqCombo::mouseMoveEvent( QMouseEvent *e )
url.populateMimeData(mime);
drag->setMimeData(mime);
QPixmap pix = KonqPixmapProvider::self()->pixmapFor( currentText(),
K3Icon::SizeMedium );
KIconLoader::SizeMedium );
if ( !pix.isNull() )
drag->setPixmap( pix );
drag->start();
@ -717,13 +717,13 @@ void KonqComboListBoxPixmap::paint( QPainter *painter )
if ( lookup_pending ) {
title = titleOfURL( text() );
if ( !title.isEmpty() )
pm = KonqPixmapProvider::self()->pixmapFor( text(), K3Icon::SizeSmall );
pm = KonqPixmapProvider::self()->pixmapFor( text(), KIconLoader::SizeSmall );
else if ( text().find( "://" ) == -1 ) {
title = titleOfURL( "http://"+text() );
if ( !title.isEmpty() )
pm = KonqPixmapProvider::self()->pixmapFor( "http://"+text(), K3Icon::SizeSmall );
pm = KonqPixmapProvider::self()->pixmapFor( "http://"+text(), KIconLoader::SizeSmall );
else
pm = KonqPixmapProvider::self()->pixmapFor( text(), K3Icon::SizeSmall );
pm = KonqPixmapProvider::self()->pixmapFor( text(), KIconLoader::SizeSmall );
}
else
pm = QPixmap();

View file

@ -5419,7 +5419,7 @@ void KonqMainWindow::setIcon( const QPixmap& pix )
QString url = m_combo->currentText();
if ( !url.isEmpty() )
big = KonqPixmapProvider::self()->pixmapFor( url, K3Icon::SizeMedium );
big = KonqPixmapProvider::self()->pixmapFor( url, KIconLoader::SizeMedium );
KWindowSystem::setIcons( winId(), big, pix );
}

View file

@ -246,7 +246,7 @@ void KonqDraggableLabel::mouseMoveEvent( QMouseEvent * ev )
drag->setMimeData( md );
QString iconName = KMimeType::iconNameForUrl( lst.first() );
drag->setPixmap(KIconLoader::global()->loadMimeTypeIcon(iconName, K3Icon::Small));
drag->setPixmap(KIconLoader::global()->loadMimeTypeIcon(iconName, KIconLoader::Small));
drag->start();
}

View file

@ -448,8 +448,8 @@ void KonqFrameTabs::slotInitiateDrag( QWidget *w )
frame->activeChildView()->url().populateMimeData(md);
d->setMimeData( md );
QString iconName = KMimeType::iconNameForUrl(frame->activeChildView()->url());
d->setPixmap(KIconLoader::global()->loadIcon(iconName, K3Icon::Small, 0));
//d->setPixmap( KIconLoader::global()->loadMimeTypeIcon(KMimeType::pixmapForURL( frame->activeChildView()->url(), 0), K3Icon::Small ) );
d->setPixmap(KIconLoader::global()->loadIcon(iconName, KIconLoader::Small, 0));
//d->setPixmap( KIconLoader::global()->loadMimeTypeIcon(KMimeType::pixmapForURL( frame->activeChildView()->url(), 0), KIconLoader::Small ) );
d->start();
}
}

View file

@ -159,7 +159,7 @@ void KonqPixmapProvider::clear()
QPixmap KonqPixmapProvider::loadIcon( const QString& url, const QString& icon,
int size )
{
if ( size <= K3Icon::SizeSmall )
if ( size <= KIconLoader::SizeSmall )
return SmallIcon( icon, size );
KUrl u;
@ -174,7 +174,7 @@ QPixmap KonqPixmapProvider::loadIcon( const QString& url, const QString& icon,
if ( url.startsWith( "http:/" ) && icon.startsWith("favicons/") ) {
QPixmap small = SmallIcon( icon, size );
big = KIconLoader::global()->loadIcon( KProtocolInfo::icon("http"),
K3Icon::Panel, size );
KIconLoader::Panel, size );
int x = big.width() - small.width();
int y = 0;
@ -206,7 +206,7 @@ QPixmap KonqPixmapProvider::loadIcon( const QString& url, const QString& icon,
}
else // not a favicon..
big = KIconLoader::global()->loadIcon( icon, K3Icon::Panel, size );
big = KIconLoader::global()->loadIcon( icon, KIconLoader::Panel, size );
return big;
}