Bigger fonts in table-view
authorSakari Poussa <spoussa@gmail.com>
Thu, 27 May 2010 15:56:47 +0000 (18:56 +0300)
committerSakari Poussa <spoussa@gmail.com>
Thu, 27 May 2010 15:56:47 +0000 (18:56 +0300)
src/main-window.cpp
src/score-common.h
src/table-model.cpp

index d499d06..f028e39 100644 (file)
@@ -615,39 +615,39 @@ void MainWindow::deleteCourse()
 void MainWindow::viewStatistics()
 {
     TRACE;
-  QMainWindow *win = new QMainWindow(this);
-  QString title = "Statistics";
-  win->setWindowTitle(title);
+    QMainWindow *win = new QMainWindow(this);
+    QString title = "Statistics";
+    win->setWindowTitle(title);
 #ifdef Q_WS_MAEMO_5
-  win->setAttribute(Qt::WA_Maemo5StackedWindow);
+    win->setAttribute(Qt::WA_Maemo5StackedWindow);
 #endif
 
-  StatModel *model = new StatModel(clubList, scoreList);
+    StatModel *model = new StatModel(clubList, scoreList);
 
-  QTableView *table = new QTableView;
-  table->showGrid();
-  table->setSelectionMode(QAbstractItemView::NoSelection);
-  table->setStyleSheet(ScoreStyle::style());
-  table->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
-  table->verticalHeader()->setResizeMode(QHeaderView::Stretch);
-  table->verticalHeader()->setAutoFillBackground(true);
-  table->setModel(model);
+    QTableView *table = new QTableView;
+    table->showGrid();
+    table->setSelectionMode(QAbstractItemView::NoSelection);
+    table->setStyleSheet(ScoreStyle::style());
+    table->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
+    table->verticalHeader()->setResizeMode(QHeaderView::Stretch);
+    table->verticalHeader()->setAutoFillBackground(true);
+    table->setModel(model);
 
-  QWidget *central = new QWidget(win);
-  win->setCentralWidget(central);
+    QWidget *central = new QWidget(win);
+    win->setCentralWidget(central);
 
-  QTextEdit *textEdit = new QTextEdit;
+    QTextEdit *textEdit = new QTextEdit;
 
-  textEdit->setReadOnly(true);
+    textEdit->setReadOnly(true);
 
-  QVBoxLayout *infoLayout = new QVBoxLayout;
-  infoLayout->addWidget(table);
+    QVBoxLayout *infoLayout = new QVBoxLayout;
+    infoLayout->addWidget(table);
 
-  QHBoxLayout *mainLayout = new QHBoxLayout(central);
-  mainLayout->addLayout(infoLayout);
-  central->setLayout(mainLayout);
+    QHBoxLayout *mainLayout = new QHBoxLayout(central);
+    mainLayout->addLayout(infoLayout);
+    central->setLayout(mainLayout);
 
-  win->show();
+    win->show();
 }
 
 void MainWindow::viewSettings()
index e94bf22..149308d 100644 (file)
@@ -68,12 +68,11 @@ public:
                          "color : gray;"
                          "border: solid green;"
                          "font-size : 20px;"
-                         "font-style : italic;"
                        "}"
                        "QHeaderView::section {"
                          "color : white;"
                          "border: solid green;"
-                         "font: bold italic large;"
+                         "font: bold large;"
                        "}");
 
 #if 0
index 30d2909..649949c 100644 (file)
@@ -121,17 +121,12 @@ QVariant ScoreTableModel::data(const QModelIndex &index, int role) const
   // FONT
   //
   if (role == Qt::FontRole) {
-      if (row == ROW_HOLE || row == ROW_HOLE_2) {
-          QFont font;
-          font.setBold(true);
-          return font;
-      }
-      if (row == ROW_SCORE || row == ROW_SCORE_2) {
-          QFont font;
-          font.setBold(true);
-          return font;
-      }
+      QFont font;
+      font.setBold(true);
+      font.setPointSize(26);
+      return font;
   }
+
   //
   // NUMBERS
   //