KateConfig::ConfigEntry

Search for usage in LXR

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 139 of file kateconfig.h.

Constructor & Destructor Documentation

◆ ConfigEntry()

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 150 of file kateconfig.h.

Member Data Documentation

◆ commandName

const QString KateConfig::ConfigEntry::commandName

Command name as used in e.g.

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

Definition at line 175 of file kateconfig.h.

◆ configKey

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 169 of file kateconfig.h.

◆ defaultValue

const QVariant KateConfig::ConfigEntry::defaultValue

Default value if nothing special was configured.

Definition at line 180 of file kateconfig.h.

◆ enumKey

const int KateConfig::ConfigEntry::enumKey

Enum key for this config entry, shall be unique.

Definition at line 163 of file kateconfig.h.

◆ validator

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 192 of file kateconfig.h.

◆ value

QVariant KateConfig::ConfigEntry::value

The concrete value, per default == defaultValue.

Definition at line 185 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-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:03:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.