21 #ifndef TDECONFIGPROPAGATOR_H
22 #define TDECONFIGPROPAGATOR_H
25 #include <tqvaluelist.h>
27 #include <tqptrlist.h>
29 #include <tdemacros.h>
31 class TDEConfigSkeleton;
32 class TDEConfigSkeletonItem;
34 class TDE_EXPORT TDEConfigPropagator
41 TDEConfigPropagator();
48 TDEConfigPropagator( TDEConfigSkeleton *skeleton,
const TQString &kcfgFile );
49 virtual ~TDEConfigPropagator() {}
51 TDEConfigSkeleton *skeleton() {
return mSkeleton; }
58 class TDE_EXPORT Condition
61 Condition() : isValid( false ) {}
74 typedef TQValueList<Rule> List;
76 Rule() : hideValue( false ) {}
91 class TDE_EXPORT Change
94 typedef TQPtrList<Change> List;
96 Change(
const TQString &title ) : mTitle( title ) {}
99 void setTitle(
const TQString &title ) { mTitle = title; }
100 TQString title()
const {
return mTitle; }
102 virtual TQString arg1()
const {
return TQString(); }
103 virtual TQString arg2()
const {
return TQString(); }
105 virtual void apply() = 0;
111 class TDE_EXPORT ChangeConfig :
public Change
117 TQString arg1()
const;
118 TQString arg2()
const;
130 void updateChanges();
132 Change::List changes();
143 virtual void addCustomChanges( Change::List & ) {}
145 TDEConfigSkeletonItem *findItem(
const TQString &group,
const TQString &name );
147 TQString itemValueAsString( TDEConfigSkeletonItem * );
151 Rule parsePropagation(
const TQDomElement &e );
152 Condition parseCondition(
const TQDomElement &e );
154 void parseConfigEntryPath(
const TQString &path, TQString &file,
155 TQString &group, TQString &entry );
158 TDEConfigSkeleton *mSkeleton;
162 Change::List mChanges;