DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dbe::StyleUtility Class Reference

#include <StyleUtility.hpp>

Public Member Functions

 StyleUtility ()

Static Public Member Functions

static void InitColorManagement ()

Static Public Attributes

static QColor TableColorAttribute
 Including DBE.
static QColor TableAttributeBackground
static QColor TableColorRelationship
static QColor TableRelationshipBackground
static QColor DefaultValueBackground
static QColor FileReadOnlyForeground
static QColor FileReadOnlyBackground
static QColor ObjectForeground
static QColor ObjectBackground
static QPalette AlertStatusBarPallete
static QPalette AlertStatusBarPalleteWindow
static QPalette WarningStatusBarPallete
static QPalette WarningStatusBarPalleteWindow
static QPalette PaleGreenPalleteButton
static QPalette LoadedDefault

Detailed Description

Definition at line 17 of file StyleUtility.hpp.

Constructor & Destructor Documentation

◆ StyleUtility()

dbe::StyleUtility::StyleUtility ( )

Member Function Documentation

◆ InitColorManagement()

void dbe::StyleUtility::InitColorManagement ( )
static

Definition at line 31 of file StyleUtility.cpp.

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
63 settings.beginGroup("readonly");
64 if (!settings.contains("background")) {
65 settings.setValue("background", QColor(Qt::lightGray));
66 }
67 if (!settings.contains("foreground")) {
68 settings.setValue("foreground", QColor(Qt::darkRed));
69 }
70 FileReadOnlyForeground = settings.value("foreground").value<QColor>();
71 FileReadOnlyBackground = settings.value("background").value<QColor>();
72 settings.endGroup();
73
74 settings.beginGroup("object");
75 if (!settings.contains("foreground")) {
76 settings.setValue("foreground", QColor(Qt::blue));
77 }
78 if (!settings.contains("background")) {
79 settings.setValue("background", QColor(Qt::white));
80 }
81 ObjectForeground = settings.value("foreground").value<QColor>();
82 ObjectBackground = settings.value("background").value<QColor>();
83 settings.endGroup();
84
85
86 AlertStatusBarPallete.setColor ( QPalette::Active, QPalette::Base, QColor ( "red" ) );
87 AlertStatusBarPallete.setColor ( QPalette::Inactive, QPalette::Base, QColor ( "red" ) );
88 WarningStatusBarPallete.setColor ( QPalette::Active, QPalette::Base, QColor ( "yellow" ) );
89 WarningStatusBarPallete.setColor ( QPalette::Inactive, QPalette::Base,
90 QColor ( "yellow" ) );
91 AlertStatusBarPalleteWindow.setColor ( QPalette::Active, QPalette::Window,
92 QColor ( "red" ) );
93 AlertStatusBarPalleteWindow.setColor ( QPalette::Inactive, QPalette::Window,
94 QColor ( "red" ) );
95 WarningStatusBarPalleteWindow.setColor ( QPalette::Active, QPalette::Window,
96 QColor ( "yellow" ) );
97 WarningStatusBarPalleteWindow.setColor ( QPalette::Inactive, QPalette::Window,
98 QColor ( "yellow" ) );
99 LoadedDefault.setColor ( QPalette::Active, QPalette::Base, DefaultValueBackground );
100 LoadedDefault.setColor ( QPalette::Inactive, QPalette::Base, DefaultValueBackground );
101
102 PaleGreenPalleteButton.setColor ( QPalette::Active, QPalette::Button,
103 QColor::fromRgb ( 190, 238, 158 ) );
104 PaleGreenPalleteButton.setColor ( QPalette::Inactive, QPalette::Button,
105 QColor::fromRgb ( 190, 238, 158 ) );
106}
static QPalette PaleGreenPalleteButton
static QColor ObjectForeground
static QPalette AlertStatusBarPalleteWindow
static QColor TableRelationshipBackground
static QColor FileReadOnlyForeground
static QPalette AlertStatusBarPallete
static QColor TableColorAttribute
Including DBE.
static QPalette LoadedDefault
static QPalette WarningStatusBarPalleteWindow
static QPalette WarningStatusBarPallete
static QColor TableAttributeBackground
static QColor DefaultValueBackground
static QColor TableColorRelationship
static QColor ObjectBackground
static QColor FileReadOnlyBackground

Member Data Documentation

◆ AlertStatusBarPallete

QPalette dbe::StyleUtility::AlertStatusBarPallete
static

Definition at line 36 of file StyleUtility.hpp.

◆ AlertStatusBarPalleteWindow

QPalette dbe::StyleUtility::AlertStatusBarPalleteWindow
static

Definition at line 37 of file StyleUtility.hpp.

◆ DefaultValueBackground

QColor dbe::StyleUtility::DefaultValueBackground
static

Definition at line 28 of file StyleUtility.hpp.

◆ FileReadOnlyBackground

QColor dbe::StyleUtility::FileReadOnlyBackground
static

Definition at line 31 of file StyleUtility.hpp.

◆ FileReadOnlyForeground

QColor dbe::StyleUtility::FileReadOnlyForeground
static

Definition at line 30 of file StyleUtility.hpp.

◆ LoadedDefault

QPalette dbe::StyleUtility::LoadedDefault
static

Definition at line 41 of file StyleUtility.hpp.

◆ ObjectBackground

QColor dbe::StyleUtility::ObjectBackground
static

Definition at line 34 of file StyleUtility.hpp.

◆ ObjectForeground

QColor dbe::StyleUtility::ObjectForeground
static

Definition at line 33 of file StyleUtility.hpp.

◆ PaleGreenPalleteButton

QPalette dbe::StyleUtility::PaleGreenPalleteButton
static

Definition at line 40 of file StyleUtility.hpp.

◆ TableAttributeBackground

QColor dbe::StyleUtility::TableAttributeBackground
static

Definition at line 23 of file StyleUtility.hpp.

◆ TableColorAttribute

QColor dbe::StyleUtility::TableColorAttribute
static

Including DBE.

Definition at line 22 of file StyleUtility.hpp.

◆ TableColorRelationship

QColor dbe::StyleUtility::TableColorRelationship
static

Definition at line 25 of file StyleUtility.hpp.

◆ TableRelationshipBackground

QColor dbe::StyleUtility::TableRelationshipBackground
static

Definition at line 26 of file StyleUtility.hpp.

◆ WarningStatusBarPallete

QPalette dbe::StyleUtility::WarningStatusBarPallete
static

Definition at line 38 of file StyleUtility.hpp.

◆ WarningStatusBarPalleteWindow

QPalette dbe::StyleUtility::WarningStatusBarPalleteWindow
static

Definition at line 39 of file StyleUtility.hpp.


The documentation for this class was generated from the following files: