#ifndef QTHELPERS_H
#define QTHELPERS_H
+#include "ColorSet.h"
#include "Length.h"
#include "support/qstring_helpers.h"
+#include "support/filetools.h"
#include "qt_i18n.h"
#include <QHeaderView>
/// 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);
///
support::FileName libFileSearch(QString const & dir, QString const & name,
- QString const & ext = QString());
+ QString const & ext = QString(),
+ support::search_mode mode = support::must_exist);
///
support::FileName imageLibFileSearch(QString & dir, QString const & name,
- QString const & ext = QString());
+ QString const & ext = QString(),
+ support::search_mode mode = support::must_exist);
/** Wrappers around browseFile which try to provide a filename
relative to relpath.