From 2e1c915cf2d9ec394c64ee0d6d7c705b06cce8cb Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 22 Sep 2016 08:41:38 +0200 Subject: Give feedback on gathering data Use the ProgressBar when gathering torrent data from a directory with many entries. Sprinkle processEvents() here and there to show the progress. --- torrentwidget.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'torrentwidget.h') diff --git a/torrentwidget.h b/torrentwidget.h index 15992b3..b66fa64 100644 --- a/torrentwidget.h +++ b/torrentwidget.h @@ -14,6 +14,7 @@ class QLabel; class QToolBar; class QMenuBar; class QKeyEvent; +class QProgressBar; class FileSorter; class TorrentDisplay; @@ -28,6 +29,7 @@ class TorrentWidget : public QWidget { QMenuBar *menuBar() { return mMenuBar; } TorrentDisplay *torrentDisplay() { return mTorrentDisplay; } QTreeView *torrentFileView() { return mFileView; } + void setProgressBar(QProgressBar *progressBar) { mProgressBar = progressBar; } ~TorrentWidget(); signals: @@ -36,6 +38,7 @@ class TorrentWidget : public QWidget { public slots: void selectDir(); + void setDir(); void copyToClipboard(); void gatherData(); void deleteFiles(); @@ -66,6 +69,7 @@ class TorrentWidget : public QWidget { QTreeView *mFileView; QToolBar *mToolBar; QMenuBar *mMenuBar; + QProgressBar *mProgressBar; QAction *mRefreshA; QAction *mDeleteA; QAction *mMoveA; -- cgit v1.2.3-70-g09d2