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

#include <CQTaskHeaderWidget.h>

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

Public Member Functions

 CQTaskHeaderWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 
void saved ()
 
bool setTaskName (const std::string &name)
 
virtual ~CQTaskHeaderWidget ()
 

Protected Slots

void slotExecutable ()
 
void slotUpdate ()
 

Protected Attributes

QColor mChangedColor
 
bool mExecutableChanged
 
QColor mSavedColor
 
bool mUpdateChanged
 

Detailed Description

Definition at line 23 of file CQTaskHeaderWidget.h.

Constructor & Destructor Documentation

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

Definition at line 19 of file CQTaskHeaderWidget.cpp.

References mChangedColor, mExecutableChanged, mSavedColor, and mUpdateChanged.

19  :
20  QWidget(parent, f)
21 {
22  setupUi(this);
23 
24  mUpdateChanged = false;
25  mExecutableChanged = false;
26 
27  int h, s, v;
28 
29  mSavedColor = palette().color(backgroundRole());
30  mSavedColor.getHsv(&h, &s, &v);
31 
32  if (s < 20) s = 20;
33 
34  mChangedColor.setHsv(240, s, v);
35 }
CQTaskHeaderWidget::~CQTaskHeaderWidget ( )
virtual

Definition at line 37 of file CQTaskHeaderWidget.cpp.

38 {
39  // TODO Auto-generated destructor stub
40 }

Member Function Documentation

void CQTaskHeaderWidget::saved ( )

Definition at line 48 of file CQTaskHeaderWidget.cpp.

References mExecutableChanged, mSavedColor, and mUpdateChanged.

Referenced by TaskWidget::loadCommon(), and TaskWidget::saveCommon().

49 {
50  mUpdateChanged = false;
51  mpUpdateModel->setStyleSheet(QString(mpUpdateModel->metaObject()->className()) + " {background-color:" + mSavedColor.name() + ";}");
52 
53  mExecutableChanged = false;
54  mpBoxExecutable->setStyleSheet(QString(mpBoxExecutable->metaObject()->className()) + " {background-color:" + mSavedColor.name() + ";}");
55 }
bool CQTaskHeaderWidget::setTaskName ( const std::string &  name)
void CQTaskHeaderWidget::slotExecutable ( )
protectedslot

Definition at line 71 of file CQTaskHeaderWidget.cpp.

References mChangedColor, mExecutableChanged, and mSavedColor.

72 {
74 
76  {
77  mpBoxExecutable->setStyleSheet(QString(mpBoxExecutable->metaObject()->className()) + " {background-color:" + mChangedColor.name() + ";}");
78  }
79  else
80  {
81  mpBoxExecutable->setStyleSheet(QString(mpBoxExecutable->metaObject()->className()) + " {background-color:" + mSavedColor.name() + ";}");
82  }
83 }
void CQTaskHeaderWidget::slotUpdate ( )
protectedslot

Definition at line 57 of file CQTaskHeaderWidget.cpp.

References mChangedColor, mSavedColor, and mUpdateChanged.

58 {
60 
61  if (mUpdateChanged)
62  {
63  mpUpdateModel->setStyleSheet(QString(mpUpdateModel->metaObject()->className()) + " {background-color:" + mChangedColor.name() + ";}");
64  }
65  else
66  {
67  mpUpdateModel->setStyleSheet(QString(mpUpdateModel->metaObject()->className()) + " {background-color:" + mSavedColor.name() + ";}");
68  }
69 }

Member Data Documentation

QColor CQTaskHeaderWidget::mChangedColor
protected

Definition at line 44 of file CQTaskHeaderWidget.h.

Referenced by CQTaskHeaderWidget(), slotExecutable(), and slotUpdate().

bool CQTaskHeaderWidget::mExecutableChanged
protected

Definition at line 41 of file CQTaskHeaderWidget.h.

Referenced by CQTaskHeaderWidget(), saved(), and slotExecutable().

QColor CQTaskHeaderWidget::mSavedColor
protected

Definition at line 43 of file CQTaskHeaderWidget.h.

Referenced by CQTaskHeaderWidget(), saved(), slotExecutable(), and slotUpdate().

bool CQTaskHeaderWidget::mUpdateChanged
protected

Definition at line 42 of file CQTaskHeaderWidget.h.

Referenced by CQTaskHeaderWidget(), saved(), and slotUpdate().


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