PSQt/include/QGUtils.h File Reference

#include "ndarray/ndarray.h"
#include "PSQt/Logger.h"
#include "PSQt/GUAxes.h"
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QGraphicsPathItem>
#include <math.h>
#include <string>
#include <sstream>
#include <stdint.h>
#include <iomanip>
#include <QLabel>
#include <QPainter>
#include <QPixmap>
#include <QFont>

Go to the source code of this file.

Namespaces

namespace  PSQt

Functions

uint32_t PSQt::fRGBA (const float R, const float G, const float B)
 Returns uint32_t color code for R, G, and B parameters. R - red [0,1] G - green [0,1] B - blue [0,1].
uint32_t PSQt::HSV2RGBA (const float H, const float S, const float V)
 Returns uint32_t color code for H, S, and V parameters. H - hue [0,360) S - black/white satturation [0,1] V - value of color [0,1] ??? http://www.rapidtables.com/convert/color/hsv-to-rgb.htm http://en.wikipedia.org/wiki/HSL_and_HSV http://stackoverflow.com/questions/3018313/algorithm-to-convert-rgb-to-hsv-and-hsv-to-rgb-in-range-0-255-for-both.
uint32_t * PSQt::ColorTable (const unsigned &NColors=0, const float &H1=0, const float &H2=0)
 Returns uint32_t* color table for requested parameters. NColors - number of colors H1, H2=[-360,360] - extended to negative hue range.
ndarray< uint32_t, 2 > PSQt::getColorBarImage (const unsigned &rows=20, const unsigned &cols=1024, const float &hue1=-120, const float &hue2=60)
 Returns 2-d ndarray with colorbar image.
void PSQt::setPixmapForLabel (const QImage &image, QPixmap *&pixmap, QLabel *&label)
 Sets image as a pixmap for label.
int PSQt::string_to_int (const std::string &str)
void PSQt::print_font_status (const QFont &font)
template<typename T>
std::string PSQt::val_to_string (const T &v, const unsigned &prec=0)
void PSQt::set_pen (QPen &pen, const std::string &opt)
void PSQt::set_brush (QBrush &brush, const std::string &opt)
void PSQt::set_pen_brush (QPen &pen, QBrush &brush, const std::string &opt)
QGraphicsPathItem * PSQt::graph (QGraphicsScene *scene, const float *x, const float *y, const int n=1, const std::string &opt=std::string("-bT"))
QGraphicsPathItem * PSQt::graph (QGraphicsView *view, const float *x, const float *y, const int n=1, const std::string &opt=std::string("-bT"))
QGraphicsPathItem * PSQt::hist (QGraphicsScene *scene, const float *x, const float *y, const int n=1, const std::string &opt=std::string("-bT"))
QGraphicsPathItem * PSQt::hist (QGraphicsView *view, const float *x, const float *y, const int n=1, const std::string &opt=std::string("-bT"))
bool PSQt::is_file (const std::string &path)
bool PSQt::is_directory (const std::string &path)
bool PSQt::is_link (const std::string &path)
bool PSQt::dir_exists (const std::string &dir)
 check if directory exists
bool PSQt::file_exists (const std::string &fname)
 check if file exists
bool PSQt::path_exists (const std::string &path)
std::string PSQt::basename (const std::string &path)
std::string PSQt::dirname (const std::string &path)
std::string PSQt::split_string_left (const std::string &s, size_t &pos, const char &sep)
void PSQt::splitext (const std::string &path, std::string &root, std::string &ext)
std::string PSQt::stringTimeStamp (const std::string &format=std::string("%Y-%m-%d-%H:%M:%S"))
std::string PSQt::getFileNameWithTStamp (const std::string &fname)
std::string PSQt::getGeometryFileName (const std::string &fname="geometry.txt", const bool &add_tstamp=true)
template<typename T>
void PSQt::getMinMax (const ndarray< T, 2 > &nda, float &vmin, float &vmax)
template<typename T>
void PSQt::getAveRms (const ndarray< T, 2 > &nda, double &ave, double &rms)
template<typename T>
ndarray< uint32_t, 2 > PSQt::getUint32NormalizedImage (const ndarray< T, 2 > &dnda, const float &amin=0, const float &amax=0, const unsigned &ncolors=0, const float &hue1=-120, const float &hue2=-360)


Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7