Browse Source

- Added a rss tab (still not functional)

adaptive-webui-19844
Arnaud Demaiziere 18 years ago
parent
commit
6c8f0bff13
  1. 5
      TODO
  2. 5
      src/GUI.cpp
  3. 3
      src/GUI.h
  4. 1
      src/downloadThread.h
  5. 191
      src/rss.ui
  6. 38
      src/rss_imp.h
  7. 7
      src/src.pro

5
TODO

@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
- Add a torrent scheduler
// in v0.10 (partial) - WIP
- Download from RSS feeds (WIP by gtsoul in RSS_SUPPORT branch, clean & finish rss.h, merge with trunk, add a tab in mainWindow, debug)
- Download from RSS feeds (WIP by gtsoul, clean & finish rss.h, add a tab in mainWindow, debug)
- Move finished torrent to another tab and keep on seeding them even after restart (better for sharing)
- Improve torrent creation dialog (look & features) :
- Add Private combobox (allow to share on DHT or not)
@ -44,4 +44,5 @@ @@ -44,4 +44,5 @@
- Exit confirmation only if there are active downloads (display number of downloads) - SMARTER
- Make use of QNetworkInterface (could be useful ?)
- Display more info in log (UPnP successful)
- Possibility to disable the trayicon
- Possibility to disable the trayicon
- Bring mainWindow to foreground when asking for exit confirmation

5
src/GUI.cpp

@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
#include "downloadFromURLImp.h"
#include "torrentAddition.h"
#include "searchEngine.h"
#include "rss_imp.h"
/*****************************************************
* *
@ -163,6 +164,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){ @@ -163,6 +164,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
searchEngine = new SearchEngine(&BTSession, myTrayIcon);
tabs->addTab(searchEngine, tr("Search"));
tabs->setTabIcon(1, QIcon(QString::fromUtf8(":/Icons/skin/search.png")));
// RSS tab
rssWidget = new RSSImp();
tabs->addTab(rssWidget, tr("RSS"));
tabs->setTabIcon(2, QIcon(QString::fromUtf8(":/Icons/skin/search.png")));
// Start download list refresher
refresher = new QTimer(this);
connect(refresher, SIGNAL(timeout()), this, SLOT(updateDlList()));

3
src/GUI.h

@ -50,6 +50,7 @@ class SearchEngine; @@ -50,6 +50,7 @@ class SearchEngine;
class QTcpServer;
class QTcpSocket;
class QCloseEvent;
class RSSImp;
using namespace libtorrent;
namespace fs = boost::filesystem;
@ -80,6 +81,8 @@ class GUI : public QMainWindow, private Ui::MainWindow{ @@ -80,6 +81,8 @@ class GUI : public QMainWindow, private Ui::MainWindow{
QProcess *previewProcess;
// Search
SearchEngine *searchEngine;
// RSS
RSSImp *rssWidget;
// Misc
QTcpServer *tcpServer;
QTcpSocket *clientConnection;

1
src/downloadThread.h

@ -156,6 +156,7 @@ class downloadThread : public QThread { @@ -156,6 +156,7 @@ class downloadThread : public QThread {
curl_easy_cleanup(curl);
// Close tmp file
fclose(file);
qDebug("##### chemin "+filePath.toUtf8());
emit downloadFinished(url, filePath, return_code, QString(errorBuffer));
qDebug("In Download thread RUN, signal emitted, ErrorBuffer: %s", errorBuffer);
}else{

191
src/rss.ui

@ -0,0 +1,191 @@ @@ -0,0 +1,191 @@
<ui version="4.0" >
<class>RSS</class>
<widget class="QWidget" name="RSS" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>811</width>
<height>453</height>
</rect>
</property>
<property name="windowTitle" >
<string>Search</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="lbl_streams" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>RSS streams:</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="listStreams" />
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="delStream_button" >
<property name="minimumSize" >
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="text" >
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="refreshAll_button" >
<property name="minimumSize" >
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="text" >
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="addStream_button" >
<property name="minimumSize" >
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="text" >
<string/>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="news_lbl" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>News:</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="listNews" >
<property name="minimumSize" >
<size>
<width>600</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QTextBrowser" name="contentBrowser" />
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

38
src/rss_imp.h

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
/*
* Bittorrent Client using Qt4 and libtorrent.
* Copyright (C) 2006 Christophe Dumez, Arnaud Demaiziere
*
* 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.
*
* Contact : chris@qbittorrent.org
*/
#ifndef __RSS_IMP_H__
#define __RSS_IMP_H__
#include "ui_rss.h"
#include "rss.h"
class RSSImp : public QWidget, public Ui::RSS{
Q_OBJECT
public:
RSSImp() : QWidget(){
setupUi(this);
}
~RSSImp(){}
};
#endif

7
src/src.pro

@ -30,7 +30,7 @@ QMAKE_CXXFLAGS_DEBUG += -fwrapv @@ -30,7 +30,7 @@ QMAKE_CXXFLAGS_DEBUG += -fwrapv
#LIBS += -lcurl -lupnp
#CONFIG += link_pkgconfig
#PKGCONFIG += libtorrent
QT += network
QT += network xml
DEFINES += QT_NO_CAST_TO_ASCII
@ -115,11 +115,12 @@ HEADERS += GUI.h misc.h options_imp.h about_imp.h \ @@ -115,11 +115,12 @@ HEADERS += GUI.h misc.h options_imp.h about_imp.h \
PreviewListDelegate.h trackerLogin.h \
downloadThread.h downloadFromURLImp.h \
torrentAddition.h deleteThread.h \
bittorrent.h searchEngine.h
bittorrent.h searchEngine.h \
rss.h rss_imp.h
FORMS += MainWindow.ui options.ui about.ui \
properties.ui createtorrent.ui preview.ui \
login.ui downloadFromURL.ui addTorrentDialog.ui \
search.ui
search.ui rss.ui
SOURCES += GUI.cpp \
main.cpp \
options_imp.cpp \

Loading…
Cancel
Save