OSDN Git Service

refactoring.
[kita/kita.git] / kita / src / threadlistview.h
index e13e339..fe5e93a 100644 (file)
 #include "threadlistviewbase.h"
 
 #include <klistview.h>
+#include <kparts/browserextension.h>
 
-enum ThreadListViewRows {
-    Col_Mark,
-    Col_ID,
-    Col_Icon,
-    Col_Subject,
-    Col_ResNum,
-    Col_Read,
-    Col_Unread,
-    Col_Since,
-    Col_Board,
-    Col_DatURL,
-    Col_MarkOrder
+struct Col_Attr
+{
+    QString labelName; /// for header's label
+    QString itemName;  /// for header's popupItem
+    QString keyName;   /// for KConfig's key
+    bool showDefault;  /// default setting.
 };
 
+
 namespace Kita
 {
+    class Thread;
     /**
     @author Hideki Ikemoto
     */
@@ -42,30 +39,26 @@ namespace Kita
         ~ThreadListView();
 
     protected:
+        static struct Col_Attr s_colAttr[];
         QStringList m_prevquery;
         unsigned m_nextHitIndex;
         QValueList<KListViewItem *> m_hitList;
 
         void insertSearchCombo();
-        QStringList parseSearchQuery( const QString& input );
         void searchNext( const QStringList& input );
-        void searchAll( const QStringList& query );
+        void searchNew( const QStringList& query );
+        void clearSearch();
+        void hideColumn( int col );
+        void showColumn( int col );
 
     protected slots:
         void slotHideButton( bool on );
+        void slotMouseButtonClicked( int, QListViewItem* );
 
     private slots:
         void slotSearchButton();
-    };
 
-    class ThreadListViewItem : public KListViewItem
-    {
-    public:
-        ThreadListViewItem( QListView* parent ) : KListViewItem( parent ) {};
-        virtual ~ThreadListViewItem() {};
-
-        virtual int compare( QListViewItem* i, int col, bool ascending ) const;
     };
-};
+}
 
 #endif