Diffstat (limited to 'noncore/apps/opie-sheet/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp index bd98aca..3d3c688 100644 --- a/noncore/apps/opie-sheet/mainwindow.cpp +++ b/noncore/apps/opie-sheet/mainwindow.cpp | |||
@@ -8,28 +8,31 @@ | |||
8 | ***************************************************************************/ | 8 | ***************************************************************************/ |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * Opie Sheet (formerly Sheet/Qt) | 11 | * Opie Sheet (formerly Sheet/Qt) |
12 | * by Serdar Ozler <sozler@sitebest.com> | 12 | * by Serdar Ozler <sozler@sitebest.com> |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "mainwindow.h" | 15 | #include "mainwindow.h" |
16 | 16 | ||
17 | #include <qpe/filemanager.h> | 17 | #include <qpe/filemanager.h> |
18 | #include <qpe/qcopenvelope_qws.h> | 18 | #include <qpe/qcopenvelope_qws.h> |
19 | #include <qpe/resource.h> | 19 | #include <qpe/resource.h> |
20 | #include <qpe/qpeapplication.h> | ||
21 | |||
20 | #include <qmessagebox.h> | 22 | #include <qmessagebox.h> |
21 | #include <qfile.h> | 23 | #include <qfile.h> |
22 | #include <qtranslator.h> | 24 | #include <qtranslator.h> |
23 | #include <qradiobutton.h> | 25 | #include <qradiobutton.h> |
26 | |||
24 | #include "cellformat.h" | 27 | #include "cellformat.h" |
25 | #include "numberdlg.h" | 28 | #include "numberdlg.h" |
26 | #include "textdlg.h" | 29 | #include "textdlg.h" |
27 | #include "sortdlg.h" | 30 | #include "sortdlg.h" |
28 | #include "finddlg.h" | 31 | #include "finddlg.h" |
29 | 32 | ||
30 | #define DEFAULT_NUM_ROWS 300 | 33 | #define DEFAULT_NUM_ROWS 300 |
31 | #define DEFAULT_NUM_COLS (26*3) | 34 | #define DEFAULT_NUM_COLS (26*3) |
32 | #define DEFAULT_NUM_SHEETS 3 | 35 | #define DEFAULT_NUM_SHEETS 3 |
33 | 36 | ||
34 | MainWindow::MainWindow(QWidget *parent, const char* n, WFlags fl) | 37 | MainWindow::MainWindow(QWidget *parent, const char* n, WFlags fl) |
35 | :QMainWindow(parent, n, fl) | 38 | :QMainWindow(parent, n, fl) |
@@ -738,25 +741,25 @@ void MainWindow::slotSheetChanged(const QString &name) | |||
738 | 741 | ||
739 | void MainWindow::addFlyAction(const QString &text, const QString &menuText, const QString &tip, QWidget *w) | 742 | void MainWindow::addFlyAction(const QString &text, const QString &menuText, const QString &tip, QWidget *w) |
740 | { | 743 | { |
741 | QAction *action=new QAction(text, menuText, 0, this); | 744 | QAction *action=new QAction(text, menuText, 0, this); |
742 | action->setToolTip(tip); | 745 | action->setToolTip(tip); |
743 | connect(action, SIGNAL(activated()), this, SLOT(slotFuncOutput())); | 746 | connect(action, SIGNAL(activated()), this, SLOT(slotFuncOutput())); |
744 | action->addTo(w); | 747 | action->addTo(w); |
745 | } | 748 | } |
746 | 749 | ||
747 | void MainWindow::slotFormatCells() | 750 | void MainWindow::slotFormatCells() |
748 | { | 751 | { |
749 | CellFormat dialogCellFormat(this); | 752 | CellFormat dialogCellFormat(this); |
750 | dialogCellFormat.showMaximized(); | 753 | QPEApplication::showDialog( &dialogCellFormat ); |
751 | dialogCellFormat.exec(sheet); | 754 | dialogCellFormat.exec(sheet); |
752 | } | 755 | } |
753 | 756 | ||
754 | void MainWindow::slotEditPaste() | 757 | void MainWindow::slotEditPaste() |
755 | { | 758 | { |
756 | sheet->editPaste(); | 759 | sheet->editPaste(); |
757 | } | 760 | } |
758 | 761 | ||
759 | void MainWindow::slotEditPasteContents() | 762 | void MainWindow::slotEditPasteContents() |
760 | { | 763 | { |
761 | sheet->editPaste(TRUE); | 764 | sheet->editPaste(TRUE); |
762 | } | 765 | } |
@@ -958,25 +961,25 @@ void MainWindow::slotSheetRemove() | |||
958 | comboSheets->removeItem(i); | 961 | comboSheets->removeItem(i); |
959 | break; | 962 | break; |
960 | } | 963 | } |
961 | comboSheets->setCurrentItem(0); | 964 | comboSheets->setCurrentItem(0); |
962 | slotSheetChanged(comboSheets->currentText()); | 965 | slotSheetChanged(comboSheets->currentText()); |
963 | listSheets.remove(tempSheet); | 966 | listSheets.remove(tempSheet); |
964 | } | 967 | } |
965 | } | 968 | } |
966 | 969 | ||
967 | void MainWindow::slotDataSort() | 970 | void MainWindow::slotDataSort() |
968 | { | 971 | { |
969 | SortDialog dialogSort(this); | 972 | SortDialog dialogSort(this); |
970 | dialogSort.showMaximized(); | 973 | QPEApplication::showDialog( &dialogSort ); |
971 | dialogSort.exec(sheet); | 974 | dialogSort.exec(sheet); |
972 | } | 975 | } |
973 | 976 | ||
974 | void MainWindow::slotDocModified() | 977 | void MainWindow::slotDocModified() |
975 | { | 978 | { |
976 | documentModified=TRUE; | 979 | documentModified=TRUE; |
977 | } | 980 | } |
978 | 981 | ||
979 | void MainWindow::slotInsertCells() | 982 | void MainWindow::slotInsertCells() |
980 | { | 983 | { |
981 | QDialog dialogInsert(this, 0, TRUE); | 984 | QDialog dialogInsert(this, 0, TRUE); |
982 | dialogInsert.resize(180, 130); | 985 | dialogInsert.resize(180, 130); |
@@ -994,15 +997,15 @@ void MainWindow::slotInsertCells() | |||
994 | switch (group->id(group->selected())) | 997 | switch (group->id(group->selected())) |
995 | { | 998 | { |
996 | case 0: sheet->insertRows(1, FALSE); break; | 999 | case 0: sheet->insertRows(1, FALSE); break; |
997 | case 1: sheet->insertColumns(1, FALSE); break; | 1000 | case 1: sheet->insertColumns(1, FALSE); break; |
998 | case 2: sheet->insertRows(1, TRUE); break; | 1001 | case 2: sheet->insertRows(1, TRUE); break; |
999 | case 3: sheet->insertColumns(1, TRUE); break; | 1002 | case 3: sheet->insertColumns(1, TRUE); break; |
1000 | } | 1003 | } |
1001 | } | 1004 | } |
1002 | 1005 | ||
1003 | void MainWindow::slotDataFindReplace() | 1006 | void MainWindow::slotDataFindReplace() |
1004 | { | 1007 | { |
1005 | FindDialog dialogFind(this); | 1008 | FindDialog dialogFind(this); |
1006 | dialogFind.showMaximized(); | 1009 | QPEApplication::showDialog( &dialogFind ); |
1007 | dialogFind.exec(sheet); | 1010 | dialogFind.exec(sheet); |
1008 | } | 1011 | } |