- if (role != Qt::DisplayRole)
- return QVariant();
-
- // TODO: how to diff between the two table views (no index?)
-
- if (orientation == Qt::Horizontal)
- if (section >= 0 && section <= 8)
- return QString("%1").arg(section+1);
- else if (section == 9)
- return QString(""); // was: I/O
- else
- return QString(""); // was: Tot
- else {
- switch(section) {
- case ROW_PAR:
- case ROW_PAR_2:
- return QString("Par");
- case ROW_HCP:
- case ROW_HCP_2:
- return QString("HCP");
- case ROW_SCORE:
- case ROW_SCORE_2:
- return QString("Score");
- }
+ // Only vertical header -- horizontal is hidden
+ if (orientation == Qt::Horizontal)
+ return QVariant();
+
+#if 1
+ if (role == Qt::BackgroundRole) {
+ QColor colorHoleBg(Qt::darkGray);
+ QBrush brush(colorHoleBg);
+ return brush;
+ }
+#endif
+ if (role == Qt::DisplayRole) {
+ switch(section) {
+ case ROW_PAR:
+ case ROW_PAR_2:
+ return QString("Par");
+ case ROW_HCP:
+ case ROW_HCP_2:
+ return QString("HCP");
+ case ROW_SCORE:
+ case ROW_SCORE_2:
+ return QString("Score");