summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-16 09:32:23 -0600
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-16 10:07:06 -0600
commit34fceb4a1ba8c9cffbcc02caf40961a65efa3db7 (patch)
tree5caf92855c3e42d43473447006a542f8206c42d2 /qt-ui/mainwindow.cpp
parentdd49e3a9a92e3d1a1534a870e9e3b588845fb364 (diff)
downloadsubsurface-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.cpp15
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(&copyPasteDive, 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, &copyPasteDive, &what);
+ dialog.exec();
+}
+
+void MainWindow::on_paste_triggered()
+{
+ // take the data in our copyPasteDive and apply it to selected dives
+}