graphlistconnector.h
1 /***************************************************************************
2  Copyright (C) 2002-2015 Kentaro Kitagawa
3  kitagawa@phys.s.u-tokyo.ac.jp
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  You should have received a copy of the GNU Library General
11  Public License and a list of authors along with this program;
12  see the files COPYING and AUTHORS.
13 ***************************************************************************/
14 //---------------------------------------------------------------------------
15 
16 #ifndef graphlistconnectorH
17 #define graphlistconnectorH
18 
19 #include "xnodeconnector.h"
20 //---------------------------------------------------------------------------
21 
22 class QPushButton;
23 class QTableWidget;
24 class XGraphList;
25 
27  Q_OBJECT
28 public:
29  XGraphListConnector(const shared_ptr<XGraphList> &node, QTableWidget *item,
30  QPushButton *btnnew, QPushButton *btndelete);
31  virtual ~XGraphListConnector() {}
32 protected:
33  virtual void onCatch(const Snapshot &shot, const XListNodeBase::Payload::CatchEvent &e);
34  virtual void onRelease(const Snapshot &shot, const XListNodeBase::Payload::ReleaseEvent &e);
35 protected slots:
36 void cellClicked ( int row, int col);
37 private:
38  const shared_ptr<XGraphList> m_graphlist;
39 
40  const shared_ptr<XTouchableNode> m_newGraph;
41  const shared_ptr<XTouchableNode> m_deleteGraph;
42  struct tcons {
43  xqcon_ptr conx, cony1, conz;
44  shared_ptr<XNode> node;
45  QWidget *widget;
46  };
47  typedef std::deque<tcons> tconslist;
48  tconslist m_cons;
49 
50 
51  const xqcon_ptr m_conNewGraph, m_conDeleteGraph;
52  shared_ptr<XListener> m_lsnNewGraph, m_lsnDeleteGraph;
53 
54  void onNewGraph (const Snapshot &shot, XTouchableNode *);
55  void onDeleteGraph (const Snapshot &shot, XTouchableNode *);
56 };
57 
58 #endif

Generated for KAME4 by  doxygen 1.8.3