2009-07-23 13:11:51 -04:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 - 2009 RetroShare Team
|
|
|
|
*
|
|
|
|
* 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-08-19 18:15:16 -04:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
2009-07-23 13:11:51 -04:00
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
#ifndef RSETTINGSWIN_HPP_
|
2012-09-25 19:51:13 -04:00
|
|
|
#define RSETTINGSWIN_HPP_
|
2009-07-23 13:11:51 -04:00
|
|
|
|
2012-09-25 19:51:13 -04:00
|
|
|
#include <QtGui/QDialog>
|
|
|
|
#include <retroshare-gui/configpage.h>
|
|
|
|
#include "ui_settings.h"
|
2009-07-23 13:11:51 -04:00
|
|
|
|
2013-10-09 05:31:40 -04:00
|
|
|
class FloatingHelpBrowser;
|
|
|
|
|
2009-07-23 13:11:51 -04:00
|
|
|
class RSettingsWin: public QDialog, private Ui::Settings
|
|
|
|
{
|
2012-09-25 19:51:13 -04:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
enum PageType { LastPage = -1, General = 0, Server, Transfer,Relay,
|
|
|
|
Directories, Plugins, Notify, Security, Message, Forum, Chat, Appearance, Sound, Fileassociations };
|
2009-07-23 13:11:51 -04:00
|
|
|
|
2012-09-25 19:51:13 -04:00
|
|
|
static void showYourself(QWidget *parent, PageType page = LastPage);
|
|
|
|
static void postModDirectories(bool update_local);
|
2009-07-23 13:11:51 -04:00
|
|
|
|
2012-09-25 19:51:13 -04:00
|
|
|
protected:
|
2012-11-06 18:26:47 -05:00
|
|
|
RSettingsWin(QWidget *parent = 0);
|
2012-09-25 19:51:13 -04:00
|
|
|
~RSettingsWin();
|
2010-04-24 18:09:47 -04:00
|
|
|
|
2012-09-25 19:51:13 -04:00
|
|
|
void addPage(ConfigPage*) ;
|
2009-07-23 13:11:51 -04:00
|
|
|
|
2012-09-25 19:51:13 -04:00
|
|
|
public slots:
|
|
|
|
//! Go to a specific part of the control panel.
|
|
|
|
void setNewPage(int page);
|
2009-07-23 13:11:51 -04:00
|
|
|
|
2012-09-25 19:51:13 -04:00
|
|
|
private slots:
|
|
|
|
/** Called when user clicks "Save Settings" */
|
|
|
|
void saveChanges();
|
|
|
|
void dialogFinished(int result);
|
2009-08-19 18:15:16 -04:00
|
|
|
|
2012-09-25 19:51:13 -04:00
|
|
|
private:
|
|
|
|
void initStackedWidget();
|
2010-04-24 18:09:47 -04:00
|
|
|
|
2012-09-25 19:51:13 -04:00
|
|
|
private:
|
2013-10-09 05:31:40 -04:00
|
|
|
FloatingHelpBrowser *mHelpBrowser;
|
2012-09-25 19:51:13 -04:00
|
|
|
static RSettingsWin *_instance;
|
|
|
|
static int lastPage;
|
2009-07-23 13:11:51 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // !RSETTINGSWIN_HPP_
|