1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-12 15:57:57 +00:00

- Logs are now in a separate dialog

This commit is contained in:
Christophe Dumez 2008-09-07 12:09:41 +00:00
parent f0049f1dae
commit 9156c9ac8f
8 changed files with 126 additions and 10 deletions

View File

@ -8,7 +8,7 @@
- COSMETIC: Transfer speed, ratio, connection status and DHT nodes are displayed in status bar
- COSMETIC: RSS Tab is now hidden as a default
- COSMETIC: Allow to hide or display top toolbar
- COSMETIC: Top toolbar is now hidden as a default
- COSMETIC: Log is now in a separate dialog
* Tue Aug 26 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.1.3
- BUGFIX: Fixed ratio saving for seeding torrents

View File

@ -57,6 +57,7 @@
#include "previewSelect.h"
#include "allocationDlg.h"
#include "stdlib.h"
#include "console_imp.h"
using namespace libtorrent;
@ -490,6 +491,10 @@ void GUI::on_actionSet_global_upload_limit_triggered() {
new BandwidthAllocationDialog(this, true, BTSession, QStringList());
}
void GUI::on_actionShow_console_triggered() {
new consoleDlg(this, BTSession);
}
void GUI::on_actionSet_global_download_limit_triggered() {
qDebug("actionSet_global_download_limit_triggered");
new BandwidthAllocationDialog(this, false, BTSession, QStringList());

View File

@ -116,6 +116,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
void on_actionCreate_torrent_triggered();
void on_actionWebsite_triggered() const;
void on_actionBugReport_triggered() const;
void on_actionShow_console_triggered();
void readParamsOnSocket();
void acceptConnection();
void togglePausedState(QString hash);

View File

@ -58,6 +58,7 @@
<string>Options</string>
</property>
<addaction name="actionOptions" />
<addaction name="actionShow_console" />
</widget>
<widget class="QMenu" name="menu_File" >
<property name="title" >
@ -255,6 +256,14 @@
<bool>false</bool>
</property>
</action>
<action name="actionShow_console" >
<property name="icon" >
<iconset resource="icons.qrc" >:/Icons/log.png</iconset>
</property>
<property name="text" >
<string>Show console</string>
</property>
</action>
</widget>
<resources>
<include location="icons.qrc" />

58
src/console.ui Normal file
View File

@ -0,0 +1,58 @@
<ui version="4.0" >
<class>ConsoleDlg</class>
<widget class="QDialog" name="ConsoleDlg" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>512</width>
<height>497</height>
</rect>
</property>
<property name="windowTitle" >
<string>qBittorrent console</string>
</property>
<property name="windowIcon" >
<iconset resource="icons.qrc" >:/Icons/log.png</iconset>
</property>
<layout class="QVBoxLayout" >
<item>
<widget class="QTabWidget" name="tabConsole" >
<property name="currentIndex" >
<number>0</number>
</property>
<widget class="QWidget" name="tab" >
<attribute name="title" >
<string>General</string>
</attribute>
<attribute name="icon" >
<iconset resource="icons.qrc" >:/Icons/log.png</iconset>
</attribute>
<layout class="QVBoxLayout" >
<item>
<widget class="QTextBrowser" name="textConsole" />
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2" >
<attribute name="title" >
<string>Blocked IPs</string>
</attribute>
<attribute name="icon" >
<iconset resource="icons.qrc" >:/Icons/filter.png</iconset>
</attribute>
<layout class="QVBoxLayout" >
<item>
<widget class="QTextBrowser" name="textBannedPeers" />
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="icons.qrc" />
</resources>
<connections/>
</ui>

50
src/console_imp.h Normal file
View File

@ -0,0 +1,50 @@
/*
* 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.
*
* Contact : chris@qbittorrent.org
*/
#ifndef CONSOLE_H
#define CONSOLE_H
#include "bittorrent.h"
#include "ui_console.h"
using namespace libtorrent;
class consoleDlg : public QDialog, private Ui_ConsoleDlg{
Q_OBJECT
private:
bittorrent *BTSession;
public:
consoleDlg(QWidget *parent, bittorrent* _BTSession) : QDialog(parent) {
setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
BTSession = _BTSession;
textConsole->setHtml(BTSession->getConsoleMessages().join("<br>"));
textBannedPeers->setHtml(BTSession->getPeerBanMessages().join("<br>"));
show();
}
~consoleDlg() {}
};
#endif

View File

@ -28,13 +28,6 @@
<property name="bottomMargin" >
<number>9</number>
</property>
<item>
<widget class="QLabel" name="lbl_finished" >
<property name="text" >
<string>The following torrents are finished and shared:</string>
</property>
</widget>
</item>
<item>
<widget class="QTreeView" name="finishedList" >
<property name="contextMenuPolicy" >

View File

@ -157,13 +157,13 @@ HEADERS += GUI.h misc.h options_imp.h about_imp.h \
httpserver.h httpconnection.h \
httprequestparser.h httpresponsegenerator.h \
json.h eventmanager.h filterParserThread.h \
TrackersAdditionDlg.h searchTab.h
TrackersAdditionDlg.h searchTab.h console_imp.h
FORMS += MainWindow.ui options.ui about.ui \
properties.ui createtorrent.ui preview.ui \
login.ui downloadFromURL.ui addTorrentDialog.ui \
search.ui rss.ui seeding.ui bandwidth_limit.ui \
download.ui engineSelect.ui pluginSource.ui \
trackersAdd.ui
trackersAdd.ui console.ui
SOURCES += GUI.cpp \
main.cpp \
options_imp.cpp \