#include "support/qstring_helpers.h"
#include "qt_i18n.h"
-#include <QString>
+#include <QHeaderView>
class QComboBox;
class QLineEdit;
class QWidget;
template <class T> class QList;
-class LengthCombo;
-
namespace lyx {
namespace support { class FileName; }
class BufferParams;
-
+
namespace frontend {
+class LengthCombo;
+
/// method to get a Length from widgets (LengthCombo)
std::string widgetsToLength(QLineEdit const * input, LengthCombo const * combo);
/// method to get a Length from widgets (QComboBox)
Length widgetsToLength(QLineEdit const * input, QComboBox const * combo);
-//FIXME It would be nice if defaultUnit were a default argument
/// method to set widgets from a Length
+//FIXME Remove default_unit argument for the first form. FIXME Change
+// all the code to remove default_unit argument when equal to the
+// default.
void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
-Length const & len, Length::UNIT default_unit);
+ Length const & len,
+ Length::UNIT default_unit = Length::defaultUnit());
/// method to set widgets from a string
void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
-std::string const & len, Length::UNIT default_unit);
+ std::string const & len,
+ Length::UNIT default_unit = Length::defaultUnit());
/// method to set widgets from a docstring
void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
docstring const & len, Length::UNIT default_unit);
/// colors a widget red if invalid
void setValid(QWidget * widget, bool valid);
+/// Qt5 changed setSectionMode to setSectionResizeMode
+/// These wrappers work for Qt4 and Qt5
+void setSectionResizeMode(QHeaderView * view,
+ int logicalIndex, QHeaderView::ResizeMode mode);
+void setSectionResizeMode(QHeaderView * view,
+ QHeaderView::ResizeMode mode);
+
} // namespace frontend
* Use this in qt4/ instead of _()
*/
QString const qt_(std::string const & str);
+QString const qt_(QString const & qstr);
+
///
support::FileName libFileSearch(QString const & dir, QString const & name,