org.kde.koala

Class KAboutDialog

public class KAboutDialog extends KDialogBase

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. See KAboutDialogSignals for signals emitted by KAboutDialog

Author: Mirko Boehm (mirko@kde.org) and Espen Sand (espensa@online.no)

See Also: KDialogBase

UNKNOWN: A KDialogBase with predefined main widget.

Field Summary
static intAbtAppStandard
static intAbtImageAndTitle
static intAbtImageLeft
static intAbtImageOnly
static intAbtImageRight
static intAbtKDEStandard
static intAbtPlain
Layout formats.
static intAbtProduct
static intAbtTabbed
static intAbtTitle
Constructor Summary
protected KAboutDialog(Class dummy)
KAboutDialog(QWidget parent, String name, boolean modal)
The standard Qt constructor (Constructor I).
KAboutDialog(QWidget parent, String name)
KAboutDialog(QWidget parent)
KAboutDialog()
KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator, String user1, String user2, String user3)
The extended constructor.
KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator, String user1, String user2)
KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator, String user1)
KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator)
KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal)
KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name)
KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent)
KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton)
Method Summary
KAboutContaineraddContainer(int childAlignment, int innerAlignment)
(Constructor II only) Adds a container.
KAboutContaineraddContainerPage(String title, int childAlignment, int innerAlignment)
(Constructor II only) Adds a container to a tab box.
KAboutContaineraddContainerPage(String title, int childAlignment)
KAboutContaineraddContainerPage(String title)
voidaddContributor(String name, String email, String url, String work)
(Constructor I only) Show this person as one of the major contributors.
QFrameaddLicensePage(String title, String text, int numLines)
(Constructor II only) Adds a license page to a tab box.
QFrameaddLicensePage(String title, String text)
QFrameaddPage(String title)
(Constructor II only) Adds an empty page to a tab box.
KAboutContaineraddScrolledContainerPage(String title, int childAlignment, int innerAlignment)
(Constructor II only) Adds a container inside a QScrollView to a tab box.
KAboutContaineraddScrolledContainerPage(String title, int childAlignment)
KAboutContaineraddScrolledContainerPage(String title)
QFrameaddTextPage(String title, String text, boolean richText, int numLines)
(Constructor II only) Adds a text page to a tab box.
QFrameaddTextPage(String title, String text, boolean richText)
QFrameaddTextPage(String title, String text)
voidadjust()
Adjusts the dialog.
StringclassName()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
static voidimageURL(QWidget parent, String caption, String path, QColor imageColor, String url)
Create a modal dialog with an image in the upper area with a URL link below.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
QMetaObjectmetaObject()
protected voidmouseTrackSlot(int mode, QMouseEvent e)
(Constructor II only) Tells the position of the mouse cursor when the left mouse button is pressed above an image
protected voidopenURLSlot(String url)
Open this URL.
protected voidsendEmailSlot(String name, String email)
Connected to widget.sendEmail.
voidsetAuthor(String name, String email, String url, String work)
(Constructor I only) Sets the author's name and email address.
voidsetImage(String fileName)
(Constructor II only) Define an image to be shown in the dialog.
voidsetImageBackgroundColor(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.
voidsetImageFrame(boolean state)
(Constructor II only) Enables or disables a frame around the image.
voidsetLogo(QPixmap arg1)
(Constructor I only) Sets the image as the application logo.
voidsetMaintainer(String name, String email, String url, String work)
(Constructor I only) Sets the maintainer's name and email address.
voidsetProduct(String appName, String version, String author, String year)
(Constructor II only) Prints the application name, KDE version, author, a copyright sign and a year string.
voidsetProgramLogo(String fileName)
Overloaded version of setProgramLogo(QPixmap pixmap).
voidsetProgramLogo(QPixmap pixmap)
(Constructor II only) Define the program logo to be shown in the dialog.
voidsetTitle(String title)
(Constructor II only) Sets a title (not caption) in the uppermost area of the dialog.
voidsetVersion(String name)
(Constructor I only) Sets the text describing the version.
voidshow()
Makes a modeless (modal = false in constructor) dialog visible.
voidshow(QWidget centerParent)
Makes a modeless (modal = false in constructor) dialog visible.

Field Detail

AbtAppStandard

public static final int AbtAppStandard

AbtImageAndTitle

public static final int AbtImageAndTitle

AbtImageLeft

public static final int AbtImageLeft

AbtImageOnly

public static final int AbtImageOnly

AbtImageRight

public static final int AbtImageRight

AbtKDEStandard

public static final int AbtKDEStandard

AbtPlain

public static final int AbtPlain
Layout formats.

UNKNOWN: Layout formats.

AbtProduct

public static final int AbtProduct

AbtTabbed

public static final int AbtTabbed

AbtTitle

public static final int AbtTitle

Constructor Detail

KAboutDialog

protected KAboutDialog(Class dummy)

KAboutDialog

public KAboutDialog(QWidget parent, String name, boolean modal)
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.

UNKNOWN: The standard Qt constructor (Constructor I).

KAboutDialog

public KAboutDialog(QWidget parent, String name)

KAboutDialog

public KAboutDialog(QWidget parent)

KAboutDialog

public KAboutDialog()

KAboutDialog

public KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator, String user1, String user2, String user3)
The extended constructor. (Constructor II). Add components with the methods: setTitle(), setImage(), setImageBackgroundColor(), setImageFrame(), setProduct(), addTextPage(), addContainerPage(), addContainer(), or addPage().

Parameters: dialogLayout Use a mask of LayoutType flags. caption The dialog caption. The text you specify is prepended by i18n("About"). buttonMask Specifies what buttons will be visible. defaultButton Specifies what button will be marked as the default. parent Parent of the dialog. name Dialog name (for internal use only) modal Sets dialog modality. If false, the rest of the program interface (other dialogs, for example) is accessible while the dialog is open. separator If true, a separator line is drawn between the action buttons an the main widget. user1 User button1 text. user2 User button2 text. user3 User button3 text.

UNKNOWN: The extended constructor.

KAboutDialog

public KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator, String user1, String user2)

KAboutDialog

public KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator, String user1)

KAboutDialog

public KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator)

KAboutDialog

public KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal)

KAboutDialog

public KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent, String name)

KAboutDialog

public KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton, QWidget parent)

KAboutDialog

public KAboutDialog(int dialogLayout, String caption, int buttonMask, int defaultButton)

Method Detail

addContainer

public KAboutContainer addContainer(int childAlignment, int innerAlignment)
(Constructor II only) Adds a container. You can add text and images to a container.

Parameters: childAlignment Specifies how the children of the container are aligned with respect to the container. innerAlignment Specifies how the children are aligned with respect to each other.

Returns: The new container.

UNKNOWN: (Constructor II only) Adds a container.

addContainerPage

public KAboutContainer addContainerPage(String title, int childAlignment, int innerAlignment)
(Constructor II only) Adds a container to a tab box. You can add text and images to a container.

Parameters: title Tab name. childAlignment Specifies how the children of the container are aligned with respect to the container. innerAlignment Specifies how the children are aligned with respect to each other.

Returns: The new container.

UNKNOWN: (Constructor II only) Adds a container to a tab box.

addContainerPage

public KAboutContainer addContainerPage(String title, int childAlignment)

addContainerPage

public KAboutContainer addContainerPage(String title)

addContributor

public void addContributor(String name, String email, String url, String work)
(Constructor I only) Show this person as one of the major contributors.

UNKNOWN: (Constructor I only) Show this person as one of the major contributors.

addLicensePage

public QFrame addLicensePage(String title, String text, int numLines)
(Constructor II only) Adds a license page to a tab box.

Parameters: title Tab name. text The text to display. numLines The text area height will be adjusted so that this is the minimum number of lines of text that are visible.

Returns: The frame that contains the page.

UNKNOWN: (Constructor II only) Adds a license page to a tab box.

addLicensePage

public QFrame addLicensePage(String title, String text)

addPage

public QFrame addPage(String title)
(Constructor II only) Adds an empty page to a tab box.

Parameters: title Tab name

Returns: The new page.

UNKNOWN: (Constructor II only) Adds an empty page to a tab box.

addScrolledContainerPage

public KAboutContainer addScrolledContainerPage(String title, int childAlignment, int innerAlignment)
(Constructor II only) Adds a container inside a QScrollView to a tab box. You can add text and images to a container.

Parameters: title Tab name. childAlignment Specifies how the children of the container are aligned with respect to the container. innerAlignment Specifies how the children are aligned with respect to each other.

Returns: The new container.

UNKNOWN: (Constructor II only) Adds a container inside a QScrollView to a tab box.

addScrolledContainerPage

public KAboutContainer addScrolledContainerPage(String title, int childAlignment)

addScrolledContainerPage

public KAboutContainer addScrolledContainerPage(String title)

addTextPage

public QFrame addTextPage(String title, String text, boolean richText, int numLines)
(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.

Parameters: title Tab name. text The text to display. richText Set this to true if 'text' is rich text. numLines The text area height will be adjusted so that this is the minimum number of lines of text that are visible.

Returns: The frame that contains the page.

UNKNOWN: (Constructor II only) Adds a text page to a tab box.

addTextPage

public QFrame addTextPage(String title, String text, boolean richText)

addTextPage

public QFrame addTextPage(String title, String text)

adjust

public void adjust()
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.

UNKNOWN: Adjusts the dialog.

className

public String className()

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

imageURL

public static void imageURL(QWidget parent, String caption, String path, QColor imageColor, String url)
Create a modal dialog with an image in the upper area with a URL link below.

UNKNOWN: Create a modal dialog with an image in the upper area with a URL link below.

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

metaObject

public QMetaObject metaObject()

mouseTrackSlot

protected void mouseTrackSlot(int mode, QMouseEvent e)
(Constructor II only) Tells the position of the mouse cursor when the left mouse button is pressed above an image

UNKNOWN: (Constructor II only) Tells the position of the mouse cursor when the left mouse button is pressed above an image

openURLSlot

protected void openURLSlot(String url)
Open this URL.

UNKNOWN: Open this URL.

sendEmailSlot

protected void sendEmailSlot(String name, String email)
Connected to widget.sendEmail.

UNKNOWN: Connected to widget.sendEmail.

setAuthor

public void setAuthor(String name, String email, String url, String work)
(Constructor I only) Sets the author's name and email address.

UNKNOWN: (Constructor I only) Sets the author's name and email address.

setImage

public void setImage(String fileName)
(Constructor II only) Define an image to be shown in the dialog. The position is dependent on the dialogLayout in the constructor

Parameters: fileName Path to image file.

UNKNOWN: (Constructor II only) Define an image to be shown in the dialog.

setImageBackgroundColor

public void setImageBackgroundColor(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. You set the background color of the area with this method.

Parameters: color Background color.

UNKNOWN: (Constructor II only) The image has a minimum size, but is centered within an area if the dialog box is enlarged by the user.

setImageFrame

public void setImageFrame(boolean state)
(Constructor II only) Enables or disables a frame around the image. The frame is, by default, enabled in the constructor

Parameters: state A value of true enables the frame

UNKNOWN: (Constructor II only) Enables or disables a frame around the image.

setLogo

public void setLogo(QPixmap arg1)
(Constructor I only) Sets the image as the application logo.

UNKNOWN: (Constructor I only) Sets the image as the application logo.

setMaintainer

public void setMaintainer(String name, String email, String url, String work)
(Constructor I only) Sets the maintainer's name and email address.

UNKNOWN: (Constructor I only) Sets the maintainer's name and email address.

setProduct

public void setProduct(String appName, String version, String author, String year)
(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.

Parameters: appName The application name. version Application version. author One or more authors. year A string telling when the application was made.

UNKNOWN: (Constructor II only) Prints the application name, KDE version, author, a copyright sign and a year string.

setProgramLogo

public void setProgramLogo(String fileName)
Overloaded version of setProgramLogo(QPixmap pixmap).

UNKNOWN: Overloaded version of setProgramLogo(QPixmap pixmap).

setProgramLogo

public void setProgramLogo(QPixmap pixmap)
(Constructor II only) Define the program logo to be shown in the dialog. Use this to override the default program logo. For example, use this function if the KAboutDialog is for a panel applet and you want to override the appletproxy logo with your own pixmap.

Parameters: pixmap The logo pixmap.

UNKNOWN: (Constructor II only) Define the program logo to be shown in the dialog.

setTitle

public void setTitle(String title)
(Constructor II only) Sets a title (not caption) in the uppermost area of the dialog.

Parameters: title Title string.

UNKNOWN: (Constructor II only) Sets a title (not caption) in the uppermost area of the dialog.

setVersion

public void setVersion(String name)
(Constructor I only) Sets the text describing the version.

UNKNOWN: (Constructor I only) Sets the text describing the version.

show

public void 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.

UNKNOWN: Makes a modeless (modal = false in constructor) dialog visible.

show

public void show(QWidget centerParent)
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 )).

Parameters: centerParent Center the dialog with respect to this widget.

UNKNOWN: Makes a modeless (modal = false in constructor) dialog visible.