Index: kaboutdata.cpp =================================================================== RCS file: /home/kde/kdelibs/kdecore/kaboutdata.cpp,v retrieving revision 1.21 diff -u -r1.21 kaboutdata.cpp --- kaboutdata.cpp 21 Feb 2004 20:05:12 -0000 1.21 +++ kaboutdata.cpp 2 Sep 2004 08:49:20 -0000 @@ -81,13 +81,14 @@ const char *translatorName; const char *translatorEmail; const char *productName; + const char **programLogo; }; KAboutData::KAboutData( const char *appName, const char *programName, - const char *version, + const char *version, const char *shortDescription, int licenseType, const char *copyrightStatement, @@ -106,6 +107,7 @@ { d = new KAboutDataPrivate; d->productName = 0; + d->programLogo = 0; if( appName ) { const char *p = strrchr(appName, '/'); @@ -241,6 +243,18 @@ return QString::null; } +const char ** +KAboutData::programLogo() const +{ + return d->programLogo; +} + +void +KAboutData::setProgramLogo(const char** logo) +{ + d->programLogo = logo; +} + QString KAboutData::version() const { @@ -355,7 +369,7 @@ QString result; if (!copyrightStatement().isEmpty()) result = copyrightStatement() + "\n\n"; - + QString l; QString f; switch ( mLicenseKey ) @@ -392,7 +406,7 @@ "Please check the documentation or the source for any\n" "licensing terms.\n"); return result; - } + } if (!l.isEmpty()) result += i18n("This program is distributed under the terms of the %1.").arg( l ); Index: kaboutdata.h =================================================================== RCS file: /home/kde/kdelibs/kdecore/kaboutdata.h,v retrieving revision 1.38 diff -u -r1.38 kaboutdata.h --- kaboutdata.h 22 May 2004 02:03:12 -0000 1.38 +++ kaboutdata.h 2 Sep 2004 08:49:20 -0000 @@ -359,7 +359,18 @@ * Example: I18N_NOOP("Advanced Text Editor"). */ void setProgramName( const char* programName ); - + + /** + * Defines the program logo. + * Use this if you need to have application logo + * in AboutData other than application icon. + * + * @param logoData logo data in xpm format. + * Only the pointer is copied, so you can't delete the data. + * @see programLogo() + */ + void setProgramLogo(const char** logoData); + /** * Defines the program version string. * @@ -450,6 +461,16 @@ QString programName() const; /** + * Returns the program logo data in xpm format. + * We use xpm and not here more general QPixmap, because + * QPixmap requires QPaintDevice to work while KAboutData + * is often used before QApplication is allocated. + * @return the program logo data or null if there is + * no custom logo defined. + */ + const char** programLogo() const; + + /** * Returns the program's version. * @return the version string. */