00001 /* 00002 ** This file is part of Vidalia, and is subject to the license terms in the 00003 ** LICENSE file, found in the top level directory of this distribution. If you 00004 ** did not receive the LICENSE file with this file, you may obtain it from the 00005 ** Vidalia source package distributed by the Vidalia Project at 00006 ** http://www.vidalia-project.net/. No part of Vidalia, including this file, 00007 ** may be copied, modified, propagated, or distributed except according to the 00008 ** terms described in the LICENSE file. 00009 */ 00010 00011 /* 00012 ** \file logheaderview.cpp 00013 ** \version $Id: logheaderview.cpp 2922 2008-08-03 01:19:40Z edmanm $ 00014 ** \brief Header for the message log QTreeView 00015 */ 00016 00017 #include "logheaderview.h" 00018 #include "logtreewidget.h" 00019 00020 00021 /* Column indices */ 00022 #define COL_TIME LogTreeWidget::TimeColumn 00023 #define COL_TYPE LogTreeWidget::TypeColumn 00024 #define COL_MESG LogTreeWidget::MessageColumn 00025 00026 /* Default column widths */ 00027 #define COL_TIME_WIDTH 135 00028 #define COL_TYPE_WIDTH 70 00029 00030 00031 /** Default constructor. */ 00032 LogHeaderView::LogHeaderView(QWidget *parent) 00033 : QHeaderView(Qt::Horizontal, parent) 00034 { 00035 } 00036 00037 /** Resets all column widths back to their defaults. */ 00038 void 00039 LogHeaderView::resetColumnWidths() 00040 { 00041 resizeSection(COL_TIME, COL_TIME_WIDTH); 00042 resizeSection(COL_TYPE, COL_TYPE_WIDTH); 00043 setStretchLastSection(true); 00044 } 00045 00046