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

#include <CQEffectDescriptionEdit.h>

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

Public Slots

void slotModeChanged ()
 
void slotScaleEndChanged (QString)
 
void slotScaleStartChanged (QString)
 
void slotSelectColorEnd ()
 
void slotSelectColorStart ()
 
void slotSelectObject ()
 

Public Member Functions

 CQEffectDescriptionEdit (QWidget *parent=0, Qt::WindowFlags f=0)
 
void initFrom (const CQEffectDescription *other, bool multiple=false)
 
void saveTo (CQEffectDescription *other, bool multiple=false)
 
CQEffectDescriptiontoDescription () const
 
 ~CQEffectDescriptionEdit ()
 

Protected Attributes

CQEffectDescriptionmpCurrent
 

Detailed Description

Definition at line 12 of file CQEffectDescriptionEdit.h.

Constructor & Destructor Documentation

CQEffectDescriptionEdit::CQEffectDescriptionEdit ( QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)

Definition at line 15 of file CQEffectDescriptionEdit.cpp.

15  :
16  QWidget(parent, f),
17  mpCurrent(NULL)
18 {
19  setupUi(this);
20 }
CQEffectDescription * mpCurrent
CQEffectDescriptionEdit::~CQEffectDescriptionEdit ( )

Definition at line 22 of file CQEffectDescriptionEdit.cpp.

23 {
24 }

Member Function Documentation

void CQEffectDescriptionEdit::initFrom ( const CQEffectDescription other,
bool  multiple = false 
)

Definition at line 47 of file CQEffectDescriptionEdit.cpp.

References CQEffectDescription::Colorize, CQEffectDescription::DropShadow, CQEffectDescription::getCN(), CQEffectDescription::getEndColor(), CQEffectDescription::getMode(), CQEffectDescription::getScaleEnd(), CQEffectDescription::getScaleStart(), CQEffectDescription::getStartColor(), CQEffectDescription::Scale, and setColor().

48 {
49  setColor(txtColorEnd, other->getEndColor());
50  setColor(txtColorStart, other->getStartColor());
51 
52  if (multiple)
53  txtObjectName->setText("");
54  else
55  txtObjectName->setText(other->getCN().c_str());
56 
57  txtScaleStart->setText(QString::number(other->getScaleStart()));
58  txtScaleEnd->setText(QString::number(other->getScaleEnd()));
59 
60  switch (other->getMode())
61  {
63  radColorize->setChecked(true);
64  break;
65 
67  radShadow->setChecked(true);
68  break;
69 
70  default:
72  radScale->setChecked(true);
73  break;
74  }
75 }
const QColor & getEndColor() const
const std::string & getCN() const
void setColor(QLabel *widget, const QColor &color)
const QColor & getStartColor() const
qreal getScaleStart() const
void CQEffectDescriptionEdit::saveTo ( CQEffectDescription other,
bool  multiple = false 
)

Definition at line 77 of file CQEffectDescriptionEdit.cpp.

References CQEffectDescription::Colorize, CQEffectDescription::DropShadow, CQEffectDescription::Scale, CQEffectDescription::setEndColor(), CQEffectDescription::setMode(), CQEffectDescription::setScaleEnd(), CQEffectDescription::setScaleStart(), and CQEffectDescription::setStartColor().

78 {
79  other->setStartColor(txtColorStart->palette().color(QPalette::Background));
80  other->setEndColor(txtColorEnd->palette().color(QPalette::Background));
81  other->setScaleStart(txtScaleStart->text().toDouble());
82  other->setScaleEnd(txtScaleEnd->text().toDouble());
83 
84  if (radColorize->isChecked())
86  else if (radShadow->isChecked())
88  else
90 }
void setScaleStart(qreal scale)
void setStartColor(const QColor &color)
void setScaleEnd(qreal scale)
void setEndColor(const QColor &color)
void CQEffectDescriptionEdit::slotModeChanged ( )
slot

Definition at line 111 of file CQEffectDescriptionEdit.cpp.

112 {
113 }
void CQEffectDescriptionEdit::slotScaleEndChanged ( QString  )
slot

Definition at line 115 of file CQEffectDescriptionEdit.cpp.

116 {
117 }
void CQEffectDescriptionEdit::slotScaleStartChanged ( QString  )
slot

Definition at line 119 of file CQEffectDescriptionEdit.cpp.

120 {
121 }
void CQEffectDescriptionEdit::slotSelectColorEnd ( )
slot

Definition at line 127 of file CQEffectDescriptionEdit.cpp.

References getColor(), and setColor().

128 {
129  setColor(txtColorEnd, QColorDialog::getColor(txtColorEnd->palette().color(QPalette::Background), this));
130 }
void setColor(QLabel *widget, const QColor &color)
QColor getColor(const CLColorDefinition *cd)
void CQEffectDescriptionEdit::slotSelectColorStart ( )
slot

Definition at line 132 of file CQEffectDescriptionEdit.cpp.

References getColor(), and setColor().

133 {
134  setColor(txtColorStart, QColorDialog::getColor(txtColorStart->palette().color(QPalette::Background), this));
135 }
void setColor(QLabel *widget, const QColor &color)
QColor getColor(const CLColorDefinition *cd)
void CQEffectDescriptionEdit::slotSelectObject ( )
slot

Definition at line 123 of file CQEffectDescriptionEdit.cpp.

124 {
125 }
CQEffectDescription * CQEffectDescriptionEdit::toDescription ( ) const

Definition at line 92 of file CQEffectDescriptionEdit.cpp.

References CQEffectDescription::Colorize, CQEffectDescription::DropShadow, CQEffectDescription::Scale, CQEffectDescription::setEndColor(), CQEffectDescription::setMode(), CQEffectDescription::setScaleEnd(), CQEffectDescription::setScaleStart(), and CQEffectDescription::setStartColor().

93 {
94  CQEffectDescription *result = new CQEffectDescription(txtObjectName->text().toStdString());
95 
96  result->setStartColor(txtColorStart->palette().color(QPalette::Background));
97  result->setEndColor(txtColorEnd->palette().color(QPalette::Background));
98  result->setScaleStart(txtScaleStart->text().toDouble());
99  result->setScaleEnd(txtScaleEnd->text().toDouble());
100 
101  if (radColorize->isChecked())
103  else if (radShadow->isChecked())
105  else
107 
108  return result;
109 }
void setScaleStart(qreal scale)
void setStartColor(const QColor &color)
void setScaleEnd(qreal scale)
void setEndColor(const QColor &color)

Member Data Documentation

CQEffectDescription* CQEffectDescriptionEdit::mpCurrent
protected

Definition at line 30 of file CQEffectDescriptionEdit.h.


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