# kdecore Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# 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
    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     }
    00066     KAboutPerson() {}
    00067
    00073     QString name() const;
    00074
    00080     QString task() const;
    00081
    00087     QString emailAddress() const;
    00088
    00094     QString webAddress() const;
    00095
    00096 private:
    00097     const char *mName;
    00098     const char *mTask;
    00099     const char *mEmailAddress;
    00100     const char *mWebAddress;
    00101
    00102     KAboutPersonPrivate *d;
    00103 };
    00104
    00105 class KAboutTranslatorPrivate;
    00118 class KAboutTranslator
    00119 {
    00120 public:
    00128     KAboutTranslator(const QString & name=QString::null,
    00129                      const QString & emailAddress=QString::null);
    00130
    00136     QString name() const;
    00137
    00143     QString emailAddress() const;
    00144
    00145 private:
    00146     QString mName;
    00147     QString mEmail;
    00148     KAboutTranslatorPrivate* d;
    00149 };
    00150
    00151
    00167 class KAboutData
    00168 {
    00169   public:
    00173     enum LicenseKey
    00174     {
    00175       License_Custom = -2,
    00176       License_File = -1,
    00177       License_Unknown = 0,
    00178       License_GPL  = 1,
    00179       License_GPL_V2 = 1,
    00180       License_LGPL = 2,
    00181       License_LGPL_V2 = 2,
    00182       License_BSD  = 3,
    00183       License_Artistic = 4,
    00184       License_QPL = 5,
    00185       License_QPL_V1_0 = 5
    00186     };
    00187
    00188   public:
    00223     KAboutData( const char *appName,
    00224                 const char *programName,
    00225                 const char *version,
    00226                 const char *shortDescription = 0,
    00227                 int licenseType = License_Unknown,
    00228                 const char *copyrightStatement = 0,
    00229                 const char *text = 0,
    00230                 const char *homePageAddress = 0,
    00231                 const char *bugsEmailAddress = "submit@bugs.kde.org"
    00232                 );
    00233
    00234      ~KAboutData();
    00235
    00255     void addAuthor( const char *name,
    00256                     const char *task=0,
    00257                     const char *emailAddress=0,
    00258                     const char *webAddress=0 );
    00259
    00279     void addCredit( const char *name,
    00280                     const char *task=0,
    00281                     const char *emailAddress=0,
    00282                     const char *webAddress=0 );
    00283
    00308     void setTranslator(const char* name, const char* emailAddress);
    00309
    00325     void setLicenseText( const char *license );
    00326
    00332     void setLicenseTextFile( const QString &file );
    00333
    00338     const char *appName() const;
    00339
    00344     QString programName() const;
    00345
    00350     QString version() const;
    00351
    00357     QString shortDescription() const;
    00358
    00364     QString homepage() const;
    00365
    00370     QString bugAddress() const;
    00371
    00376     const QValueList<KAboutPerson> authors() const;
    00377
    00382     const QValueList<KAboutPerson> credits() const;
    00383
    00388     const QValueList<KAboutTranslator> translators() const;
    00389
    00394     static QString aboutTranslationTeam();
    00395
    00400     QString otherText() const;
    00401
    00409     QString license() const;
    00410
    00415     QString copyrightStatement() const;
    00416
    00417   private:
    00418     const char *mAppName;
    00419     const char *mProgramName;
    00420     const char *mVersion;
    00421     const char *mShortDescription;
    00422     int mLicenseKey;
    00423     const char *mCopyrightStatement;
    00424     const char *mOtherText;
    00425     const char *mHomepageAddress;
    00426     const char *mBugEmailAddress;
    00427     QValueList<KAboutPerson> mAuthorList;
    00428     QValueList<KAboutPerson> mCreditList;
    00429     const char *mLicenseText;
    00430
    00431     KAboutDataPrivate *d;
    00432 };
    00433
    00434 #endif
    00435

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:46:18 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001