OSDN Git Service

refactoring.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sat, 29 Jan 2005 15:22:44 +0000 (15:22 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sat, 29 Jan 2005 15:22:44 +0000 (15:22 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1688 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/board/threadlistview.cpp
kita/src/board/threadlistview.h
kita/src/board/threadlistviewitem.h

index 10fff1d..3805e69 100644 (file)
@@ -60,9 +60,7 @@ ThreadListView::ThreadListView( QWidget* parent, const char* name )
         subjectList->addColumn( i18n( s_colAttr[ i ].labelName ) );
 
         if ( s_colAttr[ i ].showDefault != true ) {
-            subjectList->setColumnWidthMode( i, QListView::Manual );
-            header->setResizeEnabled( false, i );
-            subjectList->setColumnWidth( i, 0 );
+            hideColumn( i );
         }
     }
     header->setStretchEnabled( true, Col_Subject );
@@ -198,4 +196,12 @@ void ThreadListView::slotMouseButtonClicked( int button, QListViewItem* item )
     }
 }
 
+void ThreadListView::hideColumn( int col )
+{
+    QHeader* header = subjectList->header();
+    subjectList->setColumnWidthMode( col, QListView::Manual );
+    header->setResizeEnabled( false, col );
+    subjectList->setColumnWidth( col, 0 );
+}
+
 #include "threadlistview.moc"
index 7f1807b..6424eb0 100644 (file)
@@ -48,6 +48,7 @@ namespace Kita
         QStringList parseSearchQuery( const QString& input );
         void searchNext( const QStringList& input );
         void searchAll( const QStringList& query );
+        void hideColumn( int col );
 
     protected slots:
         void slotHideButton( bool on );
index 11849ec..5ea1194 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "kitaui/listviewitem.h"
 
-enum ThreadListRows {
+enum ThreadListCol {
     Col_Begin = 0,
     Col_Mark = 0,
     Col_ID,