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 <klocale.h>
00025
00026 #ifndef _KABOUTDATA_H_
00027 #define _KABOUTDATA_H_
00028
00029 class KAboutPersonPrivate;
00030 class KAboutDataPrivate;
00031
00039 class KAboutPerson
00040 {
00041 public:
00055 KAboutPerson( const char *name, const char *task,
00056 const char *emailAddress, const char *webAddress )
00057 {
00058 mName = name;
00059 mTask = task;
00060 mEmailAddress = emailAddress;
00061 mWebAddress = webAddress;
00062 }
00067 KAboutPerson() {}
00068
00074 QString name() const;
00075
00081 QString task() const;
00082
00088 QString emailAddress() const;
00089
00095 QString webAddress() const;
00096
00097 private:
00098 const char *mName;
00099 const char *mTask;
00100 const char *mEmailAddress;
00101 const char *mWebAddress;
00102
00103 KAboutPersonPrivate *d;
00104 };
00105
00106 class KAboutTranslatorPrivate;
00119 class KAboutTranslator
00120 {
00121 public:
00129 KAboutTranslator(const QString & name=QString::null,
00130 const QString & emailAddress=QString::null);
00131
00137 QString name() const;
00138
00144 QString emailAddress() const;
00145
00146 private:
00147 QString mName;
00148 QString mEmail;
00149 KAboutTranslatorPrivate* d;
00150 };
00151
00152
00168 class KAboutData
00169 {
00170 public:
00174 enum LicenseKey
00175 {
00176 License_Custom = -2,
00177 License_File = -1,
00178 License_Unknown = 0,
00179 License_GPL = 1,
00180 License_GPL_V2 = 1,
00181 License_LGPL = 2,
00182 License_LGPL_V2 = 2,
00183 License_BSD = 3,
00184 License_Artistic = 4,
00185 License_QPL = 5,
00186 License_QPL_V1_0 = 5
00187 };
00188
00189 public:
00224 KAboutData( const char *appName,
00225 const char *programName,
00226 const char *version,
00227 const char *shortDescription = 0,
00228 int licenseType = License_Unknown,
00229 const char *copyrightStatement = 0,
00230 const char *text = 0,
00231 const char *homePageAddress = 0,
00232 const char *bugsEmailAddress = "submit@bugs.kde.org"
00233 );
00234
00235 ~KAboutData();
00236
00256 void addAuthor( const char *name,
00257 const char *task=0,
00258 const char *emailAddress=0,
00259 const char *webAddress=0 );
00260
00280 void addCredit( const char *name,
00281 const char *task=0,
00282 const char *emailAddress=0,
00283 const char *webAddress=0 );
00284
00309 void setTranslator(const char* name, const char* emailAddress);
00310
00326 void setLicenseText( const char *license );
00327
00333 void setLicenseTextFile( const QString &file );
00334
00343 void setProductName( const char *name );
00344
00349 const char *appName() const;
00350
00358 const char *productName() const;
00363 QString programName() const;
00364
00369 QString version() const;
00370
00376 QString shortDescription() const;
00377
00383 QString homepage() const;
00384
00389 QString bugAddress() const;
00390
00395 const QValueList<KAboutPerson> authors() const;
00396
00401 const QValueList<KAboutPerson> credits() const;
00402
00407 const QValueList<KAboutTranslator> translators() const;
00408
00413 static QString aboutTranslationTeam();
00414
00419 QString otherText() const;
00420
00428 QString license() const;
00429
00434 QString copyrightStatement() const;
00435
00436 private:
00437 const char *mAppName;
00438 const char *mProgramName;
00439 const char *mVersion;
00440 const char *mShortDescription;
00441 int mLicenseKey;
00442 const char *mCopyrightStatement;
00443 const char *mOtherText;
00444 const char *mHomepageAddress;
00445 const char *mBugEmailAddress;
00446 QValueList<KAboutPerson> mAuthorList;
00447 QValueList<KAboutPerson> mCreditList;
00448 const char *mLicenseText;
00449
00450 KAboutDataPrivate *d;
00451 };
00452
00453 #endif
00454
This file is part of the documentation for kdecore Library Version 3.2.2.