1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
/*
* userfiledialog.h
* ui
*
* Created by Mikael Gransell on 4/13/06.
* Copyright 2006 __MyCompanyName__. All rights reserved.
*
*/
#ifndef USER_FILE_DIALOG_H
#define USER_FILE_DIALOG_H
#include <boost/shared_ptr.hpp>
#include <QDialog>
#include "backendconnection.h"
#include "userfilemodel.h"
#include "ui_userfilelisting.h"
class GlobalUserModel;
class UserFileDialog : public QDialog
{
Q_OBJECT
public:
UserFileDialog( const UserFileModelPtr& mdl,
BackendConnectionPtr backendConn,
boost::shared_ptr<GlobalUserModel> userModel,
QWidget* parent = NULL );
~UserFileDialog() { }
public slots:
void on_treeView_customContextMenuRequested( const QPoint& pos );
void on_treeView_doubleClicked();
void onDownload();
void onDownloadTo();
private:
void download( const QModelIndex& index );
void downloadTo( const QModelIndex& index, const QString& path );
QString formatFileName( const UserFileModel::TreeItem* item ) const;
void createMenu();
boost::shared_ptr<QMenu> contextMenu;
Ui::UserFileDialog ui;
BackendConnectionPtr backendConnection;
UserFileModelPtr model;
};
#endif
|