2014-07-07 00:19:45 +08:00
|
|
|
/*
|
2015-06-06 09:40:08 +08:00
|
|
|
Copyright © 2014-2015 by The qTox Project
|
|
|
|
|
2014-07-07 00:19:45 +08:00
|
|
|
This file is part of qTox, a Qt-based graphical interface for Tox.
|
|
|
|
|
2015-06-06 09:40:08 +08:00
|
|
|
qTox is libre software: you can redistribute it and/or modify
|
2014-07-07 00:19:45 +08:00
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
2015-06-06 09:40:08 +08:00
|
|
|
|
|
|
|
qTox is distributed in the hope that it will be useful,
|
2014-07-07 00:19:45 +08:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2015-06-06 09:40:08 +08:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2014-07-07 00:19:45 +08:00
|
|
|
|
2015-06-06 09:40:08 +08:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with qTox. If not, see <http://www.gnu.org/licenses/>.
|
2014-07-07 00:19:45 +08:00
|
|
|
*/
|
|
|
|
|
2014-09-13 16:32:24 +08:00
|
|
|
#ifndef SETTINGSWIDGET_H
|
|
|
|
#define SETTINGSWIDGET_H
|
2014-06-25 04:11:11 +08:00
|
|
|
|
2014-09-15 02:42:27 +08:00
|
|
|
#include <QHBoxLayout>
|
2014-07-05 00:49:19 +08:00
|
|
|
#include <QPushButton>
|
2014-10-17 00:17:25 +08:00
|
|
|
#include <QStyleFactory>
|
2015-06-06 03:37:01 +08:00
|
|
|
#include <array>
|
2014-10-17 00:17:25 +08:00
|
|
|
|
2014-09-30 17:44:27 +08:00
|
|
|
class Camera;
|
2014-09-15 18:45:59 +08:00
|
|
|
class GenericForm;
|
|
|
|
class GeneralForm;
|
|
|
|
class PrivacyForm;
|
|
|
|
class AVForm;
|
2014-10-06 02:02:12 +08:00
|
|
|
class QLabel;
|
2014-10-15 23:45:41 +08:00
|
|
|
class QTabWidget;
|
2014-10-06 00:17:01 +08:00
|
|
|
|
|
|
|
namespace Ui {class MainWindow;}
|
2014-09-11 21:44:34 +08:00
|
|
|
|
2014-09-15 02:42:27 +08:00
|
|
|
class SettingsWidget : public QWidget
|
2014-06-25 04:11:11 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2014-10-08 20:25:32 +08:00
|
|
|
SettingsWidget(QWidget* parent = nullptr);
|
2014-09-13 16:32:24 +08:00
|
|
|
~SettingsWidget();
|
2014-06-25 04:11:11 +08:00
|
|
|
|
2014-08-11 16:00:08 +08:00
|
|
|
void show(Ui::MainWindow &ui);
|
2014-10-17 01:24:16 +08:00
|
|
|
void setBodyHeadStyle(QString style);
|
2014-06-29 04:11:42 +08:00
|
|
|
|
2014-11-14 04:33:11 +08:00
|
|
|
signals:
|
|
|
|
void setShowSystemTray(bool newValue);
|
2015-01-26 21:09:19 +08:00
|
|
|
void compactToggled(bool compact);
|
2015-03-12 08:41:18 +08:00
|
|
|
void groupchatPositionToggled(bool groupchatPosition);
|
2015-01-26 21:09:19 +08:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void onTabChanged(int);
|
2014-11-14 04:33:11 +08:00
|
|
|
|
2015-06-06 03:37:01 +08:00
|
|
|
private:
|
|
|
|
void retranslateUi();
|
|
|
|
|
2014-06-25 04:11:11 +08:00
|
|
|
private:
|
2015-01-26 21:09:19 +08:00
|
|
|
QWidget *head, *body;
|
2014-10-15 23:45:41 +08:00
|
|
|
QTabWidget *settingsWidgets;
|
2014-10-06 02:02:12 +08:00
|
|
|
QLabel *nameLabel, *imgLabel;
|
2015-06-20 18:59:46 +08:00
|
|
|
std::array<GenericForm*, 5> cfgForms;
|
2015-06-06 03:37:01 +08:00
|
|
|
int currentIndex;
|
2014-06-25 04:11:11 +08:00
|
|
|
};
|
|
|
|
|
2014-09-15 18:45:59 +08:00
|
|
|
#endif // SETTINGSWIDGET_H
|