digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
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

  • 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

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
msecstimeout 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
buddythe widget to activate when the shortcut key is activated

◆ setComment

void Digikam::DConfigDlgTitle::setComment ( const QString &  comment,
MessageType  type = PlainMessage 
)
slot
Parameters
commentText displayed beneath the main title as a comment. It can either be plain text or rich text.
typeThe sort of message it is.
See also
MessageType
comment()

◆ setPixmap [1/4]

void Digikam::DConfigDlgTitle::setPixmap ( const QIcon &  icon,
ImageAlignment  alignment = ImageRight 
)
slot
Parameters
iconThe pixmap to display in the header. The pixmap is by default right, but
alignmentcan 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
pixmapPixmap displayed in the header. The pixmap is by default right, but
alignmentcan 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
iconname of the icon to display in the header. The pixmap is by default right, but
alignmentcan be used to display it also left.
See also
pixmap()

◆ setPixmap [4/4]

void Digikam::DConfigDlgTitle::setPixmap ( MessageType  type,
ImageAlignment  alignment = ImageRight 
)
slot
Parameters
typeThe message type to display as pixmap in the header. The message is by default right, but
alignmentcan be used to display it also left.
See also
pixmap()

◆ setText [1/2]

void Digikam::DConfigDlgTitle::setText ( const QString &  text,
MessageType  type 
)
slot
Parameters
textText 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.
typeThe 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
textText 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.
alignmentAlignment of the text. Default is left and vertical centered.
See also
text()

◆ setWidget()

void Digikam::DConfigDlgTitle::setWidget ( QWidget *const  widget)
Parameters
widgetthe widget displayed on the title widget.

◆ text()

QString Digikam::DConfigDlgTitle::text ( ) const
Returns
the text displayed in the title
See also
setText()