Vidalia 0.2.10
|
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 3735 2009-04-28 20:28:01Z edmanm $ 00014 ** \brief Header for the message log QTreeView 00015 */ 00016 00017 #include "LogHeaderView.h" 00018 #include "LogTreeWidget.h" 00019 00020 /* Column indices */ 00021 #define COL_TIME LogTreeWidget::TimeColumn 00022 #define COL_TYPE LogTreeWidget::TypeColumn 00023 #define COL_MESG LogTreeWidget::MessageColumn 00024 00025 /* Default column widths */ 00026 #define COL_TIME_WIDTH 135 00027 #define COL_TYPE_WIDTH 70 00028 00029 00030 /** Default constructor. */ 00031 LogHeaderView::LogHeaderView(QWidget *parent) 00032 : QHeaderView(Qt::Horizontal, parent) 00033 { 00034 } 00035 00036 /** Resets all column widths back to their defaults. */ 00037 void 00038 LogHeaderView::resetColumnWidths() 00039 { 00040 resizeSection(COL_TIME, COL_TIME_WIDTH); 00041 resizeSection(COL_TYPE, COL_TYPE_WIDTH); 00042 setStretchLastSection(true); 00043 } 00044 00045