From ebed836ee5d10659ae3d830704508f9c575181d3 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 7 Jun 2013 11:43:45 -0300 Subject: Created a new dialog - Edit DiveComputer Created a new dialog, Edit Divecomputer, it will currently only lists the divecomputers that are used on the xml file. I used the same method that the gtk version used, but only 2 divecomputers got visualized in the dirk dive data. I'll assume that it's correct and will fix it in the next couple of commits. Signed-off-by: Tomaz Canabrava --- qt-ui/divecomputermanagementdialog.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 qt-ui/divecomputermanagementdialog.cpp (limited to 'qt-ui/divecomputermanagementdialog.cpp') diff --git a/qt-ui/divecomputermanagementdialog.cpp b/qt-ui/divecomputermanagementdialog.cpp new file mode 100644 index 000000000..867ca2d49 --- /dev/null +++ b/qt-ui/divecomputermanagementdialog.cpp @@ -0,0 +1,22 @@ +#include "divecomputermanagementdialog.h" +#include "models.h" +#include "ui_divecomputermanagementdialog.h" + +DiveComputerManagementDialog::DiveComputerManagementDialog(QWidget* parent, Qt::WindowFlags f): QDialog(parent, f) +, ui( new Ui::DiveComputerManagementDialog()) +{ + ui->setupUi(this); + model = new DiveComputerModel(); + ui->tableView->setModel(model); +} + +DiveComputerManagementDialog* DiveComputerManagementDialog::instance() +{ + static DiveComputerManagementDialog *self = new DiveComputerManagementDialog(); + return self; +} + +void DiveComputerManagementDialog::update() +{ + model->update(); +} -- cgit v1.2.3-70-g09d2