COPASI API  4.16.103
Public Member Functions | Private Slots | List of all members
NodeSizePanel Class Reference

#include <NodeSizePanel.h>

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

Public Member Functions

 NodeSizePanel (QWidget *parent=0, bool modal=false, Qt::WindowFlags fl=0)
 

Private Slots

void cancel ()
 
void setMaxValue ()
 
void setMinAndMaxValues ()
 
void setMinValue ()
 

Detailed Description

Definition at line 19 of file NodeSizePanel.h.

Constructor & Destructor Documentation

NodeSizePanel::NodeSizePanel ( QWidget *  parent = 0,
bool  modal = false,
Qt::WindowFlags  fl = 0 
)

Definition at line 66 of file NodeSizePanel.cpp.

References C_INT32, CQLayoutMainWindow::getMaxNodeSize(), and CQLayoutMainWindow::getMinNodeSize().

66  :
67  QDialog(parent, fl)
68 {
69  setupUi(this);
70  this->setModal(modal);
71  CQLayoutMainWindow * tmp = dynamic_cast<CQLayoutMainWindow *>(parentWidget());
72  assert(tmp);
73 
74  if (tmp)
75  {
76  C_INT32 minV = (C_INT32)(tmp->getMinNodeSize());
77  C_INT32 maxV = (C_INT32)(tmp->getMaxNodeSize());
78  lineEdit1->setText(QString::number(minV));
79  lineEdit2->setText(QString::number(maxV));
80  }
81 }
#define C_INT32
Definition: copasi.h:90
bool fl(const C_FLOAT64 &d1, const C_FLOAT64 &d2)

Member Function Documentation

void NodeSizePanel::cancel ( )
privateslot

Definition at line 37 of file NodeSizePanel.cpp.

38 {
39  close();
40 }
void NodeSizePanel::setMaxValue ( )
privateslot

Definition at line 54 of file NodeSizePanel.cpp.

References C_INT32, and CQLayoutMainWindow::setMaxValue().

55 {
56  CQLayoutMainWindow * tmp = dynamic_cast<CQLayoutMainWindow *>(parentWidget());
57  assert(tmp);
58  QString s = lineEdit1->text();
59  bool ok;
60  C_INT32 val = s.toInt(&ok, 10);
61 
62  if ((tmp) && (ok))
63  tmp->setMaxValue(val);
64 }
#define C_INT32
Definition: copasi.h:90
void setMaxValue(C_INT32 maxNdSize)
void NodeSizePanel::setMinAndMaxValues ( )
privateslot

Definition at line 20 of file NodeSizePanel.cpp.

References C_INT32, and CQLayoutMainWindow::setMinAndMaxValue().

21 {
22  CQLayoutMainWindow * tmp = dynamic_cast<CQLayoutMainWindow *>(parentWidget());
23  assert(tmp);
24  QString s1 = lineEdit1->text();
25  bool ok1;
26  C_INT32 val1 = s1.toInt(&ok1, 10);
27  QString s2 = lineEdit2->text();
28  bool ok2;
29  C_INT32 val2 = s2.toInt(&ok2, 10);
30 
31  if ((tmp) && (ok1) && (ok2) && (val1 < val2))
32  tmp->setMinAndMaxValue(val1, val2);
33 
34  close();
35 }
#define C_INT32
Definition: copasi.h:90
void setMinAndMaxValue(C_INT32 minNdSize, C_INT32 maxNdSize)
void NodeSizePanel::setMinValue ( )
privateslot

Definition at line 42 of file NodeSizePanel.cpp.

References C_INT32, and CQLayoutMainWindow::setMinValue().

43 {
44  CQLayoutMainWindow * tmp = dynamic_cast<CQLayoutMainWindow *>(parentWidget());
45  assert(tmp);
46  QString s = lineEdit1->text();
47  bool ok;
48  C_INT32 val = s.toInt(&ok, 10);
49 
50  if ((tmp) && (ok))
51  tmp->setMinValue(val);
52 }
#define C_INT32
Definition: copasi.h:90
void setMinValue(C_INT32 minNdSize)

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