Vidalia  0.2.15
StreamItem.h
Go to the documentation of this file.
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.h
00013 ** \brief Item representing a stream through Tor and its status
00014 */
00015 
00016 #ifndef _STREAMITEM_H
00017 #define _STREAMITEM_H
00018 
00019 #include "Stream.h"
00020 
00021 #include <QTreeWidgetItem>
00022 
00023 
00024 class StreamItem : public QTreeWidgetItem
00025 {
00026 public:
00027   /** Constructor */
00028   StreamItem(const Stream &stream);
00029 
00030   Stream stream() const { return _stream; }
00031   /** Updates the status of this stream item. */
00032   void update(const Stream &stream);
00033   /** Returns the ID of the stream associated with this tree item. */
00034   StreamId id() const { return _stream.id(); }
00035   
00036 private:
00037   Stream _stream;
00038 };
00039 
00040 #endif
00041