Changeset View
Changeset View
Standalone View
Standalone View
kcms/kfontinst/kcmfontinst/FontList.cpp
Show First 20 Lines • Show All 608 Lines • ▼ Show 20 Line(s) | 606 | { | |||
---|---|---|---|---|---|
609 | case COL_STATUS: | 609 | case COL_STATUS: | ||
610 | return i18n("Status"); | 610 | return i18n("Status"); | ||
611 | default: | 611 | default: | ||
612 | break; | 612 | break; | ||
613 | } | 613 | } | ||
614 | break; | 614 | break; | ||
615 | // case Qt::DecorationRole: | 615 | // case Qt::DecorationRole: | ||
616 | // if(COL_STATUS==section) | 616 | // if(COL_STATUS==section) | ||
617 | // return SmallIcon("fontstatus"); | 617 | // return QIcon::fromTheme("fontstatus"); | ||
618 | // break; | 618 | // break; | ||
619 | case Qt::TextAlignmentRole: | 619 | case Qt::TextAlignmentRole: | ||
620 | return QVariant(Qt::AlignLeft | Qt::AlignVCenter); | 620 | return QVariant(Qt::AlignLeft | Qt::AlignVCenter); | ||
621 | case Qt::ToolTipRole: | 621 | case Qt::ToolTipRole: | ||
622 | if(COL_STATUS==section) | 622 | if(COL_STATUS==section) | ||
623 | return i18n("This column shows the status of the font family, and of the " | 623 | return i18n("This column shows the status of the font family, and of the " | ||
624 | "individual font styles."); | 624 | "individual font styles."); | ||
625 | break; | 625 | break; | ||
▲ Show 20 Lines • Show All 462 Lines • ▼ Show 20 Line(s) | 1087 | { | |||
1088 | CFamilyItem *fam=static_cast<CFamilyItem *>(index.internalPointer()); | 1088 | CFamilyItem *fam=static_cast<CFamilyItem *>(index.internalPointer()); | ||
1089 | 1089 | | |||
1090 | switch(index.column()) | 1090 | switch(index.column()) | ||
1091 | { | 1091 | { | ||
1092 | case COL_STATUS: | 1092 | case COL_STATUS: | ||
1093 | switch(fam->status()) | 1093 | switch(fam->status()) | ||
1094 | { | 1094 | { | ||
1095 | case CFamilyItem::PARTIAL: | 1095 | case CFamilyItem::PARTIAL: | ||
1096 | return SmallIcon("dialog-ok", 0, KIconLoader::DisabledState); | 1096 | return QIcon::fromTheme("dialog-ok"); | ||
1097 | case CFamilyItem::ENABLED: | 1097 | case CFamilyItem::ENABLED: | ||
1098 | return SmallIcon("dialog-ok"); | 1098 | return QIcon::fromTheme("dialog-ok"); | ||
1099 | case CFamilyItem::DISABLED: | 1099 | case CFamilyItem::DISABLED: | ||
1100 | return SmallIcon("dialog-cancel"); | 1100 | return QIcon::fromTheme("dialog-cancel"); | ||
1101 | } | 1101 | } | ||
1102 | break; | 1102 | break; | ||
1103 | default: | 1103 | default: | ||
1104 | break; | 1104 | break; | ||
1105 | } | 1105 | } | ||
1106 | } | 1106 | } | ||
1107 | else if(COL_STATUS==index.column()) | 1107 | else if(COL_STATUS==index.column()) | ||
1108 | return SmallIcon( (static_cast<CFontItem *>(index.internalPointer()))->isEnabled() | 1108 | return QIcon::fromTheme( (static_cast<CFontItem *>(index.internalPointer()))->isEnabled() | ||
1109 | ? "dialog-ok" : "dialog-cancel", 10); | 1109 | ? "dialog-ok" : "dialog-cancel"); | ||
1110 | break; | 1110 | break; | ||
1111 | case Qt::SizeHintRole: | 1111 | case Qt::SizeHintRole: | ||
1112 | if(mi->isFamily()) { | 1112 | if(mi->isFamily()) { | ||
1113 | const int s = KIconLoader::global()->currentSize(KIconLoader::Small); | 1113 | const int s = KIconLoader::global()->currentSize(KIconLoader::Small); | ||
1114 | return QSize(s, s + 4); | 1114 | return QSize(s, s + 4); | ||
1115 | } | 1115 | } | ||
1116 | default: | 1116 | default: | ||
1117 | break; | 1117 | break; | ||
▲ Show 20 Lines • Show All 288 Lines • ▼ Show 20 Line(s) | 1384 | { | |||
1406 | connect(itsModel, SIGNAL(listingPercent(int)), SLOT(listingPercent(int))); | 1406 | connect(itsModel, SIGNAL(listingPercent(int)), SLOT(listingPercent(int))); | ||
1407 | 1407 | | |||
1408 | setWhatsThis(model->whatsThis()); | 1408 | setWhatsThis(model->whatsThis()); | ||
1409 | header()->setWhatsThis(whatsThis()); | 1409 | header()->setWhatsThis(whatsThis()); | ||
1410 | itsMenu=new QMenu(this); | 1410 | itsMenu=new QMenu(this); | ||
1411 | itsDeleteAct=itsMenu->addAction(QIcon::fromTheme("edit-delete"), i18n("Delete"), | 1411 | itsDeleteAct=itsMenu->addAction(QIcon::fromTheme("edit-delete"), i18n("Delete"), | ||
1412 | this, SIGNAL(del())); | 1412 | this, SIGNAL(del())); | ||
1413 | itsMenu->addSeparator(); | 1413 | itsMenu->addSeparator(); | ||
1414 | itsEnableAct=itsMenu->addAction(QIcon::fromTheme("enablefont"), i18n("Enable"), | 1414 | itsEnableAct=itsMenu->addAction(QIcon::fromTheme("font-enable"), i18n("Enable"), | ||
1415 | this, SIGNAL(enable())); | 1415 | this, SIGNAL(enable())); | ||
1416 | itsDisableAct=itsMenu->addAction(QIcon::fromTheme("disablefont"), i18n("Disable"), | 1416 | itsDisableAct=itsMenu->addAction(QIcon::fromTheme("font-disable"), i18n("Disable"), | ||
1417 | this, SIGNAL(disable())); | 1417 | this, SIGNAL(disable())); | ||
1418 | if(!Misc::app(KFI_VIEWER).isEmpty()) | 1418 | if(!Misc::app(KFI_VIEWER).isEmpty()) | ||
1419 | itsMenu->addSeparator(); | 1419 | itsMenu->addSeparator(); | ||
1420 | itsPrintAct=Misc::app(KFI_VIEWER).isEmpty() ? nullptr : itsMenu->addAction(QIcon::fromTheme("document-print"), i18n("Print..."), | 1420 | itsPrintAct=Misc::app(KFI_VIEWER).isEmpty() ? nullptr : itsMenu->addAction(QIcon::fromTheme("document-print"), i18n("Print..."), | ||
1421 | this, SIGNAL(print())); | 1421 | this, SIGNAL(print())); | ||
1422 | itsViewAct=Misc::app(KFI_VIEWER).isEmpty() ? nullptr : itsMenu->addAction(QIcon::fromTheme("kfontview"), i18n("Open in Font Viewer"), | 1422 | itsViewAct=Misc::app(KFI_VIEWER).isEmpty() ? nullptr : itsMenu->addAction(QIcon::fromTheme("kfontview"), i18n("Open in Font Viewer"), | ||
1423 | this, SLOT(view())); | 1423 | this, SLOT(view())); | ||
1424 | itsMenu->addSeparator(); | 1424 | itsMenu->addSeparator(); | ||
▲ Show 20 Lines • Show All 636 Lines • Show Last 20 Lines |