author | llornkcor <llornkcor> | 2005-08-24 20:22:10 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2005-08-24 20:22:10 (UTC) |
commit | 65edeafe2dc8689dce7c2ce94e954933b393dcf0 (patch) (unidiff) | |
tree | 17d0986ef0bce73f44a4b9900466fcc533954814 /noncore/apps/opie-gutenbrowser/LibraryDialog.h | |
parent | f0bb6c410f19d502cf563254d95158617a32b94e (diff) | |
download | opie-65edeafe2dc8689dce7c2ce94e954933b393dcf0.zip opie-65edeafe2dc8689dce7c2ce94e954933b393dcf0.tar.gz opie-65edeafe2dc8689dce7c2ce94e954933b393dcf0.tar.bz2 |
optimize search. fix other things
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/LibraryDialog.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-gutenbrowser/LibraryDialog.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.h b/noncore/apps/opie-gutenbrowser/LibraryDialog.h index 8d6352f..95226b2 100644 --- a/noncore/apps/opie-gutenbrowser/LibraryDialog.h +++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.h | |||
@@ -9,59 +9,68 @@ | |||
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | #ifndef LIBRARYDIALOG_H | 12 | #ifndef LIBRARYDIALOG_H |
13 | #define LIBRARYDIALOG_H | 13 | #define LIBRARYDIALOG_H |
14 | 14 | ||
15 | #include <qpe/config.h> | 15 | #include <qpe/config.h> |
16 | 16 | ||
17 | #include "SearchDialog.h" | 17 | #include "SearchDialog.h" |
18 | #include "NetworkDialog.h" | 18 | #include "NetworkDialog.h" |
19 | #include <qstringlist.h> | 19 | #include <qstringlist.h> |
20 | #include <qdialog.h> | 20 | #include <qdialog.h> |
21 | #include <qcheckbox.h> | 21 | #include <qcheckbox.h> |
22 | #include <qdatetime.h> | 22 | #include <qdatetime.h> |
23 | #include <qfile.h> | 23 | #include <qfile.h> |
24 | #include <qheader.h> | 24 | #include <qheader.h> |
25 | #include <qlistview.h> | 25 | #include <qlistview.h> |
26 | #include <qmessagebox.h> | 26 | #include <qmessagebox.h> |
27 | #include <qregexp.h> | 27 | #include <qregexp.h> |
28 | #include <qstring.h> | 28 | #include <qstring.h> |
29 | #include <qtextstream.h> | 29 | #include <qtextstream.h> |
30 | #include <qlabel.h> | 30 | #include <qlabel.h> |
31 | #include <stdlib.h> | 31 | #include <stdlib.h> |
32 | #include <qtabwidget.h> | 32 | #include <qtabwidget.h> |
33 | #include <qvaluelist.h> | ||
33 | 34 | ||
34 | class QVBoxLayout; | 35 | class QVBoxLayout; |
35 | class QHBoxLayout; | 36 | class QHBoxLayout; |
36 | class QGridLayout; | 37 | class QGridLayout; |
37 | class QListView; | 38 | class QListView; |
38 | class QListViewItem; | 39 | class QListViewItem; |
39 | class QPushButton; | 40 | class QPushButton; |
40 | //class QTabWidget; | 41 | //class QTabWidget; |
41 | class QWidget; | 42 | class QWidget; |
42 | //class Gutenbrowser; | 43 | //class Gutenbrowser; |
43 | 44 | ||
45 | typedef struct { | ||
46 | QString title; | ||
47 | QString author; | ||
48 | QString year; | ||
49 | QString file; | ||
50 | } etext; | ||
51 | |||
52 | |||
44 | class LibraryDialog : public QDialog { | 53 | class LibraryDialog : public QDialog { |
45 | Q_OBJECT | 54 | Q_OBJECT |
46 | 55 | ||
47 | public: | 56 | public: |
48 | LibraryDialog( QWidget* parent = 0, const char* name = 0 , bool modal = TRUE, WFlags fl = 0 ); | 57 | LibraryDialog( QWidget* parent = 0, const char* name = 0 , bool modal = TRUE, WFlags fl = 0 ); |
49 | ~LibraryDialog(); | 58 | ~LibraryDialog(); |
50 | 59 | ||
51 | QTabWidget *tabWidget; | 60 | QTabWidget *tabWidget; |
52 | QListView *ListView1,*ListView2,*ListView3,*ListView4,*ListView5; | 61 | QListView *ListView1,*ListView2,*ListView3,*ListView4,*ListView5; |
53 | QWidget *widget_1,*widget_2,*widget_3,*widget_4,*widget_5,*widget_6; | 62 | QWidget *widget_1,*widget_2,*widget_3,*widget_4,*widget_5,*widget_6; |
54 | QString ftp_host,ftp_base_dir; | 63 | QString ftp_host,ftp_base_dir; |
55 | QLabel *statusLabel; | 64 | QLabel *statusLabel; |
56 | QListViewItem *QList_Item1,*QList_Item2,*QList_Item3,*QList_Item4,*QList_Item5; | 65 | QListViewItem *QList_Item1,*QList_Item2,*QList_Item3,*QList_Item4,*QList_Item5; |
57 | QStringList list,ItemStrlist,Searchlist,resultLs; | 66 | QStringList list,ItemStrlist,Searchlist,resultLs; |
58 | // QStringList list1,list2,list3,list4; | 67 | // QStringList list1,list2,list3,list4; |
59 | 68 | ||
60 | QPushButton *buttonSearch,*buttonCancel,*buttonDownload,*buttonLibrary,*buttonNewList,*moreInfoButton; | 69 | QPushButton *buttonSearch,*buttonCancel,*buttonDownload,*buttonLibrary,*buttonNewList,*moreInfoButton; |
61 | QString new_index,old_index; | 70 | QString new_index,old_index; |
62 | QFile newindexLib,indexLib; | 71 | QFile newindexLib,indexLib; |
63 | 72 | ||
64 | int checked; | 73 | int checked; |
65 | int i_binary; | 74 | int i_binary; |
66 | bool useSmallInterface; | 75 | bool useSmallInterface; |
67 | bool indexLoaded; | 76 | bool indexLoaded; |
@@ -78,56 +87,60 @@ bool indexLoaded; | |||
78 | QString m_getFilePath; | 87 | QString m_getFilePath; |
79 | QString Edir; | 88 | QString Edir; |
80 | 89 | ||
81 | QString index; | 90 | QString index; |
82 | QString IDontKnowWhy; | 91 | QString IDontKnowWhy; |
83 | QString local_library; | 92 | QString local_library; |
84 | QString local_index; | 93 | QString local_index; |
85 | QString File_Name; | 94 | QString File_Name; |
86 | QString proxy_http; | 95 | QString proxy_http; |
87 | int doitAll; | 96 | int doitAll; |
88 | QString texter; | 97 | QString texter; |
89 | // CConfigFile *config; | 98 | // CConfigFile *config; |
90 | void parseSearchResults( QString resultStr); | 99 | void parseSearchResults( QString resultStr); |
91 | 100 | ||
92 | public slots: | 101 | public slots: |
93 | bool getItem(QListViewItem* ); | 102 | bool getItem(QListViewItem* ); |
94 | void doListView(); | 103 | void doListView(); |
95 | void FindLibrary(); | 104 | void FindLibrary(); |
96 | void newList(); | 105 | void newList(); |
97 | void Newlibrary(); | 106 | void Newlibrary(); |
98 | void Library(); | 107 | void Library(); |
99 | bool getAuthor(); | 108 | bool getAuthor(); |
100 | void select_title(QListViewItem*); | 109 | void select_title(QListViewItem*); |
101 | void cancelIt(); | 110 | void cancelIt(); |
102 | void sort(); | 111 | void sortLists(int); |
103 | bool moreInfo(); | 112 | bool moreInfo(); |
104 | // void DownloadEmAll(); | 113 | // void DownloadEmAll(); |
105 | bool httpDownload(); | 114 | bool httpDownload(); |
106 | bool setTitle(); | 115 | bool setTitle(); |
107 | void saveConfig(); | 116 | void saveConfig(); |
108 | bool download_Etext(); | 117 | bool download_Etext(); |
109 | bool download_newEtext(); | 118 | bool download_newEtext(); |
110 | 119 | ||
111 | void onButtonSearch(); | 120 | void onButtonSearch(); |
112 | bool onButtonDownload(); | 121 | bool onButtonDownload(); |
113 | 122 | ||
114 | // bool UnzipIt( QString fileName); | 123 | // bool UnzipIt( QString fileName); |
115 | void comboSelect(int index); | 124 | void comboSelect(int index); |
116 | protected slots: | 125 | protected slots: |
117 | 126 | ||
118 | 127 | ||
119 | protected: | 128 | protected: |
120 | 129 | ||
130 | QValueList<etext> etextLibrary; | ||
131 | |||
121 | void initDialog(); | 132 | void initDialog(); |
122 | QHBoxLayout *hbox,*hbox1,*hbox2; | 133 | QHBoxLayout *hbox,*hbox1,*hbox2; |
123 | QVBoxLayout *vbox; | 134 | QVBoxLayout *vbox; |
124 | // void search_slot(); | 135 | // void search_slot(); |
125 | private: | 136 | private: |
126 | void addItems(); | 137 | void addItems(); |
127 | void clearItems(); | 138 | void clearItems(); |
128 | void cleanStrings(); | 139 | void cleanStrings(); |
129 | bool getEtext(const QStringList &); | 140 | bool getEtext(const QStringList &); |
141 | private slots: | ||
142 | void authBoxClicked(); | ||
130 | 143 | ||
131 | }; | 144 | }; |
132 | 145 | ||
133 | #endif // LIBRARYDIALOG_H | 146 | #endif // LIBRARYDIALOG_H |