00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#include <qvaluelist.h>
00023
#include <qstring.h>
00024
#include <klocale.h>
00025
00026
#ifndef _KABOUTDATA_H_
00027
#define _KABOUTDATA_H_
00028
00029
class KAboutPersonPrivate;
00030
class KAboutDataPrivate;
00031
00051 class KAboutPerson
00052 {
00053
public:
00067 KAboutPerson(
const char *name,
const char *task,
00068
const char *emailAddress,
const char *webAddress )
00069 {
00070 mName = name;
00071 mTask = task;
00072 mEmailAddress = emailAddress;
00073 mWebAddress = webAddress;
00074 }
00079
KAboutPerson() {}
00080
00086
QString name() const;
00087
00093
QString task() const;
00094
00100
QString emailAddress() const;
00101
00107
QString webAddress() const;
00108
00109 private:
00110 const
char *mName;
00111 const
char *mTask;
00112 const
char *mEmailAddress;
00113 const
char *mWebAddress;
00114
00115 KAboutPersonPrivate *d;
00116 };
00117
00118 class KAboutTranslatorPrivate;
00131 class
KAboutTranslator
00132 {
00133
public:
00141 KAboutTranslator(
const QString & name=QString::null,
00142
const QString & emailAddress=QString::null);
00143
00149
QString name()
const;
00150
00156
QString emailAddress()
const;
00157
00158
private:
00159
QString mName;
00160
QString mEmail;
00161 KAboutTranslatorPrivate* d;
00162 };
00163
00164
00180 class KAboutData
00181 {
00182
public:
00186 enum LicenseKey
00187 {
00188 License_Custom = -2,
00189 License_File = -1,
00190 License_Unknown = 0,
00191 License_GPL = 1,
00192 License_GPL_V2 = 1,
00193 License_LGPL = 2,
00194 License_LGPL_V2 = 2,
00195 License_BSD = 3,
00196 License_Artistic = 4,
00197 License_QPL = 5,
00198 License_QPL_V1_0 = 5
00199 };
00200
00201
public:
00236
KAboutData(
const char *appName,
00237
const char *programName,
00238
const char *version,
00239
const char *shortDescription = 0,
00240
int licenseType = License_Unknown,
00241
const char *copyrightStatement = 0,
00242
const char *text = 0,
00243
const char *homePageAddress = 0,
00244
const char *bugsEmailAddress =
"submit@bugs.kde.org"
00245 );
00246
00247 ~
KAboutData();
00248
00268
void addAuthor(
const char *name,
00269
const char *task=0,
00270
const char *emailAddress=0,
00271
const char *webAddress=0 );
00272
00292
void addCredit(
const char *name,
00293
const char *task=0,
00294
const char *emailAddress=0,
00295
const char *webAddress=0 );
00296
00321
void setTranslator(
const char* name,
const char* emailAddress);
00322
00338
void setLicenseText(
const char *license );
00339
00345
void setLicenseTextFile(
const QString &file );
00346
00352
void setAppName(
const char *appName );
00353
00361
void setProgramName(
const char* programName );
00362
00368
void setVersion(
const char* version );
00369
00377
void setShortDescription(
const char *shortDescription );
00378
00384
void setLicense( LicenseKey licenseKey);
00385
00394
void setCopyrightStatement(
const char *copyrightStatement );
00395
00403
void setOtherText(
const char *otherText );
00404
00412
void setHomepage(
const char *homepage );
00413
00420
void setBugAddress(
const char *bugAddress );
00421
00430
void setProductName(
const char *name );
00431
00436
const char *appName() const;
00437
00445 const
char *productName() const;
00450
QString programName() const;
00451
00456
QString version() const;
00457
00463
QString shortDescription() const;
00464
00470
QString homepage() const;
00471
00476
QString bugAddress() const;
00477
00482 const
QValueList<
KAboutPerson> authors() const;
00483
00488 const
QValueList<
KAboutPerson> credits() const;
00489
00494 const
QValueList<
KAboutTranslator> translators() const;
00495
00500 static
QString aboutTranslationTeam();
00501
00506
QString otherText() const;
00507
00515
QString license() const;
00516
00521
QString copyrightStatement() const;
00522
00523 private:
00524 const
char *mAppName;
00525 const
char *mProgramName;
00526 const
char *mVersion;
00527 const
char *mShortDescription;
00528
int mLicenseKey;
00529 const
char *mCopyrightStatement;
00530 const
char *mOtherText;
00531 const
char *mHomepageAddress;
00532 const
char *mBugEmailAddress;
00533
QValueList<
KAboutPerson> mAuthorList;
00534
QValueList<
KAboutPerson> mCreditList;
00535 const
char *mLicenseText;
00536
00537 KAboutDataPrivate *d;
00538 };
00539
00540 #endif
00541