KAboutDialog Class Reference
A KDialogBase with predefined main widget. More...
#include <kaboutdialog.h>
Inheritance diagram for KAboutDialog:


Public Types | |
enum | LayoutType { AbtPlain = 0x0001, AbtTabbed = 0x0002, AbtTitle = 0x0004, AbtImageLeft = 0x0008, AbtImageRight = 0x0010, AbtImageOnly = 0x0020, AbtProduct = 0x0040, AbtKDEStandard = AbtTabbed|AbtTitle|AbtImageLeft, AbtAppStandard = AbtTabbed|AbtTitle|AbtProduct, AbtImageAndTitle = AbtPlain|AbtTitle|AbtImageOnly } |
Layout formats. More... | |
Signals | |
void | sendEmail (const QString &name, const QString &email) |
Send an email to this person. | |
void | openURL (const QString &url) |
Open the selected URL. | |
Public Member Functions | |
KAboutDialog (QWidget *parent=0, const char *name=0, bool modal=true) | |
The standard Qt constructor (Constructor I). | |
KAboutDialog (int dialogLayout, const QString &caption, int buttonMask, ButtonCode defaultButton, QWidget *parent=0, const char *name=0, bool modal=false, bool separator=false, const QString &user1=QString::null, const QString &user2=QString::null, const QString &user3=QString::null) | |
The extended constructor. | |
void | adjust () |
Adjusts the dialog. | |
virtual void | show (void) |
Makes a modeless (modal = false in constructor) dialog visible. | |
virtual void | show (QWidget *centerParent) |
Makes a modeless (modal = false in constructor) dialog visible. | |
void | setTitle (const QString &title) |
(Constructor II only) Sets a title (not caption) in the uppermost area of the dialog. | |
void | setImage (const QString &fileName) |
(Constructor II only) Define an image to be shown in the dialog. | |
void | setImageBackgroundColor (const QColor &color) |
(Constructor II only) The image has a minimum size, but is centered within an area if the dialog box is enlarged by the user. | |
void | setImageFrame (bool state) |
(Constructor II only) Enables or disables a frame around the image. | |
void | setProduct (const QString &appName, const QString &version, const QString &author, const QString &year) |
(Constructor II only) Prints the application name, KDE version, author, a copyright sign and a year string. | |
QFrame * | addTextPage (const QString &title, const QString &text, bool richText=false, int numLines=10) |
(Constructor II only) Adds a text page to a tab box. | |
QFrame * | addLicensePage (const QString &title, const QString &text, int numLines=10) |
(Constructor II only) Adds a license page to a tab box. | |
KAboutContainer * | addContainerPage (const QString &title, int childAlignment=AlignCenter, int innerAlignment=AlignCenter) |
(Constructor II only) Adds a container to a tab box. | |
KAboutContainer * | addScrolledContainerPage (const QString &title, int childAlignment=AlignCenter, int innerAlignment=AlignCenter) |
(Constructor II only) Adds a container inside a QScrollView to a tab box. | |
KAboutContainer * | addContainer (int childAlignment, int innerAlignment) |
(Constructor II only) Adds a container. | |
QFrame * | addPage (const QString &title) |
(Constructor II only) Adds an empty page to a tab box. | |
void | setLogo (const QPixmap &) |
(Constructor I only) Sets the image as the application logo. | |
void | setAuthor (const QString &name, const QString &email, const QString &url, const QString &work) |
(Constructor I only) Sets the author's name and email address. | |
void | setMaintainer (const QString &name, const QString &email, const QString &url, const QString &work) |
(Constructor I only) Sets the maintainer's name and email address. | |
void | addContributor (const QString &name, const QString &email, const QString &url, const QString &work) |
(Constructor I only) Show this person as one of the major contributors. | |
void | setVersion (const QString &name) |
(Constructor I only) Sets the text describing the version. | |
Static Public Member Functions | |
void | imageURL (QWidget *parent, const QString &caption, const QString &path, const QColor &imageColor, const QString &url) |
Create a modal dialog with an image in the upper area with a URL link below. | |
Protected Slots | |
void | sendEmailSlot (const QString &name, const QString &email) |
Connected to widget->sendEmail. | |
void | openURLSlot (const QString &url) |
Open this URL. | |
virtual void | mouseTrackSlot (int mode, const QMouseEvent *e) |
(Constructor II only) Tells the position of the mouse cursor when the left mouse button is pressed above an image | |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
KAboutWidget * | about |
The main widget (Constructor I). | |
KAboutContainerBase * | mContainerBase |
The main widget (Constructor II). |
Detailed Description
A KDialogBase with predefined main widget.As a KDialogBase it uses your application wide settings for KDialogBase objects (base frame tiles, main frame tiles etc). To use it, simply create a KAboutDialog object, set all (or some) of its properties and show it. Do not derive it to create your own about dialog until you need some cool features that are unsupported and you have contacted me to add them.
The dialog can be created using two different constructors. The difference between these constructors is the available components that can be used to build the contents of the dialog. The first (Constructor I) provides a number of easy to use methods. Basically it allows you to add the components of choice, and the components are placed in a predefined layout. You do not have to plan the layout. Everything is taken care of.
The second constructor (Constructor II) works in quite the same manner as the first, but you have better control on where the components are postioned in the layout and you have access to an extended number of components you can install such as titles, product information, a tabbed pages (where you can display rich text with url links) and a person (developer) information field. The "About KDE" dialog box is created with Constructor II.
For the derived features, see the basic class KDialogBase.
- Author:
- Mirko Boehm (mirko@kde.org) and Espen Sand (espensa@online.no)
- See also:
- KDialogBase
Definition at line 283 of file kaboutdialog.h.
Member Enumeration Documentation
|
Layout formats.
Definition at line 291 of file kaboutdialog.h. |
Constructor & Destructor Documentation
|
The standard Qt constructor (Constructor I). Add components with the following methods: setLogo(), setAuthor(), setMaintainer(), addContributor(), or setVersion(). The dialog will be laid out automatically. Definition at line 1481 of file kaboutdialog.cpp. References about, openURL(), openURLSlot(), sendEmail(), sendEmailSlot(), and KDialogBase::setMainWidget(). |
|
The extended constructor. (Constructor II). Add components with the methods: setTitle(), setImage(), setImageBackgroundColor(), setImageFrame(), setProduct(), addTextPage(), addContainerPage(), addContainer(), or addPage().
Definition at line 1501 of file kaboutdialog.cpp. References mContainerBase, mouseTrackSlot(), openURLSlot(), sendEmailSlot(), KDialogBase::setMainWidget(), and KDialog::setPlainCaption(). |
Member Function Documentation
|
Adjusts the dialog. You can call this method after you have set up all the contents but it is not required. It is done automatically when show() is executed. Definition at line 1540 of file kaboutdialog.cpp. References about, and KAboutWidget::adjust(). Referenced by show(). |
|
Makes a modeless (modal = false in constructor) dialog visible. If you reimplement this method make sure you run it in the new method (e.g., show()). Reimplemented from KDialogBase. Reimplemented from QDialog. Definition at line 1524 of file kaboutdialog.cpp. References adjust(), mContainerBase, QDialog::show(), and KAboutContainerBase::show(). Referenced by KHelpMenu::aboutKDE(). |
|
Makes a modeless (modal = false in constructor) dialog visible. If you reimplmement this method make sure you run it in the new method (i.e., show( parent )).
Definition at line 1532 of file kaboutdialog.cpp. References adjust(), mContainerBase, QDialog::show(), and KAboutContainerBase::show(). |
|
(Constructor II only) Sets a title (not caption) in the uppermost area of the dialog.
Definition at line 1666 of file kaboutdialog.cpp. References mContainerBase, and KAboutContainerBase::setTitle(). Referenced by KAboutKDE::KAboutKDE(). |
|
(Constructor II only) Define an image to be shown in the dialog.
The position is dependent on the
Definition at line 1673 of file kaboutdialog.cpp. References mContainerBase, and KAboutContainerBase::setImage(). Referenced by imageURL(), and KAboutKDE::KAboutKDE(). |
|
(Constructor II only) The image has a minimum size, but is centered within an area if the dialog box is enlarged by the user. You set the background color of the area with this method.
Definition at line 1680 of file kaboutdialog.cpp. References mContainerBase, and KAboutContainerBase::setImageBackgroundColor(). Referenced by imageURL(), and KAboutKDE::KAboutKDE(). |
|
(Constructor II only) Enables or disables a frame around the image. The frame is, by default, enabled in the constructor
Definition at line 1687 of file kaboutdialog.cpp. References mContainerBase, and KAboutContainerBase::setImageFrame(). |
|
(Constructor II only) Prints the application name, KDE version, author, a copyright sign and a year string. To the left of the text the standard application icon is displayed.
Definition at line 1694 of file kaboutdialog.cpp. References mContainerBase, and KAboutContainerBase::setProduct(). |
|
(Constructor II only) Adds a text page to a tab box. The text can be regular text or rich text. The rich text can contain URLs and mail links.
Definition at line 1617 of file kaboutdialog.cpp. References KAboutContainerBase::addTextPage(), and mContainerBase. Referenced by KAboutKDE::KAboutKDE(). |
|
(Constructor II only) Adds a license page to a tab box.
Definition at line 1624 of file kaboutdialog.cpp. References KAboutContainerBase::addLicensePage(), and mContainerBase. |
|
(Constructor II only) Adds a container to a tab box. You can add text and images to a container.
Definition at line 1632 of file kaboutdialog.cpp. References KAboutContainerBase::addContainerPage(), and mContainerBase. |
|
(Constructor II only) Adds a container inside a QScrollView to a tab box. You can add text and images to a container.
Definition at line 1641 of file kaboutdialog.cpp. References KAboutContainerBase::addScrolledContainerPage(), and mContainerBase. |
|
(Constructor II only) Adds a container. You can add text and images to a container.
Definition at line 1658 of file kaboutdialog.cpp. References KAboutContainerBase::addContainer(), and mContainerBase. Referenced by imageURL(). |
|
(Constructor II only) Adds an empty page to a tab box.
Definition at line 1651 of file kaboutdialog.cpp. References KAboutContainerBase::addEmptyPage(), and mContainerBase. |
|
(Constructor I only) Sets the image as the application logo.
Definition at line 1549 of file kaboutdialog.cpp. References about, and KAboutWidget::setLogo(). |
|
(Constructor I only) Sets the author's name and email address.
Definition at line 1565 of file kaboutdialog.cpp. References about, and KAboutWidget::setAuthor(). |
|
(Constructor I only) Sets the maintainer's name and email address.
Definition at line 1556 of file kaboutdialog.cpp. References about, and KAboutWidget::setMaintainer(). |
|
(Constructor I only) Show this person as one of the major contributors.
Definition at line 1574 of file kaboutdialog.cpp. References about, and KAboutWidget::addContributor(). |
|
(Constructor I only) Sets the text describing the version.
Definition at line 1583 of file kaboutdialog.cpp. References about, and KAboutWidget::setVersion(). |
|
Create a modal dialog with an image in the upper area with a URL link below.
Definition at line 1703 of file kaboutdialog.cpp. References addContainer(), KAboutContainer::addPerson(), QDialog::exec(), setImage(), setImageBackgroundColor(), and KDialog::setPlainCaption(). |
|
Send an email to this person. The application must provide the functionality. Referenced by KAboutDialog(). |
|
Open the selected URL.
Referenced by KAboutDialog(). |
|
Connected to widget->sendEmail.
Definition at line 1591 of file kaboutdialog.cpp. Referenced by KAboutDialog(). |
|
Open this URL.
Definition at line 1602 of file kaboutdialog.cpp. Referenced by KAboutDialog(). |
|
(Constructor II only) Tells the position of the mouse cursor when the left mouse button is pressed above an image
Definition at line 1611 of file kaboutdialog.cpp. Referenced by KAboutDialog(). |
Member Data Documentation
|
The main widget (Constructor I).
Definition at line 565 of file kaboutdialog.h. Referenced by addContributor(), adjust(), KAboutDialog(), setAuthor(), setLogo(), setMaintainer(), and setVersion(). |
|
The main widget (Constructor II).
Definition at line 570 of file kaboutdialog.h. Referenced by addContainer(), addContainerPage(), addLicensePage(), addPage(), addScrolledContainerPage(), addTextPage(), KAboutDialog(), setImage(), setImageBackgroundColor(), setImageFrame(), setProduct(), setTitle(), and show(). |
The documentation for this class was generated from the following files: