digiKam Developer Documentation: Digikam::DConfigDlgTitle Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Types | Public Slots | Public Member Functions | Protected Member Functions | Properties | List of all members
Digikam::DConfigDlgTitle Class Reference

This class provides a widget often used for DConfigDlg titles. More...

Inheritance diagram for Digikam::DConfigDlgTitle:

## Public Types
enum | ImageAlignment { ImageLeft , ImageRight }
| Possible title pixmap alignments. More...
enum | MessageType { PlainMessage , InfoMessage , WarningMessage , ErrorMessage }
| Comment message types. More...

## Public Slots
void | setAutoHideTimeout (int msecs)
| Set the autohide timeout of the label Set value to 0 to disable autohide, which is the default.
void | setComment (const QString &comment, MessageType type=PlainMessage)
void | setPixmap (const QIcon &icon, ImageAlignment alignment=ImageRight)
void | setPixmap (const QPixmap &pixmap, ImageAlignment alignment=ImageRight)
void | setPixmap (const QString &icon, ImageAlignment alignment=ImageRight)
void | setPixmap (MessageType type, ImageAlignment alignment=ImageRight)
void | setText (const QString &text, MessageType type)
void | setText (const QString &text, Qt::Alignment alignment=Qt::AlignLeft|Qt::AlignVCenter)

## Public Member Functions
| DConfigDlgTitle (QWidget *const parent=nullptr)
| Constructs a title widget with the given.
int | autoHideTimeout () const
| Get the current timeout value in milliseconds.
QString | comment () const
QPixmap | pixmap () const
void | setBuddy (QWidget *const buddy)
| Sets this label's buddy to buddy.
void | setWidget (QWidget *const widget)
QString | text () const

## Protected Member Functions
void | changeEvent (QEvent *) override
bool | eventFilter (QObject *, QEvent *) override
void | showEvent (QShowEvent *) override

## Properties
int | autoHideTimeout
QString | comment
QPixmap | pixmap
QString | text

## Detailed Description

DConfigDlgTitle uses the general application font at 1.4 times its size to style the text.

DConfigDlgTitle is very simple to use. You can either use its default text (and pixmap) properties or display your own widgets in the title widget.

## Member Enumeration Documentation

## ◆ ImageAlignment

enum Digikam::DConfigDlgTitle::ImageAlignment

- ImageLeft: Display the pixmap left
- ImageRight: Display the pixmap right (default)

Enumerator
ImageLeft | Display the pixmap on the left.
ImageRight | Display the pixmap on the right.

## ◆ MessageType

enum Digikam::DConfigDlgTitle::MessageType

Enumerator
PlainMessage | Normal comment.
InfoMessage | Information the user should be alerted to.
WarningMessage | A warning the user should be alerted to.
ErrorMessage | An error message.

## Constructor & Destructor Documentation

## ◆ DConfigDlgTitle()

Digikam::DConfigDlgTitle::DConfigDlgTitle | ( | QWidget *const | parent = `nullptr` | ) |
| explicit

Parameters

  parent | .

## Member Function Documentation

## ◆ autoHideTimeout()

int Digikam::DConfigDlgTitle::autoHideTimeout | ( |  | ) | const

Returns
  timeout value in msecs

## ◆ comment()

QString Digikam::DConfigDlgTitle::comment | ( |  | ) | const

Returns
  the text displayed in the comment below the title, if any

See also
  setComment()

## ◆ pixmap()

QPixmap Digikam::DConfigDlgTitle::pixmap | ( |  | ) | const

Returns
  the pixmap displayed in the title

See also
  setPixmap()

## ◆ setAutoHideTimeout

void Digikam::DConfigDlgTitle::setAutoHideTimeout | ( | int | msecs | ) |
| slot

Parameters

  msecs | timeout value in milliseconds

## ◆ setBuddy()

void Digikam::DConfigDlgTitle::setBuddy | ( | QWidget *const | buddy | ) |

When the user presses the shortcut key indicated by the label in this title widget, the keyboard focus is transferred to the label's buddy widget.

Parameters

  buddy | the widget to activate when the shortcut key is activated

## ◆ setComment

void Digikam::DConfigDlgTitle::setComment | ( | const QString & | comment,
|  | MessageType | type = `PlainMessage`
| ) |  |
| slot

Parameters

  comment | Text displayed beneath the main title as a comment. It can either be plain text or rich text.
  type | The sort of message it is.

See also
  MessageType
  comment()

## ◆ setPixmap [1/4]

void Digikam::DConfigDlgTitle::setPixmap | ( | const QIcon & | icon,
|  | ImageAlignment | alignment = `ImageRight`
| ) |  |
| slot

Parameters

  icon | The pixmap to display in the header. The pixmap is by default right, but
  alignment | can be used to display it also left.

See also
  pixmap()

## ◆ setPixmap [2/4]

void Digikam::DConfigDlgTitle::setPixmap | ( | const QPixmap & | pixmap,
|  | ImageAlignment | alignment = `ImageRight`
| ) |  |
| slot

Parameters

  pixmap | Pixmap displayed in the header. The pixmap is by default right, but
  alignment | can be used to display it also left.

See also
  pixmap()

## ◆ setPixmap [3/4]

void Digikam::DConfigDlgTitle::setPixmap | ( | const QString & | icon,
|  | ImageAlignment | alignment = `ImageRight`
| ) |  |
| slot

Parameters

  icon | name of the icon to display in the header. The pixmap is by default right, but
  alignment | can be used to display it also left.

See also
  pixmap()

## ◆ setPixmap [4/4]

void Digikam::DConfigDlgTitle::setPixmap | ( | MessageType | type,
|  | ImageAlignment | alignment = `ImageRight`
| ) |  |
| slot

Parameters

  type | The message type to display as pixmap in the header. The message is by default right, but
  alignment | can be used to display it also left.

See also
  pixmap()

## ◆ setText [1/2]

void Digikam::DConfigDlgTitle::setText | ( | const QString & | text,
|  | MessageType | type
| ) |  |
| slot

Parameters

  text | Text displayed on the label. It can either be plain text or rich text. If it is plain text, the text is displayed as a bold title text.
  type | The sort of message it is; will also set the icon accordingly

See also
  MessageType
  text()

## ◆ setText [2/2]

void Digikam::DConfigDlgTitle::setText | ( | const QString & | text,
|  | Qt::Alignment | alignment = `Qt::AlignLeft | Qt::AlignVCenter`
| ) |  |
| slot

Parameters

  text | Text displayed on the label. It can either be plain text or rich text. If it is plain text, the text is displayed as a bold title text.
  alignment | Alignment of the text. Default is left and vertical centered.

See also
  text()

## ◆ setWidget()

void Digikam::DConfigDlgTitle::setWidget | ( | QWidget *const | widget | ) |

Parameters

  widget | the widget displayed on the title widget.

## ◆ text()

QString Digikam::DConfigDlgTitle::text | ( |  | ) | const

Returns
  the text displayed in the title

See also
  setText()