OSDN Git Service

Merge KITA-KDE4
[kita/kita.git] / kita / src / threadlistview.h
index fe5e93a..3eff9d8 100644 (file)
 #ifndef KITATHREADLISTVIEW_H
 #define KITATHREADLISTVIEW_H
 
-#include "threadlistviewbase.h"
+#include <QtCore/QList>
 
-#include <klistview.h>
-#include <kparts/browserextension.h>
-
-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.
-};
+#include "ui_threadlistviewbase.h"
 
+class KAction;
 
 namespace Kita
 {
@@ -30,34 +22,42 @@ namespace Kita
     /**
     @author Hideki Ikemoto
     */
-    class ThreadListView : public Kita::ThreadListViewBase
+    class ThreadListView : public QWidget, public Ui::ThreadListViewBase
     {
         Q_OBJECT
 
     public:
-        ThreadListView( QWidget* parent = 0, const char *name = 0 );
-        ~ThreadListView();
+        explicit ThreadListView(QWidget* parent = 0);
+        virtual ~ThreadListView();
 
     protected:
-        static struct Col_Attr s_colAttr[];
         QStringList m_prevquery;
         unsigned m_nextHitIndex;
-        QValueList<KListViewItem *> m_hitList;
+        QList<QTableWidgetItem *> m_hitList;
+        KAction* m_deleteLogAct;
 
         void insertSearchCombo();
-        void searchNext( const QStringList& input );
-        void searchNew( const QStringList& query );
+        void searchNext(const QStringList& input);
+        void searchNew(const QStringList& query);
         void clearSearch();
-        void hideColumn( int col );
-        void showColumn( int col );
+        void hideColumn(int col);
+        void showColumn(int col);
+        void contextMenuEvent(QContextMenuEvent* event);
+        virtual void deleteLog(const KUrl& url);
 
     protected slots:
-        void slotHideButton( bool on );
-        void slotMouseButtonClicked( int, QListViewItem* );
+        void slotHideButton(bool on);
+        void slotItemClicked(QTableWidgetItem*);
 
     private slots:
         void slotSearchButton();
 
+    private:
+        KAction* m_openWithBrowserAct;
+        KAction* m_copyUrlAct;
+        KAction* m_copyTitleAndUrlAct;
+        KAction* m_favoritesAct;
+        KAction* m_propertyAct;
     };
 }