make tables look nicer
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 15 Nov 2008 16:59:29 +0000 (16:59 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 15 Nov 2008 16:59:29 +0000 (16:59 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@185 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

src/overview.cpp

index 9085731..f449073 100644 (file)
@@ -413,8 +413,7 @@ void MOverview::updateUsers()
                usermodel->setData(usermodel->index(i,0),usl[i].userId());
                usermodel->setData(usermodel->index(i,1),usl[i].description());
        }
-       usertable->resizeColumnToContents(0);
-       usertable->resizeColumnToContents(1);
+       usertable->resizeColumnsToContents();
 }
 
 void MOverview::newUser()
@@ -554,8 +553,7 @@ void MOverview::updateHosts()
                if(thisHost==hsl[i].hostId())
                        foundThis=true;
        }
-       hosttable->resizeColumnToContents(0);
-       hosttable->resizeColumnToContents(1);
+       hosttable->resizeColumnsToContents();
        thishostbutton->setEnabled(!foundThis && req->hasRole("addhost"));
 }
 
@@ -722,9 +720,7 @@ void MOverview::eventOrderTicket()
        cartmodel->setData(cartmodel->index(cr,0),id,Qt::UserRole);
        cartmodel->setData(cartmodel->index(cr,1),eventmodel->data(eventmodel->index(ilst[0].row(),1)));
        cartmodel->setData(cartmodel->index(cr,2),eventmodel->data(eventmodel->index(ilst[0].row(),0)));
-       carttable->resizeColumnToContents(0);
-       carttable->resizeColumnToContents(1);
-       carttable->resizeColumnToContents(2);
+       carttable->resizeColumnsToContents();
 }
 
 void MOverview::initCart()
@@ -760,8 +756,7 @@ void MOverview::cartAddTicket()
        vl->addWidget(tv=new QTableView,10);
        tv->setModel(eventmodel);
        tv->setEditTriggers(QAbstractItemView::NoEditTriggers);
-       tv->resizeColumnToContents(0);
-       tv->resizeColumnToContents(1);
+       tv->resizeColumnsToContents();
        vl->addSpacing(15);
        vl->addLayout(hl=new QHBoxLayout,0);
        hl->addStretch(10);
@@ -785,9 +780,7 @@ void MOverview::cartAddTicket()
                cartmodel->setData(cartmodel->index(cr,0),id,Qt::UserRole);
                cartmodel->setData(cartmodel->index(cr,1),eventmodel->data(eventmodel->index(idx.row(),1)));
                cartmodel->setData(cartmodel->index(cr,2),eventmodel->data(eventmodel->index(idx.row(),0)));
-               carttable->resizeColumnToContents(0);
-               carttable->resizeColumnToContents(1);
-               carttable->resizeColumnToContents(2);
+               carttable->resizeColumnsToContents();
        }
 }
 
@@ -965,6 +958,7 @@ void MOverview::updateOrders()
                                ordermodel->setData(ordermodel->index(cl,3),cust[j].name());
                cl++;
        }
+       ordertable->resizeColumnsToContents();
 }
 
 void MOverview::orderDetails()