Mercurial > octave-dspies
comparison libgui/graphics/ToolBarButton.cc @ 18692:fe0e34be5576
maint: untabify recently added code files.
* Backend.cc, BaseControl.cc, ButtonControl.cc, Canvas.cc, Canvas.h,
CheckBoxControl.cc, Container.cc, ContextMenu.cc, EditControl.cc, Figure.cc,
Figure.h, GLCanvas.h, ListBoxControl.cc, Menu.cc, MouseModeActionGroup.cc,
Object.cc, Object.h, ObjectFactory.cc, ObjectProxy.cc, Panel.cc,
PopupMenuControl.cc, PushButtonControl.cc, PushTool.cc, QtHandlesUtils.cc,
QtHandlesUtils.h, RadioButtonControl.cc, SliderControl.cc, TextControl.cc,
ToggleButtonControl.cc, ToggleTool.cc, ToolBar.cc, ToolBarButton.cc,
__init_qt__.cc, pt-jit.cc, ov-classdef.cc, ov-classdef.h: Untabify code.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 27 Apr 2014 18:02:47 -0700 |
parents | fb96b7f55242 |
children |
comparison
equal
deleted
inserted
replaced
18691:9a6646cc7c3e | 18692:fe0e34be5576 |
---|---|
72 switch (pId) | 72 switch (pId) |
73 { | 73 { |
74 case base_properties::ID_VISIBLE: | 74 case base_properties::ID_VISIBLE: |
75 action->setVisible (tp.is_visible ()); | 75 action->setVisible (tp.is_visible ()); |
76 if (m_separator) | 76 if (m_separator) |
77 m_separator->setVisible (tp.is_visible ()); | 77 m_separator->setVisible (tp.is_visible ()); |
78 break; | 78 break; |
79 case T::properties::ID_TOOLTIPSTRING: | 79 case T::properties::ID_TOOLTIPSTRING: |
80 action->setToolTip (Utils::fromStdString (tp.get_tooltipstring ())); | 80 action->setToolTip (Utils::fromStdString (tp.get_tooltipstring ())); |
81 break; | 81 break; |
82 case T::properties::ID_CDATA: | 82 case T::properties::ID_CDATA: |
83 { | 83 { |
84 QImage img = Utils::makeImageFromCData (tp.get_cdata (), 16, 16); | 84 QImage img = Utils::makeImageFromCData (tp.get_cdata (), 16, 16); |
85 | 85 |
86 action->setIcon (QIcon (QPixmap::fromImage (img))); | 86 action->setIcon (QIcon (QPixmap::fromImage (img))); |
87 } | 87 } |
88 break; | 88 break; |
89 case T::properties::ID_SEPARATOR: | 89 case T::properties::ID_SEPARATOR: |
90 if (tp.is_separator ()) | 90 if (tp.is_separator ()) |
91 { | 91 { |
92 if (! m_separator) | 92 if (! m_separator) |
93 { | 93 { |
94 m_separator = new QAction (action); | 94 m_separator = new QAction (action); |
95 m_separator->setSeparator (true); | 95 m_separator->setSeparator (true); |
96 m_separator->setVisible (tp.is_visible ()); | 96 m_separator->setVisible (tp.is_visible ()); |
97 | 97 |
98 QWidget* w = qobject_cast<QWidget*> (action->parent ()); | 98 QWidget* w = qobject_cast<QWidget*> (action->parent ()); |
99 | 99 |
100 w->insertAction (action, m_separator); | 100 w->insertAction (action, m_separator); |
101 } | 101 } |
102 } | 102 } |
103 else | 103 else |
104 { | 104 { |
105 if (m_separator) | 105 if (m_separator) |
106 delete m_separator; | 106 delete m_separator; |
107 m_separator = 0; | 107 m_separator = 0; |
108 } | 108 } |
109 break; | 109 break; |
110 case T::properties::ID_ENABLE: | 110 case T::properties::ID_ENABLE: |
111 action->setEnabled (tp.is_enable ()); | 111 action->setEnabled (tp.is_enable ()); |
112 break; | 112 break; |
113 default: | 113 default: |