Restructured locations of source.
This commit is contained in:
parent
78a4c6d730
commit
7c4e8e95e8
151 changed files with 1 additions and 0 deletions
43
pglab/util.h
43
pglab/util.h
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#include <string>
|
||||
#include <QString>
|
||||
#include <QTableView>
|
||||
|
||||
QString msfloatToHumanReadableString(float ms);
|
||||
void copySelectionToClipboard(const QTableView *view);
|
||||
QString ConvertToMultiLineCString(const QString &in);
|
||||
void exportTable(const QTableView *view, QTextStream &out);
|
||||
|
||||
inline QString stdStrToQ(const std::string &s)
|
||||
{
|
||||
return QString::fromUtf8(s.c_str());
|
||||
}
|
||||
|
||||
inline std::string qStrToStd(const QString &s)
|
||||
{
|
||||
return std::string(s.toUtf8().data());
|
||||
}
|
||||
|
||||
inline std::string qvarToStdStr(const QVariant &c)
|
||||
{
|
||||
return qStrToStd(c.toString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
namespace std {
|
||||
|
||||
template <>
|
||||
struct hash<QString>
|
||||
{
|
||||
std::size_t operator()(const QString& s) const
|
||||
{
|
||||
return qHash(s);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // UTIL_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue