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 143 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 

Construct one config entry.

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 154 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 179 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 173 of file kateconfig.h.

◆ defaultValue

const QVariant KateConfig::ConfigEntry::defaultValue

Default value if nothing special was configured.

Definition at line 184 of file kateconfig.h.

◆ enumKey

const int KateConfig::ConfigEntry::enumKey

Enum key for this config entry, shall be unique.

Definition at line 167 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 196 of file kateconfig.h.

◆ value

QVariant KateConfig::ConfigEntry::value

The concrete value, per default == defaultValue.

Definition at line 189 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-2022 The KDE developers.
Generated on Sun Jun 26 2022 03:49:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.