File indexing completed on 2024-06-23 05:49:21

0001 /*
0002     This file is part of the Kasten Framework, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2007-2009 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #ifndef KASTEN_ABSTRACTMODELSYNCHRONIZER_P_HPP
0010 #define KASTEN_ABSTRACTMODELSYNCHRONIZER_P_HPP
0011 
0012 #include "abstractmodelsynchronizer.hpp"
0013 
0014 // Qt
0015 #include <QUrl>
0016 
0017 namespace Kasten {
0018 
0019 class AbstractModelSynchronizerPrivate
0020 {
0021 public:
0022     explicit AbstractModelSynchronizerPrivate(AbstractModelSynchronizer* parent);
0023     AbstractModelSynchronizerPrivate(const AbstractModelSynchronizerPrivate&) = delete;
0024 
0025     virtual ~AbstractModelSynchronizerPrivate();
0026 
0027     AbstractModelSynchronizerPrivate& operator=(const AbstractModelSynchronizerPrivate&) = delete;
0028 
0029 public:
0030     const QUrl& url() const;
0031 
0032 public:
0033     void setUrl(const QUrl& url);
0034 
0035 protected:
0036     AbstractModelSynchronizer* const q_ptr;
0037 
0038 protected:
0039     QUrl mUrl;
0040 
0041 private:
0042     Q_DECLARE_PUBLIC(AbstractModelSynchronizer)
0043 };
0044 
0045 inline AbstractModelSynchronizerPrivate::AbstractModelSynchronizerPrivate(AbstractModelSynchronizer* parent)
0046     : q_ptr(parent)
0047 {
0048 }
0049 
0050 inline AbstractModelSynchronizerPrivate::~AbstractModelSynchronizerPrivate() = default;
0051 
0052 inline const QUrl& AbstractModelSynchronizerPrivate::url() const { return mUrl; }
0053 
0054 inline void AbstractModelSynchronizerPrivate::setUrl(const QUrl& url)
0055 {
0056     Q_Q(AbstractModelSynchronizer);
0057 
0058     mUrl = url;
0059     Q_EMIT q->urlChanged(url);
0060 }
0061 
0062 }
0063 
0064 #endif