Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/fonts.cpp
Show First 20 Lines • Show All 459 Lines • ▼ Show 20 Line(s) | 459 | { | |||
---|---|---|---|---|---|
460 | return m_state.hinting - KXftConfig::Hint::None; | 460 | return m_state.hinting - KXftConfig::Hint::None; | ||
461 | } | 461 | } | ||
462 | 462 | | |||
463 | bool FontAASettings::needsSave() const | 463 | bool FontAASettings::needsSave() const | ||
464 | { | 464 | { | ||
465 | return m_state != m_originalState; | 465 | return m_state != m_originalState; | ||
466 | } | 466 | } | ||
467 | 467 | | |||
468 | bool FontAASettings::State::operator==(const State& other) const | ||||
469 | { | ||||
470 | if ( | ||||
471 | exclude != other.exclude | ||||
472 | || antiAliasing != other.antiAliasing | ||||
473 | || dpi != other.dpi | ||||
474 | || subPixel != other.subPixel | ||||
475 | || hinting != other.hinting | ||||
476 | ) { | ||||
477 | return false; | ||||
478 | } | ||||
479 | | ||||
480 | if (exclude && (excludeFrom != other.excludeFrom || excludeTo != other.excludeTo)) { | ||||
481 | return false; | ||||
482 | } | ||||
483 | | ||||
484 | return true; | ||||
485 | } | ||||
486 | | ||||
487 | bool FontAASettings::State::operator!=(const State& other) const | ||||
488 | { | ||||
489 | return !(*this == other); | ||||
490 | } | ||||
468 | 491 | | |||
469 | /**** KFonts ****/ | 492 | /**** KFonts ****/ | ||
470 | 493 | | |||
471 | KFonts::KFonts(QObject *parent, const QVariantList &args) | 494 | KFonts::KFonts(QObject *parent, const QVariantList &args) | ||
472 | : KQuickAddons::ConfigModule(parent, args) | 495 | : KQuickAddons::ConfigModule(parent, args) | ||
473 | , m_settings(new FontsSettings(this)) | 496 | , m_settings(new FontsSettings(this)) | ||
474 | , m_fontAASettings(new FontAASettings(this)) | 497 | , m_fontAASettings(new FontAASettings(this)) | ||
475 | { | 498 | { | ||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Line(s) | 628 | if (fontDiffFlags & KFontChooser::FontDiffStyle) { | |||
607 | font.setStyle(newFont.style()); | 630 | font.setStyle(newFont.style()); | ||
608 | font.setUnderline(newFont.underline()); | 631 | font.setUnderline(newFont.underline()); | ||
609 | font.setStyleName(newFont.styleName()); | 632 | font.setStyleName(newFont.styleName()); | ||
610 | } | 633 | } | ||
611 | 634 | | |||
612 | return font; | 635 | return font; | ||
613 | } | 636 | } | ||
614 | 637 | | |||
615 | bool FontAASettings::State::operator==(const State& other) const | | |||
616 | { | | |||
617 | if ( | | |||
618 | exclude != other.exclude | | |||
619 | || antiAliasing != other.antiAliasing | | |||
620 | || dpi != other.dpi | | |||
621 | || subPixel != other.subPixel | | |||
622 | || hinting != other.hinting | | |||
623 | ) { | | |||
624 | return false; | | |||
625 | } | | |||
626 | | ||||
627 | if (exclude && (excludeFrom != other.excludeFrom || excludeTo != other.excludeTo)) { | | |||
628 | return false; | | |||
629 | } | | |||
630 | | ||||
631 | return true; | | |||
632 | } | | |||
633 | | ||||
634 | bool FontAASettings::State::operator!=(const State& other) const | | |||
635 | { | | |||
636 | return !(*this == other); | | |||
637 | } | | |||
638 | | ||||
639 | #include "fonts.moc" | 638 | #include "fonts.moc" | ||
640 | 639 | |