Vidalia  0.2.17
html.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 html.h
00013 ** \brief HTML formatting functions
00014 */
00015 
00016 #ifndef _HTML_H
00017 #define _HTML_H
00018 
00019 #include <QString>
00020 
00021 
00022 /** Wraps a string in "<p>" tags, converts "\n" to "<br/>" and converts "\n\n"
00023  * to a new paragraph. */
00024 QString p(QString str);
00025 
00026 /** Wraps a string in "<i>" tags. */
00027 QString i(QString str);
00028 
00029 /** Wraps a string in "<b>" tags. */
00030 QString b(QString str);
00031 
00032 /** Wraps a string in "<tr>" tags. */
00033 QString trow(QString str);
00034 
00035 /** Wraps a string in "<td>" tags. */
00036 QString tcol(QString str);
00037 
00038 /** Wraps a string in "<th>" tags. */
00039 QString thead(QString str);
00040 
00041 /** Escapes "<" and ">" characters in a string, for html. */
00042 QString escape(QString str);
00043 
00044 #endif
00045