MEPP2 Project
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
Typedefs
a
c
e
f
h
i
m
p
r
s
t
v
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
m
n
o
p
q
r
s
t
v
w
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
w
x
Variables
c
d
e
f
i
l
m
n
o
p
r
s
t
v
Typedefs
a
c
e
f
g
h
i
k
l
m
n
o
p
r
t
v
w
Enumerations
Enumerator
Macros
_
a
b
c
h
i
m
n
o
p
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Visualization
Helpers
QtHelpers.cpp
Go to the documentation of this file.
1
// Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2
// All rights reserved.
3
//
4
// This file is part of MEPP2; you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published
6
// by the Free Software Foundation; either version 3 of the License,
7
// or (at your option) any later version.
8
//
9
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11
#include "
Visualization/Helpers/QtHelpers.h
"
12
13
void
14
FEVV::Helpers::changeBackgroundColor
(QWidget *_widget,
const
Color
&_color)
15
{
16
QPalette pal(_widget->palette());
17
pal.setColor(
18
QPalette::Background,
19
QColor(_color.
red
(), _color.
green
(), _color.
blue
(), _color.
alpha
()));
20
_widget->setAutoFillBackground(
true
);
21
_widget->setPalette(pal);
22
}
23
24
void
25
FEVV::Helpers::changeTextColor
(QWidget *_widget,
const
Color
&_color)
26
{
27
QPalette pal(_widget->palette());
28
pal.setColor(
29
QPalette::WindowText,
30
QColor(_color.
red
(), _color.
green
(), _color.
blue
(), _color.
alpha
()));
31
_widget->setAutoFillBackground(
true
);
32
_widget->setPalette(pal);
33
}
FEVV::Color::blue
void blue(const unsigned char _blueValue)
Definition:
Color.inl:94
FEVV::Helpers::changeBackgroundColor
void changeBackgroundColor(QWidget *_widget, const Color &_color)
Definition:
QtHelpers.cpp:14
FEVV::Color::alpha
void alpha(const unsigned char _alphaValue)
Definition:
Color.inl:101
FEVV::Color::green
void green(const unsigned char _greenValue)
Definition:
Color.inl:87
QtHelpers.h
FEVV::Helpers::changeTextColor
void changeTextColor(QWidget *_widget, const Color &_color)
Definition:
QtHelpers.cpp:25
FEVV::Color
Definition:
Color.hpp:18
FEVV::Color::red
void red(const unsigned char _redValue)
Definition:
Color.inl:80
Generated by
1.8.20