Quantum GIS API Documentation  1.8
src/core/symbology/qgsmarkercatalogue.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                              qgsmarkercatalogue.h
00003                              -------------------
00004     begin                : March 2005
00005     copyright            : (C) 2005 by Radim Blazek
00006     email                : [email protected]
00007  ***************************************************************************/
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 #ifndef QGSMARKERCATALOGUE_H
00017 #define QGSMARKERCATALOGUE_H
00018 
00019 #include <QStringList>
00020 
00021 class QImage;
00022 class QString;
00023 class QPicture;
00024 class QPen;
00025 class QBrush;
00026 class QPainter;
00027 
00028 
00030 class CORE_EXPORT QgsMarkerCatalogue : public QObject
00031 {
00032     Q_OBJECT
00033   public:
00035     ~QgsMarkerCatalogue();
00036 
00038     static QgsMarkerCatalogue *instance();
00039 
00041     QStringList list();
00042 
00050     QImage imageMarker( QString fullName, double size, QPen pen, QBrush brush, double opacity = 1.0 );
00051 
00059     QPicture pictureMarker( QString fullName, double size, QPen pen, QBrush brush, double opacity = 1.0 );
00060 
00063     static bool svgMarker( QPainter * thepPainter, QString name, double size );
00064 
00065   public slots:
00066     void refreshList();
00067 
00068   signals:
00069     void markersRefreshed();
00070 
00071   private:
00072 
00074     QgsMarkerCatalogue();
00075 
00076     static QgsMarkerCatalogue *mMarkerCatalogue;
00077 
00079     QStringList mList;
00080 
00082     void hardMarker( QPainter * thepPainter, int imageSize, QString name, double size, QPen pen, QBrush brush );
00083 
00084     bool fontMarker( QPainter * thepPainter, QString name, double size );
00085 
00086 };
00087 
00088 #endif // QGSMARKERCATALOGUE_H
00089 
00090 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines