COPASI API  4.16.103
Public Slots | Signals | Public Member Functions | Protected Types | Protected Slots | Static Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
CUpDownSubwidget Class Reference

#include <CUpDownSubwidget.h>

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

Public Slots

virtual void setIndex (int, bool, bool)
 

Signals

void copy (int)
 
void del (int)
 
void down (int)
 
void up (int)
 

Public Member Functions

 CUpDownSubwidget (QWidget *parent=0, const char *name=0, Qt::WindowFlags fl=0)
 
void enableCopy (const bool &)
 
virtual int getIndex () const
 
 ~CUpDownSubwidget ()
 

Protected Types

enum  IconID {
  image0_ID, image1_ID, image2_ID, image3_ID,
  unknown_ID
}
 

Protected Slots

void slotCopy ()
 
void slotDel ()
 
void slotDown ()
 
void slotUp ()
 

Static Protected Member Functions

static QPixmap qt_get_icon (IconID id)
 

Protected Attributes

int mIndex
 

Private Member Functions

void init ()
 

Detailed Description

Definition at line 20 of file CUpDownSubwidget.h.

Member Enumeration Documentation

enum CUpDownSubwidget::IconID
protected
Enumerator
image0_ID 
image1_ID 
image2_ID 
image3_ID 
unknown_ID 

Definition at line 55 of file CUpDownSubwidget.h.

Constructor & Destructor Documentation

CUpDownSubwidget::CUpDownSubwidget ( QWidget *  parent = 0,
const char *  name = 0,
Qt::WindowFlags  fl = 0 
)

Definition at line 21 of file CUpDownSubwidget.cpp.

References init().

22  : QWidget(parent, fl)
23 {
24  setObjectName(QString::fromUtf8(name));
25  setupUi(this);
26 
27  init();
28 }
bool fl(const C_FLOAT64 &d1, const C_FLOAT64 &d2)
CUpDownSubwidget::~CUpDownSubwidget ( )

Definition at line 33 of file CUpDownSubwidget.cpp.

34 {
35  // no need to delete child widgets, Qt does it all for us
36 }

Member Function Documentation

void CUpDownSubwidget::copy ( int  )
signal

Referenced by slotCopy().

void CUpDownSubwidget::del ( int  )
signal

Referenced by slotDel().

void CUpDownSubwidget::down ( int  )
signal

Referenced by slotDown().

void CUpDownSubwidget::enableCopy ( const bool &  enable)

Definition at line 70 of file CUpDownSubwidget.cpp.

Referenced by CScanContainerWidget::addWidget(), init(), and CScanContainerWidget::insertWidget().

71 {
72  if (enable) toolButtonCopy->show();
73  else toolButtonCopy->hide();
74 }
int CUpDownSubwidget::getIndex ( ) const
virtual

Definition at line 91 of file CUpDownSubwidget.cpp.

References mIndex.

92 {
93  return mIndex;
94 }
void CUpDownSubwidget::init ( )
private

Definition at line 38 of file CUpDownSubwidget.cpp.

References CQIconResource::editCopy, CQIconResource::editDelete, enableCopy(), CQIconResource::icon(), CQIconResource::moveDown, CQIconResource::moveUp, and setIndex().

Referenced by CUpDownSubwidget().

39 {
40  setIndex(0, true, true);
41  enableCopy(false);
42 
43  toolButtonDel->setIcon(CQIconResource::icon(CQIconResource::editDelete));
44  toolButtonUp->setIcon(CQIconResource::icon(CQIconResource::moveUp));
45  toolButtonCopy->setIcon(CQIconResource::icon(CQIconResource::editCopy));
46  toolButtonDown->setIcon(CQIconResource::icon(CQIconResource::moveDown));
47 
48 }
virtual void setIndex(int, bool, bool)
static const QIcon & icon(const IconID &id)
void enableCopy(const bool &)
static QPixmap CUpDownSubwidget::qt_get_icon ( IconID  id)
inlinestaticprotected

Definition at line 63 of file CUpDownSubwidget.h.

References image0_data, image0_ID, image1_ID, image2_ID, and image3_ID.

