diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch) | |
tree | 5ac38a06f3dde268dc7927dc155896926aaf7012 /kdeui/tests/kaboutdialogtest.cpp | |
download | tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/tests/kaboutdialogtest.cpp')
-rw-r--r-- | kdeui/tests/kaboutdialogtest.cpp | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/kdeui/tests/kaboutdialogtest.cpp b/kdeui/tests/kaboutdialogtest.cpp new file mode 100644 index 000000000..89d25d531 --- /dev/null +++ b/kdeui/tests/kaboutdialogtest.cpp @@ -0,0 +1,72 @@ +/* -*- C++ -*- + * This file shows an example for the KDE about dialog. + * + * copyright: (C) Mirko Boehm, 1999 + * license: GNU Public License, Version 2 + * mail to: Mirko Boehm <mirko@kde.org> + * requires: recent C++-compiler, at least Qt 1.4 + * $Revision$ + */ + +#include "kaboutdialog.h" +// #include <kimgio.h> +#include <qimage.h> +#include <kapplication.h> +#include <klocale.h> + +int main(int argc, char** argv) +{ + (void)new KApplication(argc, argv, "KAboutDialogTest"); + QImage logo; + QImage bg; + QPixmap pix; + KAboutDialog about; + // ----- + // kimgioRegister(); + if(logo.load("RayTracedGear.png")) + { + pix=logo; + about.setLogo(pix); + } else { + qDebug("main: No logo loaded."); + } + if(bg.load("background_1.png")) + { + pix=bg; + about.setBackgroundTile(&pix); + about.showTile( true ); + about.enableLinkedHelp( true ); + + //about.showBaseFrameTile(true); + } else { + qDebug("main: No tile loaded."); + } +// about.setButtonOKText +// ("Cl&ose", "Close this dialog.", +// "<b>Close</b> the dialog<br>" +// "<i>(there are no settings to save).</i>"); + about.setCaption("KAboutDialog example"); + about.setVersion("KAboutDialog, Draft Study"); + about.setHelp("kdehelp/intro.html", "intro"); + // ----- set the application author: + about.setAuthor + ("Mirko Boehm", "mirko@kde.org", "", "Initial developer."); + // ----- set the application maintainer: + about.setMaintainer("Any One", // name + "anyone@kde.org", // email address + "http://www.anyhere.com", // URL + "Current maintainer."); // description + // ----- add some contributors: + about.addContributor("Some One", "someone@kde.org", "http://www.somehere.com", + "Making coffee"); + about.addContributor("Another One", + "anotherone@kde.org", + "http://www.blablax.com", + "Pizza donator"); + // ----- contents of the dialog have changed, adapt sizes: + about.adjust(); + about.exec(); + // ----- + return 0; +} + |