make order of event columns more logical
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 13 Dec 2008 21:08:31 +0000 (21:08 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 13 Dec 2008 21:08:31 +0000 (21:08 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@213 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

src/overview.cpp

index 5029b9d..645717f 100644 (file)
@@ -343,7 +343,7 @@ void MOverview::updateEvents()
        QList<MEvent>evl=req->getAllEvents();
        eventmodel->clear();
        eventmodel->insertColumns(0,6);
-       eventmodel->setHorizontalHeaderLabels(QStringList()<<tr("Start Time")<<tr("Title")<<tr("Capacity")<<tr("Sold")<<tr("Reserved")<<tr("Free"));
+       eventmodel->setHorizontalHeaderLabels(QStringList()<<tr("Start Time")<<tr("Title")<<tr("Free")<<tr("Reserved")<<tr("Sold")<<tr("Capacity"));
        QDateTime now=QDateTime::currentDateTime();
        for(int i=0,j=0;i<evl.size();i++){
                QDateTime stime=QDateTime::fromTime_t(evl[i].startTime());
@@ -352,10 +352,10 @@ void MOverview::updateEvents()
                eventmodel->setData(eventmodel->index(j,0),evl[i].eventId(),Qt::UserRole);
                eventmodel->setData(eventmodel->index(j,0),stime.toString(tr("ddd MMMM d yyyy, h:mm ap","time format")));
                eventmodel->setData(eventmodel->index(j,1),evl[i].title());
-               eventmodel->setData(eventmodel->index(j,2),evl[i].capacity());
-               eventmodel->setData(eventmodel->index(j,3),evl[i].amountSold());
-               eventmodel->setData(eventmodel->index(j,4),evl[i].amountReserved());
-               eventmodel->setData(eventmodel->index(j,5),evl[i].capacity()-evl[i].amountSold()-evl[i].amountReserved());
+               eventmodel->setData(eventmodel->index(j,2),evl[i].capacity()-evl[i].amountSold()-evl[i].amountReserved());
+               eventmodel->setData(eventmodel->index(j,3),evl[i].amountReserved());
+               eventmodel->setData(eventmodel->index(j,4),evl[i].amountSold());
+               eventmodel->setData(eventmodel->index(j,5),evl[i].capacity());
                j++;
        }
        eventtable->resizeColumnsToContents();