diff ui/administratorwindow.cpp @ 348:e6aa82466420

Use the table item delegate for certificates and make the model editable.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 10 Apr 2014 14:14:56 +0200
parents 4454a4dc73a3
children 9ba7b4b4c1de
line wrap: on
line diff
--- a/ui/administratorwindow.cpp	Thu Apr 10 14:13:34 2014 +0200
+++ b/ui/administratorwindow.cpp	Thu Apr 10 14:14:56 2014 +0200
@@ -15,6 +15,8 @@
 #include <QHeaderView>
 #include <QFileDialog>
 
+#include "certificatetabledelegate.h"
+
 AdministratorWindow::AdministratorWindow() {
     createActions();
     createMenuBar();
@@ -61,8 +63,10 @@
     QGroupBox *certBox = new QGroupBox(tr("Managed Certificates"));
     certificateView = new QTableView;
     certificateModel = new CertificateTabelModel();
+    CertificateTableDelegate *delegate = new CertificateTableDelegate(certificateView);
     certificateView->setModel(certificateModel);
-    certificateView->setColumnWidth(0, 60);
+    certificateView->setItemDelegate(delegate);
+    certificateView->setColumnWidth(0, 50);
     certificateView->setColumnWidth(2, 130);
     certificateView->setColumnWidth(3, 130);
     certificateView->setColumnWidth(4, 200);

http://wald.intevation.org/projects/trustbridge/