// show
subjectList->adjustColumn( id );
}
+ saveHeaderOnOff();
return true;
} else {
return false;
return subjectList->header()->eventFilter( watched, e );
}
}
+
+void KitaSubjectView::saveHeaderOnOff()
+{
+ // FIXME: refactoring.
+ QString configPath = locateLocal( "appdata", "subjectview.conf" );
+ KConfig config( configPath );
+
+ config.setGroup( "Column" );
+ config.writeEntry( "Col_Mark" , subjectList->columnWidth( Col_Mark ) != 0 ? true : false );
+ config.writeEntry( "Col_ID" , subjectList->columnWidth( Col_ID ) != 0 ? true : false );
+ config.writeEntry( "Col_Icon" , subjectList->columnWidth( Col_Icon ) != 0 ? true : false );
+ config.writeEntry( "Col_Subject" , subjectList->columnWidth( Col_Subject ) != 0 ? true : false );
+ config.writeEntry( "Col_ResNum" , subjectList->columnWidth( Col_ResNum ) != 0 ? true : false );
+ config.writeEntry( "Col_Read" , subjectList->columnWidth( Col_Read ) != 0 ? true : false );
+ config.writeEntry( "Col_ViewPos" , subjectList->columnWidth( Col_ViewPos ) != 0 ? true : false );
+ config.writeEntry( "Col_Unread" , subjectList->columnWidth( Col_Unread ) != 0 ? true : false );
+ config.writeEntry( "Col_Since" , subjectList->columnWidth( Col_Since ) != 0 ? true : false );
+ config.writeEntry( "Col_Speed" , subjectList->columnWidth( Col_Speed ) != 0 ? true : false );
+ config.writeEntry( "Col_Board" , subjectList->columnWidth( Col_Board ) != 0 ? true : false );
+ config.writeEntry( "Col_DatURL" , subjectList->columnWidth( Col_DatURL ) != 0 ? true : false );
+ config.writeEntry( "Col_MarkOrder", subjectList->columnWidth( Col_MarkOrder ) != 0 ? true : false );
+ config.writeEntry( "Col_ID" , subjectList->columnWidth( Col_ID ) != 0 ? true : false );
+}
void loadLayout();
void updateListViewItem( QListViewItem* item, Kita::Thread* thread, const QDateTime& current, int id, int order);
bool eventFilter( QObject* watched, QEvent* e );
+ void saveHeaderOnOff();
private slots:
void loadThread( QListViewItem* item );