statusevent.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 
00004 **  you did not receive the LICENSE file with this file, you may obtain it
00005 **  from the 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
00008 **  the terms described in the LICENSE file.
00009 */
00010 
00011 /*
00012 ** \file statusevent.h
00013 ** \version $Id: statusevent.h 2780 2008-06-21 21:48:32Z edmanm $
00014 ** \brief Base class for all Tor status events
00015 */
00016 
00017 #ifndef _STATUSEVENT_H
00018 #define _STATUSEVENT_H
00019 
00020 #include <QEvent>
00021 #include <QString>
00022 #include "eventtype.h"
00023 #include "tcglobal.h"
00024 
00025 
00026 class StatusEvent : public QEvent
00027 {
00028 public:
00029   /** Constructor */
00030   StatusEvent(QEvent::Type type, tc::Severity severity)
00031     : QEvent(type), _severity(severity) {}
00032 
00033   /** Returns the severity of this status event. */
00034   tc::Severity severity() const { return _severity; }
00035   /** Returns a StatusEvent::Severity enum value for the severity represented
00036    * by <b>str</b>. */ 
00037   static tc::Severity severityFromString(const QString &str);
00038 
00039 private:
00040   tc::Severity _severity; /**< Severity of this status event. */
00041 };
00042 
00043 #endif
00044 

Generated on 28 Dec 2009 for Vidalia by  doxygen 1.6.1