Browse Source

- started work on properties

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
707e87f5b8
  1. 10
      src/GUI.cpp
  2. 3
      src/GUI.h
  3. BIN
      src/Icons/oxygen/help-about.png
  4. BIN
      src/Icons/oxygen/network-server.png
  5. BIN
      src/Icons/oxygen/peer.png
  6. BIN
      src/Icons/oxygen/urlseed.png
  7. 4
      src/icons.qrc
  8. 487
      src/propertiesWidget.ui
  9. 39
      src/propertieswidget.cpp
  10. 44
      src/propertieswidget.h
  11. 9
      src/src.pro

10
src/GUI.cpp

@ -63,6 +63,7 @@ @@ -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 @@ -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() { @@ -274,6 +278,8 @@ GUI::~GUI() {
delete searchEngine;
delete transferListFilters;
delete transferList;
delete properties;
delete hSplitter;
delete vSplitter;
delete checkConnect;
qDebug("1");

3
src/GUI.h

@ -58,6 +58,7 @@ class QFrame; @@ -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{ @@ -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;

BIN
src/Icons/oxygen/help-about.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

BIN
src/Icons/oxygen/network-server.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

BIN
src/Icons/oxygen/peer.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

BIN
src/Icons/oxygen/urlseed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

4
src/icons.qrc

@ -91,6 +91,7 @@ @@ -91,6 +91,7 @@
<file>Icons/oxygen/gear.png</file>
<file>Icons/oxygen/draw-triangle2.png</file>
<file>Icons/oxygen/remove.png</file>
<file>Icons/oxygen/peer.png</file>
<file>Icons/oxygen/browse.png</file>
<file>Icons/oxygen/unsubscribe16.png</file>
<file>Icons/oxygen/subscribe.png</file>
@ -104,9 +105,12 @@ @@ -104,9 +105,12 @@
<file>Icons/oxygen/list-remove.png</file>
<file>Icons/oxygen/connection.png</file>
<file>Icons/oxygen/bug.png</file>
<file>Icons/oxygen/help-about.png</file>
<file>Icons/oxygen/list-add.png</file>
<file>Icons/oxygen/network-server.png</file>
<file>Icons/oxygen/application-x-kgetlist.png</file>
<file>Icons/oxygen/folder.png</file>
<file>Icons/oxygen/urlseed.png</file>
<file>Icons/oxygen/edit-cut.png</file>
<file>Icons/oxygen/unsubscribe.png</file>
<file>Icons/oxygen/draw-rectangle.png</file>

487
src/propertiesWidget.ui

@ -0,0 +1,487 @@ @@ -0,0 +1,487 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PropertiesWidget</class>
<widget class="QWidget" name="PropertiesWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>756</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QStackedWidget" name="stackedProperties">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QGroupBox" name="groupTorrentInfos">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="title">
<string>Torrent information</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="savePath_lbl">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Save path:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="creator_lbl">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Creator:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="hash_lbl2">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Torrent hash:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="comment_lbl2">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Comment:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="save_path">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="changeSavePathButton">
<property name="maximumSize">
<size>
<width>27</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="creator">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="hash_lbl">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="comment_lbl">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>185</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>115</height>
</size>
</property>
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
<weight>75</weight>
<italic>false</italic>
<bold>true</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="title">
<string>Current session</string>
</property>
<layout class="QVBoxLayout" name="_2">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<layout class="QHBoxLayout" name="_3">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="_4">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_5">
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text">
<string>Total uploaded:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text">
<string>Total downloaded:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_ratio">
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text">
<string>Share ratio:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text">
<string>Total failed:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="_5">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="upTotal">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="dlTotal">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="shareRatio">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="failed">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>181</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="RealProgressBox">
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="title">
<string>Downloaded pieces</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="incrementalDownload">
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text">
<string>Download in correct order (slower but good for previewing)</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_2"/>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="main_infos_button">
<property name="text">
<string>General</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/Icons/oxygen/help-about.png</normaloff>:/Icons/oxygen/help-about.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="trackers_button">
<property name="text">
<string>Trackers</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/Icons/oxygen/network-server.png</normaloff>:/Icons/oxygen/network-server.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="url_seeds_button">
<property name="text">
<string>URL seeds</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/Icons/oxygen/urlseed.png</normaloff>:/Icons/oxygen/urlseed.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="files_button">
<property name="text">
<string>Files</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/Icons/oxygen/folder.png</normaloff>:/Icons/oxygen/folder.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="icons.qrc"/>
</resources>
<connections/>
</ui>

39
src/propertieswidget.cpp

@ -0,0 +1,39 @@ @@ -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() {
}

44
src/propertieswidget.h

@ -0,0 +1,44 @@ @@ -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 <QWidget>
#include "ui_propertiesWidget.h"
class PropertiesWidget : public QWidget, private Ui::PropertiesWidget {
Q_OBJECT
public:
PropertiesWidget(QWidget *parent);
~PropertiesWidget();
};
#endif // PROPERTIESWIDGET_H

9
src/src.pro

@ -184,7 +184,8 @@ HEADERS += GUI.h \ @@ -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 \ @@ -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 \ @@ -225,5 +227,6 @@ SOURCES += GUI.cpp \
SearchTab.cpp \
ico.cpp \
rss.cpp \
TransferListWidget.cpp
TransferListWidget.cpp \
propertieswidget.cpp
DESTDIR = .

Loading…
Cancel
Save