• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • libs
  • kasten
  • core
  • document
abstractdocument_p.h
Go to the documentation of this file.
1 /*
2  This file is part of the Kasten Framework, made within the KDE community.
3 
4  Copyright 2007-2009 Friedrich W. H. Kossebau <kossebau@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #ifndef ABSTRACTDOCUMENT_P_H
24 #define ABSTRACTDOCUMENT_P_H
25 
26 #include "abstractmodel_p.h"
27 #include "abstractdocument.h"
28 
29 // lib
30 #include "abstractmodelsynchronizer.h"
31 
32 
33 namespace Kasten2
34 {
35 
36 class AbstractDocumentPrivate : public AbstractModelPrivate
37 {
38  public:
39  explicit AbstractDocumentPrivate( AbstractDocument* parent );
40 
41  ~AbstractDocumentPrivate();
42 
43  public:
44  const QString& id() const;
45  AbstractModelSynchronizer* synchronizer() const;
46 
47  public:
48  void setId( const QString& id );
49  void setSynchronizer( AbstractModelSynchronizer* synchronizer );
50 
51  protected:
52  Q_DECLARE_PUBLIC( AbstractDocument )
53 
54  protected:
55  QString mId;
56  AbstractModelSynchronizer* mSynchronizer; // TODO: should this be here, with public setters and getters?
57 };
58 
59 
60 inline AbstractDocumentPrivate::AbstractDocumentPrivate( AbstractDocument* parent )
61  : AbstractModelPrivate( parent ),
62  mSynchronizer( 0 )
63 {}
64 
65 inline const QString& AbstractDocumentPrivate::id() const { return mId; }
66 inline void AbstractDocumentPrivate::setId( const QString& id ) { mId = id; }
67 
68 inline AbstractModelSynchronizer* AbstractDocumentPrivate::synchronizer() const { return mSynchronizer; }
69 inline void AbstractDocumentPrivate::setSynchronizer( AbstractModelSynchronizer* synchronizer )
70 {
71  Q_Q( AbstractDocument );
72 
73  // plugging the same more than once?
74  if( mSynchronizer == synchronizer )
75  return;
76 
77  delete mSynchronizer;
78  mSynchronizer = synchronizer;
79 
80  emit q->synchronizerChanged( synchronizer );
81 }
82 
83 inline AbstractDocumentPrivate::~AbstractDocumentPrivate()
84 {
85  delete mSynchronizer;
86 }
87 
88 }
89 
90 #endif
Kasten2::AbstractDocumentPrivate::mSynchronizer
AbstractModelSynchronizer * mSynchronizer
Definition: abstractdocument_p.h:56
abstractdocument.h
abstractmodel_p.h
Kasten2::AbstractDocumentPrivate
Definition: abstractdocument_p.h:36
Kasten2::AbstractDocumentPrivate::id
const QString & id() const
Definition: abstractdocument_p.h:65
Kasten2::AbstractDocumentPrivate::synchronizer
AbstractModelSynchronizer * synchronizer() const
Definition: abstractdocument_p.h:68
Kasten2::AbstractDocumentPrivate::setSynchronizer
void setSynchronizer(AbstractModelSynchronizer *synchronizer)
Definition: abstractdocument_p.h:69
Kasten2::AbstractDocumentPrivate::AbstractDocumentPrivate
AbstractDocumentPrivate(AbstractDocument *parent)
Definition: abstractdocument_p.h:60
abstractmodelsynchronizer.h
Kasten2::AbstractModelPrivate
Definition: abstractmodel_p.h:32
Kasten2::AbstractDocument
Definition: abstractdocument.h:43
Kasten2::AbstractDocumentPrivate::~AbstractDocumentPrivate
~AbstractDocumentPrivate()
Definition: abstractdocument_p.h:83
Kasten2::AbstractDocumentPrivate::mId
QString mId
Definition: abstractdocument_p.h:55
Kasten2::AbstractModelSynchronizer
possible actions:
Definition: abstractmodelsynchronizer.h:61
Kasten2::AbstractDocumentPrivate::setId
void setId(const QString &id)
Definition: abstractdocument_p.h:66
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

Skip menu "okteta"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal