COPASI API  4.16.103
CUpDownSubwidget.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/UI/CUpDownSubwidget.h,v $
3 // $Revision: 1.13 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/09/30 16:39:37 $
7 // End CVS Header
8 
9 // Copyright (C) 2011 - 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 #ifndef CUPDOWNSUBWIDGET_H
15 #define CUPDOWNSUBWIDGET_H
16 
17 #include <QtCore/QVariant>
18 #include "ui_CUpDownSubwidget.h"
19 
20 class CUpDownSubwidget : public QWidget, public Ui::CUpDownSubwidget
21 {
22  Q_OBJECT
23 
24 public:
25  CUpDownSubwidget(QWidget* parent = 0, const char* name = 0, Qt::WindowFlags fl = 0);
27 
28  virtual int getIndex() const;
29  void enableCopy(const bool &);
30 
31 public slots:
32  virtual void setIndex(int, bool, bool);
33 
34 signals:
35  void copy(int);
36  void up(int);
37  void down(int);
38  void del(int);
39 
40 protected:
41  int mIndex;
42 
43 protected slots:
44 
45  void slotUp();
46  void slotDown();
47  void slotDel();
48  void slotCopy();
49 
50 
51 private:
52  void init();
53 
54 protected:
55  enum IconID
56  {
62  };
63  static QPixmap qt_get_icon(IconID 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
186 
187 };
188 
189 #endif // CUPDOWNSUBWIDGET_H
static QPixmap qt_get_icon(IconID id)
virtual void setIndex(int, bool, bool)
virtual int getIndex() const
bool fl(const C_FLOAT64 &d1, const C_FLOAT64 &d2)
CUpDownSubwidget(QWidget *parent=0, const char *name=0, Qt::WindowFlags fl=0)
static const char *const image0_data[]
void enableCopy(const bool &)