diff libgui/graphics/TextControl.cc @ 22411:c69805d1fa64

maint: Style check C++ code in libgui/ * Backend.cc, Backend.h, BaseControl.cc, BaseControl.h, ButtonControl.cc, ButtonControl.h, ButtonGroup.cc, ButtonGroup.h, Canvas.cc, Canvas.h, CheckBoxControl.cc, CheckBoxControl.h, Container.cc, Container.h, ContextMenu.cc, ContextMenu.h, EditControl.cc, EditControl.h, Figure.cc, Figure.h, FigureWindow.cc, FigureWindow.h, GLCanvas.cc, GLCanvas.h, GenericEventNotify.h, KeyMap.cc, KeyMap.h, ListBoxControl.cc, ListBoxControl.h, Logger.cc, Logger.h, Menu.cc, Menu.h, MenuContainer.h, MouseModeActionGroup.cc, MouseModeActionGroup.h, Object.cc, Object.h, ObjectFactory.cc, ObjectFactory.h, ObjectProxy.cc, ObjectProxy.h, Panel.cc, Panel.h, PopupMenuControl.cc, PopupMenuControl.h, PushButtonControl.cc, PushButtonControl.h, PushTool.cc, PushTool.h, QtHandlesUtils.cc, QtHandlesUtils.h, RadioButtonControl.cc, RadioButtonControl.h, SliderControl.cc, SliderControl.h, TextControl.cc, TextControl.h, TextEdit.cc, TextEdit.h, ToggleButtonControl.cc, ToggleButtonControl.h, ToggleTool.cc, ToggleTool.h, ToolBar.cc, ToolBar.h, ToolBarButton.cc, ToolBarButton.h, __init_qt__.cc, __init_qt__.h, annotation-dialog.cc, annotation-dialog.h, gl-select.cc, gl-select.h, color-picker.cc, color-picker.h, dialog.h, documentation-dock-widget.cc, documentation-dock-widget.h, files-dock-widget.cc, files-dock-widget.h, find-files-dialog.h, find-files-model.cc, find-files-model.h, history-dock-widget.cc, history-dock-widget.h, liboctgui-build-info.h, liboctgui-build-info.in.cc, file-editor-interface.h, file-editor-tab.cc, file-editor-tab.h, file-editor.cc, file-editor.h, find-dialog.cc, find-dialog.h, marker.cc, marker.h, octave-qscintilla.cc, octave-qscintilla.h, octave-txt-lexer.cc, octave-txt-lexer.h, main-window.cc, main-window.h, octave-cmd.cc, octave-cmd.h, octave-dock-widget.cc, octave-dock-widget.h, octave-gui.cc, octave-gui.h, octave-interpreter.cc, octave-interpreter.h, octave-qt-link.cc, octave-qt-link.h, parser.cc, parser.h, webinfo.cc, webinfo.h, resource-manager.cc, resource-manager.h, settings-dialog.cc, settings-dialog.h, shortcut-manager.cc, shortcut-manager.h, terminal-dock-widget.h, thread-manager.cc, thread-manager.h, welcome-wizard.cc, welcome-wizard.h, workspace-model.cc, workspace-model.h, workspace-view.cc, workspace-view.h: Style check C++ code in libgui/
author Rik <rik@octave.org>
date Wed, 31 Aug 2016 12:20:46 -0700
parents bac0d6f07a3e
children 8758addcf265
line wrap: on
line diff
--- a/libgui/graphics/TextControl.cc	Wed Aug 31 14:37:33 2016 -0400
+++ b/libgui/graphics/TextControl.cc	Wed Aug 31 12:20:46 2016 -0700
@@ -33,61 +33,62 @@
 namespace QtHandles
 {
 
-TextControl*
-TextControl::create (const graphics_object& go)
-{
-  Object* parent = Object::parentObject (go);
+  TextControl*
+  TextControl::create (const graphics_object& go)
+  {
+    Object* parent = Object::parentObject (go);
 
-  if (parent)
-    {
-      Container* container = parent->innerContainer ();
+    if (parent)
+      {
+        Container* container = parent->innerContainer ();
 
-      if (container)
-        return new TextControl (go, new QLabel (container));
-    }
+        if (container)
+          return new TextControl (go, new QLabel (container));
+      }
 
-  return 0;
-}
+    return 0;
+  }
 
-TextControl::TextControl (const graphics_object& go, QLabel* label)
-  : BaseControl (go, label)
-{
-  uicontrol::properties& up = properties<uicontrol> ();
+  TextControl::TextControl (const graphics_object& go, QLabel* label)
+    : BaseControl (go, label)
+  {
+    uicontrol::properties& up = properties<uicontrol> ();
 
-  label->setAutoFillBackground (true);
-  label->setTextFormat (Qt::PlainText);
-  label->setWordWrap (false);
-  label->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (),
-                                           up.get_verticalalignment ()));
-  label->setText(Utils::fromStringVector (up.get_string_vector()).join("\n"));
-}
+    label->setAutoFillBackground (true);
+    label->setTextFormat (Qt::PlainText);
+    label->setWordWrap (false);
+    label->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (),
+                         up.get_verticalalignment ()));
+    label->setText(Utils::fromStringVector (up.get_string_vector()).join("\n"));
+  }
 
-TextControl::~TextControl (void)
-{
-}
+  TextControl::~TextControl (void)
+  {
+  }
 
-void
-TextControl::update (int pId)
-{
-  uicontrol::properties& up = properties<uicontrol> ();
-  QLabel* label = qWidget<QLabel> ();
+  void
+  TextControl::update (int pId)
+  {
+    uicontrol::properties& up = properties<uicontrol> ();
+    QLabel* label = qWidget<QLabel> ();
 
-  switch (pId)
-    {
-    case uicontrol::properties::ID_STRING:
-      label->setText(Utils::fromStringVector (up.get_string_vector()).join("\n"));
-      break;
+    switch (pId)
+      {
+      case uicontrol::properties::ID_STRING:
+        label->setText(Utils::fromStringVector (up.get_string_vector()).join("\n"));
+        break;
 
-    case uicontrol::properties::ID_HORIZONTALALIGNMENT:
-    case uicontrol::properties::ID_VERTICALALIGNMENT:
-      label->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (),
-                                               up.get_verticalalignment ()));
-      break;
+      case uicontrol::properties::ID_HORIZONTALALIGNMENT:
+      case uicontrol::properties::ID_VERTICALALIGNMENT:
+        label->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (),
+                             up.get_verticalalignment ()));
+        break;
 
-    default:
-      BaseControl::update (pId);
-      break;
-    }
-}
+      default:
+        BaseControl::update (pId);
+        break;
+      }
+  }
 
 }; // namespace QtHandles
+