OSDN Git Service

remove from favorites.
[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     class Thread;
34     /**
35     @author Hideki Ikemoto
36     */
37     class ThreadListView : public Kita::ThreadListViewBase
38     {
39         Q_OBJECT
40
41     public:
42         ThreadListView( QWidget* parent = 0, const char *name = 0 );
43         ~ThreadListView();
44
45     protected:
46         QStringList m_prevquery;
47         unsigned m_nextHitIndex;
48         QValueList<KListViewItem *> m_hitList;
49
50         void insertSearchCombo();
51         QStringList parseSearchQuery( const QString& input );
52         void searchNext( const QStringList& input );
53         void searchAll( const QStringList& query );
54
55     protected slots:
56         void slotHideButton( bool on );
57         void slotMouseButtonClicked( int, QListViewItem* );
58
59     private slots:
60         void slotSearchButton();
61     
62     signals:
63         /**
64         * @param datURL É½¼¨¤¹¤ë¥¹¥ì¤Îdat¤ÎURL
65         */
66         void showThreadRequested( const QString& datURL, bool withNewTab );
67         void bookmarked( const QString& datURL, bool on );
68     };
69
70     class ThreadListViewItem : public KListViewItem
71     {
72     public:
73         ThreadListViewItem( QListView* parent ) : KListViewItem( parent ) {};
74         virtual ~ThreadListViewItem() {};
75
76         virtual int compare( QListViewItem* i, int col, bool ascending ) const;
77     };
78 }
79
80 #endif