Vidalia
0.2.17
|
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.torproject.org/projects/vidalia.html. No part of Vidalia, 00007 ** including this file, may be copied, modified, propagated, or distributed 00008 ** except according to the terms described in the LICENSE file. 00009 */ 00010 00011 /* 00012 ** \file StreamItem.cpp 00013 ** \brief Item representing a stream through Tor and its status 00014 */ 00015 00016 #include "StreamItem.h" 00017 #include "CircuitListWidget.h" 00018 00019 00020 /** Constructor */ 00021 StreamItem::StreamItem(const Stream &stream) 00022 { 00023 /* Set the stream's displayed target information */ 00024 setText(CircuitListWidget::ConnectionColumn, stream.target()); 00025 setToolTip(CircuitListWidget::ConnectionColumn, stream.target()); 00026 00027 /* Update the status and target */ 00028 update(stream); 00029 } 00030 00031 /** Updates the status of this stream item. */ 00032 void 00033 StreamItem::update(const Stream &stream) 00034 { 00035 _stream = stream; 00036 setText(CircuitListWidget::StatusColumn, stream.statusString()); 00037 setToolTip(CircuitListWidget::StatusColumn, stream.statusString()); 00038 } 00039