COPASI API  4.16.103
CScanContainerWidget.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/UI/CScanContainerWidget.h,v $
3 // $Revision: 1.11 $
4 // $Name: $
5 // $Author: ssahle $
6 // $Date: 2012/05/04 14:06:59 $
7 // End CVS Header
8 
9 // Copyright (C) 2012 - 2011 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
16 // and The University of Manchester.
17 // All rights reserved.
18 
19 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
20 // Properties, Inc. and EML Research, gGmbH.
21 // All rights reserved.
22 
23 #ifndef CCONTAINERWIDGET_H
24 #define CCONTAINERWIDGET_H
25 
26 #include <QtGui/QTableWidget>
27 #include <vector>
28 
29 /**
30  * This widget is a table that contains other widgets (arranged vertically)
31  * it adds buttons to delete, move up or down the widgets
32  */
33 class CScanContainerWidget : public QTableWidget
34 {
35  Q_OBJECT
36 
37 public:
38  CScanContainerWidget(QWidget * parent = 0, const char * name = 0);
40 
41  std::vector<QWidget*> getWidgetList() const;
42  void clearWidgetList();
43  void addWidget(QWidget* widget, bool controls = true);
44 
45  //insert before row, if row=-1 insert before the last row
46  void insertWidget(QWidget* widget, int row = -1);
47  void enableCopy(const bool & enable);
48 
49 protected slots:
50  void slotUp(int index);
51  void slotDown(int index);
52  void slotDel(int index);
53  void slotCopy(int index);
54 
55 protected:
56  void updateIndices();
57  void updateTable();
59  void resizeEvent(QResizeEvent *event);
60 
61 signals:
62  void itemDeleted();
63  void copyWidget(int);
64 };
65 
66 #endif
void resizeEvent(QResizeEvent *event)
std::vector< QWidget * > getWidgetList() const
void enableCopy(const bool &enable)
CScanContainerWidget(QWidget *parent=0, const char *name=0)
void addWidget(QWidget *widget, bool controls=true)
void insertWidget(QWidget *widget, int row=-1)