QGIS API Documentation 3.41.0-Master (57ec4277f5e)
Loading...
Searching...
No Matches
qgsalignmentcombobox.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsalignmentcombobox.h
3 ---------------------
4 begin : June 2019
5 copyright : (C) 2019 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSALIGNMENTCOMBOBOX_H
17#define QGSALIGNMENTCOMBOBOX_H
18
19#include <QComboBox>
20#include "qgis_gui.h"
21#include "qgis_sip.h"
22
34class GUI_EXPORT QgsAlignmentComboBox : public QComboBox
35{
36 Q_OBJECT
37
38 public:
42 QgsAlignmentComboBox( QWidget *parent SIP_TRANSFERTHIS = nullptr );
43
47 void setAvailableAlignments( Qt::Alignment alignments );
48
54 Qt::Alignment currentAlignment() const;
55
61 void setCurrentAlignment( Qt::Alignment alignment );
62
71 void customizeAlignmentDisplay( Qt::Alignment alignment, const QString &text = QString(), const QIcon &icon = QIcon() );
72
73 signals:
74
78 void changed();
79
80 private:
81 void populate();
82
83 Qt::Alignment mAlignments = Qt::AlignLeft | Qt::AlignHCenter | Qt::AlignRight;
84 bool mBlockChanged = false;
85};
86
87#endif //QGSALIGNMENTCOMBOBOX_H
A combo box which allows choice of alignment settings (e.g.
void changed()
Emitted when the alignment is changed.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53