Changeset View
Changeset View
Standalone View
Standalone View
kcms/colors/colors.cpp
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 60 | KCMColors::KCMColors(QObject *parent, const QVariantList &args) | |||
---|---|---|---|---|---|
62 | , m_model(new ColorsModel(this)) | 62 | , m_model(new ColorsModel(this)) | ||
63 | , m_filteredModel(new FilterProxyModel(this)) | 63 | , m_filteredModel(new FilterProxyModel(this)) | ||
64 | , m_settings(new ColorsSettings(this)) | 64 | , m_settings(new ColorsSettings(this)) | ||
65 | , m_config(KSharedConfig::openConfig(QStringLiteral("kdeglobals"))) | 65 | , m_config(KSharedConfig::openConfig(QStringLiteral("kdeglobals"))) | ||
66 | { | 66 | { | ||
67 | qmlRegisterUncreatableType<KCMColors>("org.kde.private.kcms.colors", 1, 0, "KCM", QStringLiteral("Cannot create instances of KCM")); | 67 | qmlRegisterUncreatableType<KCMColors>("org.kde.private.kcms.colors", 1, 0, "KCM", QStringLiteral("Cannot create instances of KCM")); | ||
68 | qmlRegisterType<ColorsModel>(); | 68 | qmlRegisterType<ColorsModel>(); | ||
69 | qmlRegisterType<FilterProxyModel>(); | 69 | qmlRegisterType<FilterProxyModel>(); | ||
70 | qmlRegisterType<ColorsSettings>(); | ||||
70 | 71 | | |||
71 | KAboutData *about = new KAboutData(QStringLiteral("kcm_colors"), i18n("Colors"), | 72 | KAboutData *about = new KAboutData(QStringLiteral("kcm_colors"), i18n("Colors"), | ||
72 | QStringLiteral("2.0"), QString(), KAboutLicense::GPL); | 73 | QStringLiteral("2.0"), QString(), KAboutLicense::GPL); | ||
73 | about->addAuthor(i18n("Kai Uwe Broulik"), QString(), QStringLiteral("kde@privat.broulik.de")); | 74 | about->addAuthor(i18n("Kai Uwe Broulik"), QString(), QStringLiteral("kde@privat.broulik.de")); | ||
74 | setAboutData(about); | 75 | setAboutData(about); | ||
75 | 76 | | |||
76 | connect(m_model, &ColorsModel::pendingDeletionsChanged, this, [this] { | 77 | connect(m_model, &ColorsModel::pendingDeletionsChanged, this, [this] { | ||
77 | setNeedsSave(true); | 78 | setNeedsSave(true); | ||
Show All 22 Lines | 100 | { | |||
100 | return m_model; | 101 | return m_model; | ||
101 | } | 102 | } | ||
102 | 103 | | |||
103 | FilterProxyModel *KCMColors::filteredModel() const | 104 | FilterProxyModel *KCMColors::filteredModel() const | ||
104 | { | 105 | { | ||
105 | return m_filteredModel; | 106 | return m_filteredModel; | ||
106 | } | 107 | } | ||
107 | 108 | | |||
109 | ColorsSettings *KCMColors::colorsSettings() const | ||||
110 | { | ||||
111 | return m_settings; | ||||
112 | } | ||||
113 | | ||||
108 | bool KCMColors::downloadingFile() const | 114 | bool KCMColors::downloadingFile() const | ||
109 | { | 115 | { | ||
110 | return m_tempCopyJob; | 116 | return m_tempCopyJob; | ||
111 | } | 117 | } | ||
112 | 118 | | |||
113 | void KCMColors::getNewStuff(QQuickItem *ctx) | 119 | void KCMColors::getNewStuff(QQuickItem *ctx) | ||
114 | { | 120 | { | ||
115 | if (!m_newStuffDialog) { | 121 | if (!m_newStuffDialog) { | ||
▲ Show 20 Lines • Show All 355 Lines • Show Last 20 Lines |