kaboutdata.h
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 <qimage.h>
00025 #include <klocale.h>
00026
00027 #ifndef _KABOUTDATA_H_
00028 #define _KABOUTDATA_H_
00029
00030 class KAboutPersonPrivate;
00031 class KAboutDataPrivate;
00032
00052 class KDECORE_EXPORT KAboutPerson
00053 {
00054 public:
00068 KAboutPerson( const char *name, const char *task,
00069 const char *emailAddress, const char *webAddress )
00070 {
00071 mName = name;
00072 mTask = task;
00073 mEmailAddress = emailAddress;
00074 mWebAddress = webAddress;
00075 }
00080 KAboutPerson() {}
00081
00087 QString name() const;
00088
00094 QString task() const;
00095
00101 QString emailAddress() const;
00102
00108 QString webAddress() const;
00109
00110 private:
00111 const char *mName;
00112 const char *mTask;
00113 const char *mEmailAddress;
00114 const char *mWebAddress;
00115
00116 KAboutPersonPrivate *d;
00117 };
00118
00119 class KAboutTranslatorPrivate;
00132 class KDECORE_EXPORT KAboutTranslator
00133 {
00134 public:
00142 KAboutTranslator(const QString & name=QString::null,
00143 const QString & emailAddress=QString::null);
00144
00150 QString name() const;
00151
00157 QString emailAddress() const;
00158
00159 private:
00160 QString mName;
00161 QString mEmail;
00162 KAboutTranslatorPrivate* d;
00163 };
00164
00165
00180 class KDECORE_EXPORT 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
00372 void setProgramLogo(const QImage& image);
00373
00379 void setVersion( const char* version );
00380
00388 void setShortDescription( const char *shortDescription );
00389
00395 void setLicense( LicenseKey licenseKey);
00396
00405 void setCopyrightStatement( const char *copyrightStatement );
00406
00414 void setOtherText( const char *otherText );
00415
00423 void setHomepage( const char *homepage );
00424
00431 void setBugAddress( const char *bugAddress );
00432
00441 void setProductName( const char *name );
00442
00447 const char *appName() const;
00448
00456 const char *productName() const;
00457
00462 QString programName() const;
00463
00470 QImage programLogo() const;
00471
00476 QString version() const;
00477
00483 QString shortDescription() const;
00484
00490 QString homepage() const;
00491
00496 QString bugAddress() const;
00497
00502 const QValueList<KAboutPerson> authors() const;
00503
00508 const QValueList<KAboutPerson> credits() const;
00509
00514 const QValueList<KAboutTranslator> translators() const;
00515
00520 static QString aboutTranslationTeam();
00521
00526 QString otherText() const;
00527
00535 QString license() const;
00536
00541 QString copyrightStatement() const;
00542
00543 private:
00544 const char *mAppName;
00545 const char *mProgramName;
00546 const char *mVersion;
00547 const char *mShortDescription;
00548 int mLicenseKey;
00549 const char *mCopyrightStatement;
00550 const char *mOtherText;
00551 const char *mHomepageAddress;
00552 const char *mBugEmailAddress;
00553 QValueList<KAboutPerson> mAuthorList;
00554 QValueList<KAboutPerson> mCreditList;
00555 const char *mLicenseText;
00556
00557 KAboutDataPrivate *d;
00558 };
00559
00560 #endif
00561
This file is part of the documentation for kdecore Library Version 3.4.0.