##// END OF EJS Templates
Events sorting
trabillard -
r1104:f5866d36a0ad
parent child
Show More
@@ -51,22 +51,23 void CatalogueEventsWidget::populateWithCatalogue(const QString &catalogue)
51
51
52 // TODO
52 // TODO
53 impl->addEventItem(
53 impl->addEventItem(
54 {catalogue + " - Event 1", "12/12/2012 12:12", "12/12/2042 12:42", "cloud", "mfi/b_gse"},
54 {catalogue + " - Event 1", "12/12/2012 12:12", "12/12/2042 12:52", "cloud", "mfi/b_gse42"},
55 ui->tableWidget);
55 ui->tableWidget);
56 impl->addEventItem(
56 impl->addEventItem(
57 {catalogue + " - Event 2", "12/12/2012 12:12", "12/12/2042 12:42", "cloud", "mfi/b_gse"},
57 {catalogue + " - Event 2", "12/12/2012 12:10", "12/12/2042 12:42", "Acloud", "mfi/b_gse1"},
58 ui->tableWidget);
58 ui->tableWidget);
59 impl->addEventItem(
59 impl->addEventItem(
60 {catalogue + " - Event 3", "12/12/2012 12:12", "12/12/2042 12:42", "cloud", "mfi/b_gse"},
60 {catalogue + " - Event 3", "12/12/2012 12:22", "12/12/2042 12:12", "Gcloud", "mfi/b_gse2"},
61 ui->tableWidget);
61 ui->tableWidget);
62 impl->addEventItem(
62 impl->addEventItem(
63 {catalogue + " - Event 4", "12/12/2012 12:12", "12/12/2042 12:42", "cloud", "mfi/b_gse"},
63 {catalogue + " - Event 4", "12/12/2012 12:00", "12/12/2042 12:62", "Bcloud", "mfi/b_gse3"},
64 ui->tableWidget);
64 ui->tableWidget);
65 }
65 }
66
66
67 void CatalogueEventsWidget::CatalogueEventsWidgetPrivate::addEventItem(const QStringList &data,
67 void CatalogueEventsWidget::CatalogueEventsWidgetPrivate::addEventItem(const QStringList &data,
68 QTableWidget *tableWidget)
68 QTableWidget *tableWidget)
69 {
69 {
70 tableWidget->setSortingEnabled(false);
70 auto row = tableWidget->rowCount();
71 auto row = tableWidget->rowCount();
71 tableWidget->setRowCount(row + 1);
72 tableWidget->setRowCount(row + 1);
72
73
@@ -75,4 +76,5 void CatalogueEventsWidget::CatalogueEventsWidgetPrivate::addEventItem(const QSt
75 item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
76 item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
76 tableWidget->setItem(row, i, item);
77 tableWidget->setItem(row, i, item);
77 }
78 }
79 tableWidget->setSortingEnabled(true);
78 }
80 }
General Comments 0
You need to be logged in to leave comments. Login now