Mercurial > octave-nkf
comparison libgui/graphics/PopupMenuControl.cc @ 18501:523878f76518 gui-release
style fix: eliminate lines of slashes to separate functions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Feb 2014 15:10:07 -0500 |
parents | 49877d3be064 |
children | fb96b7f55242 |
comparison
equal
deleted
inserted
replaced
18500:49877d3be064 | 18501:523878f76518 |
---|---|
28 | 28 |
29 #include "Container.h" | 29 #include "Container.h" |
30 #include "PopupMenuControl.h" | 30 #include "PopupMenuControl.h" |
31 #include "Utils.h" | 31 #include "Utils.h" |
32 | 32 |
33 ////////////////////////////////////////////////////////////////////////////// | |
34 | |
35 namespace QtHandles | 33 namespace QtHandles |
36 { | 34 { |
37 | |
38 ////////////////////////////////////////////////////////////////////////////// | |
39 | 35 |
40 PopupMenuControl* PopupMenuControl::create (const graphics_object& go) | 36 PopupMenuControl* PopupMenuControl::create (const graphics_object& go) |
41 { | 37 { |
42 Object* parent = Object::parentObject (go); | 38 Object* parent = Object::parentObject (go); |
43 | 39 |
50 } | 46 } |
51 | 47 |
52 return 0; | 48 return 0; |
53 } | 49 } |
54 | 50 |
55 ////////////////////////////////////////////////////////////////////////////// | |
56 | |
57 PopupMenuControl::PopupMenuControl (const graphics_object& go, QComboBox *box) | 51 PopupMenuControl::PopupMenuControl (const graphics_object& go, QComboBox *box) |
58 : BaseControl (go, box), m_blockUpdate (false) | 52 : BaseControl (go, box), m_blockUpdate (false) |
59 { | 53 { |
60 uicontrol::properties& up = properties<uicontrol> (); | 54 uicontrol::properties& up = properties<uicontrol> (); |
61 | 55 |
63 | 57 |
64 connect (box, SIGNAL (currentIndexChanged (int)), | 58 connect (box, SIGNAL (currentIndexChanged (int)), |
65 SLOT (currentIndexChanged (int))); | 59 SLOT (currentIndexChanged (int))); |
66 } | 60 } |
67 | 61 |
68 ////////////////////////////////////////////////////////////////////////////// | |
69 | |
70 PopupMenuControl::~PopupMenuControl (void) | 62 PopupMenuControl::~PopupMenuControl (void) |
71 { | 63 { |
72 } | 64 } |
73 | |
74 ////////////////////////////////////////////////////////////////////////////// | |
75 | 65 |
76 void PopupMenuControl::update (int pId) | 66 void PopupMenuControl::update (int pId) |
77 { | 67 { |
78 uicontrol::properties& up = properties<uicontrol> (); | 68 uicontrol::properties& up = properties<uicontrol> (); |
79 QComboBox* box = qWidget<QComboBox> (); | 69 QComboBox* box = qWidget<QComboBox> (); |
124 BaseControl::update (pId); | 114 BaseControl::update (pId); |
125 break; | 115 break; |
126 } | 116 } |
127 } | 117 } |
128 | 118 |
129 ////////////////////////////////////////////////////////////////////////////// | |
130 | |
131 void PopupMenuControl::currentIndexChanged (int index) | 119 void PopupMenuControl::currentIndexChanged (int index) |
132 { | 120 { |
133 if (! m_blockUpdate) | 121 if (! m_blockUpdate) |
134 { | 122 { |
135 gh_manager::post_set (m_handle, "value", | 123 gh_manager::post_set (m_handle, "value", |
137 false); | 125 false); |
138 gh_manager::post_callback (m_handle, "callback"); | 126 gh_manager::post_callback (m_handle, "callback"); |
139 } | 127 } |
140 } | 128 } |
141 | 129 |
142 ////////////////////////////////////////////////////////////////////////////// | |
143 | |
144 }; // namespace QtHandles | 130 }; // namespace QtHandles |