File indexing completed on 2024-05-12 03:50:09

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2012 Mohammed Nafees <nafees.technocool@gmail.com>
0004 //
0005 
0006 #ifndef GEODATABALLOONSTYLE_H
0007 #define GEODATABALLOONSTYLE_H
0008 
0009 #include "MarbleGlobal.h"
0010 #include "GeoDataColorStyle.h"
0011 #include "geodata_export.h"
0012 
0013 #include <QColor>
0014 
0015 namespace Marble
0016 {
0017 
0018 class GeoDataBalloonStylePrivate;
0019 
0020 /**
0021  */
0022 class GEODATA_EXPORT GeoDataBalloonStyle : public GeoDataColorStyle
0023 {
0024 public:
0025     GeoDataBalloonStyle();
0026 
0027     GeoDataBalloonStyle( const GeoDataBalloonStyle &other );
0028 
0029     GeoDataBalloonStyle& operator=( const GeoDataBalloonStyle &other );
0030     bool operator==( const GeoDataBalloonStyle &other ) const;
0031     bool operator!=( const GeoDataBalloonStyle &other ) const;
0032 
0033 
0034     ~GeoDataBalloonStyle() override;
0035 
0036     /** Provides type information for downcasting a GeoNode */
0037     const char* nodeType() const override;
0038 
0039     enum DisplayMode {
0040         Default,
0041         Hide
0042     };
0043 
0044     QColor backgroundColor() const;
0045     void setBackgroundColor( const QColor &color );
0046 
0047     QColor textColor() const;
0048     void setTextColor( const QColor &color );
0049 
0050     QString text() const;
0051     void setText( const QString &text );
0052 
0053     DisplayMode displayMode() const;
0054     void setDisplayMode(DisplayMode mode );
0055 
0056     void pack( QDataStream& stream ) const override;
0057 
0058     void unpack( QDataStream& stream ) override;
0059 
0060 private:
0061     GeoDataBalloonStylePrivate* const d;
0062 };
0063 
0064 }
0065 
0066 #endif