]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/qt_helpers.h
Amend f441590c
[lyx.git] / src / frontends / qt4 / qt_helpers.h
index 4b4796777b51d01858f4f02b2d938e95813d6771..d4afc78a338b7e615729a6debd1a377a4d5391e4 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "ColorSet.h"
 #include "Length.h"
-#include "support/lstrings.h"
 #include "support/qstring_helpers.h"
 #include "support/filetools.h"
 #include "qt_i18n.h"
@@ -39,12 +38,6 @@ namespace frontend {
 
 class LengthCombo;
 
-struct ColorSorter {
-       bool operator()(ColorCode lhs, ColorCode rhs) const {
-               return  support::compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0;
-       }
-};
-
 /// 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)
@@ -75,6 +68,14 @@ void doubleToWidget(QLineEdit * input, double const & value,
 /// method to set a (localized) double value in a widget (QLineEdit)
 void doubleToWidget(QLineEdit * input, std::string const & value,
        char f = 'g', int prec = 6);
+/**
+ * method to format localized floating point numbers without
+ * ever using scientific notation
+ */
+QString formatLocFPNumber(double d);
+
+/// Method to sort colors by GUI name in combo widgets
+bool ColorSorter(ColorCode lhs, ColorCode rhs);
 
 /// colors a widget red if invalid
 void setValid(QWidget * widget, bool valid);