Utility functions header. More...
#include <string>#include <qcstring.h>Namespaces | |
| namespace | util |
Utility namespace. | |
Defines | |
| #define | MAX(x, y) ((x)>=(y)?(x):(y)) |
| #define | MIN(x, y) ((x)<=(y)?(x):(y)) |
| #define | __attribute__(x) |
Enumerations | |
| enum | util::CharsetContext { util::PDF, util::CON, util::NAME, util::UTF8 } |
Functions | |
| void | util::fatalError (const QString &message) |
| QStringList | util::explode (char separator, const QString &line, bool escape) |
| QString | util::htmlEnt (const QString &str) |
| QString | util::loadFromFile (const QString &name) |
| bool | util::saveToFile (const QString &name, const QString &content) |
| bool | util::saveRawToFile (const QString &name, const QByteArray &content) |
| void | util::printList (const QStringList &l) |
| void | util::escapeSlash (QString &line) |
| void | util::consoleLog (const QString &message, const QString &fileName) |
| QString | util::getUntil (char separator, QString &line, bool escape) |
| void | util::setDebugLevel (const QString ¶m) |
| QString | util::countString (int count, QString singular, QString plural) |
| QColor | util::mixColor (const QColor &oldColor, double weight, const QColor &newColor) |
| void | util::colorMod (QWidget *widget, QColor fg, double weight_fg, QColor bg, double weight_bg) |
| QStringList | util::countList (unsigned int count, unsigned int start) |
| QVariant | util::varFromDoubleArray (double *d, int count) |
| int | util::varToDoubleArray (const QVariant &v, double *out, int out_size) |
| QStringList | util::supportedEncodings () |
| void | util::setDefaultCharset (const QString &charsetName) |
| QString | util::convertToUnicode (const std::string &str, CharsetContext ctx) |
| std::string | util::convertFromUnicode (const QString &str, CharsetContext ctx) |
Utility functions header.
| #define __attribute__ | ( | x | ) |
Turn off __attribute__ for non-gcc compilers
| #define MAX | ( | x, | |||
| y | ) | ((x)>=(y)?(x):(y)) |
macro returning greater of two values
| #define MIN | ( | x, | |||
| y | ) | ((x)<=(y)?(x):(y)) |
macro returning lesser of two values