author | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
commit | b6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff) | |
tree | d3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /library/findwidget_p.cpp | |
parent | 0d59c780513da78033f4d9040475dee9db0256d4 (diff) | |
download | opie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2 |
applied the patch generated by the optimize_connect script from
TT.
-rw-r--r-- | library/findwidget_p.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/findwidget_p.cpp b/library/findwidget_p.cpp index e91d789..0591f07 100644 --- a/library/findwidget_p.cpp +++ b/library/findwidget_p.cpp | |||
@@ -2,98 +2,98 @@ | |||
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "findwidget_p.h" | 21 | #include "findwidget_p.h" |
22 | 22 | ||
23 | #include <qpe/categoryselect.h> | 23 | #include <qpe/categoryselect.h> |
24 | #include <qpe/datebookmonth.h> | 24 | #include <qpe/datebookmonth.h> |
25 | 25 | ||
26 | #include <qcheckbox.h> | 26 | #include <qcheckbox.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | 29 | ||
30 | FindWidget::FindWidget( const QString &appName, QWidget *parent, | 30 | FindWidget::FindWidget( const QString &appName, QWidget *parent, |
31 | const char *name ) | 31 | const char *name ) |
32 | : FindWidgetBase( parent, name ), | 32 | : FindWidgetBase( parent, name ), |
33 | mStrApp( appName ), | 33 | mStrApp( appName ), |
34 | mDate( QDate::currentDate() ) | 34 | mDate( QDate::currentDate() ) |
35 | { | 35 | { |
36 | setMaximumSize( sizeHint() ); | 36 | setMaximumSize( sizeHint() ); |
37 | QArray<int> vl(0); | 37 | QArray<int> vl(0); |
38 | cmbCat->setCategories( vl, mStrApp ); | 38 | cmbCat->setCategories( vl, mStrApp ); |
39 | cmbCat->setRemoveCategoryEdit( TRUE ); | 39 | cmbCat->setRemoveCategoryEdit( TRUE ); |
40 | cmbCat->setAllCategories( TRUE ); | 40 | cmbCat->setAllCategories( TRUE ); |
41 | // hide junk for the moment... | 41 | // hide junk for the moment... |
42 | lblStartDate->hide(); | 42 | lblStartDate->hide(); |
43 | cmdStartDate->hide(); | 43 | cmdStartDate->hide(); |
44 | QPopupMenu *m1 = new QPopupMenu( this ); | 44 | QPopupMenu *m1 = new QPopupMenu( this ); |
45 | dtPicker = new DateBookMonth( m1, 0, TRUE ); | 45 | dtPicker = new DateBookMonth( m1, 0, TRUE ); |
46 | dtPicker->setDate( mDate.year(), mDate.month(), mDate.day() ); | 46 | dtPicker->setDate( mDate.year(), mDate.month(), mDate.day() ); |
47 | m1->insertItem( dtPicker ); | 47 | m1->insertItem( dtPicker ); |
48 | cmdStartDate->setPopup( m1 ); | 48 | cmdStartDate->setPopup( m1 ); |
49 | cmdStartDate->setText( TimeString::shortDate(mDate) ); | 49 | cmdStartDate->setText( TimeString::shortDate(mDate) ); |
50 | QObject::connect( dtPicker, SIGNAL(dateClicked(int, int, int)), | 50 | QObject::connect( dtPicker, SIGNAL(dateClicked(int,int,int)), |
51 | this, SLOT(slotDateChanged(int, int, int)) ); | 51 | this, SLOT(slotDateChanged(int,int,int)) ); |
52 | 52 | ||
53 | QObject::connect( cmdFind, SIGNAL(clicked()), | 53 | QObject::connect( cmdFind, SIGNAL(clicked()), |
54 | this, SLOT(slotFindClicked()) ); | 54 | this, SLOT(slotFindClicked()) ); |
55 | } | 55 | } |
56 | 56 | ||
57 | FindWidget::~FindWidget() | 57 | FindWidget::~FindWidget() |
58 | { | 58 | { |
59 | } | 59 | } |
60 | 60 | ||
61 | QString FindWidget::findText() const | 61 | QString FindWidget::findText() const |
62 | { | 62 | { |
63 | return txtFind->text(); | 63 | return txtFind->text(); |
64 | } | 64 | } |
65 | 65 | ||
66 | void FindWidget::slotFindClicked() | 66 | void FindWidget::slotFindClicked() |
67 | { | 67 | { |
68 | lblStatus->setText( "" ); | 68 | lblStatus->setText( "" ); |
69 | if ( cmdStartDate->isVisible() ) | 69 | if ( cmdStartDate->isVisible() ) |
70 | emit signalFindClicked( findText(), | 70 | emit signalFindClicked( findText(), |
71 | mDate, | 71 | mDate, |
72 | chkCase->isChecked(), | 72 | chkCase->isChecked(), |
73 | chkBackwards->isChecked(), | 73 | chkBackwards->isChecked(), |
74 | cmbCat->currentCategory() ); | 74 | cmbCat->currentCategory() ); |
75 | else | 75 | else |
76 | emit signalFindClicked( findText(), chkCase->isChecked(), | 76 | emit signalFindClicked( findText(), chkCase->isChecked(), |
77 | chkBackwards->isChecked(), | 77 | chkBackwards->isChecked(), |
78 | cmbCat->currentCategory() ); | 78 | cmbCat->currentCategory() ); |
79 | } | 79 | } |
80 | 80 | ||
81 | void FindWidget::setUseDate( bool show ) | 81 | void FindWidget::setUseDate( bool show ) |
82 | { | 82 | { |
83 | if ( show ) { | 83 | if ( show ) { |
84 | lblStartDate->show(); | 84 | lblStartDate->show(); |
85 | cmdStartDate->show(); | 85 | cmdStartDate->show(); |
86 | } else { | 86 | } else { |
87 | lblStartDate->hide(); | 87 | lblStartDate->hide(); |
88 | cmdStartDate->hide(); | 88 | cmdStartDate->hide(); |
89 | } | 89 | } |
90 | chkBackwards->setDisabled( show ); | 90 | chkBackwards->setDisabled( show ); |
91 | } | 91 | } |
92 | 92 | ||
93 | void FindWidget::setDate( const QDate &dt ) | 93 | void FindWidget::setDate( const QDate &dt ) |
94 | { | 94 | { |
95 | slotDateChanged( dt.year(), dt.month(), dt.day() ); | 95 | slotDateChanged( dt.year(), dt.month(), dt.day() ); |
96 | } | 96 | } |
97 | 97 | ||
98 | void FindWidget::slotNotFound() | 98 | void FindWidget::slotNotFound() |
99 | { | 99 | { |