QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgstabpositionwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstabpositionwidget.h
3 ---------------------
4 begin : October 2024
5 copyright : (C) 2024 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 QGSTABPOSITIONWIDGET_H
17#define QGSTABPOSITIONWIDGET_H
18
19#include "ui_qgstabpositionwidgetbase.h"
20
21#include "qgis_gui.h"
22#include "qgis_sip.h"
23#include "qgspanelwidget.h"
24#include "qgstextformat.h"
25
26#include <QDialog>
27
33class GUI_EXPORT QgsTabPositionWidget: public QgsPanelWidget, private Ui::QgsTabPositionWidgetBase
34{
35 Q_OBJECT
36 public:
37
39 QgsTabPositionWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
40
46 void setPositions( const QList< QgsTextFormat::Tab > &positions );
47
53 QList< QgsTextFormat::Tab > positions() const;
54
58 void setUnit( Qgis::RenderUnit unit );
59
60 signals:
61
65 void positionsChanged( const QList< QgsTextFormat::Tab > &positions );
66
67 private slots:
68 void mAddButton_clicked();
69 void mRemoveButton_clicked();
70
71 void emitPositionsChanged();
72
73};
74
80class GUI_EXPORT QgsTabPositionDialog : public QDialog
81{
82 Q_OBJECT
83 public:
84
86 QgsTabPositionDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags f = Qt::WindowFlags() );
87
93 void setPositions( const QList< QgsTextFormat::Tab > &positions );
94
100 QList< QgsTextFormat::Tab > positions() const;
101
105 void setUnit( Qgis::RenderUnit unit );
106
107 private:
108
109 QgsTabPositionWidget *mWidget = nullptr;
110
111};
112
113#endif // QGSTABPOSITIONWIDGET_H
RenderUnit
Rendering size units.
Definition qgis.h:4847
Base class for any widget that can be shown as a inline panel.
A dialog to enter a custom dash space pattern for lines.
A widget for configuring QgsTextFormat tab positions.
void positionsChanged(const QList< QgsTextFormat::Tab > &positions)
Emitted when positions are changed in the widget.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53