• 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
  • kasten
  • gui
  • io
bytearrayviewprofilesynchronizer.h
Go to the documentation of this file.
1 /*
2  This file is part of the Okteta Kasten module, made within the KDE community.
3 
4  Copyright 2012 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 BYTEARRAYVIEWPROFILESYNCHRONIZER_H
24 #define BYTEARRAYVIEWPROFILESYNCHRONIZER_H
25 
26 // lib
27 #include "oktetakastengui_export.h"
28 #include <bytearrayviewprofile.h>
29 // Kasten core
30 #include <kastencore.h>
31 // Qt Core
32 #include <QtCore/QObject>
33 
34 
35 namespace Kasten2
36 {
37 
38 class ByteArrayViewProfileManager;
39 class ByteArrayView;
40 
41 class OKTETAKASTENGUI_EXPORT ByteArrayViewProfileSynchronizer : public QObject
42 {
43  Q_OBJECT
44 
45  enum DirtyFlags
46  {
47  ShowsNonprintingChanged = 1 << 0,
48  ValueCodingChanged = 1 << 1,
49  CharCodecChanged = 1 << 2,
50  SubstituteCharChanged = 1 << 3,
51  UndefinedCharChanged = 1 << 4,
52  VisibleByteArrayCodingsChanged = 1 << 5,
53  OffsetColumnVisibleChanged = 1 << 6,
54  NoOfBytesPerLineChanged = 1 << 7,
55  NoOfGroupedBytesChanged = 1 << 8,
56  LayoutStyleChanged = 1 << 9,
57  ViewModusChanged = 1 << 10,
58  OffsetCodingChanged = 1 << 11
59  };
60 
61  public:
62  explicit ByteArrayViewProfileSynchronizer( ByteArrayViewProfileManager* viewProfileManager );
63 
64  public:
65 // AbstractLoadJob *startLoad( const KUrl &url );
66  void syncToRemote();
67  void syncFromRemote();
68 // AbstractConnectJob *startConnect( AbstractDocument* document,
69 // const KUrl& url, AbstractModelSynchronizer::ConnectOption option );
70 
71  ByteArrayView* view() const;
72  ByteArrayViewProfile::Id viewProfileId() const;
73 
74  void setView( ByteArrayView* view );
75  void setViewProfileId( const ByteArrayViewProfile::Id& viewProfileId );
76 
77  LocalSyncState localSyncState() const;
78 
79  Q_SIGNALS:
80  void localSyncStateChanged( Kasten2::LocalSyncState newState );
81  void viewProfileChanged( const Kasten2::ByteArrayViewProfile::Id& viewProfileId );
82 
83  private Q_SLOTS:
84  void onViewProfilesChanged( const QList<Kasten2::ByteArrayViewProfile>& viewProfiles );
85  void onViewProfilesRemoved( const QList<Kasten2::ByteArrayViewProfile::Id>& viewProfileIds );
86 
87  // TODO: turn to one signal/slot with enum parameter for property and QVariant as new value
88  void onShowsNonprintingChanged();
89  void onOffsetCodingChanged();
90  void onValueCodingChanged();
91  void onCharCodecChanged();
92  void onSubstituteCharChanged();
93  void onUndefinedCharChanged();
94  void onVisibleByteArrayCodingsChanged();
95  void onOffsetColumnVisibleChanged();
96  void onNoOfBytesPerLineChanged();
97  void onNoOfGroupedBytesChanged();
98  void onLayoutStyleChanged();
99  void onViewModusChanged();
100 
101  private:
102  void updateView( const ByteArrayViewProfile& viewProfile );
103  void updateViewProfile( ByteArrayViewProfile& viewProfile );
104  void setDirtyFlag( int dirtyFlag );
105  void connectViewSignals();
106 
107  private:
108  ByteArrayView* mView;
109  ByteArrayViewProfile::Id mViewProfileId;
110  int mDirtyFlags;
111  bool mUpdatingView;
112 
113  ByteArrayViewProfileManager* mViewProfileManager;
114 };
115 
116 
117 inline ByteArrayView* ByteArrayViewProfileSynchronizer::view() const { return mView; }
118 inline ByteArrayViewProfile::Id ByteArrayViewProfileSynchronizer::viewProfileId() const { return mViewProfileId; }
119 
120 }
121 
122 
123 #endif
Kasten2::LocalSyncState
LocalSyncState
Definition: kastencore.h:33
Kasten2::ByteArrayViewProfile::Id
QString Id
Definition: bytearrayviewprofile.h:42
Kasten2::ByteArrayViewProfile
Definition: bytearrayviewprofile.h:39
bytearrayviewprofile.h
QObject
Kasten2::ByteArrayViewProfileSynchronizer::viewProfileId
ByteArrayViewProfile::Id viewProfileId() const
Definition: bytearrayviewprofilesynchronizer.h:118
OKTETAKASTENGUI_EXPORT
#define OKTETAKASTENGUI_EXPORT
Definition: oktetakastengui_export.h:36
Kasten2::ByteArrayViewProfileSynchronizer::view
ByteArrayView * view() const
Definition: bytearrayviewprofilesynchronizer.h:117
Kasten2::ByteArrayViewProfileSynchronizer
Definition: bytearrayviewprofilesynchronizer.h:41
Kasten2::viewProfileIds
static QList< ByteArrayViewProfile::Id > viewProfileIds(const QList< ByteArrayViewProfile > &viewProfiles)
Definition: bytearrayviewprofilemanager.cpp:58
kastencore.h
Kasten2::ByteArrayViewProfileManager
Definition: bytearrayviewprofilemanager.h:65
oktetakastengui_export.h
Kasten2::ByteArrayView
Definition: bytearrayview.h:51
QList< Kasten2::ByteArrayViewProfile >
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:07 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