All fonts are now bigger (20pt)
[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 #include <QColor>
12
13 #ifndef WANT_DEBUG
14 #define TRACE
15 #else
16 #include <QDebug>
17 #define TRACE qDebug()<<QString("[%1] %2(): %3").arg(__FILE__).arg(__func__).arg(__LINE__);
18 #endif
19
20 static int fontSize = 20;
21
22 class AppSettings {
23 public:
24     QVariant hcp;
25     QVariant homeClub;
26     QVariant defaultCourses;
27 };
28
29 class ScoreColor
30 {
31  public:
32     static QColor holeBg()      { return Qt::white;                }
33     static QColor holeFg()      { return Qt::yellow;               }
34     static QColor birdie()      { return Qt::yellow;               }
35     static QColor par()         { return Qt::green;                }
36     static QColor bogey()       { return Qt::cyan;                 }
37     static QColor doubleBogey() { return Qt::red;                  }
38     static QColor bad()         { return Qt::red;                  }
39     static QColor subTotal()    { return Qt::white;                }
40     static QColor total()       { return Qt::white;                }
41 }; 
42
43 static QString statStyleSheet("QTableView {color : white;}");
44 static QString defaultStyleSheet("QTableView {"
45                                  "background-color: white;"
46                                  "color : gray;"
47                                  "border: solid green;"
48                                  "}"
49                                  "QHeaderView::section {"
50                                  "color : white;"
51                                  "border: solid green;"
52                                  "}");
53 #if 0
54 "QAbstractItemView::item[role=\"header\"]{"
55 "background : orange;"
56 "color : yellow;"
57 "border: solid green;"
58 "font-size : 16px;"
59 "}"
60 "QAbstractItemView::item"
61 "background : orange;"
62 "color : white;"
63 "border: solid green;"
64 "font-size : 16px;"
65 "}"
66 "QTableView {"
67 "alternate-background-color: yellow;"
68 "background-color: red;"
69 "color : blue;"
70 "border: solid green;"
71 "gridline-color: green;"
72 "}"
73 #endif
74 #endif