formatting is changed according to last astyle settings
[qtrapids] / src / client / DownloadView.h
index caf3daf..459bde2 100644 (file)
@@ -41,32 +41,32 @@ typedef QHash<QString, DownloadViewItem*> DownloadItems_t;
 */
 class DownloadView : public QTreeWidget
 {
-    Q_OBJECT
+       Q_OBJECT
 
 public:
-    DownloadView(QWidget* parent);
+       DownloadView(QWidget* parent);
 
-    ~DownloadView();
+       ~DownloadView();
 
-    void updateItem(TorrentState const& info, ParamsMap_t other_info);
-    QString prepareRemoveSelected();
+       void updateItem(TorrentState const& info, ParamsMap_t other_info);
+       QString prepareRemoveSelected();
 
 private slots:
-    void on_itemClicked(QTreeWidgetItem * item, int column);
+       void on_itemClicked(QTreeWidgetItem * item, int column);
 private:
 
-    void addItem_(TorrentState const& info, ParamsMap_t other_info);
-    void updateItem_(DownloadViewItem *item
-                     , TorrentState const& info, ParamsMap_t other_info);
-    void removeItem_(DownloadViewItem *item, TorrentState const& info);
+       void addItem_(TorrentState const& info, ParamsMap_t other_info);
+       void updateItem_(DownloadViewItem *item
+                        , TorrentState const& info, ParamsMap_t other_info);
+       void removeItem_(DownloadViewItem *item, TorrentState const& info);
 
-    // Maps torrent to downloadview item.
-    // Key: SHA1 info hash of torrent. Data: View item corresponding to torrent.
-    DownloadItems_t items_;
+       // Maps torrent to downloadview item.
+       // Key: SHA1 info hash of torrent. Data: View item corresponding to torrent.
+       DownloadItems_t items_;
 
-    // Private functions.
-    static QString GetStatusString(TorrentStatus::Id status);
-    static QColor GetStatusColor(TorrentStatus::Id status);
+       // Private functions.
+       static QString GetStatusString(TorrentStatus::Id status);
+       static QColor GetStatusColor(TorrentStatus::Id status);
 };
 
 
@@ -78,40 +78,37 @@ class DownloadViewItem : public QTreeWidgetItem
 {
 
 public:
-    DownloadViewItem(QTreeWidget* parent, int type) :
-            QTreeWidgetItem(parent, type = QTreeWidgetItem::UserType) {};
-
-    DownloadViewItem(QString hash, const QStringList& strings,
-                     int type = QTreeWidgetItem::UserType) :
-            QTreeWidgetItem (strings, type = Type),
-            hash_(hash)
-    {}
-
-
-    /// @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
-
-    QString getHash() const
-    {
-        return hash_;
-    }
+       DownloadViewItem(QTreeWidget* parent, int type) :
+                       QTreeWidgetItem(parent, type = QTreeWidgetItem::UserType) {};
+
+       DownloadViewItem(QString hash, const QStringList& strings,
+                        int type = QTreeWidgetItem::UserType) :
+                       QTreeWidgetItem (strings, type = Type),
+                       hash_(hash) {}
+
+
+       /// @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
+
+       QString getHash() const {
+               return hash_;
+       }
 
 private:
-    QString hash_;
+       QString hash_;
 };
 
 } // namespace qtrapids