• 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
  • controllers
  • view
  • stringsextract
stringsextracttool.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 2007-2008 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 STRINGSEXTRACTTOOL_H
24 #define STRINGSEXTRACTTOOL_H
25 
26 // lib
27 #include "oktetakastencontrollers_export.h"
28 // tool
29 #include "containedstring.h"
30 // Kasten core
31 #include <abstracttool.h>
32 // Okteta core
33 #include <addressrange.h>
34 // Qt
35 #include <QtCore/QList>
36 
37 namespace Okteta {
38 class AbstractByteArrayModel;
39 class CharCodec;
40 }
41 
42 
43 namespace Kasten2
44 {
45 
46 class ByteArrayView;
47 
48 
51 class OKTETAKASTENCONTROLLERS_EXPORT StringsExtractTool : public AbstractTool
52 {
53  Q_OBJECT
54 
55  public:
56  StringsExtractTool();
57  virtual ~StringsExtractTool();
58 
59  public: // AbstractTool API
60 // virtual AbstractModel* targetModel() const;
61  virtual QString title() const;
62 
63  virtual void setTargetModel( AbstractModel* model );
64 
65  public: // status
66  const QList<ContainedString> *containedStringList() const;
67  int minLength() const;
68  bool isApplyable() const; // candidate for AbstractTool API
69  bool isUptodate() const;
70  bool canHighlightString() const;
71  int offsetCoding() const;
72 
73  public Q_SLOTS: // settings
74  KDE_DEPRECATED void setCharCodec( const QString &codecName );
75  void setMinLength( int minLength );
76  void markString( int stringId );
77  void unmarkString();
78 
79  public Q_SLOTS: // actions
80  void extractStrings();
81 
82  Q_SIGNALS:
83  void uptodateChanged( bool isUptodate );
84  void isApplyableChanged( bool isApplyable ); // candidate for AbstractTool API
85  void canHighlightStringChanged( bool canHighlightString );
86  void offsetCodingChanged( int offsetCoding );
87 
88  private:
89  void checkUptoDate();
90 
91  private Q_SLOTS:
92  void onSelectionChanged();
93  void onSourceChanged();
94  void onSourceDestroyed();
95  void onSourceViewDestroyed();
96 
97  private: // created data
98  QList<ContainedString> mContainedStringList;
99  bool mExtractedStringsUptodate:1;
100  bool mSourceByteArrayModelUptodate:1;
101 
102  private: // settings
103  int mMinLength;
104 
105  private: // sources
106  ByteArrayView* mByteArrayView;
107  // current
108  Okteta::AbstractByteArrayModel *mByteArrayModel;
109 
110  // marked view
111  ByteArrayView* mSourceByteArrayView;
112  // selection source
113  Okteta::AddressRange mSourceSelection;
114  // source of strings
115  Okteta::AbstractByteArrayModel *mSourceByteArrayModel;
116  // minLength source
117  int mSourceMinLength;
118 };
119 
120 
121 inline const QList<ContainedString> *StringsExtractTool::containedStringList() const { return &mContainedStringList; }
122 inline int StringsExtractTool::minLength() const { return mMinLength; }
123 inline bool StringsExtractTool::isUptodate() const { return mExtractedStringsUptodate; }
124 
125 }
126 
127 #endif
Okteta::AbstractByteArrayModel
could it be useful to hide the data access behind an iterator? * class KDataBufferIterator { public: ...
Definition: abstractbytearraymodel.h:79
Kasten2::StringsExtractTool::containedStringList
const QList< ContainedString > * containedStringList() const
Definition: stringsextracttool.h:121
Kasten2::StringsExtractTool::isUptodate
bool isUptodate() const
Definition: stringsextracttool.h:123
KDE::NumberRange< Address, Size >
containedstring.h
addressrange.h
Kasten2::StringsExtractTool::minLength
int minLength() const
Definition: stringsextracttool.h:122
oktetakastencontrollers_export.h
Kasten2::AbstractTool
Definition: abstracttool.h:40
Kasten2::AbstractModel
Definition: abstractmodel.h:40
OKTETAKASTENCONTROLLERS_EXPORT
#define OKTETAKASTENCONTROLLERS_EXPORT
Definition: oktetakastencontrollers_export.h:36
Kasten2::StringsExtractTool
Definition: stringsextracttool.h:51
Kasten2::ByteArrayView
Definition: bytearrayview.h:51
QList< ContainedString >
abstracttool.h
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