• 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
  • search
searchtool.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 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 SEARCHTOOL_H
24 #define SEARCHTOOL_H
25 
26 // libfinddialog
27 #include <kfinddirection.h>
28 // Kasten core
29 #include <abstracttool.h>
30 // Okteta core
31 #include <address.h>
32 
33 namespace Okteta {
34 class AbstractByteArrayModel;
35 }
36 
37 
38 namespace Kasten2
39 {
40 
41 namespace If {
42 class SearchUserQueryable;
43 }
44 class ByteArrayView;
45 
46 
47 class SearchTool : public AbstractTool
48 {
49  Q_OBJECT
50 
51  public:
52  SearchTool();
53  virtual ~SearchTool();
54 
55  public: // AbstractTool API
56 // virtual AbstractModel* targetModel() const;
57  virtual QString title() const;
58 
59  virtual void setTargetModel( AbstractModel* model );
60 
61  public: // status
62  QByteArray searchData() const;
63 // Qt::CaseSensitivity caseSensitivity() const;
64  bool hasSelectedData() const;
65  QString charCodingName() const;
66 
67  bool isApplyable() const; // candidate for AbstractTool API
68 
69  public: // actions
70  void search( KFindDirection direction, bool fromCursor, bool inSelection );
71 
72  public:
73  void setUserQueryAgent( If::SearchUserQueryable* userQueryAgent );
74 
75  public Q_SLOTS: // settings
76  void setSearchData( const QByteArray& searchData );
77  void setCaseSensitivity( Qt::CaseSensitivity caseSensitivity );
78 
79  Q_SIGNALS:
80  void isApplyableChanged( bool isApplyable ); // candidate for AbstractTool API
81  void charCodecChanged( const QString& codecName );
82 
83  void dataNotFound();
84 
85  protected:
86  void doSearch( KFindDirection direction );
87 
88  protected: // settings
89  QByteArray mSearchData;
90  Qt::CaseSensitivity mCaseSensitivity;
91 
92  protected: // status
93  bool mPreviousFound :1;
94  Okteta::Address mSearchFirstIndex;
95  Okteta::Address mSearchLastIndex;
96 
97  protected: //
98  If::SearchUserQueryable* mUserQueryAgent;
99 
100  protected: // target
101  ByteArrayView* mByteArrayView;
102  Okteta::AbstractByteArrayModel* mByteArrayModel;
103 };
104 
105 
106 inline QByteArray SearchTool::searchData() const { return mSearchData; }
107 // inline Qt::CaseSensitivity SearchTool::caseSensitivity() const { return mCaseSensitivity; }
108 
109 }
110 
111 #endif
Kasten2::SearchTool::charCodecChanged
void charCodecChanged(const QString &codecName)
Kasten2::SearchTool::setCaseSensitivity
void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity)
Definition: searchtool.cpp:108
Okteta::Address
qint32 Address
Definition: address.h:34
Okteta::AbstractByteArrayModel
could it be useful to hide the data access behind an iterator? * class KDataBufferIterator { public: ...
Definition: abstractbytearraymodel.h:79
Kasten2::SearchTool::isApplyableChanged
void isApplyableChanged(bool isApplyable)
Kasten2::SearchTool::searchData
QByteArray searchData() const
Definition: searchtool.h:106
Kasten2::SearchTool::mSearchFirstIndex
Okteta::Address mSearchFirstIndex
Definition: searchtool.h:94
Kasten2::SearchTool::mPreviousFound
bool mPreviousFound
Definition: searchtool.h:93
Kasten2::SearchTool::search
void search(KFindDirection direction, bool fromCursor, bool inSelection)
Definition: searchtool.cpp:119
Kasten2::SearchTool::setSearchData
void setSearchData(const QByteArray &searchData)
Definition: searchtool.cpp:97
Kasten2::SearchTool::SearchTool
SearchTool()
Definition: searchtool.cpp:43
Kasten2::SearchTool::mSearchData
QByteArray mSearchData
Definition: searchtool.h:89
kfinddirection.h
Kasten2::SearchTool::mSearchLastIndex
Okteta::Address mSearchLastIndex
Definition: searchtool.h:95
Kasten2::SearchTool::mByteArrayModel
Okteta::AbstractByteArrayModel * mByteArrayModel
Definition: searchtool.h:102
Kasten2::SearchTool
Definition: searchtool.h:47
Kasten2::SearchTool::setUserQueryAgent
void setUserQueryAgent(If::SearchUserQueryable *userQueryAgent)
Definition: searchtool.cpp:92
Kasten2::SearchTool::mCaseSensitivity
Qt::CaseSensitivity mCaseSensitivity
Definition: searchtool.h:90
Kasten2::SearchTool::dataNotFound
void dataNotFound()
address.h
Kasten2::SearchTool::setTargetModel
virtual void setTargetModel(AbstractModel *model)
Definition: searchtool.cpp:66
Kasten2::SearchTool::charCodingName
QString charCodingName() const
Definition: searchtool.cpp:64
Kasten2::SearchTool::mUserQueryAgent
If::SearchUserQueryable * mUserQueryAgent
Definition: searchtool.h:98
Kasten2::SearchTool::doSearch
void doSearch(KFindDirection direction)
Definition: searchtool.cpp:154
Kasten2::KFindDirection
KFindDirection
Definition: kfinddirection.h:29
Kasten2::SearchTool::title
virtual QString title() const
Definition: searchtool.cpp:61
Kasten2::SearchTool::~SearchTool
virtual ~SearchTool()
Definition: searchtool.cpp:201
Kasten2::SearchTool::mByteArrayView
ByteArrayView * mByteArrayView
Definition: searchtool.h:101
Kasten2::SearchTool::isApplyable
bool isApplyable() const
Definition: searchtool.cpp:52
Kasten2::AbstractTool
Definition: abstracttool.h:40
Kasten2::AbstractModel
Definition: abstractmodel.h:40
Kasten2::If::SearchUserQueryable
Definition: searchuserqueryable.h:38
Kasten2::SearchTool::hasSelectedData
bool hasSelectedData() const
Definition: searchtool.cpp:63
Kasten2::ByteArrayView
Definition: bytearrayview.h:51
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