6 class ConfigBasePrivate
13 bool musicBrainzLookupEnabled;
14 bool freedbLookupEnabled;
15 bool cacheLookupEnabled;
16 int freedbLookupTransport;
17 QStringList cacheLocations;
20 int freedbSubmitTransport;
22 QString httpSubmitServer;
29 QString submitAddress;
32 KConfigSkeleton::ItemString *itemHostname;
33 KConfigSkeleton::ItemInt *itemPort;
34 KConfigSkeleton::ItemBool *itemMusicBrainzLookupEnabled;
35 KConfigSkeleton::ItemBool *itemFreedbLookupEnabled;
36 KConfigSkeleton::ItemBool *itemCacheLookupEnabled;
37 KConfigSkeleton::ItemEnum *itemFreedbLookupTransport;
38 KConfigSkeleton::ItemPathList *itemCacheLocations;
39 KConfigSkeleton::ItemEnum *itemFreedbSubmitTransport;
40 KConfigSkeleton::ItemString *itemEmailAddress;
41 KConfigSkeleton::ItemString *itemHttpSubmitServer;
42 KConfigSkeleton::ItemInt *itemHttpSubmitPort;
43 KConfigSkeleton::ItemInt *itemSmtpPort;
44 KConfigSkeleton::ItemString *itemSmtpUsername;
45 KConfigSkeleton::ItemBool *itemUseGlobalEmail;
46 KConfigSkeleton::ItemString *itemReplyTo;
47 KConfigSkeleton::ItemString *itemSmtpHostname;
48 KConfigSkeleton::ItemString *itemSubmitAddress;
54 d =
new ConfigBasePrivate;
55 setCurrentGroup( QLatin1String(
"Lookup" ) );
57 d->itemHostname =
new KConfigSkeleton::ItemString( currentGroup(), QLatin1String(
"hostname" ), d->hostname, QLatin1String(
"freedb.freedb.org" ) );
58 addItem( d->itemHostname, QLatin1String(
"hostname" ) );
59 d->itemPort =
new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String(
"port" ), d->port, 80 );
60 addItem( d->itemPort, QLatin1String(
"port" ) );
61 d->itemMusicBrainzLookupEnabled =
new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String(
"MusicBrainzLookupEnabled" ), d->musicBrainzLookupEnabled,
true );
62 addItem( d->itemMusicBrainzLookupEnabled, QLatin1String(
"MusicBrainzLookupEnabled" ) );
63 d->itemFreedbLookupEnabled =
new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String(
"FreedbLookupEnabled" ), d->freedbLookupEnabled,
true );
64 addItem( d->itemFreedbLookupEnabled, QLatin1String(
"FreedbLookupEnabled" ) );
65 d->itemCacheLookupEnabled =
new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String(
"CacheLookupEnabled" ), d->cacheLookupEnabled,
true );
66 addItem( d->itemCacheLookupEnabled, QLatin1String(
"CacheLookupEnabled" ) );
67 QList<KConfigSkeleton::ItemEnum::Choice2> valuesFreedbLookupTransport;
69 KConfigSkeleton::ItemEnum::Choice2 choice;
70 choice.name = QLatin1String(
"CDDBP");
71 valuesFreedbLookupTransport.append( choice );
74 KConfigSkeleton::ItemEnum::Choice2 choice;
75 choice.name = QLatin1String(
"HTTP");
76 valuesFreedbLookupTransport.append( choice );
78 d->itemFreedbLookupTransport =
new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String(
"FreedbLookupTransport" ), d->freedbLookupTransport, valuesFreedbLookupTransport,
EnumFreedbLookupTransport::HTTP );
79 addItem( d->itemFreedbLookupTransport, QLatin1String(
"FreedbLookupTransport" ) );
80 d->itemCacheLocations =
new KConfigSkeleton::ItemPathList( currentGroup(), QLatin1String(
"cacheLocations" ), d->cacheLocations, QStringList(QDir::homePath()+QLatin1String(
"/.cddb/")) );
81 addItem( d->itemCacheLocations, QLatin1String(
"cacheLocations" ) );
83 setCurrentGroup( QLatin1String(
"Submit" ) );
85 QList<KConfigSkeleton::ItemEnum::Choice2> valuesFreedbSubmitTransport;
87 KConfigSkeleton::ItemEnum::Choice2 choice;
88 choice.name = QLatin1String(
"HTTP");
89 valuesFreedbSubmitTransport.append( choice );
92 KConfigSkeleton::ItemEnum::Choice2 choice;
93 choice.name = QLatin1String(
"SMTP");
94 valuesFreedbSubmitTransport.append( choice );
96 d->itemFreedbSubmitTransport =
new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String(
"FreedbSubmitTransport" ), d->freedbSubmitTransport, valuesFreedbSubmitTransport,
EnumFreedbSubmitTransport::HTTP );
97 addItem( d->itemFreedbSubmitTransport, QLatin1String(
"FreedbSubmitTransport" ) );
98 d->itemEmailAddress =
new KConfigSkeleton::ItemString( currentGroup(), QLatin1String(
"emailAddress" ), d->emailAddress );
99 addItem( d->itemEmailAddress, QLatin1String(
"emailAddress" ) );
100 d->itemHttpSubmitServer =
new KConfigSkeleton::ItemString( currentGroup(), QLatin1String(
"httpSubmitServer" ), d->httpSubmitServer, QLatin1String(
"freedb.freedb.org" ) );
101 addItem( d->itemHttpSubmitServer, QLatin1String(
"httpSubmitServer" ) );
102 d->itemHttpSubmitPort =
new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String(
"httpSubmitPort" ), d->httpSubmitPort, 80 );
103 addItem( d->itemHttpSubmitPort, QLatin1String(
"httpSubmitPort" ) );
104 d->itemSmtpPort =
new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String(
"smtpPort" ), d->smtpPort, 25 );
105 addItem( d->itemSmtpPort, QLatin1String(
"smtpPort" ) );
106 d->itemSmtpUsername =
new KConfigSkeleton::ItemString( currentGroup(), QLatin1String(
"smtpUsername" ), d->smtpUsername );
107 addItem( d->itemSmtpUsername, QLatin1String(
"smtpUsername" ) );
108 d->itemUseGlobalEmail =
new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String(
"useGlobalEmail" ), d->useGlobalEmail,
true );
109 addItem( d->itemUseGlobalEmail, QLatin1String(
"useGlobalEmail" ) );
110 d->itemReplyTo =
new KConfigSkeleton::ItemString( currentGroup(), QLatin1String(
"replyTo" ), d->replyTo );
111 addItem( d->itemReplyTo, QLatin1String(
"replyTo" ) );
112 d->itemSmtpHostname =
new KConfigSkeleton::ItemString( currentGroup(), QLatin1String(
"smtpHostname" ), d->smtpHostname );
113 addItem( d->itemSmtpHostname, QLatin1String(
"smtpHostname" ) );
114 d->itemSubmitAddress =
new KConfigSkeleton::ItemString( currentGroup(), QLatin1String(
"submitAddress" ), d->submitAddress, QLatin1String(
"freedb-submit@freedb.org" ) );
115 addItem( d->itemSubmitAddress, QLatin1String(
"submitAddress" ) );
120 if (!isImmutable( QString::fromLatin1(
"hostname" ) ))
132 if (!isImmutable( QString::fromLatin1(
"port" ) ))
144 if (!isImmutable( QString::fromLatin1(
"MusicBrainzLookupEnabled" ) ))
145 d->musicBrainzLookupEnabled = v;
150 return d->musicBrainzLookupEnabled;
156 if (!isImmutable( QString::fromLatin1(
"FreedbLookupEnabled" ) ))
157 d->freedbLookupEnabled = v;
162 return d->freedbLookupEnabled;
168 if (!isImmutable( QString::fromLatin1(
"CacheLookupEnabled" ) ))
169 d->cacheLookupEnabled = v;
174 return d->cacheLookupEnabled;
180 if (!isImmutable( QString::fromLatin1(
"FreedbLookupTransport" ) ))
181 d->freedbLookupTransport = v;
186 return d->freedbLookupTransport;
192 if (!isImmutable( QString::fromLatin1(
"cacheLocations" ) ))
193 d->cacheLocations = v;
198 return d->cacheLocations;
204 if (!isImmutable( QString::fromLatin1(
"FreedbSubmitTransport" ) ))
205 d->freedbSubmitTransport = v;
210 return d->freedbSubmitTransport;
216 if (!isImmutable( QString::fromLatin1(
"emailAddress" ) ))
222 return d->emailAddress;
228 if (!isImmutable( QString::fromLatin1(
"httpSubmitServer" ) ))
229 d->httpSubmitServer = v;
234 return d->httpSubmitServer;
240 if (!isImmutable( QString::fromLatin1(
"httpSubmitPort" ) ))
241 d->httpSubmitPort = v;
246 return d->httpSubmitPort;
252 if (!isImmutable( QString::fromLatin1(
"smtpPort" ) ))
264 if (!isImmutable( QString::fromLatin1(
"smtpUsername" ) ))
270 return d->smtpUsername;
276 if (!isImmutable( QString::fromLatin1(
"useGlobalEmail" ) ))
277 d->useGlobalEmail = v;
282 return d->useGlobalEmail;
288 if (!isImmutable( QString::fromLatin1(
"replyTo" ) ))
300 if (!isImmutable( QString::fromLatin1(
"smtpHostname" ) ))
306 return d->smtpHostname;
312 if (!isImmutable( QString::fromLatin1(
"submitAddress" ) ))
313 d->submitAddress = v;
318 return d->submitAddress;
bool freedbLookupEnabled() const
Get FreedbLookupEnabled.
QString hostname() const
Get hostname.
int port() const
Get port.
void setEmailAddress(const QString &v)
Set emailAddress.
void setHostname(const QString &v)
Set hostname.
void setCacheLookupEnabled(bool v)
Set CacheLookupEnabled.
QString submitAddress() const
Get submitAddress.
int freedbLookupTransport() const
Get FreedbLookupTransport.
QStringList cacheLocations() const
Get cacheLocations.
void setFreedbLookupTransport(int v)
Set FreedbLookupTransport.
void setFreedbSubmitTransport(int v)
Set FreedbSubmitTransport.
void setCacheLocations(const QStringList &v)
Set cacheLocations.
int freedbSubmitTransport() const
Get FreedbSubmitTransport.
QString replyTo() const
Get replyTo.
void setMusicBrainzLookupEnabled(bool v)
Set MusicBrainzLookupEnabled.
QString smtpHostname() const
Get smtpHostname.
void setSubmitAddress(const QString &v)
Set submitAddress.
void setSmtpHostname(const QString &v)
Set smtpHostname.
void setHttpSubmitServer(const QString &v)
Set httpSubmitServer.
void setUseGlobalEmail(bool v)
Set useGlobalEmail.
void setReplyTo(const QString &v)
Set replyTo.
bool cacheLookupEnabled() const
Get CacheLookupEnabled.
QString httpSubmitServer() const
Get httpSubmitServer.
int smtpPort() const
Get smtpPort.
void setPort(int v)
Set port.
bool useGlobalEmail() const
Get useGlobalEmail.
void setSmtpPort(int v)
Set smtpPort.
void setSmtpUsername(const QString &v)
Set smtpUsername.
QString emailAddress() const
Get emailAddress.
bool musicBrainzLookupEnabled() const
Get MusicBrainzLookupEnabled.
int httpSubmitPort() const
Get httpSubmitPort.
void setFreedbLookupEnabled(bool v)
Set FreedbLookupEnabled.
QString smtpUsername() const
Get smtpUsername.
void setHttpSubmitPort(int v)
Set httpSubmitPort.