summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-sheet/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-sheet/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/mainwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp
index 2f07bae..b9f8e57 100644
--- a/noncore/apps/opie-sheet/mainwindow.cpp
+++ b/noncore/apps/opie-sheet/mainwindow.cpp
@@ -186,24 +186,25 @@ int MainWindow::saveCurrentFile(bool ask)
186 186
187 documentSave(currentDoc); 187 documentSave(currentDoc);
188 return QMessageBox::Yes; 188 return QMessageBox::Yes;
189} 189}
190 190
191void MainWindow::selectorFileNew(const DocLnk &lnkDoc) 191void MainWindow::selectorFileNew(const DocLnk &lnkDoc)
192{ 192{
193 selectorHide(); 193 selectorHide();
194 194
195 if (documentModified && saveCurrentFile()==QMessageBox::Cancel) return; 195 if (documentModified && saveCurrentFile()==QMessageBox::Cancel) return;
196 if (currentDoc) delete currentDoc; 196 if (currentDoc) delete currentDoc;
197 currentDoc = new DocLnk(lnkDoc); 197 currentDoc = new DocLnk(lnkDoc);
198 editData->clear();
198 listSheets.clear(); 199 listSheets.clear();
199 comboSheets->clear(); 200 comboSheets->clear();
200 201
201 typeSheet *newSheet=createNewSheet(); 202 typeSheet *newSheet=createNewSheet();
202 newSheet->data.setAutoDelete(TRUE); 203 newSheet->data.setAutoDelete(TRUE);
203 sheet->setName(newSheet->name); 204 sheet->setName(newSheet->name);
204 sheet->setSheetData(&newSheet->data); 205 sheet->setSheetData(&newSheet->data);
205 for (int i=1; i<DEFAULT_NUM_SHEETS; ++i) 206 for (int i=1; i<DEFAULT_NUM_SHEETS; ++i)
206 createNewSheet(); 207 createNewSheet();
207 documentModified=FALSE; 208 documentModified=FALSE;
208} 209}
209 210
@@ -524,25 +525,25 @@ void MainWindow::slotHelpGeneral()
524 e << helpFile; 525 e << helpFile;
525 } 526 }
526 else 527 else
527 QMessageBox::critical(this, tr("Error"), tr("Help file not found!")); 528 QMessageBox::critical(this, tr("Error"), tr("Help file not found!"));
528} 529}
529 530
530void MainWindow::slotHelpAbout() 531void MainWindow::slotHelpAbout()
531{ 532{
532 QDialog dialogAbout(this, 0, TRUE); 533 QDialog dialogAbout(this, 0, TRUE);
533 dialogAbout.resize(width()-40, height()-80); 534 dialogAbout.resize(width()-40, height()-80);
534 dialogAbout.setCaption(tr("About Opie Sheet")); 535 dialogAbout.setCaption(tr("About Opie Sheet"));
535 536
536 QLabel label(tr("Opie Sheet\nSpreadsheet Software for Opie\nQWDC Beta Winner (as Sheet/Qt)\n\nDeveloped by: Serdar Ozler\nRelease 1.0.1\nRelease Date: July 04, 2002\n\nThis product is licensed under GPL. It is freely distributable. If you want to get the latest version and also the source code, please visit the web site.\n\nhttp://qtopia.sitebest.com"), &dialogAbout); 537 QLabel label(tr("Opie Sheet\nSpreadsheet Software for Opie\nQWDC Beta Winner (as Sheet/Qt)\n\nDeveloped by: Serdar Ozler\nRelease 1.0.2\nRelease Date: October 08, 2002\n\nThis product is licensed under GPL. It is freely distributable. If you want to get the latest version and also the source code, please visit the web site.\n\nhttp://qtopia.sitebest.com"), &dialogAbout);
537 label.setGeometry(dialogAbout.rect()); 538 label.setGeometry(dialogAbout.rect());
538 label.setAlignment(Qt::AlignCenter | Qt::WordBreak); 539 label.setAlignment(Qt::AlignCenter | Qt::WordBreak);
539 540
540 dialogAbout.exec(); 541 dialogAbout.exec();
541} 542}
542 543
543void MainWindow::initSheet() 544void MainWindow::initSheet()
544{ 545{
545 sheet=new Sheet(DEFAULT_NUM_ROWS, DEFAULT_NUM_COLS, this); 546 sheet=new Sheet(DEFAULT_NUM_ROWS, DEFAULT_NUM_COLS, this);
546 setCentralWidget(sheet); 547 setCentralWidget(sheet);
547 548
548 connect(sheet, SIGNAL(currentDataChanged(const QString &)), editData, SLOT(setText(const QString &))); 549 connect(sheet, SIGNAL(currentDataChanged(const QString &)), editData, SLOT(setText(const QString &)));