Vidalia
0.3.1
src
vidalia
network
StreamItem.cpp
Go to the documentation of this file.
1
/*
2
** This file is part of Vidalia, and is subject to the license terms in the
3
** LICENSE file, found in the top level directory of this distribution. If you
4
** did not receive the LICENSE file with this file, you may obtain it from the
5
** Vidalia source package distributed by the Vidalia Project at
6
** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7
** including this file, may be copied, modified, propagated, or distributed
8
** except according to the terms described in the LICENSE file.
9
*/
10
11
/*
12
** \file StreamItem.cpp
13
** \brief Item representing a stream through Tor and its status
14
*/
15
16
#include "
StreamItem.h
"
17
#include "
CircuitListWidget.h
"
18
19
20
/** Constructor */
21
StreamItem::StreamItem
(
const
Stream
&stream)
22
{
23
/* Set the stream's displayed target information */
24
setText(
CircuitListWidget::ConnectionColumn
,
stream
.
target
());
25
setToolTip(
CircuitListWidget::ConnectionColumn
,
stream
.
target
());
26
27
/* Update the status and target */
28
update
(
stream
);
29
}
30
31
/** Updates the status of this stream item. */
32
void
33
StreamItem::update
(
const
Stream
&stream)
34
{
35
_stream
=
stream
;
36
setText(
CircuitListWidget::StatusColumn
,
stream
.
statusString
());
37
setToolTip(
CircuitListWidget::StatusColumn
,
stream
.
statusString
());
38
}
39
CircuitListWidget.h
StreamItem.h
CircuitListWidget::StatusColumn
@ StatusColumn
Definition:
CircuitListWidget.h:37
CircuitListWidget::ConnectionColumn
@ ConnectionColumn
Definition:
CircuitListWidget.h:36
Stream
Definition:
Stream.h:32
Stream::statusString
QString statusString() const
Definition:
Stream.cpp:126
Stream::target
QString target() const
Definition:
Stream.h:76
StreamItem::StreamItem
StreamItem(const Stream &stream)
Definition:
StreamItem.cpp:21
StreamItem::stream
Stream stream() const
Definition:
StreamItem.h:30
StreamItem::_stream
Stream _stream
Definition:
StreamItem.h:37
StreamItem::update
void update(const Stream &stream)
Definition:
StreamItem.cpp:33
Generated by
1.9.3