Back to index

salome-gui  6.5.0
Defines | Functions
LogWindow.cxx File Reference
#include "LogWindow.h"
#include <QAction>
#include <QApplication>
#include <QDate>
#include <QFile>
#include <QMenu>
#include <QTextEdit>
#include <QTextStream>
#include <QTime>
#include <QVBoxLayout>
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
#include <SUIT_Tools.h>

Go to the source code of this file.

Defines

#define DEFAULT_SEPARATOR   "***"

Functions

static QString plainText (const QString &richText)
 Convert rich text to plain text.

Define Documentation

#define DEFAULT_SEPARATOR   "***"

Definition at line 44 of file LogWindow.cxx.


Function Documentation

static QString plainText ( const QString &  richText) [static]

Convert rich text to plain text.

Parameters:
richTextrich text string
Returns:
converted plain text string

Definition at line 52 of file LogWindow.cxx.

{
  QString aText = richText;
  int startTag = aText.indexOf( '<' );
  while ( true )
  {
    if ( startTag < 0 )
      break;

    int finishTag = aText.indexOf( '>', startTag );
    if ( finishTag < 0 )
      break;

    aText = aText.remove( startTag, finishTag - startTag + 1 );
    startTag = aText.indexOf( '<' );
  }
  return aText;
}