-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqgsannotationwidget.h
59 lines (47 loc) · 2.16 KB
/
qgsannotationwidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/***************************************************************************
qgsannotationwidget.h
------------------------
begin : February 25, 2010
copyright : (C) 2010 by Marco Hugentobler
email : marco dot hugentobler at hugis dot net
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSANNOTATIONWIDGET_H
#define QGSANNOTATIONWIDGET_H
#include "ui_qgsannotationwidgetbase.h"
#include "qgis_app.h"
#include <memory>
class QgsMapCanvasAnnotationItem;
class QgsMarkerSymbol;
class QgsFillSymbol;
/** A configuration widget to configure the annotation item properties. Usually embedded by QgsAnnotation
subclass configuration dialogs*/
class APP_EXPORT QgsAnnotationWidget: public QWidget, private Ui::QgsAnnotationWidgetBase
{
Q_OBJECT
public:
QgsAnnotationWidget( QgsMapCanvasAnnotationItem *item, QWidget *parent = nullptr, Qt::WindowFlags f = 0 );
~QgsAnnotationWidget();
void apply();
signals:
//! Emitted when the background color of the annotation is changed
void backgroundColorChanged( const QColor &color );
private slots:
void on_mMapMarkerButton_clicked();
void on_mFrameStyleButton_clicked();
private:
QgsMapCanvasAnnotationItem *mItem = nullptr;
std::unique_ptr< QgsMarkerSymbol > mMarkerSymbol;
std::unique_ptr< QgsFillSymbol > mFillSymbol;
void blockAllSignals( bool block );
void updateCenterIcon();
void updateFillIcon();
};
#endif // QGSANNOTATIONWIDGET_H