OSDN Git Service

fix gcc 3.4.0 compile error.
[kita/kita.git] / kita / src / threadlistview.h
1 /***************************************************************************
2 *   Copyright (C) 2003 by Hideki Ikemoto                                  *
3 *   ikemo@wakaba.jp                                                       *
4 *                                                                         *
5 *   This program is free software; you can redistribute it and/or modify  *
6 *   it under the terms of the GNU General Public License as published by  *
7 *   the Free Software Foundation; either version 2 of the License, or     *
8 *   (at your option) any later version.                                   *
9 ***************************************************************************/
10 #ifndef KITATHREADLISTVIEW_H
11 #define KITATHREADLISTVIEW_H
12
13 #include "threadlistviewbase.h"
14
15 #include <klistview.h>
16
17 enum ThreadListViewRows {
18     Col_Mark,
19     Col_ID,
20     Col_Icon,
21     Col_Subject,
22     Col_ResNum,
23     Col_Read,
24     Col_Unread,
25     Col_Since,
26     Col_Board,
27     Col_DatURL,
28     Col_MarkOrder
29 };
30
31 namespace Kita
32 {
33     /**
34     @author Hideki Ikemoto
35     */
36     class ThreadListView : public Kita::ThreadListViewBase
37     {
38         Q_OBJECT
39
40     public:
41         ThreadListView( QWidget* parent = 0, const char *name = 0 );
42         ~ThreadListView();
43
44     protected:
45         QStringList m_prevquery;
46         unsigned m_nextHitIndex;
47         QValueList<KListViewItem *> m_hitList;
48
49         void insertSearchCombo();
50         QStringList parseSearchQuery( const QString& input );
51         void searchNext( const QStringList& input );
52         void searchAll( const QStringList& query );
53
54     protected slots:
55         void slotHideButton( bool on );
56
57     private slots:
58         void slotSearchButton();
59     };
60
61     class ThreadListViewItem : public KListViewItem
62     {
63     public:
64         ThreadListViewItem( QListView* parent ) : KListViewItem( parent ) {};
65         virtual ~ThreadListViewItem() {};
66
67         virtual int compare( QListViewItem* i, int col, bool ascending ) const;
68     };
69 }
70
71 #endif