2008-12-10 20:19:34 -05:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006, crypton
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2009-07-12 17:03:26 -04:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
2008-12-10 20:19:34 -05:00
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _SHAREMANAGER_H
|
|
|
|
#define _SHAREMANAGER_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QFileDialog>
|
|
|
|
|
|
|
|
#include "ui_ShareManager.h"
|
|
|
|
|
|
|
|
class ShareManager : public QDialog
|
|
|
|
{
|
2010-09-17 14:27:30 -04:00
|
|
|
Q_OBJECT
|
2008-12-10 20:19:34 -05:00
|
|
|
|
2010-09-17 14:27:30 -04:00
|
|
|
public:
|
|
|
|
static void showYourself() ;
|
|
|
|
static void postModDirectories(bool update_local);
|
2009-08-03 15:43:52 -04:00
|
|
|
|
|
|
|
private:
|
2010-09-17 14:27:30 -04:00
|
|
|
/** Default constructor */
|
2012-11-06 18:26:47 -05:00
|
|
|
ShareManager();
|
2010-09-17 14:27:30 -04:00
|
|
|
/** Default destructor */
|
|
|
|
~ShareManager();
|
2010-04-08 12:33:10 -04:00
|
|
|
|
2010-09-17 14:27:30 -04:00
|
|
|
/** Loads the settings for this page */
|
|
|
|
void load();
|
2010-04-08 12:33:10 -04:00
|
|
|
|
2008-12-10 20:19:34 -05:00
|
|
|
protected:
|
2010-09-17 14:27:30 -04:00
|
|
|
virtual void showEvent(QShowEvent * event);
|
2009-01-01 12:47:35 -05:00
|
|
|
|
2011-04-26 19:38:29 -04:00
|
|
|
virtual void dragEnterEvent(QDragEnterEvent *event);
|
|
|
|
virtual void dropEvent(QDropEvent *event);
|
|
|
|
|
2008-12-10 20:19:34 -05:00
|
|
|
private slots:
|
2010-09-17 14:27:30 -04:00
|
|
|
/** Create the context popup menu and it's submenus */
|
2010-09-18 12:05:32 -04:00
|
|
|
void shareddirListCurrentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn);
|
2010-09-17 14:27:30 -04:00
|
|
|
void shareddirListCostumPopupMenu( QPoint point );
|
2008-12-10 20:19:34 -05:00
|
|
|
|
2010-09-17 14:27:30 -04:00
|
|
|
void showShareDialog();
|
2010-09-18 12:05:32 -04:00
|
|
|
void editShareDirectory();
|
2010-09-17 14:27:30 -04:00
|
|
|
void removeShareDirectory();
|
2012-11-02 09:52:29 -04:00
|
|
|
void updateFlags();
|
2012-11-08 19:46:41 -05:00
|
|
|
void updateGroups();
|
2012-11-14 17:56:25 -05:00
|
|
|
void applyAndClose() ;
|
2010-04-08 12:33:10 -04:00
|
|
|
|
2008-12-10 20:19:34 -05:00
|
|
|
private:
|
2010-09-17 14:27:30 -04:00
|
|
|
static ShareManager *_instance;
|
|
|
|
bool isLoading;
|
2008-12-10 20:19:34 -05:00
|
|
|
|
2010-09-17 14:27:30 -04:00
|
|
|
/** Define the popup menus for the Context menu */
|
|
|
|
QMenu* contextMnu;
|
2009-01-01 12:47:35 -05:00
|
|
|
|
2010-09-17 14:27:30 -04:00
|
|
|
/** Qt Designer generated object */
|
|
|
|
Ui::ShareManager ui;
|
2008-12-10 20:19:34 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|