64  {
65  static const unsigned char image0_data[] =
66  {
67  0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
68  0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f,
69  0x08, 0x06, 0x00, 0x00, 0x00, 0x3b, 0xd6, 0x95, 0x4a, 0x00, 0x00, 0x00,
70  0xbf, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0xad, 0x92, 0x41, 0x0a, 0xc2,
71  0x30, 0x14, 0x44, 0xdf, 0x88, 0x7b, 0x11, 0x4f, 0x20, 0xb8, 0xa8, 0xb7,
72  0x70, 0xe3, 0x41, 0x3c, 0x47, 0x8f, 0x96, 0x8d, 0x27, 0x70, 0xd9, 0xb4,
73  0x10, 0xe8, 0x09, 0x8a, 0x78, 0x01, 0xbf, 0x1b, 0x53, 0x6c, 0x6c, 0xaa,
74  0x54, 0x3f, 0x04, 0xc2, 0x64, 0x26, 0xc3, 0x4c, 0x22, 0x33, 0x63, 0xee,
75  0x2c, 0x66, 0x2b, 0xff, 0x2a, 0xae, 0x25, 0xe7, 0xa5, 0x30, 0x25, 0xf0,
76  0x52, 0xe8, 0x39, 0x66, 0x36, 0x58, 0x1e, 0xba, 0x0a, 0x42, 0x8a, 0xd7,
77  0x50, 0x56, 0x10, 0x6a, 0x28, 0x23, 0xa6, 0xb4, 0xb0, 0x46, 0x2a, 0xef,
78  0x70, 0x02, 0xd8, 0x9b, 0xed, 0xa2, 0x1b, 0x80, 0xa0, 0x2d, 0xcc, 0x8e,
79  0x3d, 0x39, 0x75, 0x88, 0x2e, 0x1e, 0xba, 0xe8, 0x16, 0xf7, 0x29, 0xef,
80  0xcd, 0xf9, 0x25, 0x7f, 0x07, 0xac, 0x80, 0x5b, 0x61, 0xb6, 0x19, 0xe3,
81  0x2c, 0x33, 0x42, 0x67, 0x70, 0xd5, 0x54, 0x73, 0x30, 0x74, 0x8e, 0x79,
82  0x05, 0x6b, 0xe0, 0x22, 0x38, 0x03, 0x3c, 0xb1, 0x61, 0xde, 0x54, 0xec,
83  0xa5, 0x20, 0x68, 0x01, 0x22, 0xb1, 0x91, 0x4a, 0x83, 0x83, 0xc1, 0x36,
84  0x5b, 0x98, 0x07, 0xe7, 0xc1, 0x8d, 0x15, 0x98, 0x7b, 0xaa, 0xfe, 0x60,
85  0xac, 0xcd, 0xdc, 0x25, 0x1f, 0xdb, 0xfe, 0x66, 0x7e, 0xfa, 0xdb, 0x0f,
86  0x18, 0xe8, 0xd7, 0x34, 0x08, 0xf9, 0x77, 0xe5, 0x00, 0x00, 0x00, 0x00,
87  0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
88  };
89 
90  static const unsigned char image1_data[] =
91  {
92  0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
93  0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f,
94  0x08, 0x06, 0x00, 0x00, 0x00, 0x3b, 0xd6, 0x95, 0x4a, 0x00, 0x00, 0x00,
95  0x57, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0xcd, 0x92, 0x41, 0x0a, 0xc0,
96  0x20, 0x10, 0x03, 0x1d, 0xbf, 0xdd, 0xc7, 0xa7, 0x27, 0x8b, 0xd8, 0x44,
97  0x84, 0x8a, 0x34, 0x17, 0xc1, 0x35, 0xcc, 0xa0, 0x22, 0xa9, 0xa4, 0x00,
98  0x92, 0x44, 0x9a, 0xd7, 0xd8, 0x5c, 0x48, 0x2c, 0x03, 0x57, 0xbf, 0xda,
99  0x33, 0x49, 0x1b, 0x78, 0x06, 0x49, 0xdd, 0x92, 0x47, 0x5a, 0xa2, 0x5b,
100  0x72, 0x4f, 0x9d, 0xd1, 0xf7, 0x5e, 0x58, 0x54, 0x34, 0xfb, 0x2f, 0x6d,
101  0xa7, 0xdc, 0x32, 0xaa, 0x7f, 0xd2, 0x8e, 0x4f, 0xd5, 0x2c, 0xce, 0xff,
102  0xb0, 0x7f, 0x97, 0x6f, 0x05, 0xe3, 0x25, 0xff, 0x82, 0xbd, 0xc4, 0x5e,
103  0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
104  };
105 
106  static const unsigned char image2_data[] =
107  {
108  0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
109  0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10,
110  0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x02,
111  0x18, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0x7d, 0x92, 0xcb, 0x4a, 0x5c,
112  0x41, 0x10, 0x86, 0xbf, 0xea, 0xee, 0x39, 0x73, 0xc6, 0x11, 0x41, 0x72,
113  0x11, 0x11, 0x02, 0x51, 0xb3, 0x90, 0x90, 0x59, 0x8a, 0xb8, 0xc8, 0x22,
114  0x2f, 0x12, 0x12, 0x92, 0x07, 0x08, 0x24, 0x8b, 0x11, 0x02, 0x82, 0x1b,
115  0x4d, 0xde, 0x20, 0x31, 0x97, 0x95, 0x1b, 0x1f, 0x20, 0xcc, 0xd2, 0x80,
116  0x8a, 0x06, 0xc4, 0x45, 0x44, 0x54, 0x22, 0x51, 0x88, 0x59, 0xa8, 0xa8,
117  0x73, 0xc6, 0xb9, 0x9e, 0xd3, 0x95, 0xc5, 0x78, 0xd7, 0x49, 0x41, 0x6d,
118  0xaa, 0xe8, 0xbf, 0xff, 0xff, 0xeb, 0x96, 0xd9, 0xd9, 0xf5, 0x83, 0xce,
119  0xce, 0x76, 0xa7, 0xea, 0x89, 0x63, 0x8f, 0xf7, 0x8a, 0x31, 0x96, 0x95,
120  0x95, 0xcd, 0xf6, 0xe5, 0xe5, 0xb5, 0xe7, 0x13, 0x13, 0x2f, 0xbe, 0xf0,
121  0xbf, 0x5a, 0x5a, 0xda, 0x6c, 0x78, 0xef, 0xf5, 0xb4, 0x6b, 0x35, 0xaf,
122  0xfb, 0xfb, 0x15, 0x5d, 0x5d, 0xfd, 0xab, 0x53, 0x53, 0xdf, 0x75, 0x64,
123  0xe4, 0xd3, 0x1b, 0x55, 0xa5, 0x55, 0x9b, 0xab, 0x82, 0xd6, 0x42, 0x10,
124  0x04, 0x6c, 0x6c, 0xfc, 0x61, 0x6f, 0xef, 0x80, 0x30, 0x0c, 0xde, 0xe5,
125  0xf3, 0x93, 0x6f, 0x5b, 0x19, 0xb8, 0x26, 0x20, 0x02, 0x49, 0x12, 0x93,
126  0xcb, 0xf5, 0x33, 0x38, 0xf8, 0x90, 0x81, 0x81, 0x5e, 0x44, 0xcc, 0xfd,
127  0x56, 0x02, 0xee, 0x26, 0x01, 0x6b, 0x2d, 0xc5, 0x62, 0x99, 0x4a, 0xa5,
128  0x4e, 0x47, 0x47, 0x96, 0xe1, 0xe1, 0x47, 0x8f, 0x17, 0x16, 0x7e, 0x7d,
129  0x88, 0xe3, 0x38, 0x53, 0x2c, 0x56, 0xb2, 0x33, 0x33, 0x3f, 0xbe, 0x8d,
130  0x8f, 0xbf, 0xfc, 0x78, 0x23, 0x83, 0x28, 0xf2, 0xba, 0xbd, 0x7d, 0xa8,
131  0x73, 0x73, 0xeb, 0x7a, 0x74, 0x54, 0xbd, 0x34, 0xdf, 0xd9, 0x89, 0x74,
132  0x6b, 0xeb, 0x50, 0xa7, 0xa7, 0xe7, 0x74, 0x74, 0xf4, 0xeb, 0x6b, 0x55,
133  0xbd, 0xec, 0xa0, 0x5a, 0x85, 0x72, 0xb9, 0x8a, 0x31, 0x16, 0x6b, 0x2d,
134  0xe9, 0xf4, 0xf9, 0x3a, 0x9b, 0x05, 0xef, 0x33, 0xec, 0xee, 0x1e, 0x12,
135  0x45, 0x11, 0xe9, 0x74, 0xf8, 0x3e, 0x9f, 0x9f, 0xbc, 0x7b, 0xc6, 0x40,
136  0x15, 0xea, 0xf5, 0x06, 0xce, 0x19, 0xc2, 0xd0, 0x21, 0x22, 0xa8, 0x5e,
137  0xc9, 0xeb, 0x84, 0x20, 0x48, 0xd1, 0xdd, 0x7d, 0x87, 0xfe, 0xfe, 0x7b,
138  0xb4, 0xb5, 0x85, 0xaf, 0xce, 0x04, 0xea, 0x75, 0x10, 0xb1, 0x88, 0xb4,
139  0xc2, 0x05, 0xc6, 0x08, 0xe9, 0x74, 0x8a, 0xae, 0xae, 0x5b, 0xf4, 0xf4,
140  0xdc, 0xc6, 0xb9, 0x14, 0xce, 0x98, 0xf3, 0x87, 0x70, 0x4e, 0x30, 0xc6,
141  0x91, 0x24, 0x70, 0x71, 0x7e, 0x5a, 0xe5, 0x72, 0x9d, 0x52, 0xa9, 0x8c,
142  0xf7, 0x4a, 0x26, 0x93, 0x46, 0x44, 0x70, 0x51, 0x54, 0x21, 0x8a, 0x1a,
143  0x44, 0x51, 0x15, 0xef, 0x15, 0xef, 0x3d, 0x49, 0xa2, 0xd4, 0xeb, 0x31,
144  0x72, 0xc1, 0x4e, 0x14, 0x79, 0x8e, 0x8f, 0x6b, 0xa8, 0x0a, 0xd9, 0x6c,
145  0x06, 0x6b, 0x2d, 0xce, 0x81, 0x2b, 0x14, 0xe6, 0xa7, 0x0a, 0x85, 0x79,
146  0x73, 0xf9, 0xa6, 0x5a, 0x25, 0x97, 0x7b, 0xf0, 0x64, 0x68, 0xa8, 0xb7,
147  0xef, 0x14, 0x6e, 0x1c, 0x37, 0x08, 0x02, 0x87, 0x31, 0x06, 0x63, 0xe4,
148  0xc4, 0xa1, 0xe0, 0xc6, 0xc6, 0x9e, 0x3d, 0xbd, 0x29, 0x6f, 0xa1, 0xb0,
149  0xfc, 0xd9, 0x7b, 0xfa, 0x8c, 0x81, 0x24, 0xf1, 0x58, 0x6b, 0x88, 0x63,
150  0xc5, 0x5a, 0x83, 0xb5, 0x06, 0x11, 0xdb, 0xe4, 0xd2, 0x0a, 0x58, 0x18,
151  0x86, 0x27, 0x51, 0x00, 0x9a, 0x51, 0xac, 0xbd, 0x4e, 0xf8, 0xda, 0x4f,
152  0x3c, 0x27, 0xde, 0x3c, 0x98, 0x4a, 0x81, 0x88, 0xe0, 0x7d, 0x0a, 0x11,
153  0x8f, 0x48, 0x0c, 0x80, 0x88, 0x69, 0x42, 0x6c, 0x25, 0xb0, 0xb8, 0xf8,
154  0xb3, 0xb6, 0xb6, 0xf6, 0x1b, 0xa0, 0x04, 0xa0, 0xaa, 0x24, 0x49, 0x73,
155  0xa7, 0x9a, 0x20, 0x02, 0xa5, 0x52, 0x25, 0xfe, 0x07, 0xd9, 0xbb, 0x1d,
156  0xb5, 0x0b, 0x97, 0x87, 0x95, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
157  0x44, 0xae, 0x42, 0x60, 0x82
158  };
159 
160  static const unsigned char image3_data[] =
161  {
162  0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
163  0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f,
164  0x08, 0x06, 0x00, 0x00, 0x00, 0x3b, 0xd6, 0x95, 0x4a, 0x00, 0x00, 0x00,
165  0x59, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0xd5, 0x93, 0x3b, 0x0e, 0xc0,
166  0x30, 0x08, 0x43, 0xfd, 0x7a, 0xee, 0xdc, 0xdd, 0x9d, 0x3a, 0x94, 0xe0,
167  0x2a, 0x43, 0x33, 0x84, 0x25, 0x12, 0x1f, 0xf1, 0x30, 0x01, 0xdb, 0x4a,
168  0x06, 0xd8, 0x36, 0x29, 0x7e, 0xc5, 0xca, 0x05, 0x3b, 0xb4, 0x98, 0x2a,
169  0x18, 0x10, 0x15, 0xac, 0xe2, 0xfd, 0x8e, 0x3d, 0x42, 0xee, 0xe4, 0x9f,
170  0xb0, 0xa5, 0x1e, 0xbd, 0xdb, 0xf7, 0x16, 0xb5, 0x2b, 0x62, 0x3b, 0x4a,
171  0x8b, 0x2d, 0xbd, 0xd1, 0xd3, 0x17, 0xfd, 0xc2, 0x1e, 0xe5, 0x5d, 0xef,
172  0xfc, 0x74, 0xdf, 0x76, 0x18, 0x37, 0xe7, 0x62, 0x25, 0xf3, 0x8a, 0x3d,
173  0x31, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42,
174  0x60, 0x82
175  };
176 
177  switch (id)
178  {
179  case image0_ID: { QImage img; img.loadFromData(image0_data, sizeof(image0_data), "PNG"); return QPixmap::fromImage(img); }
180  case image1_ID: { QImage img; img.loadFromData(image1_data, sizeof(image1_data), "PNG"); return QPixmap::fromImage(img); }
181  case image2_ID: { QImage img; img.loadFromData(image2_data, sizeof(image2_data), "PNG"); return QPixmap::fromImage(img); }
182  case image3_ID: { QImage img; img.loadFromData(image3_data, sizeof(image3_data), "PNG"); return QPixmap::fromImage(img); }
183  default: return QPixmap();
184  } // switch
185  } // icon
static const char *const image0_data[]
void CUpDownSubwidget::setIndex ( int  index,
bool  isFirst,
bool  isLast 
)
virtualslot

