diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-08-16 09:32:23 -0600 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-16 10:07:06 -0600 |
commit | 34fceb4a1ba8c9cffbcc02caf40961a65efa3db7 (patch) | |
tree | 5caf92855c3e42d43473447006a542f8206c42d2 /qt-ui/mainwindow.cpp | |
parent | dd49e3a9a92e3d1a1534a870e9e3b588845fb364 (diff) | |
download | subsurface-34fceb4a1ba8c9cffbcc02caf40961a65efa3db7.tar.gz |
Cut'n'paste for dive data: implement copy side
Admittedly not very useful without working paste, but it's progress.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 687fc778d..29212564b 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -114,6 +114,8 @@ MainWindow::MainWindow() : QMainWindow(), #ifdef NO_PRINTING ui.menuFile->removeAction(ui.actionPrint); #endif + memset(©PasteDive, 0, sizeof(copyPasteDive)); + memset(&what, 0, sizeof(what)); } MainWindow::~MainWindow() @@ -1300,3 +1302,16 @@ void MainWindow::setEnabledToolbar(bool arg1) Q_FOREACH(QToolButton *b, toolBar) b->setEnabled(arg1); } + +void MainWindow::on_copy_triggered() +{ + // open dialog to select what gets copied + // copy the displayed dive + DiveComponentSelection dialog(this, ©PasteDive, &what); + dialog.exec(); +} + +void MainWindow::on_paste_triggered() +{ + // take the data in our copyPasteDive and apply it to selected dives +} |