From 92521267d139886d15a856a3f33c3f9f715a9e59 Mon Sep 17 00:00:00 2001 From: Jay Two <1289306+j2doll@users.noreply.github.com> Date: Thu, 27 Sep 2018 19:08:49 +0900 Subject: [PATCH] TODO: bind qxlsx model and widget control --- Copycat/MainWindow.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Copycat/MainWindow.cpp b/Copycat/MainWindow.cpp index 4da44b1..0fd8d01 100644 --- a/Copycat/MainWindow.cpp +++ b/Copycat/MainWindow.cpp @@ -40,7 +40,7 @@ void MainWindow::on_action_Quit_triggered() void MainWindow::on_action_Open_triggered() { - // open dialog + // open file dialog QString fileName = QFileDialog::getOpenFileName(this, tr("Open Excel"), ".", tr("Excel Files (*.xlsx)")); @@ -54,7 +54,8 @@ void MainWindow::on_action_Open_triggered() msgBox.exec(); return; } - xlsxTmp.deleteLater(); + + // TODO: make loading xlsx function of MainWindow // clear xlsxDoc if ( NULL != xlsxDoc ) @@ -75,13 +76,18 @@ void MainWindow::on_action_Open_triggered() // tabWidget->removeTab( ic ); //} + // TODO: clear sub-items of every tab + foreach( QString curretnSheetName, xlsxDoc->sheetNames() ) { QXlsx::AbstractSheet* currentSheet = xlsxDoc->sheet( curretnSheetName ); if ( NULL == currentSheet ) continue; + // create new tab // XlsxTab* newSheet = new XlsxTab( this, currentSheet ); + // TODO: append to xlsx pointer list + // tabWidget->addTab( newSheet ); }