[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [patch] KAboutData::programLogo(), QImage used
From:       Jarosław Staniek <js () iidea ! pl>
Date:       2004-09-02 10:14:18
Message-ID: 4137009F.20508 () iidea ! pl
[Download RAW message or body]

Hi,

OK now?

-- 
regards / pozdrawiam,
   Jaroslaw Staniek / OpenOffice Polska
   Kexi project: http://koffice.org/kexi/ http://www.kexi-project.org/
   Qt-KDE Wrapper project: http://iidea.pl/~js/qkw/

["kaboutdata.diff" (text/plain)]

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 10:11:59 -0000
@@ -81,13 +81,14 @@
     const char *translatorName;
     const char *translatorEmail;
     const char *productName;
+    QImage programLogo;
 };
 
 
 
 KAboutData::KAboutData( const char *appName,
                         const char *programName,
-			const char *version,
+                        const char *version,
                         const char *shortDescription,
 			int licenseType,
 			const char *copyrightStatement,
@@ -241,6 +242,18 @@
       return QString::null;
 }
 
+QImage
+KAboutData::programLogo() const
+{
+    return d->programLogo;
+}
+
+void
+KAboutData::setProgramLogo(const QImage& image)
+{
+    d->programLogo = image;
+}
+
 QString
 KAboutData::version() const
 {
@@ -355,7 +368,7 @@
   QString result;
   if (!copyrightStatement().isEmpty())
     result = copyrightStatement() + "\n\n";
-  
+
   QString l;
   QString f;
   switch ( mLicenseKey )
@@ -392,7 +405,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 10:11:59 -0000
@@ -21,6 +21,7 @@
 
 #include <qvaluelist.h>
 #include <qstring.h>
+#include <qimage.h>
 #include <klocale.h>
 
 #ifndef _KABOUTDATA_H_
@@ -359,7 +360,17 @@
      *        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 image logo image.
+     * @see programLogo()
+    */
+    void setProgramLogo(const QImage& image);
+
     /**
      * Defines the program version string.
      *
@@ -450,6 +461,13 @@
     QString programName() const;
 
     /**
+     * Returns the program logo image. 
+     * @return the program logo data or null image if there is 
+     * no custom application logo defined.
+     */
+    QImage programLogo() const;
+
+    /**
      * Returns the program's version.
      * @return the version string.
      */


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic