Hydra 0.20
hydra.src/desktop/DirView.h
00001 
00002 /*
00003  * Copyright (c) 2009 Aleksander B. Demko
00004  * This source code is distributed under the MIT license.
00005  * See the accompanying file LICENSE.MIT.txt for details.
00006  */
00007 
00008 #ifndef __INCLUDED_HYDRADESKTOP_DIRVIEW_H__
00009 #define __INCLUDED_HYDRADESKTOP_DIRVIEW_H__
00010 
00011 #include <QDirModel>
00012 #include <QTreeView>
00013 
00014 #include <desktop/View.h>
00015 
00016 namespace desktop
00017 {
00018   class DirView;
00019 }
00020 
00021 class desktop::DirView : public desktop::View
00022 {
00023     Q_OBJECT
00024 
00025   public:
00026     DirView(FileList *_filelist);
00027 
00028     virtual void onBaseChange(FileList *fl);
00029 
00030   protected:
00031     virtual void contextMenuEvent(QContextMenuEvent * event);
00032 
00033   private slots:
00034     void onMenuOpenDir(void);
00035     void onActivated(const QModelIndex &i);
00036     void onRefreshDir(void);
00037     void onNewDir(void);
00038     void onRenameDir(void);
00039     void onDelDir(void);
00040     void onCopySelection(void);
00041     void onMoveSelection(void);
00042 
00043   private:
00044     void initGui(void);
00045     void doFileOp(int op);
00046 
00047   private:
00048     QDirModel dm_model;
00049     QTreeView *dm_tree;
00050 };
00051 
00052 #endif
00053 
00054 
 All Classes Namespaces Functions Variables