2018-12-23 18:03:08 +01:00
|
|
|
/*******************************************************************************
|
|
|
|
* gui/settings/rsettingswin.h *
|
|
|
|
* *
|
|
|
|
* Copyright (c) 2008, Retroshare Team <retroshare.project@gmail.com> *
|
|
|
|
* *
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
|
|
* published by the Free Software Foundation, either version 3 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 Affero General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Affero General Public License *
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
*******************************************************************************/
|
2009-07-23 17:11:51 +00:00
|
|
|
|
|
|
|
#ifndef RSETTINGSWIN_HPP_
|
2012-09-25 23:51:13 +00:00
|
|
|
#define RSETTINGSWIN_HPP_
|
2009-07-23 17:11:51 +00:00
|
|
|
|
2020-08-15 22:17:52 +02:00
|
|
|
#include "gui/common/FilesDefs.h"
|
2013-10-18 21:10:33 +00:00
|
|
|
#include <QDialog>
|
2012-09-25 23:51:13 +00:00
|
|
|
#include <retroshare-gui/configpage.h>
|
2020-08-18 22:43:45 +10:00
|
|
|
#include <retroshare-gui/mainpage.h>
|
|
|
|
|
2017-01-26 22:35:33 +01:00
|
|
|
#include "ui_settingsw.h"
|
2009-07-23 17:11:51 +00:00
|
|
|
|
2013-10-09 09:31:40 +00:00
|
|
|
class FloatingHelpBrowser;
|
|
|
|
|
2017-01-26 22:35:33 +01:00
|
|
|
#define IMAGE_PREFERENCES ":/icons/png/options.png"
|
|
|
|
|
|
|
|
class SettingsPage: public MainPage
|
2009-07-23 17:11:51 +00:00
|
|
|
{
|
2012-09-25 23:51:13 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-01-26 22:35:33 +01:00
|
|
|
SettingsPage(QWidget *parent = 0);
|
|
|
|
|
2012-09-25 23:51:13 +00:00
|
|
|
enum PageType { LastPage = -1, General = 0, Server, Transfer,Relay,
|
|
|
|
Directories, Plugins, Notify, Security, Message, Forum, Chat, Appearance, Sound, Fileassociations };
|
2009-07-23 17:11:51 +00:00
|
|
|
|
2012-09-25 23:51:13 +00:00
|
|
|
static void showYourself(QWidget *parent, PageType page = LastPage);
|
2017-01-26 22:35:33 +01:00
|
|
|
|
|
|
|
void postModDirectories(bool update_local);
|
|
|
|
|
2020-08-15 22:17:52 +02:00
|
|
|
virtual QIcon iconPixmap() const { return FilesDefs::getIconFromQtResourcePath(IMAGE_PREFERENCES) ; } //MainPage
|
2017-01-26 22:35:33 +01:00
|
|
|
virtual QString pageName() const { return tr("Preferences") ; } //MainPage
|
2009-07-23 17:11:51 +00:00
|
|
|
|
2012-09-25 23:51:13 +00:00
|
|
|
protected:
|
2017-01-26 22:35:33 +01:00
|
|
|
~SettingsPage();
|
2010-04-24 22:09:47 +00:00
|
|
|
|
2012-09-25 23:51:13 +00:00
|
|
|
void addPage(ConfigPage*) ;
|
2009-07-23 17:11:51 +00:00
|
|
|
|
2012-09-25 23:51:13 +00:00
|
|
|
public slots:
|
|
|
|
//! Go to a specific part of the control panel.
|
|
|
|
void setNewPage(int page);
|
2009-07-23 17:11:51 +00:00
|
|
|
|
2012-09-25 23:51:13 +00:00
|
|
|
private slots:
|
2017-01-28 18:13:38 +01:00
|
|
|
void notifySettingsChanged();
|
|
|
|
|
|
|
|
// Called when user clicks "Save Settings"
|
|
|
|
//void saveChanges();
|
2017-01-26 22:35:33 +01:00
|
|
|
//void dialogFinished(int result);
|
2009-08-19 22:15:16 +00:00
|
|
|
|
2012-09-25 23:51:13 +00:00
|
|
|
private:
|
|
|
|
void initStackedWidget();
|
2010-04-24 22:09:47 +00:00
|
|
|
|
2012-09-25 23:51:13 +00:00
|
|
|
private:
|
2013-10-09 09:31:40 +00:00
|
|
|
FloatingHelpBrowser *mHelpBrowser;
|
2012-09-25 23:51:13 +00:00
|
|
|
static int lastPage;
|
2014-05-10 18:05:18 +00:00
|
|
|
|
|
|
|
/* UI - from Designer */
|
|
|
|
Ui::Settings ui;
|
2009-07-23 17:11:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // !RSETTINGSWIN_HPP_
|