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

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2013 Mohammed Nafees <nafees.technocool@gmail.com>
0004 //
0005 
0006 #ifndef GEODATANETWORKLINKCONTROL_P_H
0007 #define GEODATANETWORKLINKCONTROL_P_H
0008 
0009 #include "GeoDataContainer_p.h"
0010 
0011 #include "GeoDataTypes.h"
0012 #include "GeoDataUpdate.h"
0013 #include <QDateTime>
0014 
0015 namespace Marble
0016 {
0017 
0018 class GeoDataNetworkLinkControlPrivate : public GeoDataContainerPrivate
0019 {
0020 public:
0021     GeoDataNetworkLinkControlPrivate();
0022     GeoDataNetworkLinkControlPrivate(const GeoDataNetworkLinkControlPrivate &other);
0023     ~GeoDataNetworkLinkControlPrivate() override;
0024     GeoDataNetworkLinkControlPrivate& operator=(const GeoDataNetworkLinkControlPrivate &other);
0025 
0026     qreal m_minRefreshPeriod;
0027     qreal m_maxSessionLength;
0028     QString m_cookie;
0029     QString m_message;
0030     QString m_linkName;
0031     QString m_linkDescription;
0032     QString m_linkSnippet;
0033     int m_maxLines;
0034     QDateTime m_expires;
0035     GeoDataUpdate m_update;
0036     GeoDataAbstractView *m_abstractView;
0037 };
0038 
0039 GeoDataNetworkLinkControlPrivate::GeoDataNetworkLinkControlPrivate() :
0040     m_minRefreshPeriod( 0.0 ),
0041     m_maxSessionLength( 0.0 ),
0042     m_maxLines( 2 ),
0043     m_expires(),
0044     m_update(),
0045     m_abstractView( nullptr )
0046 {
0047 }
0048 
0049 GeoDataNetworkLinkControlPrivate::GeoDataNetworkLinkControlPrivate( const GeoDataNetworkLinkControlPrivate &other )
0050   : GeoDataContainerPrivate(other),
0051     m_minRefreshPeriod(other.m_minRefreshPeriod),
0052     m_maxSessionLength(other.m_maxSessionLength),
0053     m_cookie(other.m_cookie),
0054     m_message(other.m_message),
0055     m_linkName(other.m_linkName),
0056     m_linkDescription(other.m_linkDescription),
0057     m_linkSnippet(other.m_linkSnippet),
0058     m_maxLines(other.m_maxLines),
0059     m_expires(other.m_expires),
0060     m_update(other.m_update),
0061     m_abstractView(other.m_abstractView ? other.m_abstractView->copy() : nullptr)
0062 {
0063 }
0064 
0065 GeoDataNetworkLinkControlPrivate::~GeoDataNetworkLinkControlPrivate()
0066 {
0067     delete m_abstractView;
0068 }
0069 
0070 GeoDataNetworkLinkControlPrivate& GeoDataNetworkLinkControlPrivate::operator=(const GeoDataNetworkLinkControlPrivate &other)
0071 {
0072     GeoDataContainerPrivate::operator=(other);
0073     m_minRefreshPeriod = other.m_minRefreshPeriod;
0074     m_maxSessionLength = other.m_maxSessionLength;
0075     m_cookie = other.m_cookie;
0076     m_message = other.m_message;
0077     m_linkName = other.m_linkName;
0078     m_linkDescription = other.m_linkDescription;
0079     m_linkSnippet = other.m_linkSnippet;
0080     m_maxLines = other.m_maxLines;
0081     m_expires = other.m_expires;
0082     m_update = other.m_update;
0083 
0084     delete m_abstractView;
0085     m_abstractView = other.m_abstractView ? other.m_abstractView->copy() : nullptr;
0086 
0087     return *this;
0088 }
0089 
0090 }
0091 
0092 #endif