00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <tqvaluelist.h>
00023 #include <tqstring.h>
00024 #include <tqimage.h>
00025 #include <tdelocale.h>
00026
00027 #ifndef _TDEABOUTDATA_H_
00028 #define _TDEABOUTDATA_H_
00029
00030 class TDEAboutPersonPrivate;
00031 class TDEAboutDataPrivate;
00032
00054 class TDECORE_EXPORT TDEAboutPerson
00055 {
00056 public:
00070 TDEAboutPerson( const char *name, const char *task,
00071 const char *emailAddress, const char *webAddress )
00072 {
00073 mName = name;
00074 mTask = task;
00075 mEmailAddress = emailAddress;
00076 mWebAddress = webAddress;
00077 }
00082 TDEAboutPerson() {}
00083
00089 TQString name() const;
00090
00096 TQString task() const;
00097
00103 TQString emailAddress() const;
00104
00110 TQString webAddress() const;
00111
00112 private:
00113 const char *mName;
00114 const char *mTask;
00115 const char *mEmailAddress;
00116 const char *mWebAddress;
00117
00118 TDEAboutPersonPrivate *d;
00119 };
00120
00121 class TDEAboutTranslatorPrivate;
00134 class TDECORE_EXPORT TDEAboutTranslator
00135 {
00136 public:
00144 TDEAboutTranslator(const TQString & name=TQString::null,
00145 const TQString & emailAddress=TQString::null);
00146
00152 TQString name() const;
00153
00159 TQString emailAddress() const;
00160
00161 private:
00162 TQString mName;
00163 TQString mEmail;
00164 TDEAboutTranslatorPrivate* d;
00165 };
00166
00167
00182 class TDECORE_EXPORT TDEAboutData
00183 {
00184 public:
00188 enum LicenseKey
00189 {
00190 License_Custom = -2,
00191 License_File = -1,
00192 License_Unknown = 0,
00193 License_GPL = 1,
00194 License_GPL_V2 = 1,
00195 License_LGPL = 2,
00196 License_LGPL_V2 = 2,
00197 License_BSD = 3,
00198 License_Artistic = 4,
00199 License_QPL = 5,
00200 License_QPL_V1_0 = 5,
00201 License_GPL_V3 = 6,
00202 License_LGPL_V3 = 7
00203 };
00204
00205 public:
00240 TDEAboutData( const char *appName,
00241 const char *programName,
00242 const char *version,
00243 const char *shortDescription = 0,
00244 int licenseType = License_Unknown,
00245 const char *copyrightStatement = 0,
00246 const char *text = 0,
00247 const char *homePageAddress = 0,
00248 const char *bugsEmailAddress = 0
00249 );
00250
00251 ~TDEAboutData();
00252
00272 void addAuthor( const char *name,
00273 const char *task=0,
00274 const char *emailAddress=0,
00275 const char *webAddress=0 );
00276
00296 void addCredit( const char *name,
00297 const char *task=0,
00298 const char *emailAddress=0,
00299 const char *webAddress=0 );
00300
00325 void setTranslator(const char* name, const char* emailAddress);
00326
00342 void setLicenseText( const char *license );
00343
00349 void setLicenseTextFile( const TQString &file );
00350
00356 void setAppName( const char *appName );
00357
00366 void setProgramName( const char* programName );
00367
00377 void setProgramLogo(const TQImage& image);
00378
00384 void setVersion( const char* version );
00385
00393 void setShortDescription( const char *shortDescription );
00394
00400 void setLicense( LicenseKey licenseKey);
00401
00410 void setCopyrightStatement( const char *copyrightStatement );
00411
00419 void setOtherText( const char *otherText );
00420
00428 void setHomepage( const char *homepage );
00429
00436 void setBugAddress( const char *bugAddress );
00437
00446 void setProductName( const char *name );
00447
00452 const char *appName() const;
00453
00461 const char *productName() const;
00462
00467 TQString programName() const;
00468
00472 const char* internalProgramName() const;
00476 void translateInternalProgramName() const;
00477
00484 TQImage programLogo() const;
00485
00490 TQString version() const;
00491
00495 const char* internalVersion() const { return mVersion; }
00496
00502 TQString shortDescription() const;
00503
00509 TQString homepage() const;
00510
00515 TQString bugAddress() const;
00516
00520 const char* internalBugAddress() const { return mBugEmailAddress; }
00521
00526 const TQValueList<TDEAboutPerson> authors() const;
00527
00532 const TQValueList<TDEAboutPerson> credits() const;
00533
00538 const TQValueList<TDEAboutTranslator> translators() const;
00539
00544 static TQString aboutTranslationTeam();
00545
00550 TQString otherText() const;
00551
00559 TQString license() const;
00560
00565 TQString copyrightStatement() const;
00566
00574 TQString customAuthorPlainText() const;
00575
00583 TQString customAuthorRichText() const;
00584
00592 bool customAuthorTextEnabled() const;
00593
00604 void setCustomAuthorText(const TQString &plainText, const TQString &richText);
00605
00611 void unsetCustomAuthorText();
00612
00613 private:
00614 const char *mAppName;
00615 const char *mProgramName;
00616 const char *mVersion;
00617 const char *mShortDescription;
00618 int mLicenseKey;
00619 const char *mCopyrightStatement;
00620 const char *mOtherText;
00621 const char *mHomepageAddress;
00622 const char *mBugEmailAddress;
00623 TQValueList<TDEAboutPerson> mAuthorList;
00624 TQValueList<TDEAboutPerson> mCreditList;
00625 const char *mLicenseText;
00626 static const char *defaultBugTracker;
00627
00628 TDEAboutDataPrivate *d;
00629 };
00630
00631 #endif
00632