* Licence details can be found in the file COPYING.
*
* \author Dekel Tsur
- * \author Richard Heck
+ * \author Richard Kimberly Heck
*
* Full author contact details are available in file CREDITS.
*/
#define QTHELPERS_H
#include "ColorSet.h"
-#include "Length.h"
+#include "support/Length.h"
#include "support/qstring_helpers.h"
#include "support/filetools.h"
#include "qt_i18n.h"
class QComboBox;
class QLineEdit;
-class QCheckBox;
class QString;
class QWidget;
-template <class T> class QList;
namespace lyx {
namespace support { class FileName; }
-class BufferParams;
-
namespace frontend {
class LengthCombo;
/// method to get a double value from a localized widget (QLineEdit)
std::string widgetToDoubleStr(QLineEdit const * input);
/// method to set a (localized) double value in a widget (QLineEdit)
-void doubleToWidget(QLineEdit * input, double const & value,
+void doubleToWidget(QLineEdit * input, double value,
char f = 'g', int prec = 6);
/// method to set a (localized) double value in a widget (QLineEdit)
void doubleToWidget(QLineEdit * input, std::string const & value,
void setMessageColour(std::list<QWidget *> highlighted,
std::list<QWidget *> plain);
-/// 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);
+/// Shows a directory in OSs file browser
+void showDirectory(support::FileName const & directory);
+/// handle request for showing citation content - shows pdf/ps or
+/// web page in target; external script can be used for pdf/ps view
+/// \p pdfv takes a pad viewer, \p psv a ps viewer
+void showTarget(std::string const & target,
+ std::string const & pdfv,
+ std::string const & psv);
} // namespace frontend
QString const & ext = QString(),
support::search_mode mode = support::must_exist);
-/** Wrappers around browseFile which try to provide a filename
- relative to relpath.
-
-\param title: title for dialog
-
-\param filters: *.ps, etc
-
-\param save: whether to save dialog info (current path, etc) for next use.
-
-The \param labelN and \param dirN arguments provide for extra buttons
-in the dialog (e.g., "Templates" and a path to that directory).
-
-The difference between the functions concerns when we think we have a
-relative path.
-
-In \c browseRelToParent, we return a relative path only if it IS NOT of
- the form "../../foo.txt".
-
-In \c browseRelToSub, we return a relative path only if it IS of the
- form "../../foo.txt".
-*/
-QString browseRelToParent(QString const & filename,
- QString const & relpath,
- QString const & title,
- QStringList const & filters,
- bool save = false,
- QString const & label1 = QString(),
- QString const & dir1 = QString(),
- QString const & label2 = QString(),
- QString const & dir2 = QString());
-
-QString browseRelToSub(QString const & filename,
- QString const & relpath,
- QString const & title,
- QStringList const & filters,
- bool save = false,
- QString const & label1 = QString(),
- QString const & dir1 = QString(),
- QString const & label2 = QString(),
- QString const & dir2 = QString());
-
-/** Build filelists of all availabe bst/cls/sty-files. Done through
+/** Build filelists of all available bst/cls/sty-files. Done through
* kpsewhich and an external script, saved in *Files.lst.
* \param arg: cls, sty, bst, or bib, as required by TeXFiles.py.
* Can be a list of these, too.
QString onlyFileName(QString const & str);
QString onlyPath(QString const & str);
QStringList fileFilters(QString const & description);
-
-QString changeExtension(QString const & oldname, QString const & extension);
+/// all files wildcard for filter in qt dialogs (crossplatform)
+QString wildcardAllFiles();
/// Remove the extension from \p name
QString removeExtension(QString const & name);
#endif
-// Check if qstr is understood as rich text (Qt HTML) and if so, produce a
+// Check if text is understood as rich text (Qt HTML) and if so, produce a
// rendering in plain text.
-QString qtHtmlToPlainText(QString const & qstr);
+QString qtHtmlToPlainText(QString const & text);
} // namespace lyx