mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-23 08:39:07 +00:00
77b9dbd557
* src/LaTeX.C (LaTeX::deplog): Assume that filenames in log files are stored in the file system encoding * src/frontends/qt4/qt_helpers.[Ch] (internal_path): delete * src/frontends/qt4/QGraphics.C: Adjust to change above * src/frontends/qt4/QPrefsDialog.C: ditto * src/frontends/qt4/QExternal.C: ditto * src/frontends/qt4/QInclude.C: ditto * src/support/os.h: Document the encoding of filename arguments * src/support/os_win32.h: ditto * src/support/filetools.C (findtexfile): Convert filename from file system encoding * src/support/os_win32.C: Convert filenames from utf8 to file system encoding and vice versa where needed * src/support/os_cygwin.C: ditto * src/support/getcwd.C (getcwd): Use internal_path() with correct encoding * src/support/docstring.[Ch] (from_filesystem8bit): new conversion function * src/support/environment.C (getEnv): convert environment variable from local 8bit encoding to utf8 (setEnv): convert environment variable from utf8 to local 8bit encoding * src/support/environment.h: document encoding of function arguments git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16753 a592a061-630c-0410-9148-cb99ea01b6c8
65 lines
1.5 KiB
C++
65 lines
1.5 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file qt_helpers.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Dekel Tsur
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef QTHELPERS_H
|
|
#define QTHELPERS_H
|
|
|
|
#include "lyxlength.h"
|
|
#include "support/docstring.h"
|
|
#include "support/qstring_helpers.h"
|
|
|
|
#include <QString>
|
|
|
|
#include <utility>
|
|
|
|
class QComboBox;
|
|
class QLineEdit;
|
|
|
|
class LengthCombo;
|
|
|
|
namespace lyx {
|
|
|
|
std::string makeFontName(std::string const & family, std::string const & foundry);
|
|
|
|
std::pair<std::string,std::string> parseFontName(std::string const & name);
|
|
|
|
/// method to get a LyXLength from widgets (LengthCombo)
|
|
std::string widgetsToLength(QLineEdit const * input, LengthCombo const * combo);
|
|
/// method to get a LyXLength from widgets (QComboBox)
|
|
LyXLength widgetsToLength(QLineEdit const * input, QComboBox const * combo);
|
|
|
|
/// method to set widgets from a LyXLength
|
|
void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
|
|
std::string const & len, LyXLength::UNIT default_unit);
|
|
|
|
/// format a string to the given width
|
|
docstring const formatted(docstring const & text, int w = 80);
|
|
|
|
|
|
/**
|
|
* qt_ - i18nize string and convert to QString
|
|
*
|
|
* Use this in qt4/ instead of _()
|
|
*/
|
|
QString const qt_(char const * str, const char * comment = 0);
|
|
|
|
|
|
/**
|
|
* qt_ - i18nize string and convert to QString
|
|
*
|
|
* Use this in qt4/ instead of _()
|
|
*/
|
|
QString const qt_(std::string const & str);
|
|
|
|
} // namespace lyx
|
|
|
|
#endif // QTHELPERS_H
|