Mercurial > octave-nkf
diff libgui/graphics/Utils.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 |
line wrap: on
line diff
--- a/libgui/graphics/Utils.cc Thu Feb 20 14:58:56 2014 -0500 +++ b/libgui/graphics/Utils.cc Thu Feb 20 15:10:07 2014 -0500 @@ -39,32 +39,22 @@ #include "Object.h" #include "Utils.h" -////////////////////////////////////////////////////////////////////////////// - namespace QtHandles { -////////////////////////////////////////////////////////////////////////////// - namespace Utils { -////////////////////////////////////////////////////////////////////////////// - QString fromStdString (const std::string& s) { return QString::fromLocal8Bit (s.c_str ()); } -////////////////////////////////////////////////////////////////////////////// - std::string toStdString (const QString& s) { return std::string (s.toLocal8Bit ().data ()); } -////////////////////////////////////////////////////////////////////////////// - QStringList fromStringVector (const string_vector& v) { QStringList l; @@ -76,8 +66,6 @@ return l; } -////////////////////////////////////////////////////////////////////////////// - string_vector toStringVector (const QStringList& l) { string_vector v (l.length ()); @@ -89,8 +77,6 @@ return v; } -////////////////////////////////////////////////////////////////////////////// - template <class T> QFont computeFont (const typename T::properties& props, int height) { @@ -126,8 +112,6 @@ template QFont computeFont<uipanel> (const uipanel::properties& props, int height); -////////////////////////////////////////////////////////////////////////////// - QColor fromRgb (const Matrix& rgb) { QColor c; @@ -138,8 +122,6 @@ return c; } -////////////////////////////////////////////////////////////////////////////// - Matrix toRgb (const QColor& c) { Matrix rgb (1, 3); @@ -150,8 +132,6 @@ return rgb; } -////////////////////////////////////////////////////////////////////////////// - std::string figureSelectionType (QMouseEvent* event, bool isDoubleClick) { if (isDoubleClick) @@ -187,8 +167,6 @@ return std::string ("normal"); } -////////////////////////////////////////////////////////////////////////////// - Matrix figureCurrentPoint (const graphics_object& fig, QMouseEvent* event) { Object* tkFig = Backend::toolkitObject (fig); @@ -210,8 +188,6 @@ return Matrix (1, 2, 0.0); } -////////////////////////////////////////////////////////////////////////////// - Qt::Alignment fromHVAlign (const caseless_str& halign, const caseless_str& valign) { @@ -238,8 +214,6 @@ return flags; } -////////////////////////////////////////////////////////////////////////////// - QImage makeImageFromCData (const octave_value& v, int width, int height) { dim_vector dv (v.dims ()); @@ -315,8 +289,6 @@ return QImage (); } -////////////////////////////////////////////////////////////////////////////// - octave_scalar_map makeKeyEventStruct (QKeyEvent* event) { octave_scalar_map retval; @@ -347,10 +319,6 @@ return retval; } -////////////////////////////////////////////////////////////////////////////// - }; // namespace Utils -////////////////////////////////////////////////////////////////////////////// - }; // namespace QtHandles