Bigger fonts in table-view
[scorecard] / src / score-common.h
1 /*
2  * Copyright (C) 2009 Sakari Poussa
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, version 2.
7  */
8 #ifndef SCORE_COMMON_H
9 #define SCORE_COMMON_H
10
11 #if 0
12 #define SC_BLUE_THEME
13
14 QColor colorHoleBg(64, 64, 64);
15 QColor colorHoleFg(Qt::yellow);
16 QColor colorBirdie(00, 0x99, 00);
17 QColor colorPar(Qt::black);
18 #ifdef SC_ORANGE_THEME
19 QColor colorBogey(0xfc, 0xaf, 0x3e);
20 QColor colorDoubleBogey(0xf5, 0x79, 0x00);
21 QColor colorBad(0xce, 0x5c, 0x00);
22 #endif
23 #ifdef SC_BLUE_THEME
24 QColor colorBogey(0x20, 0x4a, 0x87);
25 QColor colorDoubleBogey(0x34, 0x65, 0xa4);
26 QColor colorBad(0x72, 0x9f, 0xcf);
27 #endif
28 QColor colorSubTotal(Qt::black);
29 QColor colorTotal(Qt::black);
30 #endif
31 #include <QColor>
32
33 #ifndef WANT_DEBUG
34 #define TRACE
35 #else
36 #include <QDebug>
37 #define TRACE qDebug()<<QString("[%1] %2(): %3").arg(__FILE__).arg(__func__).arg(__LINE__);
38 #endif
39
40
41 class AppSettings {
42 public:
43     QVariant hcp;
44     QVariant homeClub;
45     QVariant defaultCourses;
46 };
47
48 class ScoreColor
49 {
50  public:
51     static QColor holeBg()      { return Qt::white;                }
52     static QColor holeFg()      { return Qt::yellow;               }
53     static QColor birdie()      { return Qt::yellow;               }
54     static QColor par()         { return Qt::green;                }
55     static QColor bogey()       { return Qt::cyan;                 }
56     static QColor doubleBogey() { return Qt::red;                  }
57     static QColor bad()         { return Qt::red;                  }
58     static QColor subTotal()    { return Qt::white;                }
59     static QColor total()       { return Qt::white;                }
60 }; 
61
62 class ScoreStyle {
63 public:
64     static QString style()
65     {
66         return QString("QTableView {"
67                          "background-color: white;"
68                          "color : gray;"
69                          "border: solid green;"
70                          "font-size : 20px;"
71                        "}"
72                        "QHeaderView::section {"
73                          "color : white;"
74                          "border: solid green;"
75                          "font: bold large;"
76                        "}");
77
78 #if 0
79                        "QAbstractItemView::item[role=\"header\"]{"
80                          "background : orange;"
81                          "color : yellow;"
82                          "border: solid green;"
83                          "font-size : 16px;"
84                        "}"
85                        "QAbstractItemView::item"
86                          "background : orange;"
87                          "color : white;"
88                          "border: solid green;"
89                          "font-size : 16px;"
90                        "}"
91                        "QTableView {"
92                          "alternate-background-color: yellow;"
93                          "background-color: red;"
94                          "color : blue;"
95                          "border: solid green;"
96                          "gridline-color: green;"
97                        "}"
98
99 #endif
100     }
101     static QString headerView()
102     {
103         return QString("QHeaderView::section { background-color : #404040 }");
104         //return QString("QHeaderView { background-color : #404040 }");
105         return QString("QTableView { background-color : red }");
106     }
107 };
108
109 #endif