QGIS API Documentation 3.41.0-Master (af5edcb665c)
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:
38 QgsTabPositionWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
39
45 void setPositions( const QList<QgsTextFormat::Tab> &positions );
46
52 QList<QgsTextFormat::Tab> positions() const;
53
57 void setUnit( Qgis::RenderUnit unit );
58
59 signals:
60
64 void positionsChanged( const QList<QgsTextFormat::Tab> &positions );
65
66 private slots:
67 void mAddButton_clicked();
68 void mRemoveButton_clicked();
69
70 void emitPositionsChanged();
71};
72
78class GUI_EXPORT QgsTabPositionDialog : public QDialog
79{
80 Q_OBJECT
81 public:
83 QgsTabPositionDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags f = Qt::WindowFlags() );
84
90 void setPositions( const QList<QgsTextFormat::Tab> &positions );
91
97 QList<QgsTextFormat::Tab> positions() const;
98
102 void setUnit( Qgis::RenderUnit unit );
103
104 private:
105 QgsTabPositionWidget *mWidget = nullptr;
106};
107
108#endif // QGSTABPOSITIONWIDGET_H
RenderUnit
Rendering size units.
Definition qgis.h:4910
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