circuitevent.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.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 circuitevent.h
00013 ** \version $Id: circuitevent.h 2977 2008-08-17 01:28:25Z edmanm $
00014 ** \brief Event dispatched containing updated circuit status information
00015 */
00016 
00017 #ifndef _CIRCUITEVENT_H
00018 #define _CIRCUITEVENT_H
00019 
00020 #include <QEvent>
00021 #include <QString>
00022 
00023 #include "eventtype.h"
00024 #include "circuit.h"
00025 
00026 
00027 class CircuitEvent : public QEvent
00028 {
00029 public:
00030   /** Constructor */
00031   CircuitEvent(Circuit circuit)
00032   : QEvent((QEvent::Type)CustomEventType::CircuitEvent)
00033   { _circuit = circuit; }
00034 
00035   /** Returns the Circuit object for this event. */
00036   Circuit circuit() const { return _circuit; }
00037   /** Returns the ID for this circuit event. */
00038   CircuitId id() const { return _circuit.id(); }
00039   /** Returns the status of this circuit event. */
00040   Circuit::Status status() const { return _circuit.status(); }
00041   /** Returns the names of the routers in the path for this circuit event. */
00042   QStringList routerNames() const { return _circuit.routerNames(); }
00043   /** Returns the IDs of the routers in the path for this circuit event. */
00044   QStringList routerIDs() const { return _circuit.routerIDs(); }
00045   
00046 private:
00047   /** Circuit object for this event. */
00048   Circuit _circuit;
00049 };
00050 
00051 #endif
00052 

Generated on Tue Jul 7 16:58:11 2009 for Vidalia by  doxygen 1.4.7