4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
17 #include "lyxlength.h"
24 std::string makeFontName(std::string const & family, std::string const & foundry);
26 std::pair<std::string,std::string> parseFontName(std::string const & name);
28 /// method to get a LyXLength from widgets (LengthCombo)
29 std::string widgetsToLength(QLineEdit const * input, LengthCombo const * combo);
30 /// method to get a LyXLength from widgets (QComboBox)
31 LyXLength widgetsToLength(QLineEdit const * input, QComboBox const * combo);
33 /// method to set widgets from a LyXLength
34 void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
35 std::string const & len, LyXLength::UNIT default_unit);
37 /// format a string to the given width
38 std::string const formatted(std::string const & text, int w = 80);
41 * toqstr - convert char * into unicode
43 * Use this whenever there's a user-visible string that is encoded
44 * for the locale (menus, dialogs etc.)
46 QString const toqstr(char const * str);
50 * toqstr - convert string into unicode
52 * Use this whenever there's a user-visible string that is encoded
53 * for the locale (menus, dialogs etc.)
55 QString const toqstr(std::string const & str);
59 * qt_ - i18nize string and convert to unicode
61 * Use this in qt3/ instead of qt_()
63 QString const qt_(char const * str);
67 * qt_ - i18nize string and convert to unicode
69 * Use this in qt3/ instead of qt_()
71 QString const qt_(std::string const & str);
75 * fromqstr - convert QString into std::string in locale
77 * Return the QString encoded in the locale
79 std::string const fromqstr(QString const & str);