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
|
|
|
|
2013-10-18 17:10:33 -04:00
|
|
|
#include <QDialog>
|
2012-09-25 19:51:13 -04:00
|
|
|
#include <retroshare-gui/configpage.h>
|
2017-01-26 16:35:33 -05:00
|
|
|
#include "ui_settingsw.h"
|
|
|
|
#include "mainpage.h"
|
2009-07-23 13:11:51 -04:00
|
|
|
|
2013-10-09 05:31:40 -04:00
|
|
|
class FloatingHelpBrowser;
|
|
|
|
|
2017-01-26 16:35:33 -05:00
|
|
|
#define IMAGE_PREFERENCES ":/icons/png/options.png"
|
|
|
|
|
|
|
|
class SettingsPage: public MainPage
|
2009-07-23 13:11:51 -04:00
|
|
|
{
|
2012-09-25 19:51:13 -04:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-01-26 16:35:33 -05:00
|
|
|
SettingsPage(QWidget *parent = 0);
|
|
|
|
|
2012-09-25 19:51:13 -04:00
|
|
|
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);
|
2017-01-26 16:35:33 -05:00
|
|
|
|
|
|
|
void postModDirectories(bool update_local);
|
|
|
|
|
|
|
|
virtual QIcon iconPixmap() const { return QIcon(IMAGE_PREFERENCES) ; } //MainPage
|
|
|
|
virtual QString pageName() const { return tr("Preferences") ; } //MainPage
|
2009-07-23 13:11:51 -04:00
|
|
|
|
2012-09-25 19:51:13 -04:00
|
|
|
protected:
|
2017-01-26 16:35:33 -05:00
|
|
|
~SettingsPage();
|
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();
|
2017-01-26 16:35:33 -05:00
|
|
|
//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;
|
2017-01-26 16:35:33 -05:00
|
|
|
//static RSettingsWin *_instance;
|
2012-09-25 19:51:13 -04:00
|
|
|
static int lastPage;
|
2014-05-10 14:05:18 -04:00
|
|
|
|
|
|
|
/* UI - from Designer */
|
|
|
|
Ui::Settings ui;
|
2009-07-23 13:11:51 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // !RSETTINGSWIN_HPP_
|