COPASI API  4.16.103
Public Member Functions | Protected Slots | Protected Attributes | List of all members
CQBaseWidget Class Referenceabstract

#include <CQBaseWidget.h>

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

Public Member Functions

 CQBaseWidget (QWidget *parent=0, const char *name=0, Qt::WFlags fl=0)
 
bool isSliderActive () const
 
int scaleFactor ()
 
void setSliderActive (const bool &active)
 
virtual void sliderMoved (int column, int row)=0
 
virtual ~CQBaseWidget ()
 

Protected Slots

void setSlider ()
 

Protected Attributes

int mScaleFactor
 
bool mSliderActive
 

Detailed Description

Definition at line 13 of file CQBaseWidget.h.

Constructor & Destructor Documentation

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

Definition at line 29 of file CQBaseWidget.cpp.

References mSliderActive, setSlider(), and setSliderActive().

30  : QWidget(parent, fl),
31  mSliderActive(false),
32  mScaleFactor(1000)
33 {
34  setupUi(this);
35 
37 
38  connect(mpSliderRow, SIGNAL(valueChanged(int)), this, SLOT(setSlider()));
39  connect(mpSliderColumn, SIGNAL(valueChanged(int)), this, SLOT(setSlider()));
40 }
void setSlider()
bool mSliderActive
Definition: CQBaseWidget.h:33
bool fl(const C_FLOAT64 &d1, const C_FLOAT64 &d2)
void setSliderActive(const bool &active)
CQBaseWidget::~CQBaseWidget ( )
virtual

Definition at line 45 of file CQBaseWidget.cpp.

46 {}

Member Function Documentation

bool CQBaseWidget::isSliderActive ( ) const

Definition at line 68 of file CQBaseWidget.cpp.

References mSliderActive.

69 {
70  return mSliderActive;
71 }
bool mSliderActive
Definition: CQBaseWidget.h:33
int CQBaseWidget::scaleFactor ( )

Definition at line 98 of file CQBaseWidget.cpp.

References mScaleFactor.

99 {
100  return mScaleFactor;
101 }
void CQBaseWidget::setSlider ( )
protectedslot

Definition at line 73 of file CQBaseWidget.cpp.

References mScaleFactor, mSliderActive, and sliderMoved().

Referenced by CQBaseWidget().

74 {
75  if (!mSliderActive) return;
76 
77  int row = mpSliderRow->value();
78  int col = mpSliderColumn->value();
79 
80 #ifdef DEBUG_UI
81  qDebug() << "A CQBaseWidget::setSlider -> col = " << col << " - row = " << row;
82 #endif
83 
84  sliderMoved(mpSliderColumn->value() / mScaleFactor, mpSliderRow->value() / mScaleFactor);
85 
86 #ifdef DEBUG_UI
87  qDebug() << "B CQBaseWidget::setSlider -> col = " << col << " - row = " << row;
88 #endif
89 
90  mpSliderRow->setValue(row);
91  mpSliderColumn->setValue(col);
92 
93 #ifdef DEBUG_UI
94  qDebug() << "C CQBaseWidget::setSlider -> col = " << mSliderActiveColumn->value() << " - row = " << mSliderActiveRow->value();
95 #endif
96 }
bool mSliderActive
Definition: CQBaseWidget.h:33
virtual void sliderMoved(int column, int row)=0
void CQBaseWidget::setSliderActive ( const bool &  active)

Definition at line 48 of file CQBaseWidget.cpp.

References mSliderActive.

Referenced by CQBaseWidget().

49 {
50  mSliderActive = active;
51 
52  if (mSliderActive)
53  {
54  mpLabelRow->show();
55  mpSliderRow->show();
56  mpLabelColumn->show();
57  mpSliderColumn->show();
58  }
59  else
60  {
61  mpLabelRow->hide();
62  mpSliderRow->hide();
63  mpLabelColumn->hide();
64  mpSliderColumn->hide();
65  }
66 }
bool mSliderActive
Definition: CQBaseWidget.h:33
virtual void CQBaseWidget::sliderMoved ( int  column,
int  row 
)
pure virtual

Implemented in CQBarChart.

Referenced by setSlider().

Member Data Documentation

int CQBaseWidget::mScaleFactor
protected

Definition at line 35 of file CQBaseWidget.h.

Referenced by scaleFactor(), and setSlider().

bool CQBaseWidget::mSliderActive
protected

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