Diffstat (limited to 'noncore/settings/packagemanager/filterdlg.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/filterdlg.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/settings/packagemanager/filterdlg.h b/noncore/settings/packagemanager/filterdlg.h index 42bae8b..de9ea80 100644 --- a/noncore/settings/packagemanager/filterdlg.h +++ b/noncore/settings/packagemanager/filterdlg.h | |||
@@ -1,101 +1,101 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | 3 | ||
4 | =. Copyright (c) 2003 Dan Williams <drw@handhelds.org> | 4 | =. Copyright (c) 2003 Dan Williams <drw@handhelds.org> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This file is free software; you can | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This file is distributed in the hope that | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
19 | ..}^=.= = ; Public License for more details. | 19 | ..}^=.= = ; Public License for more details. |
20 | ++= -. .` .: | 20 | ++= -. .` .: |
21 | : = ...= . :.=- You should have received a copy of the GNU | 21 | : = ...= . :.=- You should have received a copy of the GNU |
22 | -. .:....=;==+<; General Public License along with this file; | 22 | -. .:....=;==+<; General Public License along with this file; |
23 | -_. . . )=. = see the file COPYING. If not, write to the | 23 | -_. . . )=. = see the file COPYING. If not, write to the |
24 | -- :-=` Free Software Foundation, Inc., | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 59 Temple Place - Suite 330, | 25 | 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef FILTERDLG_H | 30 | #ifndef FILTERDLG_H |
31 | #define FILTERDLG_H | 31 | #define FILTERDLG_H |
32 | 32 | ||
33 | #include <qcheckbox.h> | 33 | #include <qcheckbox.h> |
34 | #include <qdialog.h> | 34 | #include <qdialog.h> |
35 | #include <qcombobox.h> | 35 | #include <qcombobox.h> |
36 | #include <qlayout.h> | 36 | #include <qlayout.h> |
37 | #include <qlineedit.h> | 37 | #include <qlineedit.h> |
38 | #include <qscrollview.h> | 38 | #include <qscrollview.h> |
39 | 39 | ||
40 | #include "opackagemanager.h" | 40 | #include "opackagemanager.h" |
41 | 41 | ||
42 | class FilterDlg : public QDialog | 42 | class FilterDlg : public QDialog |
43 | { | 43 | { |
44 | Q_OBJECT | 44 | Q_OBJECT |
45 | 45 | ||
46 | public: | 46 | public: |
47 | FilterDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0, const QString &name = 0x0, | 47 | FilterDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0, const QString &name = 0x0, |
48 | const QString &server = 0x0, const QString &destination = 0x0, | 48 | const QString &server = 0x0, const QString &destination = 0x0, |
49 | OPackageManager::Status status = OPackageManager::All, | 49 | OPackageManager::Status status = OPackageManager::All, |
50 | const QString &category = 0x0 ); | 50 | const QString &category = 0x0 ); |
51 | 51 | ||
52 | const QString &name() | 52 | QString name() |
53 | { return m_nameCB->isChecked() ? m_name->text() : QString::null; }; | 53 | { return m_nameCB->isChecked() ? m_name->text() : QString::null; }; |
54 | const QString &server() | 54 | QString server() |
55 | { return m_serverCB->isChecked() ? m_server->currentText() : QString::null; }; | 55 | { return m_serverCB->isChecked() ? m_server->currentText() : QString::null; }; |
56 | const QString &destination() | 56 | QString destination() |
57 | { return m_destCB->isChecked() ? m_destination->currentText() : QString::null; }; | 57 | { return m_destCB->isChecked() ? m_destination->currentText() : QString::null; }; |
58 | OPackageManager::Status status() | 58 | OPackageManager::Status status() |
59 | { | 59 | { |
60 | if ( m_statusCB->isChecked() ) | 60 | if ( m_statusCB->isChecked() ) |
61 | { | 61 | { |
62 | if ( m_status->currentText() == tr( "All" ) ) | 62 | if ( m_status->currentText() == tr( "All" ) ) |
63 | return OPackageManager::All; | 63 | return OPackageManager::All; |
64 | else if ( m_status->currentText() == tr( "Installed" ) ) | 64 | else if ( m_status->currentText() == tr( "Installed" ) ) |
65 | return OPackageManager::Installed; | 65 | return OPackageManager::Installed; |
66 | else if ( m_status->currentText() == tr( "Not installed" ) ) | 66 | else if ( m_status->currentText() == tr( "Not installed" ) ) |
67 | return OPackageManager::NotInstalled; | 67 | return OPackageManager::NotInstalled; |
68 | else if ( m_status->currentText() == tr( "Updated" ) ) | 68 | else if ( m_status->currentText() == tr( "Updated" ) ) |
69 | return OPackageManager::Updated; | 69 | return OPackageManager::Updated; |
70 | } | 70 | } |
71 | else | 71 | |
72 | return OPackageManager::NotDefined; | 72 | return OPackageManager::NotDefined; |
73 | }; | 73 | }; |
74 | const QString &category() | 74 | QString category() |
75 | { return m_categoryCB->isChecked() ? m_category->currentText() : QString::null; }; | 75 | { return m_categoryCB->isChecked() ? m_category->currentText() : QString::null; }; |
76 | 76 | ||
77 | private: | 77 | private: |
78 | QCheckBox *m_nameCB; | 78 | QCheckBox *m_nameCB; |
79 | QCheckBox *m_serverCB; | 79 | QCheckBox *m_serverCB; |
80 | QCheckBox *m_destCB; | 80 | QCheckBox *m_destCB; |
81 | QCheckBox *m_statusCB; | 81 | QCheckBox *m_statusCB; |
82 | QCheckBox *m_categoryCB; | 82 | QCheckBox *m_categoryCB; |
83 | 83 | ||
84 | QLineEdit *m_name; | 84 | QLineEdit *m_name; |
85 | QComboBox *m_server; | 85 | QComboBox *m_server; |
86 | QComboBox *m_destination; | 86 | QComboBox *m_destination; |
87 | QComboBox *m_status; | 87 | QComboBox *m_status; |
88 | QComboBox *m_category; | 88 | QComboBox *m_category; |
89 | 89 | ||
90 | void initItem( QComboBox *comboBox, QCheckBox *checkBox, const QString &selection ); | 90 | void initItem( QComboBox *comboBox, QCheckBox *checkBox, const QString &selection ); |
91 | 91 | ||
92 | private slots: | 92 | private slots: |
93 | void slotNameSelected( bool ); | 93 | void slotNameSelected( bool ); |
94 | void slotServerSelected( bool ); | 94 | void slotServerSelected( bool ); |
95 | void slotDestSelected( bool ); | 95 | void slotDestSelected( bool ); |
96 | void slotStatusSelected( bool ); | 96 | void slotStatusSelected( bool ); |
97 | void slotStatusChanged( const QString & ); | 97 | void slotStatusChanged( const QString & ); |
98 | void slotCategorySelected( bool ); | 98 | void slotCategorySelected( bool ); |
99 | }; | 99 | }; |
100 | 100 | ||
101 | #endif | 101 | #endif |