Diffstat (limited to 'noncore/apps/opie-sheet/finddlg.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-sheet/finddlg.cpp | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/noncore/apps/opie-sheet/finddlg.cpp b/noncore/apps/opie-sheet/finddlg.cpp index e4c6ec8..c724159 100644 --- a/noncore/apps/opie-sheet/finddlg.cpp +++ b/noncore/apps/opie-sheet/finddlg.cpp | |||
@@ -1,29 +1,50 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | * * | 2 | =. This file is part of the Opie Project |
3 | * This program is free software; you can redistribute it and/or modify * | 3 | .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> |
4 | * it under the terms of the GNU General Public License as published by * | 4 | .>+-= |
5 | * the Free Software Foundation; either version 2 of the License, or * | 5 | _;:, .> :=|. This program is free software; you can |
6 | * (at your option) any later version. * | 6 | .> <`_, > . <= redistribute it and/or modify it under |
7 | * * | 7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
8 | ***************************************************************************/ | 8 | .="- .-=="i, .._ License as published by the Free Software |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This program is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
17 | ..}^=.= = ; Library General Public License for more | ||
18 | ++= -. .` .: details. | ||
19 | : = ...= . :.=- | ||
20 | -. .:....=;==+<; You should have received a copy of the GNU | ||
21 | -_. . . )=. = Library General Public License along with | ||
22 | -- :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | ||
24 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
9 | 28 | ||
10 | /* | 29 | /* |
11 | * Opie Sheet (formerly Sheet/Qt) | 30 | * Opie Sheet (formerly Sheet/Qt) |
12 | * by Serdar Ozler <sozler@sitebest.com> | 31 | * by Serdar Ozler <sozler@sitebest.com> |
13 | */ | 32 | */ |
14 | 33 | ||
34 | #include "finddlg.h" | ||
35 | |||
36 | /* QT */ | ||
15 | #include <qlabel.h> | 37 | #include <qlabel.h> |
16 | #include <qradiobutton.h> | 38 | #include <qradiobutton.h> |
17 | #include "finddlg.h" | ||
18 | 39 | ||
19 | FindDialog::FindDialog(QWidget *parent) | 40 | FindDialog::FindDialog(QWidget *parent) |
20 | :QDialog(parent, 0, TRUE) | 41 | :QDialog(parent, 0, TRUE) |
21 | { | 42 | { |
22 | // Main widget | 43 | // Main widget |
23 | tabs=new QTabWidget(this); | 44 | tabs=new QTabWidget(this); |
24 | widgetFind=new QWidget(tabs); | 45 | widgetFind=new QWidget(tabs); |
25 | widgetOptions=new QWidget(tabs); | 46 | widgetOptions=new QWidget(tabs); |
26 | tabs->addTab(widgetFind, tr("&Find && Replace")); | 47 | tabs->addTab(widgetFind, tr("&Find && Replace")); |
27 | tabs->addTab(widgetOptions, tr("&Options")); | 48 | tabs->addTab(widgetOptions, tr("&Options")); |
28 | 49 | ||
29 | // Find tab | 50 | // Find tab |
@@ -55,26 +76,25 @@ FindDialog::FindDialog(QWidget *parent) | |||
55 | checkSelection->setGeometry(10, 40, 215, 20); | 76 | checkSelection->setGeometry(10, 40, 215, 20); |
56 | checkEntire=new QCheckBox(tr("&Entire cell"), widgetOptions); | 77 | checkEntire=new QCheckBox(tr("&Entire cell"), widgetOptions); |
57 | checkEntire->setGeometry(10, 70, 215, 20); | 78 | checkEntire->setGeometry(10, 70, 215, 20); |
58 | 79 | ||
59 | // Main widget | 80 | // Main widget |
60 | box=new QVBoxLayout(this); | 81 | box=new QVBoxLayout(this); |
61 | box->addWidget(tabs); | 82 | box->addWidget(tabs); |
62 | 83 | ||
63 | setCaption(tr("Find & Replace")); | 84 | setCaption(tr("Find & Replace")); |
64 | } | 85 | } |
65 | 86 | ||
66 | FindDialog::~FindDialog() | 87 | FindDialog::~FindDialog() |
67 | { | 88 | {} |
68 | } | ||
69 | 89 | ||
70 | void FindDialog::typeChanged(int id) | 90 | void FindDialog::typeChanged(int id) |
71 | { | 91 | { |
72 | editReplace->setEnabled(id>0); | 92 | editReplace->setEnabled(id>0); |
73 | } | 93 | } |
74 | 94 | ||
75 | int FindDialog::exec(Sheet *s) | 95 | int FindDialog::exec(Sheet *s) |
76 | { | 96 | { |
77 | if (QDialog::exec()==QDialog::Accepted) | 97 | if (QDialog::exec()==QDialog::Accepted) |
78 | { | 98 | { |
79 | int id=groupType->id(groupType->selected()); | 99 | int id=groupType->id(groupType->selected()); |
80 | s->dataFindReplace(editFind->text(), editReplace->text(), checkCase->isChecked(), !checkSelection->isChecked(), checkEntire->isChecked(), id>0, id>1); | 100 | s->dataFindReplace(editFind->text(), editReplace->text(), checkCase->isChecked(), !checkSelection->isChecked(), checkEntire->isChecked(), id>0, id>1); |