KateConfig::ConfigEntry

KateConfig::ConfigEntry Class Reference

#include <kateconfig.h>

Public Member Functions

 ConfigEntry (int enumId, const char *configId, QString command, QVariant defaultVal, std::function< bool(const QVariant &)> valid=nullptr)
 

Public Attributes

const QString commandName
 
const char *const configKey
 
const QVariant defaultValue
 
const int enumKey
 
std::function< bool(const QVariant &)> validator
 
QVariant value
 

Detailed Description

One config entry.

Definition at line 146 of file kateconfig.h.

Constructor & Destructor Documentation

KateConfig::ConfigEntry::ConfigEntry ( int  enumId,
const char *  configId,
QString  command,
QVariant  defaultVal,
std::function< bool(const QVariant &)>  valid = nullptr 
)
inline

Construct one config entry.

Parameters
enumIdvalue of the enum for this config entry
configIdvalue of the key for the KConfig file for this config entry
commandcommand name
defaultValdefault value
validvalidator function, default none

Definition at line 157 of file kateconfig.h.

Member Data Documentation

const QString KateConfig::ConfigEntry::commandName

Command name as used in e.g.

ConfigInterface or modeline/command line e.g. tab-width

Definition at line 182 of file kateconfig.h.

const char* const KateConfig::ConfigEntry::configKey

KConfig entry key for this config entry, shall be unique in its group e.g.

"Tab Width"

Definition at line 176 of file kateconfig.h.

const QVariant KateConfig::ConfigEntry::defaultValue

Default value if nothing special was configured.

Definition at line 187 of file kateconfig.h.

const int KateConfig::ConfigEntry::enumKey

Enum key for this config entry, shall be unique.

Definition at line 170 of file kateconfig.h.

std::function<bool(const QVariant &)> KateConfig::ConfigEntry::validator

An optional validator function, only when these returns true we accept a given new value.

Is no validator set, we accept any value.

Definition at line 199 of file kateconfig.h.

QVariant KateConfig::ConfigEntry::value

The concrete value, per default == defaultValue.

Definition at line 192 of file kateconfig.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 12 2020 22:58:02 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.