• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

fileview.h

Go to the documentation of this file.
00001 
00003 /***************************************************************************
00004  *   Copyright (C) 2005-2007 by Joris Guisson                              *
00005  *   joris.guisson@gmail.com                                               *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
00021  ***************************************************************************/
00022 #ifndef KTFILEVIEW_H
00023 #define KTFILEVIEW_H
00024 
00025 #include <QTreeView>
00026 #include <util/constants.h>
00027 #include <ksharedconfig.h>
00028 
00029 class KMenu;
00030 
00031 namespace bt
00032 {
00033     class TorrentInterface;
00034 }
00035 
00036 namespace kt
00037 {
00038     class TorrentFileModel;
00039 
00043     class FileView : public QTreeView
00044     {
00045         Q_OBJECT
00046     public:
00047         FileView(QWidget *parent);
00048         virtual ~FileView();
00049 
00050         void changeTC(bt::TorrentInterface* tc,KSharedConfigPtr cfg);
00051         void setShowListOfFiles(bool on,KSharedConfigPtr cfg);
00052         void saveState(KSharedConfigPtr cfg);
00053         void loadState(KSharedConfigPtr cfg);
00054         void update();
00055     public slots:
00056         void onTorrentRemoved(bt::TorrentInterface* tc);
00057 
00058     private slots:
00059         void showContextMenu(const QPoint & p);
00060         void onDoubleClicked(const QModelIndex & index);
00061         void onMissingFileMarkedDND(bt::TorrentInterface* tc);
00062         
00063     private:
00064         void changePriority(bt::Priority newpriority);
00065 
00066     private slots:
00067         void open();
00068         void downloadFirst();
00069         void downloadLast();
00070         void downloadNormal();
00071         void doNotDownload();
00072         void deleteFiles();
00073         void moveFiles();
00074 
00075     private:
00076         bt::TorrentInterface* curr_tc;
00077         TorrentFileModel* model;
00078 
00079         KMenu* context_menu;
00080         QAction* open_action;
00081         QAction* download_first_action;
00082         QAction* download_normal_action;
00083         QAction* download_last_action;
00084         QAction* dnd_action;
00085         QAction* delete_action;
00086         QAction* move_files_action;
00087 
00088         QString preview_path;
00089         bool show_list_of_files;
00090         QMap<bt::TorrentInterface*,QByteArray> expanded_state_map;
00091     };
00092 
00093 }
00094 
00095 #endif

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal