Changeset View
Changeset View
Standalone View
Standalone View
Modules/energy/kcm.cpp
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
46 | 46 | | |||
47 | using namespace KQuickAddons; | 47 | using namespace KQuickAddons; | ||
48 | 48 | | |||
49 | KCMEnergyInfo::KCMEnergyInfo(QObject *parent, const QVariantList &args) : ConfigModule(parent, args) | 49 | KCMEnergyInfo::KCMEnergyInfo(QObject *parent, const QVariantList &args) : ConfigModule(parent, args) | ||
50 | { | 50 | { | ||
51 | qmlRegisterType<BatteryModel>(); | 51 | qmlRegisterType<BatteryModel>(); | ||
52 | qmlRegisterType<WakeUpModel>(); | 52 | qmlRegisterType<WakeUpModel>(); | ||
53 | qmlRegisterType<StatisticsProvider>("org.kde.kinfocenter.energy.private", 1, 0, "HistoryModel"); | 53 | qmlRegisterType<StatisticsProvider>("org.kde.kinfocenter.energy.private", 1, 0, "HistoryModel"); | ||
54 | qmlRegisterUncreatableType<BatteryModel>("org.kde.kinfocenter.energy.private", 1, 0, "BatteryModel", | ||||
55 | QStringLiteral("Use BatteryModel")); | ||||
54 | 56 | | |||
55 | KAboutData *about = new KAboutData(QStringLiteral("kcm_energyinfo"), i18n("Energy Consumption Statistics"), | 57 | KAboutData *about = new KAboutData(QStringLiteral("kcm_energyinfo"), i18n("Energy Consumption Statistics"), | ||
56 | QStringLiteral("0.2"), QString(), KAboutLicense::GPL); | 58 | QStringLiteral("0.2"), QString(), KAboutLicense::GPL); | ||
57 | about->addAuthor(i18n("Kai Uwe Broulik"), QString(), QStringLiteral("kde@privat.broulik.de")); | 59 | about->addAuthor(i18n("Kai Uwe Broulik"), QString(), QStringLiteral("kde@privat.broulik.de")); | ||
58 | setAboutData(about); | 60 | setAboutData(about); | ||
59 | 61 | | |||
60 | m_batteries = new BatteryModel(this); | 62 | m_batteries = new BatteryModel(this); | ||
61 | 63 | | |||
62 | m_wakeUps = new WakeUpModel(this); | 64 | m_wakeUps = new WakeUpModel(this); | ||
63 | } | 65 | } | ||
64 | 66 | | |||
65 | 67 | | |||
66 | #include "kcm.moc" | 68 | #include "kcm.moc" |