1 /* 2 SPDX-FileCopyrightText: 2013-2021 Laurent Montel <montel@kde.org> 3 4 SPDX-License-Identifier: GPL-2.0-or-later 5 */ 6 7 #pragma once 8 9 #include "pimcommon_export.h" 10 11 #include <KCoreConfigSkeleton> 12 13 class QWidget; 14 class QGroupBox; 15 class QCheckBox; 16 class QButtonGroup; 17 class QLineEdit; 18 class KConfigSkeletonItem; 19 class KUrlRequester; 20 class QSpinBox; 21 class QComboBox; 22 23 namespace PimCommon 24 { 25 class SimpleStringListEditor; 26 namespace ConfigureImmutableWidgetUtils 27 { 28 void checkLockDown(QWidget *w, const KConfigSkeletonItem *item); 29 PIMCOMMON_EXPORT void populateButtonGroup(QGroupBox *box, QButtonGroup *group, int orientation, const KCoreConfigSkeleton::ItemEnum *e); 30 PIMCOMMON_EXPORT void populateCheckBox(QCheckBox *b, const KCoreConfigSkeleton::ItemBool *e); 31 PIMCOMMON_EXPORT void loadWidget(QCheckBox *b, const KCoreConfigSkeleton::ItemBool *e); 32 PIMCOMMON_EXPORT void loadWidget(QGroupBox *box, QButtonGroup *group, const KCoreConfigSkeleton::ItemEnum *e); 33 PIMCOMMON_EXPORT void loadWidget(QLineEdit *b, const KCoreConfigSkeleton::ItemString *e); 34 PIMCOMMON_EXPORT void loadWidget(KUrlRequester *b, const KCoreConfigSkeleton::ItemString *e); 35 PIMCOMMON_EXPORT void loadWidget(QSpinBox *b, const KCoreConfigSkeleton::ItemInt *e); 36 PIMCOMMON_EXPORT void loadWidget(PimCommon::SimpleStringListEditor *b, const KCoreConfigSkeleton::ItemStringList *e); 37 PIMCOMMON_EXPORT void loadWidget(QSpinBox *b, const KCoreConfigSkeleton::ItemUInt *e); 38 PIMCOMMON_EXPORT void loadWidget(QComboBox *b, const KCoreConfigSkeleton::ItemEnum *e); 39 PIMCOMMON_EXPORT void loadWidget(QGroupBox *b, const KCoreConfigSkeleton::ItemBool *e); 40 41 PIMCOMMON_EXPORT void saveComboBox(QComboBox *b, KCoreConfigSkeleton::ItemEnum *e); 42 PIMCOMMON_EXPORT void saveSpinBox(QSpinBox *b, KCoreConfigSkeleton::ItemUInt *e); 43 PIMCOMMON_EXPORT void saveSpinBox(QSpinBox *b, KCoreConfigSkeleton::ItemInt *e); 44 PIMCOMMON_EXPORT void saveCheckBox(QCheckBox *b, KCoreConfigSkeleton::ItemBool *e); 45 PIMCOMMON_EXPORT void saveLineEdit(QLineEdit *b, KCoreConfigSkeleton::ItemString *e); 46 PIMCOMMON_EXPORT void saveUrlRequester(KUrlRequester *b, KCoreConfigSkeleton::ItemString *e); 47 PIMCOMMON_EXPORT void saveSimpleStringListEditor(PimCommon::SimpleStringListEditor *b, KCoreConfigSkeleton::ItemStringList *e); 48 PIMCOMMON_EXPORT void saveGroupBox(QGroupBox *b, KCoreConfigSkeleton::ItemBool *e); 49 50 PIMCOMMON_EXPORT void saveButtonGroup(QButtonGroup *group, KCoreConfigSkeleton::ItemEnum *e); 51 } 52 } 53