summaryrefslogtreecommitdiff
path: root/src/downloadstab.h
blob: 1676ec76131c73add9dd803218290798411ad4db (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
#ifndef MODORGANIZER_DOWNLOADTAB_INCLUDED
#define MODORGANIZER_DOWNLOADTAB_INCLUDED

#include <filterwidget.h>

namespace Ui
{
class MainWindow;
}
class OrganizerCore;
class DownloadListView;

class DownloadsTab : public QObject
{
  Q_OBJECT;

public:
  DownloadsTab(OrganizerCore& core, Ui::MainWindow* ui);

  void update();

private:
  struct DownloadsTabUi
  {
    QPushButton* refresh;
    QPushButton* queryInfos;
    DownloadListView* list;
    QCheckBox* showHidden;
    QLineEdit* filter;
  };

  OrganizerCore& m_core;
  DownloadsTabUi ui;
  MOBase::FilterWidget m_filter;

  void refresh();

  /**
   * @brief Handle click on the "Query infos" button
   **/
  void queryInfos();

  void resumeDownload(int downloadIndex);
};

#endif  // MODORGANIZER_DOWNLOADTAB_INCLUDED