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