KPIM::KPrefsWidManager

KPIM::KPrefsWidManager Class Reference

#include <kprefsdialog.h>

Inheritance diagram for KPIM::KPrefsWidManager:

Public Member Functions

 KPrefsWidManager (KConfigSkeleton *prefs)
 
virtual ~KPrefsWidManager ()
 
virtual void addWid (KPrefsWid *)
 
KPrefsWidBooladdWidBool (KConfigSkeleton::ItemBool *item, QWidget *parent=nullptr)
 
KPrefsWidColoraddWidColor (KConfigSkeleton::ItemColor *item, QWidget *parent=nullptr)
 
KPrefsWidComboaddWidCombo (KConfigSkeleton::ItemEnum *item, QWidget *parent=nullptr)
 
KPrefsWidDateaddWidDate (KConfigSkeleton::ItemDateTime *item, QWidget *parent=nullptr)
 
KPrefsWidDurationaddWidDuration (KConfigSkeleton::ItemDateTime *item, const QString &format, QWidget *parent=nullptr)
 
KPrefsWidFontaddWidFont (KConfigSkeleton::ItemFont *item, QWidget *parent=nullptr, const QString &sampleText=QString())
 
KPrefsWidIntaddWidInt (KConfigSkeleton::ItemInt *item, QWidget *parent=nullptr)
 
KPrefsWidStringaddWidPassword (KConfigSkeleton::ItemString *item, QWidget *parent=nullptr)
 
KPrefsWidPathaddWidPath (KConfigSkeleton::ItemPath *item, QWidget *parent=nullptr, const QString &filter=QString(), KFile::Modes mode=KFile::File)
 
KPrefsWidRadiosaddWidRadios (KConfigSkeleton::ItemEnum *item, QWidget *parent=nullptr)
 
KPrefsWidStringaddWidString (KConfigSkeleton::ItemString *item, QWidget *parent=nullptr)
 
KPrefsWidTimeaddWidTime (KConfigSkeleton::ItemDateTime *item, QWidget *parent=nullptr)
 
KConfigSkeletonprefs () const
 
void readWidConfig ()
 
void setWidDefaults ()
 
void writeWidConfig ()
 

Detailed Description

Class for managing KPrefsWid objects.

This class manages standard configuration widgets provided bz the KPrefsWid subclasses. It handles creation, loading, saving and default values in a transparent way. The user has to add the widgets by the corresponding addWid functions and KPrefsWidManager handles the rest automatically.

Definition at line 573 of file kprefsdialog.h.

Constructor & Destructor Documentation

KPrefsWidManager::KPrefsWidManager ( KConfigSkeleton prefs)
explicit

Create a KPrefsWidManager object for a KPrefs object.

Parameters
prefsKPrefs object used to access te configuration.

Definition at line 636 of file kprefsdialog.cpp.

KPrefsWidManager::~KPrefsWidManager ( )
virtual

Destructor.

Definition at line 641 of file kprefsdialog.cpp.

Member Function Documentation

void KPrefsWidManager::addWid ( KPrefsWid wid)
virtual

Register a custom KPrefsWid object.

Definition at line 647 of file kprefsdialog.cpp.

KPrefsWidBool * KPrefsWidManager::addWidBool ( KConfigSkeleton::ItemBool *  item,
QWidget parent = nullptr 
)

Register a KPrefsWidBool object.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
parentParent widget.

Definition at line 652 of file kprefsdialog.cpp.

KPrefsWidColor * KPrefsWidManager::addWidColor ( KConfigSkeleton::ItemColor item,
QWidget parent = nullptr 
)

Register a KPrefsWidColor object.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
parentParent widget.

Definition at line 680 of file kprefsdialog.cpp.

KPrefsWidCombo * KPrefsWidManager::addWidCombo ( KConfigSkeleton::ItemEnum *  item,
QWidget parent = nullptr 
)

Register a KPrefsWidCombo object.

The choices represented by the given item object are automatically added to the combo box.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
parentParent widget.

Definition at line 702 of file kprefsdialog.cpp.

KPrefsWidDate * KPrefsWidManager::addWidDate ( KConfigSkeleton::ItemDateTime *  item,
QWidget parent = nullptr 
)

Register a KPrefsWidDate object.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
parentParent widget.

Definition at line 673 of file kprefsdialog.cpp.

KPrefsWidDuration * KPrefsWidManager::addWidDuration ( KConfigSkeleton::ItemDateTime *  item,
const QString format,
QWidget parent = nullptr 
)

Register a KPrefsWidDuration object.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
formatdisplay format. default is "hh:mm:ss"
parentParent widget.

Definition at line 666 of file kprefsdialog.cpp.

KPrefsWidFont * KPrefsWidManager::addWidFont ( KConfigSkeleton::ItemFont item,
QWidget parent = nullptr,
const QString sampleText = QString() 
)

Register a KPrefsWidFont object.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
parentParent widget.
sampleTextSample text for previewing the selected font.

Definition at line 736 of file kprefsdialog.cpp.

KPrefsWidInt * KPrefsWidManager::addWidInt ( KConfigSkeleton::ItemInt *  item,
QWidget parent = nullptr 
)

Register a KPrefsWidInt object.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
parentParent widget.

Definition at line 743 of file kprefsdialog.cpp.

KPrefsWidString * KPrefsWidManager::addWidPassword ( KConfigSkeleton::ItemString *  item,
QWidget parent = nullptr 
)

Register a password KPrefsWidString object, with echomode set to KLineEdit::Password.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
parentParent widget.

Definition at line 729 of file kprefsdialog.cpp.

KPrefsWidPath * KPrefsWidManager::addWidPath ( KConfigSkeleton::ItemPath *  item,
QWidget parent = nullptr,
const QString filter = QString(),
KFile::Modes  mode = KFile::File 
)

Register a path KPrefsWidPath object.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
parentParent widget.
filterURLRequester filter
modeURLRequester mode

Definition at line 722 of file kprefsdialog.cpp.

KPrefsWidRadios * KPrefsWidManager::addWidRadios ( KConfigSkeleton::ItemEnum *  item,
QWidget parent = nullptr 
)

Register a KPrefsWidRadios object.

The choices represented by the given item object are automatically added as radio buttons.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
parentParent widget.

Definition at line 687 of file kprefsdialog.cpp.

KPrefsWidString * KPrefsWidManager::addWidString ( KConfigSkeleton::ItemString *  item,
QWidget parent = nullptr 
)

Register a KPrefsWidString object.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
parentParent widget.

Definition at line 715 of file kprefsdialog.cpp.

KPrefsWidTime * KPrefsWidManager::addWidTime ( KConfigSkeleton::ItemDateTime *  item,
QWidget parent = nullptr 
)

Register a KPrefsWidTime object.

Parameters
itemThe KConfigSkeletonItem representing the preferences entry.
parentParent widget.

Definition at line 659 of file kprefsdialog.cpp.

void KPrefsWidManager::readWidConfig ( )

Read preferences from config file.

Definition at line 757 of file kprefsdialog.cpp.

void KPrefsWidManager::setWidDefaults ( )

Set all widgets to default values.

Definition at line 750 of file kprefsdialog.cpp.

void KPrefsWidManager::writeWidConfig ( )

Write preferences to config file.

Definition at line 765 of file kprefsdialog.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 4 2020 23:18:55 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.