- Search plugin parses opensearch.xml files and adds them to combobox
[qtrapids] / src / gui / DownloadView.h
index 1ffc529..2a66141 100644 (file)
@@ -36,33 +36,33 @@ class QTimer;
 */
 class DownloadView : public QTreeWidget
 {
-    Q_OBJECT
+       Q_OBJECT
 
 public:
-    DownloadView(QWidget* parent);
+       DownloadView(QWidget* parent);
 
-    ~DownloadView();
+       ~DownloadView();
 
-    void newItem(qtrapids::QTorrentHandle handle);
-    void updateItem(qtrapids::QTorrentHandle handle);
-    qtrapids::QTorrentHandle removeSelected();
-    void removeItem(qtrapids::QTorrentHandle handle);
-    void setRefreshInterval(int msec);
+       void newItem(qtrapids::QTorrentHandle handle);
+       void updateItem(qtrapids::QTorrentHandle handle);
+       qtrapids::QTorrentHandle removeSelected();
+       void removeItem(qtrapids::QTorrentHandle handle);
+       void setRefreshInterval(int msec);
 
 private slots:
-    void on_itemClicked(QTreeWidgetItem * item, int column);
-    void on_timeout();
+       void on_itemClicked(QTreeWidgetItem * item, int column);
+       void on_timeout();
 
 private:
-    // Maps torrent to downloadview item.
-    // Key: SHA1 info hash of torrent. Data: View item corresponding to torrent.
-    std::map<qtrapids::QTorrentHandle, DownloadViewItem*> items_;
-    QTimer *timer_;
+       // Maps torrent to downloadview item.
+       // Key: SHA1 info hash of torrent. Data: View item corresponding to torrent.
+       std::map<qtrapids::QTorrentHandle, DownloadViewItem*> items_;
+       QTimer *timer_;
 
-    // Private functions.
-    QString GetStatusString(qtrapids::QTorrentHandle::State const& status) const;
-    QColor GetStatusColor(qtrapids::QTorrentHandle::State const& status) const;
-    void UpdateView();
+       // Private functions.
+       QString GetStatusString(qtrapids::QTorrentHandle::State const& status) const;
+       QColor GetStatusColor(qtrapids::QTorrentHandle::State const& status) const;
+       void UpdateView();
 
 
 };
@@ -76,30 +76,29 @@ class DownloadViewItem : public QTreeWidgetItem
 {
 
 public:
-    DownloadViewItem(QTreeWidget* parent, int type) :
-            QTreeWidgetItem(parent, type = QTreeWidgetItem::UserType) {};
-
-    DownloadViewItem(const QStringList& strings,
-                     int type = QTreeWidgetItem::UserType) :
-            QTreeWidgetItem (strings, type = Type) {};
-
-
-    /// @return An item comprising of string list, suitable for QTableView
-    /// header.
-    static DownloadViewItem *getHeaderItem()
-    {
-        DownloadViewItem *item
-        = new DownloadViewItem(QStringList()
-                               << "Name"
-                               << "Size" << "Status"
-                               << "Progress" << "DL speed"
-                               << "UL speed" << "Seeds/Leechers"
-                               << "Ratio" << "ETA");
-
-        return item;
-    }
-
-    /// @todo QTorrentHandle as one hidden column
+       DownloadViewItem(QTreeWidget* parent, int type) :
+                       QTreeWidgetItem(parent, type = QTreeWidgetItem::UserType) {};
+
+       DownloadViewItem(const QStringList& strings,
+                        int type = QTreeWidgetItem::UserType) :
+                       QTreeWidgetItem (strings, type = Type) {};
+
+
+       /// @return An item comprising of string list, suitable for QTableView
+       /// header.
+       static DownloadViewItem *getHeaderItem() {
+               DownloadViewItem *item
+               = new DownloadViewItem(QStringList()
+                                      << "Name"
+                                      << "Size" << "Status"
+                                      << "Progress" << "DL speed"
+                                      << "UL speed" << "Seeds/Leechers"
+                                      << "Ratio" << "ETA");
+
+               return item;
+       }
+
+       /// @todo QTorrentHandle as one hidden column
 };
 
 #endif