COPASI API  4.16.103
CQLayoutsWidget.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 #ifndef COPASI_CQLayoutsWidget
12 #define COPASI_CQLayoutsWidget
13 
14 #include <QtCore/QVariant>
15 
16 #include <map>
17 
18 #include "copasi/UI/ui_CQLayoutsWidget.h"
19 
20 class CQNewMainWindow;
21 class CQLayoutMainWindow;
22 class CLayout;
23 class CQLayoutsDM;
27 
29 
30 class CQLayoutsWidget : public CopasiWidget, public Ui::CQLayoutsWidget
31 {
32  Q_OBJECT
33 
35 
36  typedef std::map< std::string, LayoutWindow * > LayoutWindowMap;
37 
38 public:
39  CQLayoutsWidget(QWidget *parent);
40  virtual ~CQLayoutsWidget();
41 
42  virtual bool update(ListViews::ObjectType objectType, ListViews::Action action, const std::string & key);
43  virtual bool leave();
44 
45  void deleteLayoutWindows();
46 
47 private:
52 
53  void deleteSelectedLayouts();
54  void updateDeleteBtns();
55  virtual bool enterProtected();
56 
57  void showButtons();
58 
59  /**
60  * This creates a new layout window.
61  */
62  LayoutWindow * createLayoutWindow(int row, CLayout* pLayout);
63 
64 protected slots:
65  virtual void slotBtnNewClicked();
66  virtual void slotBtnDeleteClicked();
67  virtual void slotBtnClearClicked();
68  virtual void slotSelectionChanged(const QItemSelection& selected,
69  const QItemSelection& deselected);
70  virtual void slotDoubleClicked(const QModelIndex proxyIndex);
71  virtual void dataChanged(const QModelIndex& topLeft,
72  const QModelIndex& bottomRight);
73  virtual void slotFilterChanged();
74  void slotShowLayout(const QModelIndex & index);
75 };
76 
77 #endif // COPASI_CQLayoutsWidget
virtual ~CQLayoutsWidget()
CQSortFilterProxyModel * mpProxyModel
objectType
virtual bool leave()
CQLayoutsDM * mpLayoutsDM
virtual bool update(ListViews::ObjectType objectType, ListViews::Action action, const std::string &key)
LayoutWindow * createLayoutWindow(int row, CLayout *pLayout)
virtual void slotFilterChanged()
virtual void slotDoubleClicked(const QModelIndex proxyIndex)
void slotShowLayout(const QModelIndex &index)
CQPushButtonDelegate * mpPushButtonDelegate
virtual void slotBtnDeleteClicked()
LayoutWindowMap mLayoutWindowMap
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
virtual void slotBtnClearClicked()
virtual void slotBtnNewClicked()
CWindowInterface LayoutWindow
CQLayoutsWidget(QWidget *parent)
virtual bool enterProtected()
virtual void slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
std::map< std::string, LayoutWindow * > LayoutWindowMap