Cockatrice
2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Toggle main menu visibility
Loading...
Searching...
No Matches
home_tab_button_color.h
Go to the documentation of this file.
1
#ifndef COCKATRICE_HOME_TAB_BUTTON_COLOR_H
2
#define COCKATRICE_HOME_TAB_BUTTON_COLOR_H
3
4
#include <QList>
5
6
namespace
HomeTabButtonColor
7
{
8
12
enum
Source
13
{
14
FromThemeColors
,
15
FromBackground
,
16
};
17
18
struct
Entry
19
{
20
Source
source
;
21
const
char
*
trKey
;
22
};
23
24
inline
QList<Entry>
all
()
25
{
26
static
QList<Entry>
entries = {{
FromThemeColors
, QT_TR_NOOP(
"From theme colors"
)},
27
{
FromBackground
, QT_TR_NOOP(
"Extract from background"
)}};
28
29
return
entries;
30
}
31
38
inline
Source
intToSource
(
int
value)
39
{
40
if
(value >
FromBackground
) {
41
return
FromThemeColors
;
// default
42
}
43
44
return
static_cast<
Source
>
(value);
45
}
46
47
}
// namespace HomeTabButtonColor
48
49
#endif
// COCKATRICE_HOME_TAB_BUTTON_COLOR_H
QList
Definition
remote_connection_controller.h:20
HomeTabButtonColor
Definition
home_tab_button_color.h:7
HomeTabButtonColor::all
QList< Entry > all()
Definition
home_tab_button_color.h:24
HomeTabButtonColor::intToSource
Source intToSource(int value)
Definition
home_tab_button_color.h:38
HomeTabButtonColor::Source
Source
Where to get the colors for the home tab buttons from.
Definition
home_tab_button_color.h:13
HomeTabButtonColor::FromThemeColors
@ FromThemeColors
Use the theme's identity accent colors.
Definition
home_tab_button_color.h:14
HomeTabButtonColor::FromBackground
@ FromBackground
Extract colour from the background image.
Definition
home_tab_button_color.h:15
HomeTabButtonColor::Entry
Definition
home_tab_button_color.h:19
HomeTabButtonColor::Entry::trKey
const char * trKey
key for translation
Definition
home_tab_button_color.h:21
HomeTabButtonColor::Entry::source
Source source
Definition
home_tab_button_color.h:20
cockatrice
src
interface
widgets
general
home_tab_button_color.h
Generated by
1.18.0