cf76d17b8c354e058f30c835c90cea620b2841bf
[irwi] / src / selectremotedlg.h
1 #ifndef SELECTREMOTEDLG_H
2 #define SELECTREMOTEDLG_H
3
4 #include <QDialog>
5 #include <QString>
6 #include <QMap>
7
8 #include "remotedb.h"
9 #include "remotedbmgr.h"
10
11 class QHBoxLayout;
12 class QListWidget;
13 class QListWidgetItem;
14 class QSettings;
15 class QNetworkAccessManager;
16 class QNetworkReply;
17 class QWidget;
18 class QPushButton;
19 class QLabel;
20 class QShowEvent;
21 class OnlinePollerThread;
22
23 class SelectRemoteDlg : public QDialog
24 {
25     Q_OBJECT
26
27 public:
28     SelectRemoteDlg(QWidget *parent = 0);
29     ~SelectRemoteDlg();
30
31 public slots:
32     void refreshDB();
33
34 private slots:
35     void alphabetItemChanged(QListWidgetItem *current,
36                              QListWidgetItem *previous);
37     void mfgItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
38     void downloadRemote();
39     void setDB(RemoteDB *db);
40
41 signals:
42     void remoteChanged(Remote);
43
44 protected slots:
45     void showEvent(QShowEvent*);
46
47 private:
48     RemoteDBMgr remoteDBMgr;
49
50     QLabel *remoteNameLabel;
51     QHBoxLayout *layout;
52     QListWidget *alphabetList;
53     QListWidget *mfgList;
54     QListWidget *modelList;
55     QPushButton *downloadBtn;
56     RemoteDB *remoteDB;
57
58     void setBusy(bool busy = true);
59 };
60
61 #endif
62