~ubuntu-branches/ubuntu/quantal/mysql-workbench/quantal

« back to all changes in this revision

Viewing changes to backend/wbpublic/wbcanvas/workbench_physical_connection_impl.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2012-03-01 21:57:30 UTC
  • Revision ID: package-import@ubuntu.com-20120301215730-o7y8av8y38n162ro
Tags: upstream-5.2.38+dfsg
ImportĀ upstreamĀ versionĀ 5.2.38+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU General Public License as
 
6
 * published by the Free Software Foundation; version 2 of the
 
7
 * License.
 
8
 * 
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
12
 * GNU General Public License for more details.
 
13
 * 
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 
17
 * 02110-1301  USA
 
18
 */
 
19
#ifndef _WORKBENCH_PHYSICAL_CONNECTION_IMPL_H_
 
20
#define _WORKBENCH_PHYSICAL_CONNECTION_IMPL_H_
 
21
 
 
22
#include "model_connection_impl.h"
 
23
#include "grts/structs.workbench.physical.h"
 
24
 
 
25
 
 
26
namespace wbfig
 
27
{
 
28
  class FigureItem;
 
29
};
 
30
 
 
31
  
 
32
class WBPUBLICBACKEND_PUBLIC_FUNC workbench_physical_Connection::ImplData : public model_Connection::ImplData
 
33
{
 
34
  typedef model_Connection::ImplData super;
 
35
  
 
36
protected:
 
37
  boost::signals2::scoped_connection _realize_conn;
 
38
 
 
39
  boost::signals2::scoped_connection _fk_member_changed_conn;
 
40
  boost::signals2::scoped_connection _fk_changed_conn;
 
41
  boost::signals2::scoped_connection _table_changed_conn;
 
42
 
 
43
  bool _highlighting;
 
44
 
 
45
  void fk_changed(const db_ForeignKeyRef &fk);
 
46
  void member_changed(const std::string &name, const grt::ValueRef &ovalue);
 
47
  
 
48
  virtual bool realize();
 
49
  virtual void unrealize();
 
50
  
 
51
  void update_line_ends();
 
52
  void layout_changed();
 
53
  void table_changed(const std::string &detail);
 
54
  
 
55
  virtual mdc::CanvasItem *get_start_canvas_item();
 
56
  virtual mdc::CanvasItem *get_end_canvas_item();
 
57
 
 
58
  virtual void caption_bounds_changed(const MySQL::Geometry::Rect &obounds, mdc::TextFigure *figure);
 
59
 
 
60
  void fk_member_changed(const std::string &member, const grt::ValueRef &ovalue);
 
61
 
 
62
  void object_realized(const model_ObjectRef &object);
 
63
 
 
64
  void update_connected_tables();
 
65
 
 
66
public:
 
67
  ImplData(workbench_physical_Connection *self);
 
68
  virtual ~ImplData();
 
69
  
 
70
  void set_highlighted(bool flag);
 
71
 
 
72
  virtual void set_in_view(bool flag);
 
73
 
 
74
  void set_foreign_key(const db_ForeignKeyRef &fk);
 
75
 
 
76
private:
 
77
  workbench_physical_Connection *self() const { return (workbench_physical_Connection*)_self; }
 
78
};
 
79
 
 
80
 
 
81
#endif