26 #if ! defined (octave_qt_utils_h)
27 #define octave_qt_utils_h 1
31 #include <QFontMetrics>
40 #if defined (HAVE_QLIST_ITERATOR_CONSTRUCTOR)
41 return QList<T> (lst.begin (), lst.end ());
50 #if defined (HAVE_QFONTMETRICS_HORIZONTAL_ADVANCE)
51 return fm.horizontalAdvance (ch);
59 const QString& text,
int len = -1)
61 #if defined (HAVE_QFONTMETRICS_HORIZONTAL_ADVANCE)
62 return fm.horizontalAdvance (text,
len);
64 return fm.width (text,
len);
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
int qt_fontmetrics_horizontal_advance(const QFontMetrics &fm, QChar ch)
QList< T > std_list_to_qt_list(const std::list< T > &lst)