scidavis  2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).
  Fossies Dox: scidavis-2.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

QStringStdString.h
Go to the documentation of this file.
1 #ifndef QSTRINGSTDSTRING_H
2 #define QSTRINGSTDSTRING_H
3 
5 template <class S> S toString(const QString& x);
6 template <> inline std::string toString<std::string>(const QString& x)
7 {return x.toStdString();}
8 template <> inline std::wstring toString<std::wstring>(const QString& x)
9 {return x.toStdWString();}
10 template <> inline std::u16string toString<std::u16string>(const QString& x)
11 {return x.toStdU16String();}
12 template <> inline std::u32string toString<std::u32string>(const QString& x)
13 {return x.toStdU32String();}
14 
15 inline QString QStringFromString(const std::string& x) {return QString::fromStdString(x);}
16 inline QString QStringFromString(const std::wstring& x) {return QString::fromStdWString(x);}
17 inline QString QStringFromString(const std::u16string& x) {return QString::fromStdU16String(x);}
18 inline QString QStringFromString(const std::u32string& x) {return QString::fromStdU32String(x);}
19 inline QString QStringFromString(const char* x) {return QString::fromStdString(x);}
20 inline QString QStringFromString(const wchar_t* x) {return QString::fromStdWString(x);}
21 
22 #endif
QStringFromString
QString QStringFromString(const std::string &x)
Definition: QStringStdString.h:15
toString
S toString(const QString &x)
Deal with conversion between QString and std::string/std::wstring in a generic way.