Public Types | Public Member Functions | Private Attributes | List of all members
ConfigString Class Reference

#include <config.h>

Inheritance diagram for ConfigString:
ConfigOption

Public Types

enum  WidgetType { String, File, Dir, Image }
 
- Public Types inherited from ConfigOption
enum  OptionType {
  O_Info, O_List, O_Enum, O_String,
  O_Int, O_Bool, O_Obsolete, O_Disabled
}
 
enum  { MAX_OPTION_LENGTH = 23 }
 

Public Member Functions

 ConfigString (const char *name, const char *doc)
 
 ~ConfigString ()
 
void setWidgetType (WidgetType w)
 
WidgetType widgetType () const
 
void setDefaultValue (const char *v)
 
QCStringvalueRef ()
 
void writeTemplate (FTextStream &t, bool sl, bool)
 
void substEnvVars ()
 
void init ()
 
- Public Member Functions inherited from ConfigOption
 ConfigOption (OptionType t)
 
virtual ~ConfigOption ()
 
OptionType kind () const
 
QCString name () const
 
QCString docs () const
 
QCString dependsOn () const
 
void addDependency (const char *dep)
 
void setEncoding (const QCString &e)
 
void setUserComment (const QCString &u)
 

Private Attributes

QCString m_value
 
QCString m_defValue
 
WidgetType m_widgetType
 

Additional Inherited Members

- Protected Member Functions inherited from ConfigOption
virtual void convertStrToVal ()
 
void writeBoolValue (FTextStream &t, bool v)
 
void writeIntValue (FTextStream &t, int i)
 
void writeStringValue (FTextStream &t, QCString &s)
 
void writeStringList (FTextStream &t, QStrList &l)
 
- Protected Attributes inherited from ConfigOption
QCString m_spaces
 
QCString m_name
 
QCString m_doc
 
QCString m_dependency
 
QCString m_encoding
 
QCString m_userComment
 
OptionType m_kind
 

Detailed Description

Class representing a string type option.

Definition at line 165 of file config.h.

Member Enumeration Documentation

Enumerator
String 
File 
Dir 
Image 

Definition at line 168 of file config.h.

Constructor & Destructor Documentation

ConfigString::ConfigString ( const char *  name,
const char *  doc 
)
inline

Definition at line 169 of file config.h.

171  {
172  m_name = name;
173  m_doc = doc;
175  }
QCString m_name
Definition: config.h:86
ConfigOption(OptionType t)
Definition: config.h:56
QCString m_doc
Definition: config.h:87
WidgetType m_widgetType
Definition: config.h:190
QCString name() const
Definition: config.h:66
QCString doc
ConfigString::~ConfigString ( )
inline

Definition at line 176 of file config.h.

177  {
178  }

Member Function Documentation

void ConfigString::init ( )
inlinevirtual

Reimplemented from ConfigOption.

Definition at line 185 of file config.h.

185 { m_value = m_defValue.copy(); }
QCString copy() const
Definition: qcstring.h:250
QCString m_value
Definition: config.h:188
QCString m_defValue
Definition: config.h:189
void ConfigString::setDefaultValue ( const char *  v)
inline

Definition at line 181 of file config.h.

181 { m_defValue = v; }
QCString m_defValue
Definition: config.h:189
void ConfigString::setWidgetType ( WidgetType  w)
inline

Definition at line 179 of file config.h.

179 { m_widgetType = w; }
WidgetType m_widgetType
Definition: config.h:190
void ConfigString::substEnvVars ( )
virtual

Implements ConfigOption.

Definition at line 3002 of file config.cpp.

3003 {
3005 }
QCString m_value
Definition: config.h:188
static void substEnvVarsInString(QCString &s)
Definition: config.cpp:2897
QCString* ConfigString::valueRef ( )
inline

Definition at line 182 of file config.h.

182 { return &m_value; }
QCString m_value
Definition: config.h:188
WidgetType ConfigString::widgetType ( ) const
inline

Definition at line 180 of file config.h.

180 { return m_widgetType; }
WidgetType m_widgetType
Definition: config.h:190
void ConfigString::writeTemplate ( FTextStream t,
bool  sl,
bool   
)
virtual

Implements ConfigOption.

Definition at line 955 of file config.cpp.

956 {
957  if (!sl)
958  {
959  t << endl;
961  t << endl;
962  }
963  else if (!m_userComment.isEmpty())
964  {
966  }
969  t << "\n";
970 }
QCString m_spaces
Definition: config.h:85
QCString m_name
Definition: config.h:86
bool isEmpty() const
Definition: qcstring.h:189
QCString m_userComment
Definition: config.h:90
static QCString convertToComment(const QCString &s, const QCString &u)
Definition: config.cpp:694
uint length() const
Definition: qcstring.h:195
void writeStringValue(FTextStream &t, QCString &s)
Definition: config.cpp:737
QCString left(uint len) const
Definition: qcstring.cpp:213
QCString m_value
Definition: config.h:188
QCString m_doc
Definition: config.h:87
QTextStream & endl(QTextStream &s)

Member Data Documentation

QCString ConfigString::m_defValue
private

Definition at line 189 of file config.h.

QCString ConfigString::m_value
private

Definition at line 188 of file config.h.

WidgetType ConfigString::m_widgetType
private

Definition at line 190 of file config.h.


The documentation for this class was generated from the following files: