summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/mainwin.h
authordrw <drw>2003-01-23 00:52:29 (UTC)
committer drw <drw>2003-01-23 00:52:29 (UTC)
commit454eba9982f1a898e914b558f2ceac913fdf3b5c (patch) (unidiff)
treeeaf43c7396810126b67f200660db542cd1c35eca /noncore/settings/aqpkg/mainwin.h
parenta7b33b069107b64112b1760dc3eca02469a052d9 (diff)
downloadopie-454eba9982f1a898e914b558f2ceac913fdf3b5c.zip
opie-454eba9982f1a898e914b558f2ceac913fdf3b5c.tar.gz
opie-454eba9982f1a898e914b558f2ceac913fdf3b5c.tar.bz2
Code optimizations for main window
Diffstat (limited to 'noncore/settings/aqpkg/mainwin.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.h64
1 files changed, 54 insertions, 10 deletions
diff --git a/noncore/settings/aqpkg/mainwin.h b/noncore/settings/aqpkg/mainwin.h
index ef67cc9..46b5fae 100644
--- a/noncore/settings/aqpkg/mainwin.h
+++ b/noncore/settings/aqpkg/mainwin.h
@@ -18,19 +18,24 @@
18#ifndef MAINWIN_H 18#ifndef MAINWIN_H
19#define MAINWIN_H 19#define MAINWIN_H
20 20
21#include <qmainwindow.h> 21#include <qmainwindow.h>
22#include <qpixmap.h> 22#include <qpixmap.h>
23 23
24class QWidgetStack;
25class QPEToolBar;
26class QLineEdit;
27class QAction;
28class ProgressWidget;
29class NetworkPackageManager;
30class DataManager; 24class DataManager;
25class InstallData;
26
27class QAction;
28class QCheckListItem;
29class QComboBox;
30class QLabel;
31class QLineEdit;
32class QListView;
33class QPEToolBar;
34class QProgressBar;
35class QWidgetStack;
31 36
32class MainWindow :public QMainWindow 37class MainWindow :public QMainWindow
33{ 38{
34 Q_OBJECT 39 Q_OBJECT
35public: 40public:
36 41
@@ -52,21 +57,51 @@ private:
52 QAction *actionInstalled; 57 QAction *actionInstalled;
53 QAction *actionUpdated; 58 QAction *actionUpdated;
54 59
55 QPixmap iconDownload; 60 QPixmap iconDownload;
56 QPixmap iconRemove; 61 QPixmap iconRemove;
57 62
58 NetworkPackageManager *networkPkgWindow;
59 ProgressWidget *progressWindow;
60
61 int mnuShowUninstalledPkgsId; 63 int mnuShowUninstalledPkgsId;
62 int mnuShowInstalledPkgsId; 64 int mnuShowInstalledPkgsId;
63 int mnuShowUpgradedPkgsId; 65 int mnuShowUpgradedPkgsId;
64 int mnuFilterByCategory; 66 int mnuFilterByCategory;
65 int mnuSetFilterCategory; 67 int mnuSetFilterCategory;
66 68
69 // Main package list widget
70 QWidget *networkPkgWindow;
71 QComboBox *serversList;
72 QListView *packagesList;
73 QPixmap installedIcon;
74 QPixmap updatedIcon;
75 QString currentlySelectedServer;
76 QString categoryFilter;
77 QString stickyOption;
78
79 bool categoryFilterEnabled;
80 bool showJumpTo;
81 bool showUninstalledPkgs;
82 bool showInstalledPkgs;
83 bool showUpgradedPkgs;
84 bool downloadEnabled;
85
86 void initMainWidget();
87 void updateData();
88 void serverSelected( int index, bool showProgress );
89 void searchForPackage( const QString & );
90 bool filterByCategory( bool val );
91 void downloadSelectedPackages();
92 void downloadRemotePackage();
93 InstallData dealWithItem( QCheckListItem *item );
94
95 // Progress widget
96 QWidget *progressWindow;
97 QLabel *m_status;
98 QProgressBar *m_progress;
99
100 void initProgressWidget();
101
67public slots: 102public slots:
68 void setDocument( const QString &doc ); 103 void setDocument( const QString &doc );
69 void displayHelp(); 104 void displayHelp();
70 void displayFindBar(); 105 void displayFindBar();
71 void repeatFind(); 106 void repeatFind();
72 void findPackage( const QString & ); 107 void findPackage( const QString & );
@@ -74,16 +109,25 @@ public slots:
74 void displayAbout(); 109 void displayAbout();
75 void displaySettings(); 110 void displaySettings();
76 void filterUninstalledPackages(); 111 void filterUninstalledPackages();
77 void filterInstalledPackages(); 112 void filterInstalledPackages();
78 void filterUpgradedPackages(); 113 void filterUpgradedPackages();
79 void filterCategory(); 114 void filterCategory();
80 void setFilterCategory(); 115 bool setFilterCategory();
81 void raiseMainWidget(); 116 void raiseMainWidget();
82 void raiseProgressWidget(); 117 void raiseProgressWidget();
83 void enableUpgrade( bool ); 118 void enableUpgrade( bool );
84 void enableDownload( bool ); 119 void enableDownload( bool );
85 120
86private slots: 121private slots:
87 void init(); 122 void init();
123 void setProgressSteps( int );
124 void setProgressMessage( const QString & );
125 void updateProgress( int );
126 void serverSelected( int index );
127 void updateServer();
128 void upgradePackages();
129 void downloadPackage();
130 void applyChanges();
131 void letterPushed( QString t );
88}; 132};
89#endif 133#endif