Namespaces | Functions
color_names.cpp File Reference
#include "color_names.hpp"
#include <QRegularExpression>
Include dependency graph for color_names.cpp:

Go to the source code of this file.

Namespaces

 color_widgets
 

Functions

QColor color_widgets::colorFromString (const QString &string, bool alpha=true)
 Convert a string into a color. More...
 
static QRegularExpression regex_func_rgb (R"(^rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)$)")
 
static QRegularExpression regex_func_rgba (R"(^rgba?\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)$)")
 
static QRegularExpression regex_hex_rgba ("^#[[:xdigit:]]{8}$")
 
static QRegularExpression regex_qcolor ("^(?:(?:#[[:xdigit:]]{3})|(?:#[[:xdigit:]]{6})|(?:[[:alpha:]]+))$")
 
QString color_widgets::stringFromColor (const QColor &color, bool alpha=true)
 Convert a color into a string. More...
 

Detailed Description

Author
Mattia Basaglia

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file color_names.cpp.

Function Documentation

◆ regex_func_rgb()

static QRegularExpression regex_func_rgb ( R"(^\*\(\*[0-9]+s\s*  ,
\s *([0-9]+)\s ,
\s *([0-9]+)\s *\   
)
static

◆ regex_func_rgba()

static QRegularExpression regex_func_rgba ( R"(^?\*\(\*[0-9]+s\s*  ,
\s *([0-9]+)\s ,
\s *([0-9]+)\s ,
\s *([0-9]+)\s *\   
)
static

◆ regex_hex_rgba()

static QRegularExpression regex_hex_rgba ( "^#]{8}$"  [[:xdigit:])
static

◆ regex_qcolor()

static QRegularExpression regex_qcolor ( "^(?:(?:#[[:xdigit:]]{3})|(?:#[[:xdigit:]]{6})|(?:[[:alpha:]]+))$"  )
static


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:49