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