1 /*
2  * Copyright (C) 2009, 2010, 2012 Nicolas Bonnefon and other contributors
3  *
4  * This file is part of glogg.
5  *
6  * glogg is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * glogg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with glogg.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef FILTEREDVIEW_H
21 #define FILTEREDVIEW_H
22 
23 #include "abstractlogview.h"
24 
25 #include "data/logfiltereddata.h"
26 
27 // Class implementing the filtered (bottom) view widget.
28 class FilteredView : public AbstractLogView
29 {
30   public:
31     FilteredView( LogFilteredData* newLogData,
32             const QuickFindPattern* const quickFindPattern,
33             QWidget* parent = 0 );
34 
35     // What is visible in the view.
36     enum Visibility { MatchesOnly, MarksOnly, MarksAndMatches };
37     void setVisibility( Visibility visi );
38 
39   protected:
40     virtual LineType lineType( int lineNumber ) const;
41 
42     // Number of the filtered line relative to the unfiltered source
43     virtual qint64 displayLineNumber( int lineNumber ) const;
44     virtual qint64 maxDisplayLineNumber() const;
45 
46   private:
47     LogFilteredData* logFilteredData_;
48 };
49 
50 #endif
51