digiKam
|
Classes | |
class | Private |
Public Types | |
enum | ImageAlignment { ImageLeft , ImageRight } |
enum | MessageType { PlainMessage , InfoMessage , WarningMessage , ErrorMessage } |
Public Slots | |
void | setAutoHideTimeout (int msecs) |
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 | |
int | autoHideTimeout () const |
QString | comment () const |
DConfigDlgTitle (QWidget *const parent=nullptr) | |
QPixmap | pixmap () const |
void | setBuddy (QWidget *const buddy) |
void | setWidget (QWidget *const widget) |
QString | text () const |
~DConfigDlgTitle () override | |
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 |
This class provides a widget often used for DConfigDlg titles.
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.
|
explicit |
Constructs a title widget with the given
parent | . |
References Digikam::DConfigDlgTitle::Private::commentLabel, Digikam::DConfigDlgTitle::Private::headerLayout, Digikam::DConfigDlgTitle::Private::imageLabel, and Digikam::DConfigDlgTitle::Private::textLabel.
|
override |
int Digikam::DConfigDlgTitle::autoHideTimeout | ( | ) | const |
Get the current timeout value in milliseconds
References Digikam::DConfigDlgTitle::Private::autoHideTimeout.
|
overrideprotected |
QString Digikam::DConfigDlgTitle::comment | ( | ) | const |
References Digikam::DConfigDlgTitle::Private::commentLabel.
|
overrideprotected |
QPixmap Digikam::DConfigDlgTitle::pixmap | ( | ) | const |
References Digikam::DConfigDlgTitle::Private::imageLabel.
|
slot |
Set the autohide timeout of the label Set value to 0 to disable autohide, which is the default.
msecs | timeout value in milliseconds |
References Digikam::DConfigDlgTitle::Private::autoHideTimeout.
void Digikam::DConfigDlgTitle::setBuddy | ( | QWidget *const | buddy | ) |
Sets this label's buddy to 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.
buddy | the widget to activate when the shortcut key is activated |
References Digikam::DConfigDlgTitle::Private::textLabel.
|
slot |
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. |
References comment, Digikam::DConfigDlgTitle::Private::commentLabel, Digikam::DConfigDlgTitle::Private::commentStyleSheet(), and Digikam::DConfigDlgTitle::Private::messageType.
|
slot |
pixmap | the icon to display in the header. The pixmap is by default right, but |
alignment | can be used to display it also left. |
References setPixmap().
|
slot |
pixmap | Pixmap displayed in the header. The pixmap is by default right, but |
alignment | can be used to display it also left. |
References Digikam::DConfigDlgTitle::Private::commentLabel, Digikam::DConfigDlgTitle::Private::headerLayout, Digikam::DConfigDlgTitle::Private::imageLabel, ImageLeft, pixmap, and Digikam::DConfigDlgTitle::Private::textLabel.
Referenced by setPixmap(), and setText().
|
slot |
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. |
References setPixmap().
|
slot |
pixmap | the icon to display in the header. The pixmap is by default right, but |
alignment | can be used to display it also left. |
References Digikam::DConfigDlgTitle::Private::iconTypeToIconName(), and setPixmap().
|
slot |
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 |
References setPixmap(), setText(), and text.
|
slot |
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. |
References text, Digikam::DConfigDlgTitle::Private::textLabel, and Digikam::DConfigDlgTitle::Private::textStyleSheet().
Referenced by setText(), and Digikam::DConfigDlgViewPrivate::updateTitleWidget().
void Digikam::DConfigDlgTitle::setWidget | ( | QWidget *const | widget | ) |
widget | the widget displayed on the title widget. |
References Digikam::DConfigDlgTitle::Private::headerLayout.
|
overrideprotected |
QString Digikam::DConfigDlgTitle::text | ( | ) | const |
References Digikam::DConfigDlgTitle::Private::textLabel.
|
readwrite |
|
readwrite |
Referenced by setComment().
|
readwrite |
Referenced by setPixmap().
|
readwrite |
Referenced by setText().