Added test torrent files to right place, $HOME/MyDocs.
[qtrapids] / src / client / DownloadView.h
index 459bde2..4bac449 100644 (file)
@@ -1,11 +1,9 @@
 /***************************************************************************
- *   Copyright (C) 2009 by Lassi Väätämöinen   *
- *   lassi.vaatamoinen@ixonos.com   *
+ *   Copyright (C) 2010 by Ixonos Plc   *
  *                                                                         *
  *   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.                                   *
+ *   the Free Software Foundation; version 2 of the License.               *
  *                                                                         *
  *   This program is distributed in the hope that it will be useful,       *
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
@@ -50,23 +48,34 @@ public:
 
        void updateItem(TorrentState const& info, ParamsMap_t other_info);
        QString prepareRemoveSelected();
-
+       
+       /// Saves current view settings via QSettings
+       void saveView();
+       /// Reads view settigns via QSettings
+       void restoreView();
+       
 private slots:
        void on_itemClicked(QTreeWidgetItem * item, int column);
+
 private:
 
+       // Maps torrent to downloadview item.
+       // Key: SHA1 info hash of torrent. Data: View item corresponding to torrent.
+       DownloadItems_t items_;
+       // Used for saving view settings
+       QSettings settings_;
+       
+private:
+       // Private functions.
        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_;
 
-       // Private functions.
        static QString GetStatusString(TorrentStatus::Id status);
        static QColor GetStatusColor(TorrentStatus::Id status);
+       
 };