COPASI API  4.16.103
Public Member Functions | List of all members
CQMmlScrollView Class Reference

The class for nicely displaying QtMmlWidget. More...

#include <CQMmlScrollView.h>

Inheritance diagram for CQMmlScrollView:
Inheritance graph
[legend]
Collaboration diagram for CQMmlScrollView:
Collaboration graph
[legend]

Public Member Functions

 CQMmlScrollView (QWidget *parent=0, const char *name=0, Qt::WFlags fl=0)
 Constructor. More...
 
void updateWidget (std::ostringstream &mml)
 Function to update the MathML widget. More...
 
 ~CQMmlScrollView ()
 Destructor. More...
 

Detailed Description

The class for nicely displaying QtMmlWidget.

This class inherits QScrollView to nicely display an object of class QtMmlWidget.

Definition at line 30 of file CQMmlScrollView.h.

Constructor & Destructor Documentation

CQMmlScrollView::CQMmlScrollView ( QWidget *  parent = 0,
const char *  name = 0,
Qt::WFlags  fl = 0 
)

Constructor.

Definition at line 27 of file CQMmlScrollView.cpp.

28  : QScrollArea(parent)
29 {
30  setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
31 
32 #ifdef HAVE_MML
33  mpMmlWidget = new QtMmlWidget(viewport() /*, "mpMmlWidget"*/);
34  mpMmlWidget->setMinimumSize(QSize(0, 0));
35  setWidget(mpMmlWidget);
36 #endif // HAVE_MML
37 }
CQMmlScrollView::~CQMmlScrollView ( )

Destructor.

Definition at line 40 of file CQMmlScrollView.cpp.

41 {
42  // no need to delete child widgets, Qt does it all for us
43 }

Member Function Documentation

void CQMmlScrollView::updateWidget ( std::ostringstream &  mml)

Function to update the MathML widget.

Definition at line 46 of file CQMmlScrollView.cpp.

References FROM_UTF8.

47 {
48 #ifdef HAVE_MML
49  mpMmlWidget->setContent(FROM_UTF8(mml.str()));
50  mpMmlWidget->setBaseFontPointSize(qApp->font().pointSize());
51  mpMmlWidget->setFontName(QtMmlWidget::NormalFont, qApp->font().family());
52 
53  mpMmlWidget->resize(mpMmlWidget->sizeHint().width(), mpMmlWidget->sizeHint().height());
54 
55 #endif // HAVE_MML
56 }
#define FROM_UTF8(__x)
Definition: qtUtilities.h:73

The documentation for this class was generated from the following files: