changeset 10:0b291bd77de5

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 30 Mar 2017 15:36:37 +0300
parents 1f442052d332
children 4e8a960e3975
files main.cpp
diffstat 1 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main.cpp	Thu Mar 30 15:32:50 2017 +0300
+++ b/main.cpp	Thu Mar 30 15:36:37 2017 +0300
@@ -160,11 +160,15 @@
     QMainWindow(parent),
     ui(new Ui::SyntilistaMainWindow)
 {
+    // Setup UI
     ui->setupUi(this);
+
+    // Read config
+    readSettings();
+
     ui->edit_Amount->setValidator(new QDoubleValidator(0, 1000, 2, this));
 
-    readSettings();
-
+    // Setup person list filtering and sorting
     peopleSortIndex = 1;
     peopleSortOrder = Qt::AscendingOrder;
     peopleFilter = "";
@@ -179,11 +183,14 @@
     ui->tableview_People->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
     ui->tableview_People->setSortingEnabled(true);
 
-    connect(ui->tableview_People->selectionModel(),
+    connect(
+        ui->tableview_People->selectionModel(),
         SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
-        this, SLOT(selectedPersonChanged(const QModelIndex &, const QModelIndex &)));
+        this,
+        SLOT(selectedPersonChanged(const QModelIndex &, const QModelIndex &)));
 
-    connect(ui->tableview_People->horizontalHeader(),
+    connect(
+        ui->tableview_People->horizontalHeader(),
         SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)),
         this,
         SLOT(updateSortOrder(int, Qt::SortOrder)));