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"
18 //#include "lengthcombo.h"
25 std::string makeFontName(std::string const & family, std::string const & foundry);
27 std::pair<std::string,std::string> parseFontName(std::string const & name);
29 /// method to get a LyXLength from widgets (LengthCombo)
30 std::string widgetsToLength(QLineEdit const * input, LengthCombo const * combo);
31 /// method to get a LyXLength from widgets (QComboBox)
32 LyXLength widgetsToLength(QLineEdit const * input, QComboBox const * combo);
34 /// method to set widgets from a LyXLength
35 void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
36 std::string const & len, LyXLength::UNIT default_unit);
38 /// format a string to the given width
39 std::string const formatted(std::string const & text, int w = 80);
42 * toqstr - convert char * into unicode
44 * Use this whenever there's a user-visible string that is encoded
45 * for the locale (menus, dialogs etc.)
47 QString const toqstr(char const * str);
51 * toqstr - convert string into unicode
53 * Use this whenever there's a user-visible string that is encoded
54 * for the locale (menus, dialogs etc.)
56 QString const toqstr(std::string const & str);
60 * qt_ - i18nize string and convert to unicode
62 * Use this in qt2/ instead of qt_()
64 QString const qt_(char const * str);
68 * qt_ - i18nize string and convert to unicode
70 * Use this in qt2/ instead of qt_()
72 QString const qt_(std::string const & str);
76 * fromqstr - convert QString into std::string in locale
78 * Return the QString encoded in the locale
80 std::string const fromqstr(QString const & str);