kdecore Library API Documentation

kaboutdata.h

00001 /*
00002  * This file is part of the KDE Libraries
00003  * Copyright (C) 2000 Espen Sand (espen@kde.org)
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018  * Boston, MA 02111-1307, USA.
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 KDECORE_EXPORT 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 KDECORE_EXPORT 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 
00179 class KDECORE_EXPORT KAboutData
00180 {
00181   public:
00185     enum LicenseKey
00186     {
00187       License_Custom = -2,
00188       License_File = -1,
00189       License_Unknown = 0,
00190       License_GPL  = 1,
00191       License_GPL_V2 = 1,
00192       License_LGPL = 2,
00193       License_LGPL_V2 = 2,
00194       License_BSD  = 3,
00195       License_Artistic = 4,
00196       License_QPL = 5,
00197       License_QPL_V1_0 = 5
00198     };
00199 
00200   public:
00235     KAboutData( const char *appName,
00236                 const char *programName,
00237         const char *version,
00238         const char *shortDescription = 0,
00239         int licenseType = License_Unknown,
00240         const char *copyrightStatement = 0,
00241         const char *text = 0,
00242         const char *homePageAddress = 0,
00243         const char *bugsEmailAddress = "submit@bugs.kde.org"
00244         );
00245 
00246      ~KAboutData();
00247 
00267     void addAuthor( const char *name,
00268             const char *task=0,
00269             const char *emailAddress=0,
00270             const char *webAddress=0 );
00271 
00291     void addCredit( const char *name,
00292                     const char *task=0,
00293             const char *emailAddress=0,
00294             const char *webAddress=0 );
00295 
00320     void setTranslator(const char* name, const char* emailAddress);
00321 
00337     void setLicenseText( const char *license );
00338 
00344     void setLicenseTextFile( const QString &file );
00345 
00351     void setAppName( const char *appName );
00352     
00360     void setProgramName( const char* programName );
00361 
00367     void setVersion( const char* version );
00368     
00376     void setShortDescription( const char *shortDescription );
00377     
00383     void setLicense( LicenseKey licenseKey);
00384     
00393     void setCopyrightStatement( const char *copyrightStatement );
00394     
00402     void setOtherText( const char *otherText );
00403     
00411     void setHomepage( const char *homepage );
00412     
00419     void setBugAddress( const char *bugAddress );
00420     
00429     void setProductName( const char *name );
00430 
00435     const char *appName() const;
00436 
00444     const char *productName() const;
00445 
00450     QString programName() const;
00451 
00452 
00457     QString version() const;
00458 
00464     QString shortDescription() const;
00465 
00471     QString homepage() const;
00472 
00477     QString bugAddress() const;
00478 
00483     const QValueList<KAboutPerson> authors() const;
00484 
00489     const QValueList<KAboutPerson> credits() const;
00490 
00495     const QValueList<KAboutTranslator> translators() const;
00496 
00501     static QString aboutTranslationTeam();
00502 
00507     QString otherText() const;
00508 
00516     QString license() const;
00517 
00522     QString copyrightStatement() const;
00523 
00524   private:
00525     const char *mAppName;
00526     const char *mProgramName;
00527     const char *mVersion;
00528     const char *mShortDescription;
00529     int mLicenseKey;
00530     const char *mCopyrightStatement;
00531     const char *mOtherText;
00532     const char *mHomepageAddress;
00533     const char *mBugEmailAddress;
00534     QValueList<KAboutPerson> mAuthorList;
00535     QValueList<KAboutPerson> mCreditList;
00536     const char *mLicenseText;
00537 
00538     KAboutDataPrivate *d;
00539 };
00540 
00541 #endif
00542 
KDE Logo
This file is part of the documentation for kdecore Library Version 3.3.90.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 30 10:09:37 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003