summaryrefslogtreecommitdiffstats
path: root/shemovcleaner.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2016-08-20 17:04:58 +0200
committerArno <arno@disconnect.de>2016-08-20 17:04:58 +0200
commit96c798d4e9ca91cade25aa6d38176714979685bc (patch)
tree0a9293bd203e68faeb28e668fe5e8ab32ec5c1b5 /shemovcleaner.h
parentddd1616f5c310c94214e0ba2629f174c4cf768f3 (diff)
downloadShemovCleaner-96c798d4e9ca91cade25aa6d38176714979685bc.tar.gz
ShemovCleaner-96c798d4e9ca91cade25aa6d38176714979685bc.tar.bz2
ShemovCleaner-96c798d4e9ca91cade25aa6d38176714979685bc.zip
Revamped ShemovCleaner to a QTabWidget
It's a rather large commit. After renaming ShemovCleaner to TorrentWidget, I had to recreate ShemovCleaner as MainWindow with a single Tab. Then I created QActions for everything, including a QToolBar, a QMenu and a contetext Menu. For that the button bar at the bottom had to go. Oh, and I added some icons for the actions!
Diffstat (limited to 'shemovcleaner.h')
-rw-r--r--shemovcleaner.h53
1 files changed, 17 insertions, 36 deletions
diff --git a/shemovcleaner.h b/shemovcleaner.h
index 80ccddb..93b1581 100644
--- a/shemovcleaner.h
+++ b/shemovcleaner.h
@@ -2,52 +2,33 @@
#define SHEMOVCLEANER_H
#include <QMainWindow>
-#include <QItemSelection>
-#include <QString>
-class QPushButton;
-class QLineEdit;
-class QTreeView;
-class QStandardItemModel;
+class QTabWidget;
+class TorrentWidget;
class QLabel;
-class FileSorter;
-class TorrentDisplay;
+class QAction;
class ShemovCleaner : public QMainWindow {
Q_OBJECT
public:
- ShemovCleaner(QWidget *parent = 0);
- ~ShemovCleaner();
+ ShemovCleaner(QWidget *parent = 0, Qt::WindowFlags f = 0);
- private slots:
- void selectDir();
- void fileSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
- void gatherData();
- void deleteFiles();
- void moveFiles();
- void torrentInfo();
- void searchFile();
+ public slots:
+ void statusBarMessage(const QString &msg);
+ void setSelectionCount(const QString &msg);
private:
- void setupGui();
- void createStatusbar();
- void readHeaderData();
- void writeHeaderData();
- void readSettings();
- void writeSettings();
- QLineEdit *mDir;
- QPushButton *mSelDir;
- QLineEdit *mSearchTorrents;
- QPushButton *mDoSearchTorrents;
- QPushButton *mMove;
- QPushButton *mDelete;
- QPushButton *mInfo;
- QString mExt;
+ void createStatusBar();
+ void createActions();
+ QAction *createSeparator();
QLabel *mSelected;
- QStandardItemModel *mModel;
- FileSorter *mProxy;
- QTreeView *mFileView;
- TorrentDisplay *mTorrentDisplay;
+ QTabWidget *mTab;
+ TorrentWidget *mTorrentTab;
+ QAction *mTorRefreshA;
+ QAction *mTorDeleteA;
+ QAction *mTorMoveA;
+ QAction *mTorInfoA;
+ QAction *mTorDirA;
};
#endif // SHEMOVCLEANER_H