Definition at line 76 of file CUpDownSubwidget.cpp.

References mIndex.

Referenced by CScanContainerWidget::addWidget(), init(), and CScanContainerWidget::updateIndices().

77 {
78  mIndex = index;
79 
80  if ((mIndex == 0) || (isFirst))
81  toolButtonUp->setEnabled(false);
82  else
83  toolButtonUp->setEnabled(true);
84 
85  if (isLast)
86  toolButtonDown->setEnabled(false);
87  else
88  toolButtonDown->setEnabled(true);
89 }
void CUpDownSubwidget::slotCopy ( )
protectedslot

Definition at line 50 of file CUpDownSubwidget.cpp.

References copy(), and mIndex.

51 {
52  emit copy(mIndex);
53 }
void CUpDownSubwidget::slotDel ( )
protectedslot

Definition at line 65 of file CUpDownSubwidget.cpp.

References del(), and mIndex.

66 {
67  emit del(mIndex);
68 }
void CUpDownSubwidget::slotDown ( )
protectedslot

Definition at line 60 of file CUpDownSubwidget.cpp.

References down(), and mIndex.

61 {
62  emit down(mIndex);
63 }
void CUpDownSubwidget::slotUp ( )
protectedslot

Definition at line 55 of file CUpDownSubwidget.cpp.

References mIndex, and up().

56 {
57  emit up(mIndex);
58 }
void CUpDownSubwidget::up ( int  )
signal

Referenced by slotUp().

Member Data Documentation

int CUpDownSubwidget::mIndex
protected

Definition at line 41 of file CUpDownSubwidget.h.

Referenced by getIndex(), setIndex(), slotCopy(), slotDel(), slotDown(), and slotUp().


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