QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
A combo box which allows choice of alignment settings (e.g. More...
#include <qgsalignmentcombobox.h>
Signals | |
void | changed () |
Emitted when the alignment is changed. More... | |
Public Member Functions | |
QgsAlignmentComboBox (QWidget *parent=nullptr) | |
Constructor for QgsAlignmentComboBox, with the specified parent widget. More... | |
Qt::Alignment | currentAlignment () const |
Returns the current alignment choice. More... | |
void | customizeAlignmentDisplay (Qt::Alignment alignment, const QString &text=QString(), const QIcon &icon=QIcon()) |
Sets the text and icon to use for a particular alignment option, replacing the default text or icon. More... | |
void | setAvailableAlignments (Qt::Alignment alignments) |
Sets the available alignment choices shown in the combo box. More... | |
void | setCurrentAlignment (Qt::Alignment alignment) |
Sets the current alignment choice. More... | |
A combo box which allows choice of alignment settings (e.g.
left, right, ...).
Currently only horizontal alignments are supported. Available alignment choices can be manually specified by calling setAvailableAlignments(), which is useful when only a subset of Qt's alignment options should be exposed.
Definition at line 34 of file qgsalignmentcombobox.h.
QgsAlignmentComboBox::QgsAlignmentComboBox | ( | QWidget * | parent = nullptr | ) |
Constructor for QgsAlignmentComboBox, with the specified parent widget.
Definition at line 21 of file qgsalignmentcombobox.cpp.
|
signal |
Emitted when the alignment is changed.
Qt::Alignment QgsAlignmentComboBox::currentAlignment | ( | ) | const |
Returns the current alignment choice.
Definition at line 39 of file qgsalignmentcombobox.cpp.
void QgsAlignmentComboBox::customizeAlignmentDisplay | ( | Qt::Alignment | alignment, |
const QString & | text = QString() , |
||
const QIcon & | icon = QIcon() |
||
) |
Sets the text and icon to use for a particular alignment option, replacing the default text or icon.
If text or icon is not specified, they will not be changed from the default.
Definition at line 51 of file qgsalignmentcombobox.cpp.
void QgsAlignmentComboBox::setAvailableAlignments | ( | Qt::Alignment | alignments | ) |
Sets the available alignment choices shown in the combo box.
Definition at line 33 of file qgsalignmentcombobox.cpp.
void QgsAlignmentComboBox::setCurrentAlignment | ( | Qt::Alignment | alignment | ) |
Sets the current alignment choice.
Definition at line 44 of file qgsalignmentcombobox.cpp.