DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
src
internal
StyleUtility.cpp
Go to the documentation of this file.
1
// DUNE DAQ modification notice:
2
// This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
3
// Fork baseline commit: dbe-02-12-17 (2022-05-12).
4
// Renamed since fork: no.
5
7
#include "
dbe/StyleUtility.hpp
"
8
9
QColor
dbe::StyleUtility::TableColorAttribute
;
10
QColor
dbe::StyleUtility::TableAttributeBackground
;
11
12
QColor
dbe::StyleUtility::FileReadOnlyForeground
;
13
QColor
dbe::StyleUtility::FileReadOnlyBackground
;
14
15
QColor
dbe::StyleUtility::TableColorRelationship
;
16
QColor
dbe::StyleUtility::TableRelationshipBackground
;
17
18
QColor
dbe::StyleUtility::ObjectForeground
;
19
QColor
dbe::StyleUtility::ObjectBackground
;
20
21
QColor
dbe::StyleUtility::DefaultValueBackground
;
22
23
QPalette
dbe::StyleUtility::AlertStatusBarPallete
;
24
QPalette
dbe::StyleUtility::AlertStatusBarPalleteWindow
;
25
QPalette
dbe::StyleUtility::WarningStatusBarPallete
;
26
QPalette
dbe::StyleUtility::WarningStatusBarPalleteWindow
;
27
QPalette
dbe::StyleUtility::PaleGreenPalleteButton
;
28
QPalette
dbe::StyleUtility::LoadedDefault
;
29
30
void
31
dbe::StyleUtility::InitColorManagement
()
32
{
33
QSettings settings;
34
35
settings.beginGroup(
"attribute"
);
36
if
(!settings.contains(
"foreground"
)) {
37
settings.setValue(
"foreground"
, QColor(
"#1B676B"
));
38
}
39
if
(!settings.contains(
"background"
)) {
40
settings.setValue(
"background"
, QColor(
"#ffffff"
));
41
}
42
if
(!settings.contains(
"default-background"
)) {
43
settings.setValue(
"default-background"
, QColor(
"#b8f4ff"
));
44
}
45
46
DefaultValueBackground
= settings.value(
"default-background"
).value<QColor>();
47
TableColorAttribute
= settings.value(
"foreground"
).value<QColor>();
48
TableAttributeBackground
= settings.value(
"background"
).value<QColor>();
49
settings.endGroup();
50
51
settings.beginGroup(
"relationship"
);
52
if
(!settings.contains(
"foreground"
)) {
53
settings.setValue(
"foreground"
, QColor(
"#AD4713"
));
54
}
55
if
(!settings.contains(
"background"
)) {
56
settings.setValue(
"background"
, QColor(Qt::white));
57
}
58
TableColorRelationship
= settings.value(
"foreground"
).value<QColor>();
59
TableRelationshipBackground
= settings.value(
"background"
).value<QColor>();
60
settings.endGroup();
61
62
settings.beginGroup(
"readonly"
);
63
if
(!settings.contains(
"background"
)) {
64
settings.setValue(
"background"
, QColor(Qt::lightGray));
65
}
66
if
(!settings.contains(
"foreground"
)) {
67
settings.setValue(
"foreground"
, QColor(Qt::darkRed));
68
}
69
FileReadOnlyForeground
= settings.value(
"foreground"
).value<QColor>();
70
FileReadOnlyBackground
= settings.value(
"background"
).value<QColor>();
71
settings.endGroup();
72
73
settings.beginGroup(
"object"
);
74
if
(!settings.contains(
"foreground"
)) {
75
settings.setValue(
"foreground"
, QColor(Qt::blue));
76
}
77
if
(!settings.contains(
"background"
)) {
78
settings.setValue(
"background"
, QColor(Qt::white));
79
}
80
ObjectForeground
= settings.value(
"foreground"
).value<QColor>();
81
ObjectBackground
= settings.value(
"background"
).value<QColor>();
82
settings.endGroup();
83
84
AlertStatusBarPallete
.setColor(QPalette::Active, QPalette::Base, QColor(
"red"
));
85
AlertStatusBarPallete
.setColor(QPalette::Inactive, QPalette::Base, QColor(
"red"
));
86
WarningStatusBarPallete
.setColor(QPalette::Active, QPalette::Base, QColor(
"yellow"
));
87
WarningStatusBarPallete
.setColor(QPalette::Inactive, QPalette::Base, QColor(
"yellow"
));
88
AlertStatusBarPalleteWindow
.setColor(QPalette::Active, QPalette::Window, QColor(
"red"
));
89
AlertStatusBarPalleteWindow
.setColor(QPalette::Inactive, QPalette::Window, QColor(
"red"
));
90
WarningStatusBarPalleteWindow
.setColor(QPalette::Active, QPalette::Window, QColor(
"yellow"
));
91
WarningStatusBarPalleteWindow
.setColor(QPalette::Inactive, QPalette::Window, QColor(
"yellow"
));
92
LoadedDefault
.setColor(QPalette::Active, QPalette::Base,
DefaultValueBackground
);
93
LoadedDefault
.setColor(QPalette::Inactive, QPalette::Base,
DefaultValueBackground
);
94
95
PaleGreenPalleteButton
.setColor(QPalette::Active, QPalette::Button, QColor::fromRgb(190, 238, 158));
96
PaleGreenPalleteButton
.setColor(QPalette::Inactive, QPalette::Button, QColor::fromRgb(190, 238, 158));
97
}
StyleUtility.hpp
dbe::StyleUtility::PaleGreenPalleteButton
static QPalette PaleGreenPalleteButton
Definition
StyleUtility.hpp:39
dbe::StyleUtility::ObjectForeground
static QColor ObjectForeground
Definition
StyleUtility.hpp:32
dbe::StyleUtility::AlertStatusBarPalleteWindow
static QPalette AlertStatusBarPalleteWindow
Definition
StyleUtility.hpp:36
dbe::StyleUtility::TableRelationshipBackground
static QColor TableRelationshipBackground
Definition
StyleUtility.hpp:25
dbe::StyleUtility::InitColorManagement
static void InitColorManagement()
Definition
StyleUtility.cpp:31
dbe::StyleUtility::FileReadOnlyForeground
static QColor FileReadOnlyForeground
Definition
StyleUtility.hpp:29
dbe::StyleUtility::AlertStatusBarPallete
static QPalette AlertStatusBarPallete
Definition
StyleUtility.hpp:35
dbe::StyleUtility::TableColorAttribute
static QColor TableColorAttribute
Including DBE.
Definition
StyleUtility.hpp:21
dbe::StyleUtility::LoadedDefault
static QPalette LoadedDefault
Definition
StyleUtility.hpp:40
dbe::StyleUtility::WarningStatusBarPalleteWindow
static QPalette WarningStatusBarPalleteWindow
Definition
StyleUtility.hpp:38
dbe::StyleUtility::WarningStatusBarPallete
static QPalette WarningStatusBarPallete
Definition
StyleUtility.hpp:37
dbe::StyleUtility::TableAttributeBackground
static QColor TableAttributeBackground
Definition
StyleUtility.hpp:22
dbe::StyleUtility::DefaultValueBackground
static QColor DefaultValueBackground
Definition
StyleUtility.hpp:27
dbe::StyleUtility::TableColorRelationship
static QColor TableColorRelationship
Definition
StyleUtility.hpp:24
dbe::StyleUtility::ObjectBackground
static QColor ObjectBackground
Definition
StyleUtility.hpp:33
dbe::StyleUtility::FileReadOnlyBackground
static QColor FileReadOnlyBackground
Definition
StyleUtility.hpp:30
Generated on
for DUNE-DAQ by
1.18.0