![]() |
Sayonara Player
|
Helper functions. More...
Namespaces | |
File | |
FileUtils functions. | |
Language | |
language namespace | |
Classes | |
class | Image |
The Image class. More... | |
class | Set |
A set structure. Inherited from std::set with some useful methods. For integer and String this set is ordered. More... | |
class | Tree |
The Tree class. More... | |
Typedefs | |
using | Extensions = uint16_t |
Enumerations | |
enum | SaveAsAnswer { Success, InvalidName, NotStorable, NameAlreadyThere, InvalidObject, OtherError } |
enum | Extension { Soundfile =1<<0, Playlist =1<<1, Podcast =1<<2, Haltdeimaul =1<<3 } |
Functions | |
template<typename TINT , typename T > | |
std::enable_if< std::is_pointer< T >::value, bool >::type | between (TINT idx, const T &cont) |
template<typename TINT , typename T > | |
std::enable_if< std::is_class< T >::value, bool >::type | between (TINT idx, const T &cont) |
template<typename TINT > | |
std::enable_if< std::is_integral< TINT >::value, bool >::type | between (TINT idx, TINT max) |
uint64_t | current_date_to_int () |
uint64_t | date_to_int (const QDateTime &date) |
QDateTime | int_to_date (uint64_t date) |
QString | cvt_str_to_first_upper (const QString &str) |
Transform all letters after a space to upper case. More... | |
QString | cvt_str_to_very_first_upper (const QString &str) |
Transform only first letter to upper case. More... | |
QString | cvt_ms_to_string (MilliSeconds msec, const QString &format) |
Convert milliseconds to string. More... | |
QString | cvt_not_null (const QString &str) |
QString | sayonara_path () |
get sayonara path in home directory More... | |
QString | sayonara_path (const QString &append_path) |
QString | share_path () |
get share path of sayonara More... | |
QString | share_path (const QString &append_path) |
QString | lib_path () |
get library path of sayonara More... | |
QString | lib_path (const QString &append_path) |
QString | create_link (const QString &name, bool dark=true, bool underline=true) |
create a link string More... | |
QString | create_link (const QString &name, bool dark, bool underline, const QString &target) |
QStringList | soundfile_extensions (bool with_asterisk=true) |
get all supported sound file extensions More... | |
QString | soundfile_filter () |
get filter for file reader or file chooser More... | |
QStringList | playlist_extensions (bool with_asterisk=true) |
get all supported playlist file extensions More... | |
QStringList | podcast_extensions (bool with_asterisk=true) |
get all supported podcast file extensions More... | |
QStringList | image_extensions (bool with_asterisk=true) |
QString | get_file_filter (Extensions extensions, const QString &name) |
get filter for file chooser dialog based on extensions More... | |
int | random_number (int min, int max) |
get a random val between min max More... | |
QString | random_string (int max_chars) |
QString | easy_tag_finder (const QString &tag, const QString &xml_doc) |
gets value out of tag More... | |
QByteArray | calc_hash (const QByteArray &data) |
calculate a md5 hashsum More... | |
void | sleep_ms (uint64_t ms) |
sleep More... | |
QStringList | ip_addresses () |
get all ip addresses of the host More... | |
QByteArray | cvt_pixmap_to_bytearray (const QPixmap &pm) |
QPixmap | cvt_bytearray_to_pixmap (const QByteArray &arr) |
void | set_environment (const QString &key, const QString &value) |
set an environment variable. This function is platform independent More... | |
void | unset_environment (const QString &key) |
QString | get_environment (const char *key) |
Helper functions.
QByteArray Util::calc_hash | ( | const QByteArray & | data | ) |
calculate a md5 hashsum
data | input data |
QString Util::create_link | ( | const QString & | name, |
bool | dark = true , |
||
bool | underline = true |
||
) |
create a link string
name | appearing name in link |
target | target url (if not given, name is taken) |
underline | if link should be underlined |
QString Util::cvt_ms_to_string | ( | MilliSeconds | msec, |
const QString & | format | ||
) |
Convert milliseconds to string.
msec | milliseconds | |
format | $D | for days, $H for hours, $M for minutes $S for secods, A little 'e' behind the number will result in the unit displayed after the string |
QString Util::cvt_str_to_first_upper | ( | const QString & | str | ) |
Transform all letters after a space to upper case.
str | input string |
QString Util::cvt_str_to_very_first_upper | ( | const QString & | str | ) |
Transform only first letter to upper case.
str | input string |
QString Util::easy_tag_finder | ( | const QString & | tag, |
const QString & | xml_doc | ||
) |
gets value out of tag
tag | form: grandparent.parent.child |
xml_doc | content of the xml document |
QString Util::get_file_filter | ( | Extensions | extensions, |
const QString & | name | ||
) |
get filter for file chooser dialog based on extensions
extensions | disjunction of Extension |
name | name that should appear in the file dialog |
QStringList Util::ip_addresses | ( | ) |
get all ip addresses of the host
QString Util::lib_path | ( | ) |
get library path of sayonara
QStringList Util::playlist_extensions | ( | bool | with_asterisk = true | ) |
get all supported playlist file extensions
QStringList Util::podcast_extensions | ( | bool | with_asterisk = true | ) |
get all supported podcast file extensions
int Util::random_number | ( | int | min, |
int | max | ||
) |
get a random val between min max
min | minimum included value |
max | maximum included value |
QString Util::sayonara_path | ( | ) |
get sayonara path in home directory
void Util::set_environment | ( | const QString & | key, |
const QString & | value | ||
) |
set an environment variable. This function is platform independent
key | variable name |
value | variable value |
QString Util::share_path | ( | ) |
get share path of sayonara
void Util::sleep_ms | ( | uint64_t | ms | ) |
sleep
ms | milliseconds to sleep |
QStringList Util::soundfile_extensions | ( | bool | with_asterisk = true | ) |
get all supported sound file extensions
QString Util::soundfile_filter | ( | ) |
get filter for file reader or file chooser