|
|
@ -33,8 +33,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include <QShortcut> |
|
|
|
#include <QShortcut> |
|
|
|
#include <QWidget> |
|
|
|
#include <QWidget> |
|
|
|
#include "base/bittorrent/torrenthandle.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "base/bittorrent/torrenthandle.h" |
|
|
|
|
|
|
|
|
|
|
|
class TransferListWidget; |
|
|
|
class TransferListWidget; |
|
|
|
class TorrentContentFilterModel; |
|
|
|
class TorrentContentFilterModel; |
|
|
@ -67,9 +67,12 @@ class PropertiesWidget: public QWidget |
|
|
|
Q_DISABLE_COPY(PropertiesWidget) |
|
|
|
Q_DISABLE_COPY(PropertiesWidget) |
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
public: |
|
|
|
enum SlideState {REDUCED, VISIBLE}; |
|
|
|
enum SlideState |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
REDUCED, |
|
|
|
|
|
|
|
VISIBLE |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
PropertiesWidget(QWidget *parent, MainWindow *main_window, TransferListWidget *transferList); |
|
|
|
PropertiesWidget(QWidget *parent, MainWindow *main_window, TransferListWidget *transferList); |
|
|
|
~PropertiesWidget(); |
|
|
|
~PropertiesWidget(); |
|
|
|
BitTorrent::TorrentHandle *getCurrentTorrent() const; |
|
|
|
BitTorrent::TorrentHandle *getCurrentTorrent() const; |
|
|
@ -78,6 +81,16 @@ public: |
|
|
|
QTreeView *getFilesList() const; |
|
|
|
QTreeView *getFilesList() const; |
|
|
|
SpeedWidget *getSpeedWidget() const { return speedWidget; } |
|
|
|
SpeedWidget *getSpeedWidget() const { return speedWidget; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public slots: |
|
|
|
|
|
|
|
void setVisibility(bool visible); |
|
|
|
|
|
|
|
void loadDynamicData(); |
|
|
|
|
|
|
|
void clear(); |
|
|
|
|
|
|
|
void readSettings(); |
|
|
|
|
|
|
|
void saveSettings(); |
|
|
|
|
|
|
|
void reloadPreferences(); |
|
|
|
|
|
|
|
void openDoubleClickedFile(const QModelIndex &); |
|
|
|
|
|
|
|
void loadTrackers(BitTorrent::TorrentHandle *const torrent); |
|
|
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
protected: |
|
|
|
QPushButton *getButtonFromIndex(int index); |
|
|
|
QPushButton *getButtonFromIndex(int index); |
|
|
|
bool applyPriorities(); |
|
|
|
bool applyPriorities(); |
|
|
@ -98,21 +111,10 @@ protected slots: |
|
|
|
void renameSelectedFile(); |
|
|
|
void renameSelectedFile(); |
|
|
|
void openSelectedFile(); |
|
|
|
void openSelectedFile(); |
|
|
|
|
|
|
|
|
|
|
|
public slots: |
|
|
|
|
|
|
|
void setVisibility(bool visible); |
|
|
|
|
|
|
|
void loadDynamicData(); |
|
|
|
|
|
|
|
void clear(); |
|
|
|
|
|
|
|
void readSettings(); |
|
|
|
|
|
|
|
void saveSettings(); |
|
|
|
|
|
|
|
void reloadPreferences(); |
|
|
|
|
|
|
|
void openDoubleClickedFile(const QModelIndex &); |
|
|
|
|
|
|
|
void loadTrackers(BitTorrent::TorrentHandle *const torrent); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
void openFile(const QModelIndex &index); |
|
|
|
void openFile(const QModelIndex &index); |
|
|
|
void openFolder(const QModelIndex &index, bool containing_folder); |
|
|
|
void openFolder(const QModelIndex &index, bool containing_folder); |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
|
|
|
Ui::PropertiesWidget *m_ui; |
|
|
|
Ui::PropertiesWidget *m_ui; |
|
|
|
TransferListWidget *transferList; |
|
|
|
TransferListWidget *transferList; |
|
|
|
MainWindow *main_window; |
|
|
|
MainWindow *main_window; |
|
|
|