kaboutdata.h
/*
* This file is part of the KDE Libraries
* Copyright (C) 2000 Espen Sand (espen@kde.org)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#include <qvaluelist.h>
#include <qstring.h>
#include <qimage.h>
#include <klocale.h>
#ifndef _KABOUTDATA_H_
#define _KABOUTDATA_H_
class KAboutPersonPrivate;
class KAboutDataPrivate;
class KDECORE_EXPORT KAboutPerson
{
public:
KAboutPerson( const char *name, const char *task,
const char *emailAddress, const char *webAddress )
{
mName = name;
mTask = task;
mEmailAddress = emailAddress;
mWebAddress = webAddress;
}
KAboutPerson() {}
QString name() const;
QString task() const;
QString emailAddress() const;
QString webAddress() const;
private:
const char *mName;
const char *mTask;
const char *mEmailAddress;
const char *mWebAddress;
KAboutPersonPrivate *d;
};
class KAboutTranslatorPrivate;
class KDECORE_EXPORT KAboutTranslator
{
public:
KAboutTranslator(const QString & name=QString::null,
const QString & emailAddress=QString::null);
QString name() const;
QString emailAddress() const;
private:
QString mName;
QString mEmail;
KAboutTranslatorPrivate* d;
};
class KDECORE_EXPORT KAboutData
{
public:
enum LicenseKey
{
License_Custom = -2,
License_File = -1,
License_Unknown = 0,
License_GPL = 1,
License_GPL_V2 = 1,
License_LGPL = 2,
License_LGPL_V2 = 2,
License_BSD = 3,
License_Artistic = 4,
License_QPL = 5,
License_QPL_V1_0 = 5
};
public:
KAboutData( const char *appName,
const char *programName,
const char *version,
const char *shortDescription = 0,
int licenseType = License_Unknown,
const char *copyrightStatement = 0,
const char *text = 0,
const char *homePageAddress = 0,
const char *bugsEmailAddress = "submit@bugs.kde.org"
);
~KAboutData();
void addAuthor( const char *name,
const char *task=0,
const char *emailAddress=0,
const char *webAddress=0 );
void addCredit( const char *name,
const char *task=0,
const char *emailAddress=0,
const char *webAddress=0 );
void setTranslator(const char* name, const char* emailAddress);
void setLicenseText( const char *license );
void setLicenseTextFile( const QString &file );
void setAppName( const char *appName );
void setProgramName( const char* programName );
void setProgramLogo(const QImage& image);
void setVersion( const char* version );
void setShortDescription( const char *shortDescription );
void setLicense( LicenseKey licenseKey);
void setCopyrightStatement( const char *copyrightStatement );
void setOtherText( const char *otherText );
void setHomepage( const char *homepage );
void setBugAddress( const char *bugAddress );
void setProductName( const char *name );
const char *appName() const;
const char *productName() const;
QString programName() const;
const char* internalProgramName() const;
void translateInternalProgramName() const;
QImage programLogo() const;
QString version() const;
const char* internalVersion() const { return mVersion; }
QString shortDescription() const;
QString homepage() const;
QString bugAddress() const;
const char* internalBugAddress() const { return mBugEmailAddress; }
const QValueList<KAboutPerson> authors() const;
const QValueList<KAboutPerson> credits() const;
const QValueList<KAboutTranslator> translators() const;
static QString aboutTranslationTeam();
QString otherText() const;
QString license() const;
QString copyrightStatement() const;
QString customAuthorPlainText() const;
QString customAuthorRichText() const;
bool customAuthorTextEnabled() const;
void setCustomAuthorText(const QString &plainText, const QString &richText);
void unsetCustomAuthorText();
private:
const char *mAppName;
const char *mProgramName;
const char *mVersion;
const char *mShortDescription;
int mLicenseKey;
const char *mCopyrightStatement;
const char *mOtherText;
const char *mHomepageAddress;
const char *mBugEmailAddress;
QValueList<KAboutPerson> mAuthorList;
QValueList<KAboutPerson> mCreditList;
const char *mLicenseText;
KAboutDataPrivate *d;
};
#endif
klocale.h
KAboutTranslator
This structure is used to store information about a translator.
Definition: kaboutdata.h:134
KAboutData
This class is used to store information about a program.
Definition: kaboutdata.h:182
KStdAction::name
const char * name(StdAction id)
KAboutPerson
This structure is used to store information about a person or developer.
Definition: kaboutdata.h:54
KAboutData::LicenseKey
LicenseKey
Descibes the license of the software.
Definition: kaboutdata.h:188
KAboutPerson::KAboutPerson
KAboutPerson(const char *name, const char *task, const char *emailAddress, const char *webAddress)
Convenience constructor.
Definition: kaboutdata.h:70

KDE Home | KDE Accessibility Home | Description of Access Keys