-
-
Notifications
You must be signed in to change notification settings - Fork 3k
/
qgsmarkercatalogue.h
73 lines (55 loc) · 2.46 KB
/
qgsmarkercatalogue.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
60
61
62
63
64
65
66
67
68
69
70
71
/***************************************************************************
qgsmarkercatalogue.h
-------------------
begin : March 2005
copyright : (C) 2005 by Radim Blazek
email : blazek@itc.it
***************************************************************************/
/***************************************************************************
* *
* 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 QGSMARKERCATALOGUE_H
#define QGSMARKERCATALOGUE_H
#include <QStringList>
class QImage;
class QString;
class QPicture;
class QPen;
class QBrush;
class QPainter;
/** Catalogue of point symbols */
class CORE_EXPORT QgsMarkerCatalogue
{
public:
//! Destructor
~QgsMarkerCatalogue();
//! Access to canonical QgsMarkerCatalogue instance
static QgsMarkerCatalogue *instance();
/**List of available markers*/
QStringList list();
/** Returns pixmap of the marker
* \param fullName full name, e.g. hard:circle, svg:/home/usr1/marker1.svg
*/
QImage imageMarker( QString fullName, double size, QPen pen, QBrush brush, bool qtBug = true );
/** Returns qpicture of the marker
* \param fullName full name, e.g. hard:circle, svg:/home/usr1/marker1.svg
*/
QPicture pictureMarker( QString fullName, double size, QPen pen, QBrush brush, bool qtBug = true );
/** Returns a pixmap given a file name of a svg marker
* NOTE: this method needs to be public static for QgsMarkerDialog::visualizeMarkers */
static void svgMarker( QPainter * thepPainter, QString name, double size );
private:
/**Constructor*/
QgsMarkerCatalogue();
static QgsMarkerCatalogue *mMarkerCatalogue;
/** List of availabel markers*/
QStringList mList;
/** Hard coded */
void hardMarker( QPainter * thepPainter, int imageSize, QString name, double size, QPen pen, QBrush brush, bool qtBug = true );
};
#endif // QGSMARKERCATALOGUE_H