From 707e87f5b85f8e08809d36f163fec5eb32095651 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 8 Nov 2009 14:20:58 +0000 Subject: [PATCH] - started work on properties --- src/GUI.cpp | 10 +- src/GUI.h | 3 + src/Icons/oxygen/help-about.png | Bin 0 -> 734 bytes src/Icons/oxygen/network-server.png | Bin 0 -> 491 bytes src/Icons/oxygen/peer.png | Bin 0 -> 409 bytes src/Icons/oxygen/urlseed.png | Bin 0 -> 901 bytes src/icons.qrc | 4 + src/propertiesWidget.ui | 487 ++++++++++++++++++++++++++++ src/propertieswidget.cpp | 39 +++ src/propertieswidget.h | 44 +++ src/src.pro | 9 +- 11 files changed, 591 insertions(+), 5 deletions(-) create mode 100644 src/Icons/oxygen/help-about.png create mode 100644 src/Icons/oxygen/network-server.png create mode 100644 src/Icons/oxygen/peer.png create mode 100644 src/Icons/oxygen/urlseed.png create mode 100644 src/propertiesWidget.ui create mode 100644 src/propertieswidget.cpp create mode 100644 src/propertieswidget.h diff --git a/src/GUI.cpp b/src/GUI.cpp index fe4b0ec40..bef4e3b84 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -63,6 +63,7 @@ #include "httpserver.h" #include "torrentPersistentData.h" #include "TransferListFiltersWidget.h" +#include "propertieswidget.h" using namespace libtorrent; @@ -137,13 +138,16 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis qDebug("create tabWidget"); tabs = new QTabWidget(); vSplitter = new QSplitter(Qt::Horizontal); + hSplitter = new QSplitter(Qt::Vertical, vSplitter); // Transfer List tab + properties = new PropertiesWidget(hSplitter); transferList = new TransferListWidget(vSplitter, BTSession); transferListFilters = new TransferListFiltersWidget(vSplitter, transferList); - + hSplitter->addWidget(transferList); + hSplitter->addWidget(properties); vSplitter->addWidget(transferListFilters); - vSplitter->addWidget(transferList); + vSplitter->addWidget(hSplitter); tabs->addTab(vSplitter, QIcon(QString::fromUtf8(":/Icons/oxygen/folder-remote.png")), tr("Transfers")); vboxLayout->addWidget(tabs); @@ -274,6 +278,8 @@ GUI::~GUI() { delete searchEngine; delete transferListFilters; delete transferList; + delete properties; + delete hSplitter; delete vSplitter; delete checkConnect; qDebug("1"); diff --git a/src/GUI.h b/src/GUI.h index 1cc7dee8d..effe8dfc6 100644 --- a/src/GUI.h +++ b/src/GUI.h @@ -58,6 +58,7 @@ class QFrame; class TransferListWidget; class TransferListFiltersWidget; class QSplitter; +class PropertiesWidget; class GUI : public QMainWindow, private Ui::MainWindow{ Q_OBJECT @@ -76,7 +77,9 @@ class GUI : public QMainWindow, private Ui::MainWindow{ QMenu *myTrayIconMenu; TransferListWidget *transferList; TransferListFiltersWidget *transferListFilters; + PropertiesWidget *properties; QSplitter *vSplitter; + QSplitter *hSplitter; QLabel *connecStatusLblIcon; bool systrayIntegration; bool displaySpeedInTitle; diff --git a/src/Icons/oxygen/help-about.png b/src/Icons/oxygen/help-about.png new file mode 100644 index 0000000000000000000000000000000000000000..e1eb7972d484c933cb23c846ca6e77501ca1a97d GIT binary patch literal 734 zcmV<40wMj0P)+f;K8PVh9!*!(H4p;$7};_ilHbUDwTN z?EK+lhc`R_y!UuRN-6x01pX48Suv4qP7`BO!vpET0O+gyXuns$BFJ1;k4`)2(jOVn zLP&)@|>CnmbvB7Sn((ujcbPt6Ul@NW0;qQtu$2F_1Pn zdL+kCE`>_XhusKJI@B)-#kg}{W z9&uoQx@d3IrvW^O3=C;bfeTc%K`7r3&~Sa+c={CK54R{p0ZhOU=EcOIP2%vo zY8yFAz%)4AmW%4$u+JEjmSXz;(N?9I}Yocf`GGok!G?x%fYd3ANf{pVvMA_*YXg{cv7nZBm2@ieWNras&G3D272l_l(i Qb^rhX07*qoM6N<$g0$m2kN^Mx literal 0 HcmV?d00001 diff --git a/src/Icons/oxygen/network-server.png b/src/Icons/oxygen/network-server.png new file mode 100644 index 0000000000000000000000000000000000000000..d2a954d44526a447e6f4e693324450868f7443b4 GIT binary patch literal 491 zcmV@I z6tZ>cs#3?$MGAIGp@M&a*2RKp$X#+d-yK9MULgrQczO4}pZ6m4M zO;r>{>SMK1(R3jAkU$c z(ue|C=n(p<8K9a`77{=;?4T$LkSNe1Vn%?5fE)o*{&oS%K|tex5Zy(6z;}}H5(OFOaM9~Q zx7&rU^;%d7NZx5-7`_aL!@KIe_FWhZ2B&COuIuhI#@gB+jYenIeO0r?aeN&F!KL=o zG(F6?Xp54<9?3z011HBvpSaL>eLkDbZu-?)JUISV`@iy0Ug zcY`pa)tkqUfP#`Gt`Q}{`DrEPiAAXl<>lpinR(g8$%zH2dih1^v)|cB0aZ(Qx;Tbt zoKOC7zMvk`wt2Faq_S(id`k2^Pm0i_5b<& zAxc~Md>Q+9-#UNbf82lGf7wh6Z`MDS-!o5x%Vn4DKkGl?&CZkmKjID$>3CoMZ~e!3 zNj}qm-m;E?3T3B%?SE8XsiILP>)QB1(075Iq>6@txGQ7%%rEs*|6lsAx-j5}UAuM{ z6PwsNyNCIU{yPRdu}@bQ=AYJ(YKff=)1Gg>e}#!{-R=6F|78MB{EdIV|9Jh||9AK! zv?L<--()=8``%ugO@#SZ_h)ftZG$R_LWc=P3@@X9THg5(T@DOL22WQ%mvv4FO#rj_ Bsq6p% literal 0 HcmV?d00001 diff --git a/src/Icons/oxygen/urlseed.png b/src/Icons/oxygen/urlseed.png new file mode 100644 index 0000000000000000000000000000000000000000..d0746f6637f91b80648a44684017b096020c2fbf GIT binary patch literal 901 zcmV;01A6?4P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2iXT6 z3@0|{X2oLw00RX{L_t(I%bk&3OjCCl#-IN=2iu;OewU95XpxqRb-+N`05_9em<2Rw zLZZg6L=(MW%WkII%wQrhaTiO}Eb&H{UF~9I7u#;OOcIE%+jLu8@JG*wA*XuZ6zE~n@xe%V8iQh>H z*MDJP1Z1B=d+ZrND6vG(~M(T?tIet0R$( z7cdsH;WVRX;c(kYN};HB+aQP;MAHSx3=7V}LoTl2+{Yhao5yv2a|T?wS?~LOB1W6u z^^thG2%g^pmZR9YvkKvO5?~mZtUR1H9$WNfzRdy#lu*hNj0K+pEQ_g_i2KiSSS~SO z%{&;B0XiK6J=HL9c8}xrVnhFTuUc@qhi{o1>;raxH4HTlcy?5xuA&@c;TK4YS*%GJ zoN9Gp^j-wdQ~8prYO+zs%!PkE(+L1vS}cCgCh`MZTA?n!jO_DQpvGxLm$w2Fk>{A0 zibB&$SP}$$eX*NmInMgg;IGYZUMMId50#bt4VqI)WHCi2V+ojaWpMHg-t*YeR%Zh( zFwk-$ot<02+}u-Wxx{*igc(9|Rk>t(BG9d7<0rC|hs{XnQd&h)%8*A>A?UH~p8rmsmYwW}SfwR_s%UL|P bH_l!Hjq5YnqXgLB00000NkvXXu0mjfZJe5J literal 0 HcmV?d00001 diff --git a/src/icons.qrc b/src/icons.qrc index e014c332b..e70126d52 100644 --- a/src/icons.qrc +++ b/src/icons.qrc @@ -91,6 +91,7 @@ Icons/oxygen/gear.png Icons/oxygen/draw-triangle2.png Icons/oxygen/remove.png + Icons/oxygen/peer.png Icons/oxygen/browse.png Icons/oxygen/unsubscribe16.png Icons/oxygen/subscribe.png @@ -104,9 +105,12 @@ Icons/oxygen/list-remove.png Icons/oxygen/connection.png Icons/oxygen/bug.png + Icons/oxygen/help-about.png Icons/oxygen/list-add.png + Icons/oxygen/network-server.png Icons/oxygen/application-x-kgetlist.png Icons/oxygen/folder.png + Icons/oxygen/urlseed.png Icons/oxygen/edit-cut.png Icons/oxygen/unsubscribe.png Icons/oxygen/draw-rectangle.png diff --git a/src/propertiesWidget.ui b/src/propertiesWidget.ui new file mode 100644 index 000000000..759207441 --- /dev/null +++ b/src/propertiesWidget.ui @@ -0,0 +1,487 @@ + + + PropertiesWidget + + + + 0 + 0 + 756 + 300 + + + + Form + + + + + + 0 + + + + + + + + + + 75 + true + + + + Torrent information + + + + + + + + + 50 + false + + + + Save path: + + + + + + + + 50 + false + + + + Creator: + + + + + + + + 50 + false + + + + Torrent hash: + + + + + + + + 50 + false + + + + Comment: + + + + + + + + + + + + + + + + + + + + + 27 + 16777215 + + + + + 50 + false + + + + ... + + + + + + + + + + + + + + + + + + + + + + + + 50 + false + + + + + + + + + + + + + Qt::Horizontal + + + + 185 + 20 + + + + + + + + + + + + 0 + 0 + + + + + 0 + 115 + + + + + Sans Serif + 9 + 75 + false + true + false + false + + + + Current session + + + + 6 + + + 9 + + + + + 6 + + + 0 + + + + + 6 + + + 0 + + + + + + Sans Serif + 9 + 50 + false + false + false + false + + + + Total uploaded: + + + + + + + + Sans Serif + 9 + 50 + false + false + false + false + + + + Total downloaded: + + + + + + + + Sans Serif + 9 + 50 + false + false + false + false + + + + Share ratio: + + + + + + + + Sans Serif + 9 + 50 + false + false + false + false + + + + Total failed: + + + + + + + + + 6 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + 181 + 20 + + + + + + + + + + + + + + + + 0 + 50 + + + + + 75 + true + + + + Downloaded pieces + + + + + + + + Sans Serif + 9 + 50 + false + false + false + false + + + + Download in correct order (slower but good for previewing) + + + + + + + + + + + + + + General + + + + :/Icons/oxygen/help-about.png:/Icons/oxygen/help-about.png + + + + 16 + 16 + + + + + + + + Trackers + + + + :/Icons/oxygen/network-server.png:/Icons/oxygen/network-server.png + + + + 16 + 16 + + + + + + + + URL seeds + + + + :/Icons/oxygen/urlseed.png:/Icons/oxygen/urlseed.png + + + + 16 + 16 + + + + + + + + Files + + + + :/Icons/oxygen/folder.png:/Icons/oxygen/folder.png + + + + 16 + 16 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + diff --git a/src/propertieswidget.cpp b/src/propertieswidget.cpp new file mode 100644 index 000000000..4a1b573f3 --- /dev/null +++ b/src/propertieswidget.cpp @@ -0,0 +1,39 @@ +/* + * Bittorrent Client using Qt4 and libtorrent. + * Copyright (C) 2006 Christophe Dumez + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * In addition, as a special exception, the copyright holders give permission to + * link this program with the OpenSSL project's "OpenSSL" library (or with + * modified versions of it that use the same license as the "OpenSSL" library), + * and distribute the linked executables. You must obey the GNU General Public + * License in all respects for all of the code used other than "OpenSSL". If you + * modify file(s), you may extend this exception to your version of the file(s), + * but you are not obligated to do so. If you do not wish to do so, delete this + * exception statement from your version. + * + * Contact : chris@qbittorrent.org + */ + +#include "propertieswidget.h" + +PropertiesWidget::PropertiesWidget(QWidget *parent): QWidget(parent) { + setupUi(this); +} + +PropertiesWidget::~PropertiesWidget() { + +} diff --git a/src/propertieswidget.h b/src/propertieswidget.h new file mode 100644 index 000000000..f439a93d2 --- /dev/null +++ b/src/propertieswidget.h @@ -0,0 +1,44 @@ +/* + * Bittorrent Client using Qt4 and libtorrent. + * Copyright (C) 2006 Christophe Dumez + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * In addition, as a special exception, the copyright holders give permission to + * link this program with the OpenSSL project's "OpenSSL" library (or with + * modified versions of it that use the same license as the "OpenSSL" library), + * and distribute the linked executables. You must obey the GNU General Public + * License in all respects for all of the code used other than "OpenSSL". If you + * modify file(s), you may extend this exception to your version of the file(s), + * but you are not obligated to do so. If you do not wish to do so, delete this + * exception statement from your version. + * + * Contact : chris@qbittorrent.org + */ + +#ifndef PROPERTIESWIDGET_H +#define PROPERTIESWIDGET_H + +#include +#include "ui_propertiesWidget.h" + +class PropertiesWidget : public QWidget, private Ui::PropertiesWidget { + Q_OBJECT +public: + PropertiesWidget(QWidget *parent); + ~PropertiesWidget(); +}; + +#endif // PROPERTIESWIDGET_H diff --git a/src/src.pro b/src/src.pro index c8b9dbd86..46288d5da 100644 --- a/src/src.pro +++ b/src/src.pro @@ -184,7 +184,8 @@ HEADERS += GUI.h \ supportedEngines.h \ TransferListWidget.h \ TransferListDelegate.h \ - TransferListFiltersWidget.h + TransferListFiltersWidget.h \ + propertieswidget.h FORMS += MainWindow.ui \ options.ui \ about.ui \ @@ -202,7 +203,8 @@ FORMS += MainWindow.ui \ pluginSource.ui \ trackersAdd.ui \ console.ui \ - FeedDownloader.ui + FeedDownloader.ui \ + propertiesWidget.ui SOURCES += GUI.cpp \ main.cpp \ options_imp.cpp \ @@ -225,5 +227,6 @@ SOURCES += GUI.cpp \ SearchTab.cpp \ ico.cpp \ rss.cpp \ - TransferListWidget.cpp + TransferListWidget.cpp \ + propertieswidget.cpp DESTDIR = .