COPASI API  4.16.103
Public Member Functions | Static Public Attributes | Protected Slots | Protected Attributes | List of all members
AboutDialog Class Reference

#include <AboutDialog.h>

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

Public Member Functions

 AboutDialog (QWidget *parent, const QString &text, const int &width, const int &heigth)
 
virtual ~AboutDialog ()
 

Static Public Attributes

static const char * text
 

Protected Slots

void closeButton_clicked ()
 

Protected Attributes

QVBoxLayout * mainLayout
 
QTextEdit * textEdit
 

Detailed Description

Definition at line 30 of file AboutDialog.h.

Constructor & Destructor Documentation

AboutDialog::AboutDialog ( QWidget *  parent,
const QString &  text,
const int &  width,
const int &  heigth 
)

Definition at line 75 of file AboutDialog.cpp.

References closeButton_clicked(), mainLayout, and textEdit.

78  :
79  QDialog(parent),
80  textEdit(NULL),
81  mainLayout(NULL)
82 {
83  this->setModal(true);
84  this->mainLayout = new QVBoxLayout(this);
85  this->mainLayout->setSizeConstraint(QLayout::SetFixedSize);
86  this->textEdit = new QTextEdit(this);
87 
88  QPalette Palette;
89  Palette.setBrush(QPalette::Base, QBrush(QPixmap((const char**)copasi_beta_background_xpm)));
90 
91  textEdit->setPalette(Palette);
92 
93  QFontMetrics FontMetrics = this->fontMetrics();
94  int w = width * (FontMetrics.width('W') + FontMetrics.width('I')) / 2;
95  int h = heigth * FontMetrics.lineSpacing();
96  this->textEdit->setFixedSize(w, h);
97  this->textEdit->setReadOnly(true);
98  this->textEdit->setText(text);
99  // this->textEdit->setText(QString(text).arg();
100  this->mainLayout->addWidget(this->textEdit);
101  QDialogButtonBox* box = new QDialogButtonBox(QDialogButtonBox::Close, Qt::Horizontal, this);
102  this->mainLayout->addWidget(box);
103 
104  connect(box, SIGNAL(rejected()), this, SLOT(closeButton_clicked()));
105 }
void closeButton_clicked()
QTextEdit * textEdit
Definition: AboutDialog.h:47
QVBoxLayout * mainLayout
Definition: AboutDialog.h:48
static const char * text
Definition: AboutDialog.h:41
AboutDialog::~AboutDialog ( )
virtual

Definition at line 107 of file AboutDialog.cpp.

References mainLayout, pdelete, and textEdit.

108 {
109  pdelete(this->textEdit);
110  pdelete(this->mainLayout);
111 }
#define pdelete(p)
Definition: copasi.h:215
QTextEdit * textEdit
Definition: AboutDialog.h:47
QVBoxLayout * mainLayout
Definition: AboutDialog.h:48

Member Function Documentation

void AboutDialog::closeButton_clicked ( )
protectedslot

Definition at line 113 of file AboutDialog.cpp.

Referenced by AboutDialog().

114 {
115  close();
116 }

Member Data Documentation

QVBoxLayout* AboutDialog::mainLayout
protected

Definition at line 48 of file AboutDialog.h.

Referenced by AboutDialog(), and ~AboutDialog().

const char * AboutDialog::text
static

Definition at line 41 of file AboutDialog.h.

Referenced by CopasiUI3Window::about().

QTextEdit* AboutDialog::textEdit
protected

Definition at line 47 of file AboutDialog.h.

Referenced by AboutDialog(), and ~AboutDialog().


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