~ubuntu-branches/ubuntu/wily/juffed/wily-proposed

« back to all changes in this revision

Viewing changes to include/SearchResults.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2011-04-30 13:43:26 UTC
  • mfrom: (2.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20110430134326-0bnvvo5z2medbdxi
Tags: 0.9.1137-1
* New upstream release.
* Remove debian/juffed.1, added upstream (in debian.in).
* Remove debian/patches/static.patch: we can now bundle the .so after
  upstream has resolved soname issues.
* debian/control:
  - Bump Standards-Version to 0.9.2.
  - Update homepage.
  - Do not build-depend on chrpath, not needed anymore.
* debian/rules:
  - Remove chrpath rule, not needed anymore.
* Add juffed-dev and juffed-plugins packages.
* Do not install the libkeybindings.so plugin: causes a segfault on my
  amd64 machine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
JuffEd - An advanced text editor
 
3
Copyright 2007-2010 Mikhail Murzin
 
4
 
 
5
This program is free software; you can redistribute it and/or
 
6
modify it under the terms of the GNU General Public License 
 
7
version 2 as published by the Free Software Foundation.
 
8
 
 
9
This program is distributed in the hope that it will be useful,
 
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
GNU General Public License for more details.
 
13
 
 
14
You should have received a copy of the GNU General Public License
 
15
along with this program; if not, write to the Free Software
 
16
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
17
*/
 
18
 
 
19
#ifndef __JUFFED_SEARCH_RESULTS_H__
 
20
#define __JUFFED_SEARCH_RESULTS_H__
 
21
 
 
22
#include "LibConfig.h"
 
23
 
 
24
#include <QVector>
 
25
 
 
26
#include "Types.h"
 
27
 
 
28
namespace Juff {
 
29
 
 
30
struct SearchOccurence {
 
31
        int startRow;
 
32
        int startCol;
 
33
        int endRow;
 
34
        int endCol;
 
35
        
 
36
        SearchOccurence() {
 
37
                startRow = startCol = endRow = endCol = -1;
 
38
        }
 
39
        SearchOccurence(int row1, int col1, int row2, int col2) {
 
40
                startRow = row1;
 
41
                startCol = col1;
 
42
                endRow = row2;
 
43
                endCol = col2;
 
44
        }
 
45
};
 
46
 
 
47
class LIBJUFF_EXPORT SearchResults {
 
48
public:
 
49
        SearchResults(const Juff::SearchParams&);
 
50
 
 
51
        int count() const;
 
52
        SearchOccurence occurence(int) const;
 
53
        int findIndexByCursorPos(int row, int col, bool forward);
 
54
        void addOccurence(int, int, int, int);
 
55
        const Juff::SearchParams& params() const;
 
56
//      void setVisible(bool visible);
 
57
//      bool isVisible() const;
 
58
 
 
59
private:
 
60
        Juff::SearchParams params_;
 
61
        QVector<SearchOccurence> occurences_;
 
62
//      bool visible_;
 
63
};
 
64
 
 
65
}
 
66
 
 
67
#endif // __JUFFED_SEARCH_RESULTS_H__