blob: bd005e2e8479d3805dad821e827ba84a1d987792 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
/***************************************************************************
networkpkgmgr.h - description
-------------------
begin : Mon Aug 26 13:32:30 BST 2002
copyright : (C) 2002 by Andy Qua
email : andy.qua@blueyonder.co.uk
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef NETWORKPKGMGR_H
#define NETWORKPKGMGR_H
#include <qlayout.h>
#include <qpushbutton.h>
#include <qwidget.h>
#include <qcombobox.h>
#include <qlistview.h>
#include "datamgr.h"
class InstallData;
/** NetworkPackageManager is the base class of the project */
class NetworkPackageManager : public QWidget
{
Q_OBJECT
public:
/** construtor */
NetworkPackageManager( QWidget* parent=0, const char *name=0 );
/** destructor */
~NetworkPackageManager();
void setDataManager( DataManager *dm );
void selectLocalPackage( const QString &pkg );
void updateData();
void searchForPackage( const QString & );
void showOnlyUninstalledPackages( bool val );
void showOnlyInstalledPackages( bool val );
void showUpgradedPackages( bool val );
bool filterByCategory( bool val );
bool setFilterCategory();
private:
DataManager *dataMgr;
QComboBox *serversList;
QListView *packagesList;
QString currentlySelectedServer;
QString categoryFilter;
bool categoryFilterEnabled;
bool showJumpTo;
bool showUninstalledPkgs;
bool showInstalledPkgs;
bool showUpgradedPkgs;
bool downloadEnabled;
void initGui();
void showProgressDialog( char *initialText );
void downloadSelectedPackages();
void downloadRemotePackage();
void serverSelected( int index, bool showProgress );
InstallData dealWithItem( QCheckListItem *item );
QString stickyOption;
signals:
void appRaiseMainWidget();
void appRaiseProgressWidget();
void appEnableUpgrade( bool );
void appEnableDownload( bool );
void progressSetSteps( int );
void progressSetMessage( const QString & );
void progressUpdate( int );
public slots:
void applyChanges();
void upgradePackages();
void downloadPackage();
void updateServer();
void displayText( const QString &t );
void letterPushed( QString t );
void serverSelected( int index );
};
#endif
|