/***************************************************************************
    copyright            : (C) 2001-2006 by Robby Stephenson
    email                : robby@periapsis.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of version 2 of the GNU General Public License as  *
 *   published by the Free Software Foundation;                            *
 *                                                                         *
 ***************************************************************************/

#include "richtextlabel.h"

#include <kdebug.h>

#include <tqlayout.h>

using Tellico::GUI::RichTextLabel;

RichTextLabel::RichTextLabel(TQWidget* parent) : TQTextEdit(parent) {
  init();
}

RichTextLabel::RichTextLabel(const TQString& text, TQWidget* parent) : TQTextEdit(text, TQString(), parent) {
  init();
}

TQSize RichTextLabel::tqsizeHint() const {
  return tqminimumSizeHint();
}

void RichTextLabel::init() {
  setReadOnly(true);
  setTextFormat(TQt::RichText);

  setFrameShape(TQFrame::NoFrame);
  viewport()->setMouseTracking(false);

  setPaper(tqcolorGroup().background());

  tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
  viewport()->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
}

#include "richtextlabel.moc"
