mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 13:04:23 +00:00
- Started work on transfer list filters
This commit is contained in:
parent
9f9f6abec1
commit
2dddd2b24b
23
src/GUI.cpp
23
src/GUI.cpp
@ -62,6 +62,7 @@
|
|||||||
#include "console_imp.h"
|
#include "console_imp.h"
|
||||||
#include "httpserver.h"
|
#include "httpserver.h"
|
||||||
#include "torrentPersistentData.h"
|
#include "torrentPersistentData.h"
|
||||||
|
#include "TransferListFiltersWidget.h"
|
||||||
|
|
||||||
using namespace libtorrent;
|
using namespace libtorrent;
|
||||||
|
|
||||||
@ -135,10 +136,16 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|||||||
|
|
||||||
qDebug("create tabWidget");
|
qDebug("create tabWidget");
|
||||||
tabs = new QTabWidget();
|
tabs = new QTabWidget();
|
||||||
|
vSplitter = new QSplitter(Qt::Horizontal);
|
||||||
|
|
||||||
// Transfer List tab
|
// Transfer List tab
|
||||||
transferList = new TransferListWidget(tabs, BTSession);
|
transferListFilters = new TransferListFiltersWidget(vSplitter);
|
||||||
int index_tab = tabs->addTab(transferList, tr("Transfers"));
|
vSplitter->addWidget(transferListFilters);
|
||||||
tabs->setTabIcon(index_tab, QIcon(QString::fromUtf8(":/Icons/oxygen/folder-remote.png")));
|
transferList = new TransferListWidget(vSplitter, BTSession);
|
||||||
|
vSplitter->addWidget(transferList);
|
||||||
|
|
||||||
|
tabs->addTab(vSplitter, QIcon(QString::fromUtf8(":/Icons/oxygen/folder-remote.png")), tr("Transfers"));
|
||||||
|
|
||||||
vboxLayout->addWidget(tabs);
|
vboxLayout->addWidget(tabs);
|
||||||
|
|
||||||
// Transfer list slots
|
// Transfer list slots
|
||||||
@ -155,8 +162,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|||||||
//connect(downloadingTorrentTab, SIGNAL(torrentDoubleClicked(QString, bool)), this, SLOT(torrentDoubleClicked(QString, bool)));
|
//connect(downloadingTorrentTab, SIGNAL(torrentDoubleClicked(QString, bool)), this, SLOT(torrentDoubleClicked(QString, bool)));
|
||||||
// Search engine tab
|
// Search engine tab
|
||||||
searchEngine = new SearchEngine(BTSession, myTrayIcon, systrayIntegration);
|
searchEngine = new SearchEngine(BTSession, myTrayIcon, systrayIntegration);
|
||||||
index_tab = tabs->addTab(searchEngine, tr("Search"));
|
tabs->addTab(searchEngine, QIcon(QString::fromUtf8(":/Icons/oxygen/edit-find.png")), tr("Search"));
|
||||||
tabs->setTabIcon(index_tab, QIcon(QString::fromUtf8(":/Icons/oxygen/edit-find.png")));
|
|
||||||
readSettings();
|
readSettings();
|
||||||
// RSS Tab
|
// RSS Tab
|
||||||
rssWidget = 0;
|
rssWidget = 0;
|
||||||
@ -233,6 +239,11 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|||||||
if(settings.value(QString::fromUtf8("Preferences/General/StartMinimized"), false).toBool()) {
|
if(settings.value(QString::fromUtf8("Preferences/General/StartMinimized"), false).toBool()) {
|
||||||
this->setWindowState(Qt::WindowMinimized);
|
this->setWindowState(Qt::WindowMinimized);
|
||||||
}
|
}
|
||||||
|
// Splitter size
|
||||||
|
QList<int> sizes;
|
||||||
|
sizes << 120;
|
||||||
|
sizes << vSplitter->width()-120;
|
||||||
|
vSplitter->setSizes(sizes);
|
||||||
scrapeTimer = new QTimer(this);
|
scrapeTimer = new QTimer(this);
|
||||||
connect(scrapeTimer, SIGNAL(timeout()), this, SLOT(scrapeTrackers()));
|
connect(scrapeTimer, SIGNAL(timeout()), this, SLOT(scrapeTrackers()));
|
||||||
scrapeTimer->start(20000);
|
scrapeTimer->start(20000);
|
||||||
@ -260,7 +271,9 @@ GUI::~GUI() {
|
|||||||
if(rssWidget != 0)
|
if(rssWidget != 0)
|
||||||
delete rssWidget;
|
delete rssWidget;
|
||||||
delete searchEngine;
|
delete searchEngine;
|
||||||
|
delete transferListFilters;
|
||||||
delete transferList;
|
delete transferList;
|
||||||
|
delete vSplitter;
|
||||||
delete checkConnect;
|
delete checkConnect;
|
||||||
qDebug("1");
|
qDebug("1");
|
||||||
if(systrayCreator) {
|
if(systrayCreator) {
|
||||||
|
@ -56,6 +56,8 @@ class QModelIndex;
|
|||||||
class HttpServer;
|
class HttpServer;
|
||||||
class QFrame;
|
class QFrame;
|
||||||
class TransferListWidget;
|
class TransferListWidget;
|
||||||
|
class TransferListFiltersWidget;
|
||||||
|
class QSplitter;
|
||||||
|
|
||||||
class GUI : public QMainWindow, private Ui::MainWindow{
|
class GUI : public QMainWindow, private Ui::MainWindow{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -73,6 +75,8 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||||||
QPointer<QTimer> systrayCreator;
|
QPointer<QTimer> systrayCreator;
|
||||||
QMenu *myTrayIconMenu;
|
QMenu *myTrayIconMenu;
|
||||||
TransferListWidget *transferList;
|
TransferListWidget *transferList;
|
||||||
|
TransferListFiltersWidget *transferListFilters;
|
||||||
|
QSplitter *vSplitter;
|
||||||
QLabel *connecStatusLblIcon;
|
QLabel *connecStatusLblIcon;
|
||||||
bool systrayIntegration;
|
bool systrayIntegration;
|
||||||
bool displaySpeedInTitle;
|
bool displaySpeedInTitle;
|
||||||
|
BIN
src/Icons/oxygen/draw-rectangle.png
Normal file
BIN
src/Icons/oxygen/draw-rectangle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 389 B |
BIN
src/Icons/oxygen/draw-triangle2.png
Normal file
BIN
src/Icons/oxygen/draw-triangle2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 670 B |
BIN
src/Icons/oxygen/folder-remote16.png
Normal file
BIN
src/Icons/oxygen/folder-remote16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 675 B |
@ -1,4 +1,30 @@
|
|||||||
#ifndef TRANSFERLISTFILTERSWIDGET_H
|
#ifndef TRANSFERLISTFILTERSWIDGET_H
|
||||||
#define TRANSFERLISTFILTERSWIDGET_H
|
#define TRANSFERLISTFILTERSWIDGET_H
|
||||||
|
|
||||||
|
#include <QListWidget>
|
||||||
|
#include <QListWidgetItem>
|
||||||
|
#include <QIcon>
|
||||||
|
|
||||||
|
class TransferListFiltersWidget: public QListWidget {
|
||||||
|
public:
|
||||||
|
TransferListFiltersWidget(QWidget *parent): QListWidget(parent) {
|
||||||
|
// Add filters
|
||||||
|
QListWidgetItem *all = new QListWidgetItem(this);
|
||||||
|
all->setData(Qt::DisplayRole, tr("All"));
|
||||||
|
all->setData(Qt::DecorationRole, QIcon(":/Icons/oxygen/folder-remote16.png"));
|
||||||
|
QListWidgetItem *downloading = new QListWidgetItem(this);
|
||||||
|
downloading->setData(Qt::DisplayRole, tr("Downloading"));
|
||||||
|
downloading->setData(Qt::DecorationRole, QIcon(":/Icons/skin/downloading.png"));
|
||||||
|
QListWidgetItem *completed = new QListWidgetItem(this);
|
||||||
|
completed->setData(Qt::DisplayRole, tr("Completed"));
|
||||||
|
completed->setData(Qt::DecorationRole, QIcon(":/Icons/skin/seeding.png"));
|
||||||
|
QListWidgetItem *active = new QListWidgetItem(this);
|
||||||
|
active->setData(Qt::DisplayRole, tr("Active"));
|
||||||
|
active->setData(Qt::DecorationRole, QIcon(":/Icons/oxygen/draw-triangle2.png"));
|
||||||
|
QListWidgetItem *inactive = new QListWidgetItem(this);
|
||||||
|
inactive->setData(Qt::DisplayRole, tr("Inactive"));
|
||||||
|
inactive->setData(Qt::DecorationRole, QIcon(":/Icons/oxygen/draw-rectangle.png"));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
#endif // TRANSFERLISTFILTERSWIDGET_H
|
#endif // TRANSFERLISTFILTERSWIDGET_H
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
<file>Icons/oxygen/mail-queue.png</file>
|
<file>Icons/oxygen/mail-queue.png</file>
|
||||||
<file>Icons/oxygen/view-refresh.png</file>
|
<file>Icons/oxygen/view-refresh.png</file>
|
||||||
<file>Icons/oxygen/file.png</file>
|
<file>Icons/oxygen/file.png</file>
|
||||||
|
<file>Icons/oxygen/folder-remote16.png</file>
|
||||||
<file>Icons/oxygen/mail-folder-inbox.png</file>
|
<file>Icons/oxygen/mail-folder-inbox.png</file>
|
||||||
<file>Icons/oxygen/edit-find.png</file>
|
<file>Icons/oxygen/edit-find.png</file>
|
||||||
<file>Icons/oxygen/folder-new.png</file>
|
<file>Icons/oxygen/folder-new.png</file>
|
||||||
@ -88,6 +89,7 @@
|
|||||||
<file>Icons/oxygen/download.png</file>
|
<file>Icons/oxygen/download.png</file>
|
||||||
<file>Icons/oxygen/application-x-kgetlist-no.png</file>
|
<file>Icons/oxygen/application-x-kgetlist-no.png</file>
|
||||||
<file>Icons/oxygen/gear.png</file>
|
<file>Icons/oxygen/gear.png</file>
|
||||||
|
<file>Icons/oxygen/draw-triangle2.png</file>
|
||||||
<file>Icons/oxygen/remove.png</file>
|
<file>Icons/oxygen/remove.png</file>
|
||||||
<file>Icons/oxygen/browse.png</file>
|
<file>Icons/oxygen/browse.png</file>
|
||||||
<file>Icons/oxygen/unsubscribe16.png</file>
|
<file>Icons/oxygen/unsubscribe16.png</file>
|
||||||
@ -107,6 +109,7 @@
|
|||||||
<file>Icons/oxygen/folder.png</file>
|
<file>Icons/oxygen/folder.png</file>
|
||||||
<file>Icons/oxygen/edit-cut.png</file>
|
<file>Icons/oxygen/edit-cut.png</file>
|
||||||
<file>Icons/oxygen/unsubscribe.png</file>
|
<file>Icons/oxygen/unsubscribe.png</file>
|
||||||
|
<file>Icons/oxygen/draw-rectangle.png</file>
|
||||||
<file>Icons/oxygen/subscribe16.png</file>
|
<file>Icons/oxygen/subscribe16.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
Loading…
x
Reference in New Issue
Block a user