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>
This commit is contained in:
Dirk Hohndel 2014-08-16 09:32:23 -06:00
parent dd49e3a9a9
commit 34fceb4a1b
7 changed files with 260 additions and 1 deletions

View file

@ -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
}