• 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
  • gui
  • system
singledocumentstrategy_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 2011 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 SINGLEDOCUMENTSTRATEGY_P_H
24 #define SINGLEDOCUMENTSTRATEGY_P_H
25 
26 // lib
27 #include "abstractdocumentstrategy_p.h"
28 #include "singledocumentstrategy.h"
29 // Kasten core
30 #include <documentmanager.h>
31 #include <documentsyncmanager.h>
32 // Qt Core
33 #include <QtCore/QStringList>
34 
35 
36 namespace Kasten2
37 {
38 class ViewManager;
39 
40 
41 class SingleDocumentStrategyPrivate : public AbstractDocumentStrategyPrivate
42 {
43  public:
44  SingleDocumentStrategyPrivate( SingleDocumentStrategy* parent,
45  DocumentManager* documentManager,
46  ViewManager* viewManager );
47  virtual ~SingleDocumentStrategyPrivate();
48 
49  public:
50  void init();
51 
52  public: // AbstractDocumentStrategy API
53  void createNew();
54  void createNewFromClipboard();
55  void createNewWithGenerator( AbstractModelDataGenerator* generator );
56 
57  void load( const KUrl& url );
58 
59  void closeDocument( AbstractDocument* document );
60  void closeAll();
61  void closeAllOther( AbstractDocument* document );
62 
63  public: // const AbstractDocumentStrategy API
64  QList<AbstractDocument*> documents() const;
65  QStringList supportedRemoteTypes() const;
66 
67  bool canClose( AbstractDocument* document ) const;
68  bool canCloseAll() const;
69  bool canCloseAllOther( AbstractDocument* document ) const;
70 
71  protected:
72  Q_DECLARE_PUBLIC( SingleDocumentStrategy )
73 
74  protected:
75  DocumentManager* mDocumentManager;
76  ViewManager* mViewManager;
77 };
78 
79 
80 inline
81 SingleDocumentStrategyPrivate::SingleDocumentStrategyPrivate( SingleDocumentStrategy* parent,
82  DocumentManager* documentManager,
83  ViewManager* viewManager )
84  : AbstractDocumentStrategyPrivate( parent ),
85  mDocumentManager( documentManager ),
86  mViewManager( viewManager )
87 {
88 }
89 
90 inline QList<AbstractDocument*> SingleDocumentStrategyPrivate::documents() const
91 {
92  return mDocumentManager->documents();
93 }
94 
95 inline QStringList SingleDocumentStrategyPrivate::supportedRemoteTypes() const
96 {
97  return mDocumentManager->syncManager()->supportedRemoteTypes();
98 }
99 
100 inline bool SingleDocumentStrategyPrivate::canClose( AbstractDocument* document ) const
101 {
102  return mDocumentManager->canClose( document );
103 }
104 
105 inline bool SingleDocumentStrategyPrivate::canCloseAllOther( AbstractDocument* document ) const
106 {
107  return mDocumentManager->canCloseAllOther( document );
108 }
109 
110 inline bool SingleDocumentStrategyPrivate::canCloseAll() const
111 {
112  return mDocumentManager->canCloseAll();
113 }
114 
115 inline void SingleDocumentStrategyPrivate::closeAll()
116 {
117  mDocumentManager->closeAll();
118 }
119 
120 inline void SingleDocumentStrategyPrivate::closeAllOther( AbstractDocument* document )
121 {
122  mDocumentManager->closeAllOther( document );
123 }
124 
125 inline void SingleDocumentStrategyPrivate::closeDocument( AbstractDocument* document )
126 {
127  mDocumentManager->closeDocument( document );
128 }
129 
130 inline SingleDocumentStrategyPrivate::~SingleDocumentStrategyPrivate() {}
131 
132 }
133 
134 #endif
documentsyncmanager.h
documentmanager.h
Kasten2::SingleDocumentStrategyPrivate::createNew
void createNew()
Kasten2::DocumentManager::canClose
bool canClose(AbstractDocument *document)
Definition: documentmanager.cpp:127
Kasten2::SingleDocumentStrategyPrivate::createNewFromClipboard
void createNewFromClipboard()
Kasten2::DocumentManager::documents
QList< AbstractDocument * > documents() const
Definition: documentmanager.cpp:52
Kasten2::SingleDocumentStrategyPrivate::mDocumentManager
DocumentManager * mDocumentManager
Definition: singledocumentstrategy_p.h:75
Kasten2::DocumentManager::closeAll
void closeAll()
Definition: documentmanager.cpp:96
Kasten2::SingleDocumentStrategyPrivate
Definition: singledocumentstrategy_p.h:41
Kasten2::ViewManager
Definition: viewmanager.h:40
singledocumentstrategy.h
Kasten2::SingleDocumentStrategyPrivate::~SingleDocumentStrategyPrivate
virtual ~SingleDocumentStrategyPrivate()
Definition: singledocumentstrategy_p.h:130
Kasten2::DocumentManager::canCloseAll
bool canCloseAll()
Definition: documentmanager.cpp:148
Kasten2::DocumentManager::canCloseAllOther
bool canCloseAllOther(AbstractDocument *document)
Definition: documentmanager.cpp:164
Kasten2::DocumentManager::closeAllOther
void closeAllOther(AbstractDocument *document)
Definition: documentmanager.cpp:109
Kasten2::SingleDocumentStrategyPrivate::canClose
bool canClose(AbstractDocument *document) const
Definition: singledocumentstrategy_p.h:100
Kasten2::SingleDocumentStrategyPrivate::closeAllOther
void closeAllOther(AbstractDocument *document)
Definition: singledocumentstrategy_p.h:120
Kasten2::SingleDocumentStrategyPrivate::closeDocument
void closeDocument(AbstractDocument *document)
Definition: singledocumentstrategy_p.h:125
Kasten2::DocumentSyncManager::supportedRemoteTypes
QStringList supportedRemoteTypes() const
Definition: documentsyncmanager.cpp:67
Kasten2::AbstractModelDataGenerator
Definition: abstractmodeldatagenerator.h:41
Kasten2::SingleDocumentStrategyPrivate::createNewWithGenerator
void createNewWithGenerator(AbstractModelDataGenerator *generator)
abstractdocumentstrategy_p.h
Kasten2::SingleDocumentStrategyPrivate::documents
QList< AbstractDocument * > documents() const
Definition: singledocumentstrategy_p.h:90
Kasten2::SingleDocumentStrategyPrivate::canCloseAll
bool canCloseAll() const
Definition: singledocumentstrategy_p.h:110
Kasten2::SingleDocumentStrategyPrivate::canCloseAllOther
bool canCloseAllOther(AbstractDocument *document) const
Definition: singledocumentstrategy_p.h:105
Kasten2::SingleDocumentStrategy
Definition: singledocumentstrategy.h:37
Kasten2::SingleDocumentStrategyPrivate::supportedRemoteTypes
QStringList supportedRemoteTypes() const
Definition: singledocumentstrategy_p.h:95
Kasten2::AbstractDocument
Definition: abstractdocument.h:43
Kasten2::SingleDocumentStrategyPrivate::SingleDocumentStrategyPrivate
SingleDocumentStrategyPrivate(SingleDocumentStrategy *parent, DocumentManager *documentManager, ViewManager *viewManager)
Definition: singledocumentstrategy_p.h:81
Kasten2::SingleDocumentStrategyPrivate::closeAll
void closeAll()
Definition: singledocumentstrategy_p.h:115
Kasten2::DocumentManager::closeDocument
void closeDocument(AbstractDocument *document)
Definition: documentmanager.cpp:66
Kasten2::SingleDocumentStrategyPrivate::init
void init()
Kasten2::SingleDocumentStrategyPrivate::mViewManager
ViewManager * mViewManager
Definition: singledocumentstrategy_p.h:76
Kasten2::DocumentManager::syncManager
DocumentSyncManager * syncManager()
Definition: documentmanager.h:108
Kasten2::DocumentManager
Definition: documentmanager.h:44
Kasten2::SingleDocumentStrategyPrivate::load
void load(const KUrl &url)
Kasten2::AbstractDocumentStrategyPrivate
Definition: abstractdocumentstrategy_p.h:32
QList
Definition: bookmarkable.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:09 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