Changeset 14539
- Timestamp:
- Jun 12, 2015, 10:12:12 PM (8 years ago)
- Location:
- trunk/qt
- Files:
-
- 56 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt/AboutDialog.h
r14537 r14539 20 20 21 21 public: 22 AboutDialog (QWidget * parent = 0);23 ~AboutDialog () {}22 AboutDialog (QWidget * parent = nullptr); 23 virtual ~AboutDialog () {} 24 24 25 25 public slots: … … 27 27 28 28 private: 29 Ui::AboutDialog ui; 30 29 31 QDialog * myLicenseDialog; 30 Ui::AboutDialog ui;31 32 }; 32 33 -
trunk/qt/AddData.h
r14537 r14539 18 18 { 19 19 public: 20 enum 21 { 22 NONE, 23 MAGNET, 24 URL, 25 FILENAME, 26 METAINFO 27 }; 20 28 21 enum { NONE, MAGNET, URL, FILENAME, METAINFO }; 29 public: 30 AddData (): type (NONE) {} 31 AddData (const QString& str) { set (str); } 32 33 int set (const QString&); 34 35 QByteArray toBase64 () const; 36 QString readableName () const; 37 38 static bool isSupported (const QString& str) { return AddData (str).type != NONE; } 39 40 public: 22 41 int type; 23 24 42 QByteArray metainfo; 25 43 QString filename; 26 44 QString magnet; 27 45 QUrl url; 28 29 public:30 31 int set (const QString&);32 AddData (const QString& str) { set(str); }33 AddData (): type(NONE) {}34 35 QByteArray toBase64 () const;36 QString readableName () const;37 38 public:39 40 static bool isSupported (const QString& str) { return AddData(str).type != NONE; }41 46 }; 42 47 -
trunk/qt/Application.cc
r14537 r14539 570 570 } 571 571 572 FaviconCache& Application::faviconCache () 573 { 574 return myFavicons; 575 } 576 572 577 /*** 573 578 **** -
trunk/qt/Application.h
r14537 r14539 33 33 virtual ~Application (); 34 34 35 public:36 35 void raise (); 37 36 bool notifyApp (const QString& title, const QString& body) const; 38 37 39 public: 40 FaviconCache favicons; 38 FaviconCache& faviconCache (); 39 40 public slots: 41 void addTorrent (const QString&); 42 void addTorrent (const AddData&); 43 44 private: 45 void maybeUpdateBlocklist (); 46 void quitLater (); 47 48 private slots: 49 void consentGiven (int result); 50 void onSessionSourceChanged (); 51 void refreshPref (int key); 52 void refreshTorrents (); 53 void onTorrentsAdded (const QSet<int>& torrents); 54 void onTorrentCompleted (int); 55 void onNewTorrentChanged (int); 41 56 42 57 private: … … 52 67 QTranslator qtTranslator; 53 68 QTranslator appTranslator; 54 55 private slots: 56 void consentGiven (int result); 57 void onSessionSourceChanged (); 58 void refreshPref (int key); 59 void refreshTorrents (); 60 void onTorrentsAdded (const QSet<int>& torrents); 61 void onTorrentCompleted (int); 62 void onNewTorrentChanged (int); 63 64 public slots: 65 void addTorrent (const QString&); 66 void addTorrent (const AddData&); 67 68 private: 69 void maybeUpdateBlocklist (); 70 71 void quitLater (); 69 FaviconCache myFavicons; 72 70 }; 73 71 -
trunk/qt/ColumnResizer.h
r14537 r14539 26 26 void addLayout (QGridLayout * layout); 27 27 28 // QObject 28 29 virtual bool eventFilter (QObject * object, QEvent * event); 29 30 -
trunk/qt/CustomVariantType.h
r14537 r14539 16 16 { 17 17 public: 18 19 18 enum 20 19 { -
trunk/qt/DBusAdaptor.h
r14537 r14539 18 18 { 19 19 Q_OBJECT 20 Q_CLASSINFO( "D-Bus Interface", "com.transmissionbt.Transmission" ) 20 Q_CLASSINFO ("D-Bus Interface", "com.transmissionbt.Transmission") 21 22 public: 23 DBusAdaptor (Application *); 24 virtual ~DBusAdaptor () {} 25 26 public slots: 27 bool PresentWindow (); 28 bool AddMetainfo (const QString&); 21 29 22 30 private: 23 31 Application * myApp; 24 25 public:26 DBusAdaptor( Application* );27 virtual ~DBusAdaptor() {}28 29 public slots:30 bool PresentWindow();31 bool AddMetainfo( const QString& );32 32 }; 33 33 -
trunk/qt/DetailsDialog.cc
r14537 r14539 285 285 **** 286 286 ***/ 287 288 QString289 DetailsDialog::timeToStringRounded (int seconds)290 {291 if (seconds > 60)292 seconds -= (seconds % 60);293 294 return Formatter::timeToString (seconds);295 }296 287 297 288 void -
trunk/qt/DetailsDialog.h
r14537 r14539 17 17 #include <QTimer> 18 18 19 #include "Prefs.h"20 21 19 #include "ui_DetailsDialog.h" 22 20 23 21 class QTreeWidgetItem; 22 23 class Prefs; 24 24 class Session; 25 25 class Torrent; … … 33 33 Q_OBJECT 34 34 35 private: 36 void getNewData (); 35 public: 36 DetailsDialog (Session&, Prefs&, const TorrentModel&, QWidget * parent = nullptr); 37 virtual ~DetailsDialog (); 37 38 38 private slots: 39 void onTorrentChanged (); 40 void onTimer (); 39 void setIds (const QSet<int>& ids); 41 40 42 public: 43 DetailsDialog (Session&, Prefs&, const TorrentModel&, QWidget * parent = 0); 44 ~DetailsDialog (); 45 void setIds (const QSet<int>& ids); 41 // QWidget 46 42 virtual QSize sizeHint () const { return QSize (440, 460); } 47 43 … … 53 49 void initOptionsTab (); 54 50 55 private: 51 void getNewData (); 52 56 53 QIcon getStockIcon (const QString& freedesktop_name, int fallback); 57 QString timeToStringRounded (int seconds);58 QString trimToDesiredWidth (const QString& str);59 60 private:61 Session& mySession;62 Prefs& myPrefs;63 const TorrentModel& myModel;64 QSet<int> myIds;65 QTimer myTimer;66 bool myChangedTorrents;67 bool myHavePendingRefresh;68 69 Ui::DetailsDialog ui;70 71 TrackerModel * myTrackerModel;72 TrackerModelFilter * myTrackerFilter;73 TrackerDelegate * myTrackerDelegate;74 75 QMap<QString,QTreeWidgetItem*> myPeers;76 54 77 55 private slots: 56 void refresh (); 78 57 void refreshPref (int key); 79 void onBandwidthPriorityChanged (int); 58 59 void onTorrentChanged (); 60 void onTimer (); 61 62 // Tracker tab 63 void onTrackerSelectionChanged (); 64 void onAddTrackerClicked (); 65 void onEditTrackerClicked (); 66 void onRemoveTrackerClicked (); 67 void onShowTrackerScrapesToggled (bool); 68 void onShowBackupTrackersToggled (bool); 69 70 // Files tab 80 71 void onFilePriorityChanged (const QSet<int>& fileIndices, int); 81 72 void onFileWantedChanged (const QSet<int>& fileIndices, bool); 82 73 void onPathEdited (const QString& oldpath, const QString& newname); 83 74 void onOpenRequested (const QString& path); 75 76 // Options tab 77 void onBandwidthPriorityChanged (int); 84 78 void onHonorsSessionLimitsToggled (bool); 85 79 void onDownloadLimitedToggled (bool); … … 89 83 void onIdleModeChanged (int); 90 84 void onIdleLimitChanged (); 91 void onShowTrackerScrapesToggled (bool); 92 void onShowBackupTrackersToggled (bool); 93 void onTrackerSelectionChanged (); 94 void onAddTrackerClicked (); 95 void onEditTrackerClicked (); 96 void onRemoveTrackerClicked (); 97 void refresh (); 85 86 private: 87 Session& mySession; 88 Prefs& myPrefs; 89 const TorrentModel& myModel; 90 91 Ui::DetailsDialog ui; 92 93 QSet<int> myIds; 94 QTimer myTimer; 95 bool myChangedTorrents; 96 bool myHavePendingRefresh; 97 98 TrackerModel * myTrackerModel; 99 TrackerModelFilter * myTrackerFilter; 100 TrackerDelegate * myTrackerDelegate; 101 102 QMap<QString, QTreeWidgetItem*> myPeers; 98 103 }; 99 104 -
trunk/qt/FaviconCache.h
r14537 r14539 25 25 26 26 public: 27 28 static QString getHost( const QUrl& url ); 29 static QSize getIconSize (); 30 31 public: 32 33 FaviconCache(); 34 virtual ~FaviconCache(); 27 FaviconCache (); 28 virtual ~FaviconCache (); 35 29 36 30 // returns a cached pixmap, or a NULL pixmap if there's no match in the cache … … 43 37 void add (const QUrl& url); 44 38 39 static QString getHost (const QUrl& url); 40 static QSize getIconSize (); 41 45 42 signals: 46 47 43 void pixmapReady (const QString& host); 48 44 49 45 private: 50 51 QNetworkAccessManager * myNAM;52 QMap<QString,QPixmap> myPixmaps;53 54 46 QString getCacheDir (); 55 47 void ensureCacheDirHasBeenScanned (); 56 48 57 49 private slots: 50 void onRequestFinished (QNetworkReply * reply); 58 51 59 void onRequestFinished (QNetworkReply * reply); 52 private: 53 QNetworkAccessManager * myNAM; 54 QMap<QString, QPixmap> myPixmaps; 60 55 }; 61 56 -
trunk/qt/FileTreeDelegate.h
r14537 r14539 18 18 19 19 public: 20 FileTreeDelegate (QObject * parent =0): QItemDelegate(parent) {}21 virtual ~FileTreeDelegate () {}20 FileTreeDelegate (QObject * parent = nullptr): QItemDelegate (parent) {} 21 virtual ~FileTreeDelegate () {} 22 22 23 23 public: 24 // QAbstractItemDelegate 24 25 virtual QSize sizeHint (const QStyleOptionViewItem&, const QModelIndex&) const; 25 virtual void paint (QPainter *, const QStyleOptionViewItem&, const QModelIndex&) const;26 virtual void paint (QPainter *, const QStyleOptionViewItem&, const QModelIndex&) const; 26 27 }; 27 28 -
trunk/qt/FileTreeItem.h
r14537 r14539 13 13 #include <stdint.h> 14 14 15 #include <QObject> 15 #include <QCoreApplication> 16 #include <QHash> 16 17 #include <QList> 17 #include <QHash>18 18 #include <QSet> 19 19 #include <QString> 20 20 #include <QVariant> 21 21 22 class FileTreeItem : public QObject22 class FileTreeItem 23 23 { 24 Q_OBJECT 25 26 enum { LOW=(1<<0), NORMAL=(1<<1), HIGH=(1<<2) }; 24 Q_DECLARE_TR_FUNCTIONS (FileTreeItem) 27 25 28 26 public: 29 30 virtual ~FileTreeItem(); 31 32 FileTreeItem (const QString& name=QString (), int fileIndex=-1, uint64_t size=0): 27 FileTreeItem (const QString& name = QString (), int fileIndex = -1, uint64_t size = 0): 28 myName (name), 33 29 myFileIndex (fileIndex), 34 my Parent (0),35 my Name (name),30 myTotalSize (size), 31 myParent (nullptr), 36 32 myPriority (0), 37 myIsWanted ( 0),33 myIsWanted (false), 38 34 myHaveSize (0), 39 myTotalSize (size),40 35 myFirstUnhashedRow (0) {} 36 ~FileTreeItem(); 41 37 42 38 public: 43 void appendChild (FileTreeItem * child);39 void appendChild (FileTreeItem * child); 44 40 FileTreeItem * child (const QString& filename); 45 FileTreeItem * child (int row) { return myChildren.at (row); }46 int childCount () const { return myChildren.size (); }41 FileTreeItem * child (int row) { return myChildren.at (row); } 42 int childCount () const { return myChildren.size (); } 47 43 FileTreeItem * parent () { return myParent; } 48 44 const FileTreeItem * parent () const { return myParent; } … … 50 46 const QString& name () const { return myName; } 51 47 QVariant data (int column, int role) const; 52 std::pair<int, int> update (const QString& name, bool want, int priority, uint64_t have, bool updateFields);48 std::pair<int, int> update (const QString& name, bool want, int priority, uint64_t have, bool updateFields); 53 49 void twiddleWanted (QSet<int>& fileIds, bool&); 54 50 void twiddlePriority (QSet<int>& fileIds, int&); … … 57 53 QString path () const; 58 54 bool isComplete () const; 55 56 private: 57 enum 58 { 59 LOW = (1 << 0), 60 NORMAL = (1 << 1), 61 HIGH = (1 << 2) 62 }; 59 63 60 64 private: … … 67 71 int priority () const; 68 72 int isSubtreeWanted () const; 73 const QHash<QString,int>& getMyChildRows(); 69 74 75 private: 76 QString myName; 70 77 const int myFileIndex; 78 const uint64_t myTotalSize; 79 71 80 FileTreeItem * myParent; 72 81 QList<FileTreeItem*> myChildren; 73 82 QHash<QString,int> myChildRows; 74 const QHash<QString,int>& getMyChildRows();75 QString myName;76 83 int myPriority; 77 84 bool myIsWanted; 78 85 uint64_t myHaveSize; 79 const uint64_t myTotalSize;80 86 size_t myFirstUnhashedRow; 81 87 }; -
trunk/qt/FileTreeModel.cc
r14537 r14539 17 17 FileTreeModel::FileTreeModel (QObject * parent, bool isEditable): 18 18 QAbstractItemModel(parent), 19 myIsEditable (isEditable), 19 20 myRootItem (new FileTreeItem), 20 myIndexCache (), 21 myIsEditable (isEditable) 21 myIndexCache () 22 22 { 23 23 } -
trunk/qt/FileTreeModel.h
r14537 r14539 40 40 41 41 public: 42 FileTreeModel (QObject * parent = 0, bool isEditable = true);43 ~FileTreeModel ();42 FileTreeModel (QObject * parent = nullptr, bool isEditable = true); 43 virtual ~FileTreeModel (); 44 44 45 45 void setEditable (bool editable); 46 46 47 public: 48 QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const; 49 Qt::ItemFlags flags (const QModelIndex& index) const; 50 QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; 51 QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) const; 52 QModelIndex parent (const QModelIndex& child) const; 47 void clear (); 48 void addFile (int index, const QString& filename, 49 bool wanted, int priority, 50 uint64_t size, uint64_t have, 51 QList<QModelIndex>& rowsAdded, 52 bool torrentChanged); 53 53 54 QModelIndex parent (const QModelIndex& child, int column) const; 54 int rowCount (const QModelIndex& parent = QModelIndex()) const; 55 int columnCount (const QModelIndex &parent = QModelIndex()) const; 56 virtual bool setData (const QModelIndex & index, const QVariant & value, int role = Qt::EditRole); 55 56 // QAbstractItemModel 57 virtual QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const; 58 virtual Qt::ItemFlags flags (const QModelIndex& index) const; 59 virtual QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; 60 virtual QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex ()) const; 61 virtual QModelIndex parent (const QModelIndex& child) const; 62 virtual int rowCount (const QModelIndex& parent = QModelIndex ()) const; 63 virtual int columnCount (const QModelIndex& parent = QModelIndex ()) const; 64 virtual bool setData (const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); 65 66 public slots: 67 void clicked (const QModelIndex& index); 68 void doubleClicked (const QModelIndex& index); 57 69 58 70 signals: … … 62 74 void openRequested (const QString& path); 63 75 64 public:65 void clear ();66 void addFile (int index, const QString& filename,67 bool wanted, int priority,68 uint64_t size, uint64_t have,69 QList<QModelIndex>& rowsAdded,70 bool torrentChanged);71 72 76 private: 73 void clearSubtree (const QModelIndex 77 void clearSubtree (const QModelIndex&); 74 78 QModelIndex indexOf (FileTreeItem *, int column) const; 75 void parentsChanged (const QModelIndex 76 void subtreeChanged (const QModelIndex 79 void parentsChanged (const QModelIndex&, int firstColumn, int lastColumn); 80 void subtreeChanged (const QModelIndex&, int firstColumn, int lastColumn); 77 81 FileTreeItem * findItemForFileIndex (int fileIndex) const; 78 82 FileTreeItem * itemFromIndex (const QModelIndex&) const; 79 83 80 84 private: 85 bool myIsEditable; 86 81 87 FileTreeItem * myRootItem; 82 88 QMap<int, FileTreeItem *> myIndexCache; 83 bool myIsEditable;84 85 public slots:86 void clicked (const QModelIndex & index);87 void doubleClicked (const QModelIndex & index);88 89 }; 89 90 -
trunk/qt/FileTreeView.h
r14537 r14539 26 26 27 27 public: 28 FileTreeView (QWidget * parent=0, bool editable=true); 28 FileTreeView (QWidget * parent = nullptr, bool editable = true); 29 29 30 void clear (); 30 void update (const FileList& files, bool updateProperties =true);31 void update (const FileList& files, bool updateProperties = true); 31 32 32 33 void setEditable (bool editable); 34 35 public slots: 36 void onClicked (const QModelIndex& index); 37 void onDoubleClicked (const QModelIndex& index); 38 void onOpenRequested (const QString& path); 33 39 34 40 signals: … … 39 45 40 46 protected: 47 // QObject 41 48 bool eventFilter (QObject *, QEvent *); 42 49 … … 45 52 QSortFilterProxyModel * myProxy; 46 53 FileTreeDelegate * myDelegate; 47 48 public slots:49 void onClicked (const QModelIndex& index);50 void onDoubleClicked (const QModelIndex& index);51 void onOpenRequested (const QString& path);52 54 }; 53 55 -
trunk/qt/FilterBar.cc
r14537 r14539 20 20 #include "FilterBarLineEdit.h" 21 21 #include "Prefs.h" 22 #include "Torrent.h" 22 23 #include "TorrentFilter.h" 23 24 #include "TorrentModel.h" … … 104 105 FilterBar::refreshTrackers () 105 106 { 106 FaviconCache& favicons = qApp->favicon s;107 FaviconCache& favicons = qApp->faviconCache (); 107 108 const int firstTrackerRow = 2; // skip over the "All" and separator... 108 109 -
trunk/qt/FilterBar.h
r14537 r14539 28 28 29 29 public: 30 FilterBar (Prefs& prefs, const TorrentModel& torrents, const TorrentFilter& filter, QWidget * parent = 0);31 ~FilterBar ();30 FilterBar (Prefs& prefs, const TorrentModel& torrents, const TorrentFilter& filter, QWidget * parent = nullptr); 31 virtual ~FilterBar (); 32 32 33 33 private: 34 FilterBarComboBox * createTrackerCombo (QStandardItemModel * 34 FilterBarComboBox * createTrackerCombo (QStandardItemModel *); 35 35 FilterBarComboBox * createActivityCombo (); 36 36 void recountSoon (); 37 37 void refreshTrackers (); 38 38 QString getCountString (int n) const; 39 40 private:41 Prefs& myPrefs;42 const TorrentModel& myTorrents;43 const TorrentFilter& myFilter;44 FilterBarComboBox * myActivityCombo;45 FilterBarComboBox * myTrackerCombo;46 QLabel * myCountLabel;47 QStandardItemModel * myTrackerModel;48 QTimer * myRecountTimer;49 bool myIsBootstrapping;50 FilterBarLineEdit * myLineEdit;51 39 52 40 private slots: … … 61 49 void onTorrentModelDataChanged (const QModelIndex&, const QModelIndex&); 62 50 void onTextChanged (const QString&); 51 52 private: 53 Prefs& myPrefs; 54 const TorrentModel& myTorrents; 55 const TorrentFilter& myFilter; 56 57 FilterBarComboBox * myActivityCombo; 58 FilterBarComboBox * myTrackerCombo; 59 QLabel * myCountLabel; 60 QStandardItemModel * myTrackerModel; 61 QTimer * myRecountTimer; 62 bool myIsBootstrapping; 63 FilterBarLineEdit * myLineEdit; 63 64 }; 64 65 -
trunk/qt/FilterBarComboBox.h
r14537 r14539 26 26 27 27 public: 28 FilterBarComboBox (QWidget * parent = 0); 28 FilterBarComboBox (QWidget * parent = nullptr); 29 29 30 int currentCount () const; 30 31 32 // QWidget 31 33 virtual QSize minimumSizeHint () const; 32 34 virtual QSize sizeHint () const; 33 35 34 36 protected: 37 // QWidget 35 38 virtual void paintEvent (QPaintEvent * e); 36 39 -
trunk/qt/FilterBarComboBoxDelegate.h
r14537 r14539 23 23 FilterBarComboBoxDelegate (QObject * parent, QComboBox * combo); 24 24 25 public:26 25 static bool isSeparator (const QModelIndex &index); 27 26 static void setSeparator (QAbstractItemModel * model, const QModelIndex& index); 28 27 29 28 protected: 30 virtual void paint (QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const; 29 // QAbstractItemDelegate 30 virtual void paint (QPainter *, const QStyleOptionViewItem&, const QModelIndex&) const; 31 31 virtual QSize sizeHint (const QStyleOptionViewItem&, const QModelIndex&) const; 32 32 33 33 private: 34 QComboBox * myCombo;34 QComboBox * const myCombo; 35 35 }; 36 36 -
trunk/qt/FilterBarLineEdit.h
r14537 r14539 20 20 21 21 public: 22 FilterBarLineEdit (QWidget * parent = 0);22 FilterBarLineEdit (QWidget * parent = nullptr); 23 23 24 24 protected: 25 // QWidget 25 26 virtual void resizeEvent (QResizeEvent * event); 26 27 -
trunk/qt/Filters.h
r14537 r14539 17 17 class FilterMode 18 18 { 19 public: 20 enum 21 { 22 SHOW_ALL, 23 SHOW_ACTIVE, 24 SHOW_DOWNLOADING, 25 SHOW_SEEDING, 26 SHOW_PAUSED, 27 SHOW_FINISHED, 28 SHOW_VERIFYING, 29 SHOW_ERROR, 30 NUM_MODES 31 }; 32 33 public: 34 FilterMode (int mode = SHOW_ALL): myMode (mode) {} 35 FilterMode (const QString& name): myMode (modeFromName (name)) {} 36 37 int mode () const { return myMode; } 38 const QString& name () const { return names[myMode]; } 39 40 static int modeFromName (const QString& name); 41 static const QString& nameFromMode(int mode) { return names[mode]; } 42 19 43 private: 20 44 int myMode; 21 45 22 public:23 FilterMode( int mode=SHOW_ALL ): myMode(mode) {}24 FilterMode( const QString& name ): myMode(modeFromName(name)) {}25 46 static const QString names[]; 26 enum { SHOW_ALL, SHOW_ACTIVE, SHOW_DOWNLOADING, SHOW_SEEDING, SHOW_PAUSED,27 SHOW_FINISHED, SHOW_VERIFYING, SHOW_ERROR, NUM_MODES };28 static int modeFromName( const QString& name );29 static const QString& nameFromMode( int mode ) { return names[mode]; }30 int mode() const { return myMode; }31 const QString& name() const { return names[myMode]; }32 47 }; 48 49 Q_DECLARE_METATYPE(FilterMode) 33 50 34 51 class SortMode 35 52 { 53 public: 54 enum 55 { 56 SORT_BY_ACTIVITY, 57 SORT_BY_AGE, 58 SORT_BY_ETA, 59 SORT_BY_NAME, 60 SORT_BY_PROGRESS, 61 SORT_BY_QUEUE, 62 SORT_BY_RATIO, 63 SORT_BY_SIZE, 64 SORT_BY_STATE, 65 SORT_BY_ID, 66 NUM_MODES 67 }; 68 69 public: 70 SortMode (int mode = SORT_BY_ID): myMode (mode) {} 71 SortMode (const QString& name): myMode (modeFromName (name)) {} 72 73 int mode () const { return myMode; } 74 const QString& name () const { return names[myMode]; } 75 76 static int modeFromName (const QString& name); 77 static const QString& nameFromMode (int mode); 78 36 79 private: 37 80 int myMode; 38 81 39 public:40 SortMode( int mode=SORT_BY_ID ): myMode(mode) {}41 SortMode( const QString& name ): myMode(modeFromName(name)) {}42 82 static const QString names[]; 43 enum { SORT_BY_ACTIVITY, SORT_BY_AGE, SORT_BY_ETA, SORT_BY_NAME,44 SORT_BY_PROGRESS, SORT_BY_QUEUE, SORT_BY_RATIO, SORT_BY_SIZE,45 SORT_BY_STATE, SORT_BY_ID, NUM_MODES };46 static int modeFromName( const QString& name );47 static const QString& nameFromMode( int mode );48 int mode() const { return myMode; }49 const QString& name() const { return names[myMode]; }50 83 }; 51 84 52 Q_DECLARE_METATYPE(FilterMode)53 85 Q_DECLARE_METATYPE(SortMode) 54 86 -
trunk/qt/Formatter.h
r14537 r14539 13 13 #include <stdint.h> // int64_t 14 14 15 #include <QCoreApplication> 15 16 #include <QString> 16 #include <QObject>17 #include <QIcon>18 17 19 18 class Speed; 20 19 21 class Formatter : public QObject20 class Formatter 22 21 { 23 Q_ OBJECT22 Q_DECLARE_TR_FUNCTIONS (Formatter) 24 23 25 24 public: 25 enum Size 26 { 27 B, 28 KB, 29 MB, 30 GB, 31 TB 32 }; 26 33 27 Formatter() {} 28 virtual ~Formatter() {} 34 enum Type 35 { 36 SPEED, 37 SIZE, 38 MEM 39 }; 29 40 30 41 public: 31 32 42 static QString memToString (int64_t bytes); 33 43 static QString sizeToString (int64_t bytes); … … 36 46 static QString ratioToString (double ratio); 37 47 static QString timeToString (int seconds); 38 static QString uploadSpeedToString (const Speed& up);39 static QString downloadSpeedToString (const Speed& down);48 static QString uploadSpeedToString (const Speed& up); 49 static QString downloadSpeedToString (const Speed& down); 40 50 41 public:42 43 typedef enum { B, KB, MB, GB, TB } Size;44 typedef enum { SPEED, SIZE, MEM } Type;45 51 static QString unitStr (Type t, Size s) { return unitStrings[t][s]; } 46 52 static void initUnits (); 47 53 48 54 private: 49 50 55 static QString unitStrings[3][5]; 51 56 }; -
trunk/qt/FreeSpaceLabel.h
r14537 r14539 13 13 #include <stdint.h> 14 14 15 #include <QLabel> 15 16 #include <QString> 16 17 #include <QTimer> 17 #include <QLabel>18 18 19 19 class Session; … … 29 29 30 30 public: 31 FreeSpaceLabel (QWidget * parent = 0);31 FreeSpaceLabel (QWidget * parent = nullptr); 32 32 virtual ~FreeSpaceLabel () {} 33 33 34 34 void setSession (Session& session); 35 35 void setPath (const QString& folder); 36 37 private slots: 38 void onSessionExecuted (int64_t tag, const QString& result, tr_variant * arguments); 39 void onTimer (); 36 40 37 41 private: … … 40 44 QString myPath; 41 45 QTimer myTimer; 42 43 private slots:44 void onSessionExecuted (int64_t tag, const QString& result, tr_variant * arguments);45 void onTimer ();46 46 }; 47 47 -
trunk/qt/IconToolButton.h
r14537 r14539 21 21 22 22 protected: 23 // QWidget 23 24 virtual void paintEvent (QPaintEvent * event); 24 25 }; -
trunk/qt/LicenseDialog.h
r14537 r14539 18 18 19 19 public: 20 LicenseDialog (QWidget * parent = 0);21 ~LicenseDialog () {}20 LicenseDialog (QWidget * parent = nullptr); 21 virtual ~LicenseDialog () {} 22 22 }; 23 23 -
trunk/qt/MainWindow.cc
r14537 r14539 80 80 81 81 MainWindow::MainWindow (Session& session, Prefs& prefs, TorrentModel& model, bool minimized): 82 mySession (session), 83 myPrefs (prefs), 84 myModel (model), 82 85 myLastFullUpdateTime (0), 83 86 mySessionDialog (new SessionDialog (session, prefs, this)), … … 89 92 myTorrentDelegate (new TorrentDelegate (this)), 90 93 myTorrentDelegateMin (new TorrentDelegateMin (this)), 91 mySession (session),92 myPrefs (prefs),93 myModel (model),94 94 myLastSendTime (0), 95 95 myLastReadTime (0), -
trunk/qt/MainWindow.h
r14537 r14539 12 12 13 13 #include <ctime> 14 #include <QLineEdit> 15 #include <QIcon> 14 16 15 #include <QMainWindow> 17 #include <Q Map>16 #include <QNetworkReply> 18 17 #include <QPointer> 19 #include <QPushButton>20 18 #include <QSet> 21 19 #include <QSystemTrayIcon> 22 20 #include <QTimer> 23 21 #include <QWidgetList> 24 #include <QNetworkReply>25 22 26 23 #include "Filters.h" … … 28 25 #include "ui_MainWindow.h" 29 26 27 class QAction; 28 class QIcon; 29 class QMenu; 30 30 31 class AddData; 31 class ActionDelegator;32 32 class Prefs; 33 33 class DetailsDialog; … … 36 36 class TorrentDelegateMin; 37 37 class TorrentModel; 38 class QAction;39 class QLabel;40 class QMenu;41 class QModelIndex;42 class QSortFilterProxyModel;43 class Filterbar;44 38 45 39 extern "C" … … 52 46 Q_OBJECT 53 47 48 public: 49 MainWindow (Session&, Prefs&, TorrentModel&, bool minized); 50 virtual ~MainWindow (); 51 52 public slots: 53 void startAll (); 54 void startSelected (); 55 void startSelectedNow (); 56 void pauseAll (); 57 void pauseSelected (); 58 void removeSelected (); 59 void deleteSelected (); 60 void verifySelected (); 61 void queueMoveTop (); 62 void queueMoveUp (); 63 void queueMoveDown (); 64 void queueMoveBottom (); 65 void reannounceSelected (); 66 void onNetworkTimer (); 67 68 void setToolbarVisible (bool); 69 void setFilterbarVisible (bool); 70 void setStatusbarVisible (bool); 71 void setCompactView (bool); 72 void refreshActionSensitivity (); 73 void refreshActionSensitivitySoon (); 74 void wrongAuthentication (); 75 76 protected: 77 // QWidget 78 virtual void contextMenuEvent (QContextMenuEvent *); 79 virtual void dragEnterEvent (QDragEnterEvent *); 80 virtual void dropEvent (QDropEvent *); 81 54 82 private: 83 QIcon getStockIcon (const QString&, int fallback = -1); 84 85 QSet<int> getSelectedTorrents () const; 86 void updateNetworkIcon (); 87 88 QMenu * createOptionsMenu (); 89 QMenu * createStatsModeMenu (); 90 void initStatusBar (); 91 92 void clearSelection (); 93 void addTorrent (const AddData& addMe, bool showOptions); 94 95 // QWidget 55 96 virtual void hideEvent (QHideEvent * event); 56 97 virtual void showEvent (QShowEvent * event); 57 58 private:59 time_t myLastFullUpdateTime;60 QDialog * mySessionDialog;61 QPointer<QDialog> myPrefsDialog;62 QDialog * myAboutDialog;63 QDialog * myStatsDialog;64 DetailsDialog * myDetailsDialog;65 QSystemTrayIcon myTrayIcon;66 TorrentFilter myFilterModel;67 TorrentDelegate * myTorrentDelegate;68 TorrentDelegateMin * myTorrentDelegateMin;69 Session& mySession;70 Prefs& myPrefs;71 TorrentModel& myModel;72 Ui_MainWindow ui;73 time_t myLastSendTime;74 time_t myLastReadTime;75 QTimer myNetworkTimer;76 bool myNetworkError;77 QTimer myRefreshTrayIconTimer;78 QTimer myRefreshActionSensitivityTimer;79 QAction * myDlimitOffAction;80 QAction * myDlimitOnAction;81 QAction * myUlimitOffAction;82 QAction * myUlimitOnAction;83 QAction * myRatioOffAction;84 QAction * myRatioOnAction;85 86 private:87 QIcon getStockIcon (const QString&, int fallback=-1);88 89 private:90 QSet<int> getSelectedTorrents () const;91 void updateNetworkIcon ();92 QWidgetList myHidden;93 98 94 99 private slots: … … 127 132 void onModelReset (); 128 133 129 private slots:130 134 void setSortPref (int); 131 135 void setSortAscendingPref (bool); … … 141 145 142 146 private: 147 Session& mySession; 148 Prefs& myPrefs; 149 TorrentModel& myModel; 150 151 Ui_MainWindow ui; 152 153 time_t myLastFullUpdateTime; 154 QDialog * mySessionDialog; 155 QPointer<QDialog> myPrefsDialog; 156 QDialog * myAboutDialog; 157 QDialog * myStatsDialog; 158 DetailsDialog * myDetailsDialog; 159 QSystemTrayIcon myTrayIcon; 160 TorrentFilter myFilterModel; 161 TorrentDelegate * myTorrentDelegate; 162 TorrentDelegateMin * myTorrentDelegateMin; 163 time_t myLastSendTime; 164 time_t myLastReadTime; 165 QTimer myNetworkTimer; 166 bool myNetworkError; 167 QTimer myRefreshTrayIconTimer; 168 QTimer myRefreshActionSensitivityTimer; 169 QAction * myDlimitOffAction; 170 QAction * myDlimitOnAction; 171 QAction * myUlimitOffAction; 172 QAction * myUlimitOnAction; 173 QAction * myRatioOffAction; 174 QAction * myRatioOnAction; 175 QWidgetList myHidden; 143 176 QWidget * myFilterBar; 144 145 private:146 QMenu * createOptionsMenu ();147 QMenu * createStatsModeMenu ();148 void initStatusBar ();149 150 177 QAction * myAltSpeedAction; 151 178 QString myErrorMessage; 152 153 public slots:154 void startAll ();155 void startSelected ();156 void startSelectedNow ();157 void pauseAll ();158 void pauseSelected ();159 void removeSelected ();160 void deleteSelected ();161 void verifySelected ();162 void queueMoveTop ();163 void queueMoveUp ();164 void queueMoveDown ();165 void queueMoveBottom ();166 void reannounceSelected ();167 void onNetworkTimer ();168 169 private:170 void clearSelection ();171 void addTorrent (const AddData& addMe, bool showOptions);172 173 public slots:174 void setToolbarVisible (bool);175 void setFilterbarVisible (bool);176 void setStatusbarVisible (bool);177 void setCompactView (bool);178 void refreshActionSensitivity ();179 void refreshActionSensitivitySoon ();180 void wrongAuthentication ();181 182 public:183 MainWindow (Session&, Prefs&, TorrentModel&, bool minized);184 virtual ~MainWindow ();185 186 protected:187 virtual void contextMenuEvent (QContextMenuEvent *);188 virtual void dragEnterEvent (QDragEnterEvent *);189 virtual void dropEvent (QDropEvent *);190 179 }; 191 180 -
trunk/qt/MakeDialog.h
r14537 r14539 30 30 Q_OBJECT 31 31 32 public: 33 MakeDialog (Session&, QWidget * parent = nullptr); 34 virtual ~MakeDialog (); 35 36 protected: 37 // QWidget 38 virtual void dragEnterEvent (QDragEnterEvent *); 39 virtual void dropEvent (QDropEvent *); 40 41 private: 42 QString getSource () const; 43 32 44 private slots: 33 45 void onSourceChanged (); … … 35 47 36 48 private: 37 QString getSource () const;49 Session& mySession; 38 50 39 private:40 Session& mySession;41 51 Ui::MakeDialog ui; 52 42 53 std::unique_ptr<tr_metainfo_builder, void(*)(tr_metainfo_builder*)> myBuilder; 43 44 protected:45 virtual void dragEnterEvent (QDragEnterEvent *);46 virtual void dropEvent (QDropEvent *);47 48 public:49 MakeDialog (Session&, QWidget * parent = 0);50 virtual ~MakeDialog ();51 54 }; 52 55 -
trunk/qt/OptionsDialog.h
r14537 r14539 16 16 #include <QFile> 17 17 #include <QMap> 18 #include <QString>19 18 #include <QString> 20 19 #include <QTimer> … … 39 38 40 39 public: 41 OptionsDialog (Session& session, const Prefs& prefs, const AddData& addme, QWidget * parent = 0); 42 ~OptionsDialog (); 40 OptionsDialog (Session& session, const Prefs& prefs, const AddData& addme, QWidget * parent = nullptr); 41 virtual ~OptionsDialog (); 42 43 private: 44 typedef QMap<uint32_t, int32_t> mybins_t; 43 45 44 46 private: … … 60 62 Session& mySession; 61 63 AddData myAdd; 64 65 Ui::OptionsDialog ui; 66 62 67 QDir myLocalDestination; 63 68 bool myHaveInfo; 64 69 tr_info myInfo; 65 Ui::OptionsDialog ui;66 70 QPushButton * myVerifyButton; 67 71 QVector<int> myPriorities; … … 69 73 FileList myFiles; 70 74 71 private:72 75 QTimer myVerifyTimer; 73 76 char myVerifyBuf[2048 * 4]; … … 79 82 QVector<bool> myVerifyFlags; 80 83 QCryptographicHash myVerifyHash; 81 typedef QMap<uint32_t, int32_t> mybins_t;82 84 mybins_t myVerifyBins; 83 85 QTimer myEditTimer; -
trunk/qt/PathButton.h
r14537 r14539 34 34 const QString& path () const; 35 35 36 // QWidget 36 37 virtual QSize sizeHint () const; 37 38 … … 40 41 41 42 protected: 43 // QWidget 42 44 virtual void paintEvent (QPaintEvent * event); 43 44 private slots:45 void onClicked ();46 void onFileSelected (const QString& path);47 45 48 46 private: … … 51 49 bool isDirMode () const; 52 50 QString effectiveTitle () const; 51 52 private slots: 53 void onClicked (); 54 void onFileSelected (const QString& path); 53 55 54 56 private: -
trunk/qt/Prefs.cc
r14537 r14539 13 13 #include <iostream> 14 14 15 #include <QDateTime> 15 16 #include <QDir> 16 17 #include <QFile> -
trunk/qt/Prefs.h
r14537 r14539 11 11 #define QTR_PREFS_H 12 12 13 #include <QDateTime>14 13 #include <QObject> 15 14 #include <QSet> … … 20 19 21 20 #include "Filters.h" 21 22 class QDateTime; 22 23 23 24 extern "C" … … 31 32 32 33 public: 33 34 34 enum 35 35 { … … 132 132 }; 133 133 134 private: 134 public: 135 Prefs (const QString& configDir); 136 virtual ~Prefs (); 135 137 136 struct PrefItem 137 { 138 int id; 139 tr_quark key; 140 int type; 141 }; 142 143 static PrefItem myItems[]; 144 145 private: 146 QSet<int> myTemporaryPrefs; 147 QString const myConfigDir; 148 mutable QVariant myValues[PREFS_COUNT]; 149 void initDefaults (tr_variant *); 150 151 void set (int key, const char * value); 152 153 public: 154 bool isCore (int key) const { return FIRST_CORE_PREF<=key && key<=LAST_CORE_PREF; } 138 bool isCore (int key) const { return FIRST_CORE_PREF <= key && key <= LAST_CORE_PREF; } 155 139 bool isClient (int key) const { return !isCore (key); } 156 140 const char * keyStr (int i) const { return tr_quark_get_string (myItems[i].key,NULL); } 157 tr_quark getKey 141 tr_quark getKey (int i) const { return myItems[i].key; } 158 142 int type (int i) const { return myItems[i].type; } 159 143 const QVariant& variant (int i) const { return myValues[i]; } 160 161 Prefs (const QString& configDir);162 ~Prefs ();163 144 164 145 int getInt (int key) const; … … 174 155 QVariant& v (myValues[key]); 175 156 const QVariant tmp = QVariant::fromValue (value); 176 if (v.isNull() || (v!=tmp))157 if (v.isNull() || v != tmp) 177 158 { 178 159 v = tmp; … … 185 166 signals: 186 167 void changed (int key); 168 169 private: 170 struct PrefItem 171 { 172 int id; 173 tr_quark key; 174 int type; 175 }; 176 177 private: 178 void initDefaults (tr_variant *); 179 180 // Intentionally not implemented 181 void set (int key, const char * value); 182 183 private: 184 const QString myConfigDir; 185 186 QSet<int> myTemporaryPrefs; 187 mutable QVariant myValues[PREFS_COUNT]; 188 189 static PrefItem myItems[]; 187 190 }; 188 191 -
trunk/qt/PrefsDialog.cc
r14537 r14539 533 533 PrefsDialog::PrefsDialog (Session& session, Prefs& prefs, QWidget * parent): 534 534 QDialog (parent), 535 myIsServer (session.isServer ()),536 535 mySession (session), 537 myPrefs (prefs) 536 myPrefs (prefs), 537 myIsServer (session.isServer ()) 538 538 { 539 539 ui.setupUi (this); -
trunk/qt/PrefsDialog.h
r14537 r14539 18 18 #include "ui_PrefsDialog.h" 19 19 20 class QAbstractButton;21 class QCheckBox;22 class QDoubleSpinBox;23 20 class QHttp; 24 class QLabel;25 class QLineEdit;26 21 class QMessageBox; 27 class QPushButton;28 class QSpinBox;29 22 class QString; 30 class QTime;31 class QTimeEdit;32 class QVBoxLayout;33 class QWidget;34 23 35 class FreeSpaceLabel;36 24 class Prefs; 37 25 class Session; … … 40 28 { 41 29 Q_OBJECT 30 31 public: 32 PrefsDialog (Session&, Prefs&, QWidget * parent = nullptr); 33 virtual ~PrefsDialog (); 34 35 private: 36 typedef QMap<int, QWidget*> key2widget_t; 37 38 private: 39 bool updateWidgetValue (QWidget * widget, int prefKey); 40 void linkWidgetToPref (QWidget * widget, int prefKey); 41 void updateBlocklistLabel (); 42 43 void setPref (int key, const QVariant& v); 44 45 void initDownloadingTab (); 46 void initSeedingTab (); 47 void initSpeedTab (); 48 void initPrivacyTab (); 49 void initNetworkTab (); 50 void initDesktopTab (); 51 void initRemoteTab (); 42 52 43 53 private slots: … … 62 72 63 73 private: 64 bool updateWidgetValue (QWidget * widget, int prefKey); 65 void linkWidgetToPref (QWidget * widget, int prefKey); 66 void updateBlocklistLabel (); 74 Session& mySession; 75 Prefs& myPrefs; 67 76 68 public: 69 PrefsDialog (Session&, Prefs&, QWidget * parent = 0); 70 ~PrefsDialog (); 77 Ui::PrefsDialog ui; 71 78 72 private:73 void setPref (int key, const QVariant& v);74 75 void initDownloadingTab ();76 void initSeedingTab ();77 void initSpeedTab ();78 void initPrivacyTab ();79 void initNetworkTab ();80 void initDesktopTab ();81 void initRemoteTab ();82 83 private:84 typedef QMap<int,QWidget*> key2widget_t;85 79 key2widget_t myWidgets; 86 80 const bool myIsServer; 87 Session& mySession;88 Prefs& myPrefs;89 81 QWidgetList myWebWidgets; 90 82 QWidgetList myWebAuthWidgets; … … 95 87 QWidgetList myBlockWidgets; 96 88 QWidgetList myUnsupportedWhenRemote; 97 Ui::PrefsDialog ui;98 89 99 90 int myBlocklistHttpTag; -
trunk/qt/RelocateDialog.h
r14537 r14539 24 24 25 25 public: 26 RelocateDialog (Session&, const TorrentModel&, const QSet<int>& ids, QWidget * parent = 0); 27 ~RelocateDialog () {} 26 RelocateDialog (Session&, const TorrentModel&, const QSet<int>& ids, QWidget * parent = nullptr); 27 virtual ~RelocateDialog () {} 28 29 private: 30 QString newLocation () const; 28 31 29 32 private slots: … … 32 35 33 36 private: 34 QString newLocation () const;35 36 private:37 37 Session& mySession; 38 38 const QSet<int> myIds; 39 39 40 Ui::RelocateDialog ui; 40 41 -
trunk/qt/Session.cc
r14537 r14539 276 276 277 277 Session::Session (const QString& configDir, Prefs& prefs): 278 myConfigDir (configDir), 279 myPrefs (prefs), 278 280 nextUniqueTag (FIRST_UNIQUE_TAG), 279 281 myBlocklistSize (-1), 280 myPrefs (prefs), 281 mySession (0), 282 myConfigDir (configDir) 282 mySession (0) 283 283 { 284 284 myStats.ratio = TR_RATIO_NA; -
trunk/qt/Session.h
r14537 r14539 35 35 public: 36 36 FileAdded (int64_t tag, const QString& name): myTag (tag), myName (name) {} 37 ~FileAdded () {} 37 virtual ~FileAdded () {} 38 38 39 void setFileToDelete (const QString& file) { myDelFile = file; } 39 40 … … 44 45 const int64_t myTag; 45 46 const QString myName; 47 46 48 QString myDelFile; 47 49 }; … … 53 55 public: 54 56 Session (const QString& configDir, Prefs& prefs); 55 ~Session ();57 virtual ~Session (); 56 58 57 public:58 59 void stop (); 59 60 void restart (); 60 61 61 private:62 void start ();63 64 public:65 62 const QUrl& getRemoteUrl () const { return myRpc.url (); } 66 63 const tr_session_stats& getStats () const { return myStats; } … … 68 65 const QString& sessionVersion () const { return mySessionVersion; } 69 66 70 public:71 67 int64_t blocklistSize () const { return myBlocklistSize; } 72 68 void setBlocklistSize (int64_t i); … … 74 70 void portTest (); 75 71 void copyMagnetLinkToClipboard (int torrentId); 76 77 public:78 72 79 73 /** returns true if the transmission session is being run inside this client */ … … 83 77 bool isLocal () const; 84 78 85 private: 86 void updateStats (tr_variant * args); 87 void updateInfo (tr_variant * args); 79 void exec (tr_quark method, tr_variant * args, int64_t tag = -1); 80 void exec (const char * method, tr_variant * args, int64_t tag = -1); 88 81 89 public:90 void exec (tr_quark method, tr_variant * args, int64_t tag = -1);91 void exec (const char* method, tr_variant * args, int64_t tag = -1);92 93 public:94 82 int64_t getUniqueTag () { return nextUniqueTag++; } 95 83 96 private:97 void sessionSet (const tr_quark key, const QVariant& variant);98 void pumpRequests ();99 void sendTorrentRequest (const char * request, const QSet<int>& torrentIds);100 static void updateStats (tr_variant * d, tr_session_stats * stats);101 void refreshTorrents (const QSet<int>& torrentIds);102 103 public:104 84 void torrentSet (const QSet<int>& ids, const tr_quark key, bool val); 105 85 void torrentSet (const QSet<int>& ids, const tr_quark key, int val); … … 127 107 void addNewlyCreatedTorrent (const QString& filename, const QString& localPath); 128 108 void addTorrent (const AddData& addme); 129 void removeTorrents (const QSet<int>& torrentIds, bool deleteFiles =false);109 void removeTorrents (const QSet<int>& torrentIds, bool deleteFiles = false); 130 110 void verifyTorrents (const QSet<int>& torrentIds); 131 111 void reannounceTorrents (const QSet<int>& torrentIds); 132 112 void launchWebInterface (); 133 113 void updatePref (int key); 134 114 135 115 /** request a refresh for statistics, including the ones only used by the properties dialog, for a specific torrent */ 136 116 void refreshExtraStats (const QSet<int>& ids); 137 138 private slots:139 void responseReceived (int64_t tag, const QString& result, tr_variant * args);140 117 141 118 signals: … … 155 132 156 133 private: 134 void start (); 135 136 void updateStats (tr_variant * args); 137 void updateInfo (tr_variant * args); 138 139 void sessionSet (const tr_quark key, const QVariant& variant); 140 void pumpRequests (); 141 void sendTorrentRequest (const char * request, const QSet<int>& torrentIds); 142 void refreshTorrents (const QSet<int>& torrentIds); 143 144 static void updateStats (tr_variant * d, tr_session_stats * stats); 145 146 private slots: 147 void responseReceived (int64_t tag, const QString& result, tr_variant * args); 148 149 private: 150 QString const myConfigDir; 151 Prefs& myPrefs; 152 157 153 int64_t nextUniqueTag; 158 154 int64_t myBlocklistSize; 159 Prefs& myPrefs;160 155 tr_session * mySession; 161 QString const myConfigDir;162 156 QStringList myIdleJSON; 163 157 tr_session_stats myStats; -
trunk/qt/SessionDialog.h
r14537 r14539 24 24 25 25 public: 26 SessionDialog (Session& session, Prefs& prefs, QWidget * parent = 0);27 ~SessionDialog () {}26 SessionDialog (Session& session, Prefs& prefs, QWidget * parent = nullptr); 27 virtual ~SessionDialog () {} 28 28 29 29 private slots: … … 34 34 Session& mySession; 35 35 Prefs& myPrefs; 36 36 37 Ui::SessionDialog ui; 38 37 39 QWidgetList myRemoteWidgets; 38 40 QWidgetList myAuthWidgets; -
trunk/qt/Speed.h
r14537 r14539 11 11 #define QTR_SPEED_H 12 12 13 #include "Formatter.h"14 15 13 class Speed 16 14 { 17 private:18 int _Bps;19 Speed (int Bps): _Bps (Bps) {}20 21 15 public: 22 16 Speed (): _Bps (0) {} 17 23 18 double KBps () const; 24 19 int Bps () const { return _Bps; } … … 30 25 Speed operator+ (const Speed& that) const { return Speed (_Bps + that._Bps); } 31 26 bool operator< (const Speed& that) const { return _Bps < that._Bps; } 27 28 private: 29 Speed (int Bps): _Bps (Bps) {} 30 31 private: 32 int _Bps; 32 33 }; 33 34 -
trunk/qt/SqueezeLabel.h
r14537 r14539 50 50 51 51 public: 52 SqueezeLabel (QWidget * parent=0);53 SqueezeLabel (const QString& text, QWidget * parent=0);52 SqueezeLabel (QWidget * parent = nullptr); 53 SqueezeLabel (const QString& text, QWidget * parent = nullptr); 54 54 55 55 protected: 56 void paintEvent (QPaintEvent* paintEvent); 56 // QWidget 57 virtual void paintEvent (QPaintEvent * paintEvent); 57 58 }; 58 59 -
trunk/qt/StatsDialog.h
r14537 r14539 15 15 #include "ui_StatsDialog.h" 16 16 17 class QTimer; 18 17 19 class Session; 18 class QTimer;19 20 20 21 class StatsDialog: public QDialog … … 22 23 Q_OBJECT 23 24 25 public: 26 StatsDialog (Session&, QWidget * parent = nullptr); 27 ~StatsDialog (); 28 29 // QWidget 30 virtual void setVisible (bool visible); 31 24 32 private slots: 25 33 void updateStats (); 26 34 27 public: 28 StatsDialog (Session&, QWidget * parent = 0); 29 ~StatsDialog (); 30 virtual void setVisible (bool visible); 35 private: 36 Session& mySession; 31 37 32 private:33 Session & mySession; 38 Ui::StatsDialog ui; 39 34 40 QTimer * myTimer; 35 Ui::StatsDialog ui;36 41 }; 37 42 -
trunk/qt/Torrent.cc
r14537 r14539 30 30 31 31 Torrent::Torrent (const Prefs& prefs, int id): 32 m agnetTorrent (false),33 m yPrefs (prefs)32 myPrefs (prefs), 33 magnetTorrent (false) 34 34 { 35 35 #ifndef NDEBUG … … 605 605 if (tr_variantDictFindStr(child, TR_KEY_announce, &str, &len)) 606 606 { 607 qApp->favicon s.add (QUrl(QString::fromUtf8(str)));607 qApp->faviconCache ().add (QUrl(QString::fromUtf8(str))); 608 608 list.append (QString::fromUtf8 (str, len)); 609 609 } … … 645 645 { 646 646 trackerStat.announce = QString::fromUtf8 (str, len); 647 qApp->favicon s.add (QUrl (trackerStat.announce));647 qApp->faviconCache ().add (QUrl (trackerStat.announce)); 648 648 } 649 649 … … 801 801 TrackerStat::getFavicon () const 802 802 { 803 return qApp->favicon s.find (QUrl (announce));804 } 805 803 return qApp->faviconCache ().find (QUrl (announce)); 804 } 805 -
trunk/qt/Torrent.h
r14537 r14539 18 18 #include <QStringList> 19 19 #include <QList> 20 #include <QTemporaryFile>21 20 #include <QVariant> 22 21 … … 31 30 #endif 32 31 32 class QPixmap; 33 33 34 class Prefs; 34 class QPixmap;35 class QStyle;36 35 37 36 extern "C" … … 59 58 }; 60 59 60 Q_DECLARE_METATYPE(Peer) 61 61 62 typedef QList<Peer> PeerList; 62 Q_DECLARE_METATYPE(Peer)63 63 Q_DECLARE_METATYPE(PeerList) 64 64 65 65 struct TrackerStat 66 66 { 67 QPixmap getFavicon () const; 68 67 69 bool hasAnnounced; 68 70 bool hasScraped; … … 90 92 QString lastAnnounceResult; 91 93 QString lastScrapeResult; 92 QPixmap getFavicon () const;93 94 }; 94 95 96 Q_DECLARE_METATYPE(TrackerStat) 97 95 98 typedef QList<TrackerStat> TrackerStatsList; 96 Q_DECLARE_METATYPE(TrackerStat)97 99 Q_DECLARE_METATYPE(TrackerStatsList) 98 100 99 101 struct TorrentFile 100 102 { 101 TorrentFile(): wanted (true), index(-1), priority(0), size(0), have(0) {}103 TorrentFile(): wanted (true), index (-1), priority (0), size (0), have (0) {} 102 104 103 105 bool wanted; … … 109 111 }; 110 112 113 Q_DECLARE_METATYPE(TorrentFile) 114 111 115 typedef QList<TorrentFile> FileList; 112 Q_DECLARE_METATYPE(TorrentFile)113 116 Q_DECLARE_METATYPE(FileList) 114 117 115 116 118 class Torrent: public QObject 117 119 { … … 119 121 120 122 public: 121 122 123 enum 123 124 { … … 182 183 }; 183 184 185 typedef QList<tr_quark> KeyList; 186 184 187 public: 185 188 Torrent (const Prefs&, int id); 186 189 virtual ~Torrent (); 187 188 signals:189 void torrentChanged (int id);190 void torrentCompleted (int id);191 192 private:193 194 enum Group195 {196 INFO, // info fields that only need to be loaded once197 STAT, // commonly-used stats that should be refreshed often198 STAT_EXTRA, // rarely used; only refresh if details dialog is open199 DERIVED // doesn't come from RPC200 };201 202 struct Property203 {204 int id;205 tr_quark key;206 int type;207 int group;208 };209 210 static Property myProperties[];211 212 bool magnetTorrent;213 214 public:215 typedef QList<tr_quark> KeyList;216 static const KeyList& getInfoKeys ();217 static const KeyList& getStatKeys ();218 static const KeyList& getExtraStatKeys ();219 220 private:221 static KeyList buildKeyList (Group group);222 223 private:224 QVariant myValues[PROPERTY_COUNT];225 226 int getInt (int key) const;227 bool getBool (int key) const;228 QTime getTime (int key) const;229 QIcon getIcon (int key) const;230 double getDouble (int key) const;231 qulonglong getSize (int key) const;232 QString getString (int key) const;233 QDateTime getDateTime (int key) const;234 235 bool setInt (int key, int value);236 bool setBool (int key, bool value);237 bool setIcon (int key, const QIcon&);238 bool setDouble (int key, double);239 bool setString (int key, const char *);240 bool setSize (int key, qulonglong);241 bool setDateTime (int key, const QDateTime&);242 243 public:244 190 245 191 int getBandwidthPriority () const { return getInt (BANDWIDTH_PRIORITY); } … … 315 261 bool isStalled () const { return getBool (IS_STALLED); } 316 262 317 public:318 263 QString activityString () const; 319 264 tr_torrent_activity getActivity () const { return static_cast<tr_torrent_activity> (getInt (ACTIVITY)); } … … 330 275 void notifyComplete () const; 331 276 332 public:333 277 void update (tr_variant * dict); 334 278 void setMagnet (bool magnet) { magnetTorrent = magnet; } 335 279 280 QIcon getMimeTypeIcon () const { return getIcon (MIME_ICON); } 281 282 static const KeyList& getInfoKeys (); 283 static const KeyList& getStatKeys (); 284 static const KeyList& getExtraStatKeys (); 285 286 signals: 287 void torrentChanged (int id); 288 void torrentCompleted (int id); 289 336 290 private: 291 enum Group 292 { 293 INFO, // info fields that only need to be loaded once 294 STAT, // commonly-used stats that should be refreshed often 295 STAT_EXTRA, // rarely used; only refresh if details dialog is open 296 DERIVED // doesn't come from RPC 297 }; 298 299 struct Property 300 { 301 int id; 302 tr_quark key; 303 int type; 304 int group; 305 }; 306 307 private: 308 int getInt (int key) const; 309 bool getBool (int key) const; 310 QTime getTime (int key) const; 311 QIcon getIcon (int key) const; 312 double getDouble (int key) const; 313 qulonglong getSize (int key) const; 314 QString getString (int key) const; 315 QDateTime getDateTime (int key) const; 316 317 bool setInt (int key, int value); 318 bool setBool (int key, bool value); 319 bool setIcon (int key, const QIcon&); 320 bool setDouble (int key, double); 321 bool setString (int key, const char *); 322 bool setSize (int key, qulonglong); 323 bool setDateTime (int key, const QDateTime&); 324 337 325 const char * getMimeTypeString () const; 338 326 void updateMimeIcon (); 339 327 340 public: 341 QIcon getMimeTypeIcon () const { return getIcon (MIME_ICON); } 328 static KeyList buildKeyList (Group group); 342 329 343 330 private: 344 331 const Prefs& myPrefs; 332 333 QVariant myValues[PROPERTY_COUNT]; 334 bool magnetTorrent; 345 335 FileList myFiles; 336 337 static Property myProperties[]; 346 338 }; 347 339 -
trunk/qt/TorrentDelegate.cc
r14537 r14539 158 158 159 159 QString 160 TorrentDelegate::progressString (const Torrent& tor) const160 TorrentDelegate::progressString (const Torrent& tor) 161 161 { 162 162 const bool isMagnet (!tor.hasMetadata()); … … 267 267 268 268 QString 269 TorrentDelegate::shortTransferString (const Torrent& tor) const269 TorrentDelegate::shortTransferString (const Torrent& tor) 270 270 { 271 271 QString str; … … 286 286 287 287 QString 288 TorrentDelegate::shortStatusString (const Torrent& tor) const288 TorrentDelegate::shortStatusString (const Torrent& tor) 289 289 { 290 290 QString str; … … 313 313 314 314 QString 315 TorrentDelegate::statusString (const Torrent& tor) const315 TorrentDelegate::statusString (const Torrent& tor) 316 316 { 317 317 QString str; -
trunk/qt/TorrentDelegate.h
r14537 r14539 12 12 13 13 #include <QStyledItemDelegate> 14 #include <QSize>15 14 15 class QStyle; 16 16 class QStyleOptionProgressBar; 17 class QStyleOptionViewItem; 18 class QStyle; 19 class Session; 17 20 18 class Torrent; 21 19 … … 25 23 26 24 public: 27 static QColor blueBrush, greenBrush, silverBrush; 28 static QColor blueBack, greenBack, silverBack; 25 explicit TorrentDelegate (QObject * parent = nullptr); 26 virtual ~TorrentDelegate (); 27 28 // QAbstractItemDelegate 29 virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; 30 virtual void paint(QPainter * painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; 31 32 protected: 33 QSize margin (const QStyle& style) const; 34 void setProgressBarPercentDone (const QStyleOptionViewItem& option, const Torrent&) const; 35 36 // Our own overridables 37 virtual QSize sizeHint (const QStyleOptionViewItem&, const Torrent&) const; 38 virtual void drawTorrent (QPainter * painter, const QStyleOptionViewItem& option, const Torrent&) const; 39 40 static QString statusString (const Torrent& tor); 41 static QString progressString (const Torrent& tor); 42 static QString shortStatusString (const Torrent& tor); 43 static QString shortTransferString (const Torrent& tor); 29 44 30 45 protected: 31 46 QStyleOptionProgressBar * myProgressBarStyle; 32 47 33 protected: 34 QString statusString (const Torrent& tor) const; 35 QString progressString (const Torrent& tor) const; 36 QString shortStatusString (const Torrent& tor) const; 37 QString shortTransferString (const Torrent& tor) const; 38 39 protected: 40 QSize margin (const QStyle& style) const; 41 virtual QSize sizeHint (const QStyleOptionViewItem&, const Torrent&) const; 42 virtual void setProgressBarPercentDone (const QStyleOptionViewItem& option, const Torrent&) const; 43 virtual void drawTorrent (QPainter* painter, const QStyleOptionViewItem& option, const Torrent&) const; 44 45 public: 46 explicit TorrentDelegate (QObject * parent=0); 47 virtual ~TorrentDelegate (); 48 49 QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; 50 void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; 48 static QColor blueBrush; 49 static QColor greenBrush; 50 static QColor silverBrush; 51 static QColor blueBack; 52 static QColor greenBack; 53 static QColor silverBack; 51 54 }; 52 55 -
trunk/qt/TorrentDelegateMin.h
r14537 r14539 11 11 #define QTR_TORRENT_DELEGATE_MIN_H 12 12 13 #include <QSize>14 15 13 #include "TorrentDelegate.h" 16 17 class QStyleOptionViewItem;18 class QStyle;19 class Session;20 class Torrent;21 14 22 15 class TorrentDelegateMin: public TorrentDelegate … … 24 17 Q_OBJECT 25 18 19 public: 20 explicit TorrentDelegateMin (QObject * parent = nullptr): TorrentDelegate (parent) {} 21 virtual ~TorrentDelegateMin () {} 22 26 23 protected: 24 // TorrentDelegate 27 25 virtual QSize sizeHint (const QStyleOptionViewItem&, const Torrent&) const; 28 void drawTorrent (QPainter* painter, const QStyleOptionViewItem& option, const Torrent&) const; 29 30 public: 31 explicit TorrentDelegateMin (QObject * parent=0): TorrentDelegate(parent) {} 32 virtual ~TorrentDelegateMin () {} 26 virtual void drawTorrent (QPainter * painter, const QStyleOptionViewItem& option, const Torrent&) const; 33 27 }; 34 28 -
trunk/qt/TorrentFilter.h
r14537 r14539 12 12 13 13 #include <QSortFilterProxyModel> 14 #include <QMetaType>15 #include <QVariant>16 14 17 15 class QString; 18 class QWidget;19 16 20 17 class FilterMode; … … 27 24 28 25 public: 26 enum TextMode 27 { 28 FILTER_BY_NAME, 29 FILTER_BY_FILES, 30 FILTER_BY_TRACKER 31 }; 32 33 public: 29 34 TorrentFilter (const Prefs& prefs); 30 35 virtual ~TorrentFilter (); 31 36 32 public:33 enum TextMode { FILTER_BY_NAME, FILTER_BY_FILES, FILTER_BY_TRACKER };34 37 int hiddenRowCount () const; 35 38 36 private slots: 37 void refreshPref (int key); 39 void countTorrentsPerMode (int * setmeCounts) const; 38 40 39 41 protected: 42 // QSortFilterProxyModel 40 43 virtual bool filterAcceptsRow (int, const QModelIndex&) const; 41 44 virtual bool lessThan (const QModelIndex&, const QModelIndex&) const; … … 45 48 bool trackerFilterAcceptsTorrent (const Torrent * tor, const QString& tracker) const; 46 49 47 p ublic:48 void countTorrentsPerMode (int * setmeCounts) const;50 private slots: 51 void refreshPref (int key); 49 52 50 53 private: -
trunk/qt/TorrentModel.cc
r14537 r14539 14 14 #include <libtransmission/variant.h> 15 15 16 #include "Speed.h" 17 #include "Torrent.h" 16 18 #include "TorrentDelegate.h" 17 19 #include "TorrentModel.h" -
trunk/qt/TorrentModel.h
r14537 r14539 16 16 #include <QVector> 17 17 18 #include "Speed.h"19 #include "Torrent.h"20 21 18 class Prefs; 19 class Speed; 20 class Torrent; 22 21 23 22 extern "C" … … 30 29 Q_OBJECT 31 30 32 private: 33 typedef QMap<int,int> id_to_row_t; 34 typedef QMap<int,Torrent*> id_to_torrent_t; 35 typedef QVector<Torrent*> torrents_t; 36 id_to_row_t myIdToRow; 37 id_to_torrent_t myIdToTorrent; 38 torrents_t myTorrents; 39 const Prefs& myPrefs; 31 public: 32 enum Role 33 { 34 TorrentRole = Qt::UserRole 35 }; 40 36 41 37 public: 38 TorrentModel (const Prefs& prefs); 39 virtual ~TorrentModel (); 40 42 41 void clear (); 43 42 bool hasTorrent (const QString& hashString) const; 44 virtual int rowCount (const QModelIndex& parent = QModelIndex()) const; 43 44 Torrent * getTorrentFromId (int id); 45 const Torrent * getTorrentFromId (int id) const; 46 47 void getTransferSpeed (Speed& uploadSpeed, size_t& uploadPeerCount, 48 Speed& downloadSpeed, size_t& downloadPeerCount); 49 50 // QAbstractItemModel 51 virtual int rowCount (const QModelIndex& parent = QModelIndex ()) const; 45 52 virtual QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const; 46 enum Role { TorrentRole = Qt::UserRole };47 48 public:49 Torrent* getTorrentFromId (int id);50 const Torrent* getTorrentFromId (int id) const;51 52 private:53 void addTorrent (Torrent *);54 QSet<int> getIds () const;55 56 public:57 void getTransferSpeed (Speed & uploadSpeed,58 size_t & uploadPeerCount,59 Speed & downloadSpeed,60 size_t & downloadPeerCount);61 53 62 54 signals: … … 68 60 void removeTorrent (int id); 69 61 62 private: 63 typedef QMap<int, int> id_to_row_t; 64 typedef QMap<int, Torrent*> id_to_torrent_t; 65 typedef QVector<Torrent*> torrents_t; 66 67 private: 68 void addTorrent (Torrent *); 69 QSet<int> getIds () const; 70 70 71 private slots: 71 72 void onTorrentChanged (int propertyId); 72 73 73 public: 74 TorrentModel (const Prefs& prefs); 75 virtual ~TorrentModel (); 74 private: 75 const Prefs& myPrefs; 76 77 id_to_row_t myIdToRow; 78 id_to_torrent_t myIdToTorrent; 79 torrents_t myTorrents; 76 80 }; 77 81 -
trunk/qt/TrackerDelegate.h
r14537 r14539 12 12 13 13 #include <QItemDelegate> 14 #include <QSize>15 14 16 class QPainter;17 class QStyleOptionViewItem;18 15 class QStyle; 19 16 … … 26 23 27 24 public: 28 TrackerDelegate (QObject * parent =0): QItemDelegate(parent), myShowMore(false) {}25 TrackerDelegate (QObject * parent = nullptr): QItemDelegate (parent), myShowMore (false) {} 29 26 virtual ~TrackerDelegate () {} 30 27 31 public: 32 QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; 33 void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; 28 void setShowMore (bool b); 34 29 35 public: 36 void setShowMore (bool b); 30 // QAbstractItemDelegate 31 virtual QSize sizeHint (const QStyleOptionViewItem& option, const QModelIndex& index) const; 32 virtual void paint (QPainter * painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; 37 33 38 34 protected: 39 35 QString getText (const TrackerInfo&) const; 40 36 QSize margin (const QStyle& style) const; 41 virtual QSize sizeHint (const QStyleOptionViewItem&, const TrackerInfo&) const; 42 void drawTracker (QPainter*, const QStyleOptionViewItem&, const TrackerInfo&) const; 37 38 QSize sizeHint (const QStyleOptionViewItem&, const TrackerInfo&) const; 39 void drawTracker (QPainter *, const QStyleOptionViewItem&, const TrackerInfo&) const; 43 40 44 41 private: -
trunk/qt/TrackerModel.cc
r14537 r14539 13 13 14 14 #include "Application.h" // Application 15 #include "TorrentModel.h" 15 16 #include "TrackerModel.h" 16 17 -
trunk/qt/TrackerModel.h
r14537 r14539 16 16 17 17 #include "Torrent.h" 18 #include "TorrentModel.h" 18 19 class TorrentModel; 19 20 20 21 struct TrackerInfo 21 22 { 22 23 23 TrackerStat st; 24 int torrentId; 24 25 }; 26 25 27 Q_DECLARE_METATYPE(TrackerInfo) 26 28 … … 29 31 Q_OBJECT 30 32 31 typedef QVector<TrackerInfo> rows_t;32 rows_t myRows;33 34 33 public: 35 void refresh (const TorrentModel&, const QSet<int>& ids); 36 int find (int torrentId, const QString& url) const; 37 38 public: 39 virtual int rowCount (const QModelIndex& parent = QModelIndex()) const; 40 virtual QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const; 41 enum Role { TrackerRole = Qt::UserRole }; 34 enum Role 35 { 36 TrackerRole = Qt::UserRole 37 }; 42 38 43 39 public: 44 40 TrackerModel () {} 45 41 virtual ~TrackerModel () {} 42 43 void refresh (const TorrentModel&, const QSet<int>& ids); 44 int find (int torrentId, const QString& url) const; 45 46 // QAbstractItemModel 47 virtual int rowCount (const QModelIndex& parent = QModelIndex ()) const; 48 virtual QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const; 49 50 private: 51 typedef QVector<TrackerInfo> rows_t; 52 53 private: 54 rows_t myRows; 46 55 }; 47 56 -
trunk/qt/TrackerModelFilter.h
r14537 r14539 13 13 #include <QSortFilterProxyModel> 14 14 15 class TrackerModelFilter 15 class TrackerModelFilter: public QSortFilterProxyModel 16 16 { 17 17 Q_OBJECT 18 18 19 19 public: 20 TrackerModelFilter (QObject * parent = 0);20 TrackerModelFilter (QObject * parent = nullptr); 21 21 22 public:23 22 void setShowBackupTrackers (bool); 24 23 bool showBackupTrackers () const { return myShowBackups; } 25 24 26 25 protected: 27 bool filterAcceptsRow (int sourceRow, const QModelIndex&sourceParent) const; 26 // QSortFilterProxyModel 27 virtual bool filterAcceptsRow (int sourceRow, const QModelIndex& sourceParent) const; 28 28 29 29 private: -
trunk/qt/Utils.cc
r14537 r14539 19 19 #include <QFileDialog> 20 20 #include <QFileInfo> 21 #include <QIcon> 21 22 #include <QInputDialog> 22 23 #include <QObject> -
trunk/qt/Utils.h
r14537 r14539 13 13 #include <cctype> // isxdigit() 14 14 15 #include <QIcon>16 #include <QObject>17 15 #include <QRect> 18 16 #include <QString> 19 17 20 #include "Speed.h" 18 class QColor; 19 class QIcon; 21 20 22 class QColor; 23 24 class Utils: public QObject 21 class Utils 25 22 { 26 Q_OBJECT27 28 public:29 Utils () {}30 virtual ~Utils () {}31 32 23 public: 33 24 static QIcon guessMimeIcon (const QString& filename); 34 25 // Test if string is UTF-8 or not 35 static bool isValidUtf8 (const char *s);26 static bool isValidUtf8 (const char * s); 36 27 37 28 static QString removeTrailingDirSeparator (const QString& path); -
trunk/qt/WatchDir.h
r14537 r14539 25 25 public: 26 26 WatchDir (const TorrentModel&); 27 ~WatchDir ();27 virtual ~WatchDir (); 28 28 29 public:30 29 void setPath (const QString& path, bool isEnabled); 31 30 31 signals: 32 void torrentFileAdded (const QString& filename); 33 32 34 private: 33 enum { OK, DUPLICATE, ERROR }; 35 enum 36 { 37 OK, 38 DUPLICATE, 39 ERROR 40 }; 41 42 private: 34 43 int metainfoTest (const QString& filename) const; 35 36 signals:37 void torrentFileAdded (QString filename);38 44 39 45 private slots: … … 41 47 void onTimeout (); 42 48 43 private slots:44 49 void rescanAllWatchedDirectories (); 45 50 46 51 private: 47 52 const TorrentModel& myModel; 53 48 54 QSet<QString> myWatchDirFiles; 49 55 QFileSystemWatcher * myWatcher;
Note: See TracChangeset
for help on using the changeset viewer.