1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
qTox/src/widget/form/settingswidget.h

71 lines
1.7 KiB
C
Raw Normal View History

2014-07-07 00:19:45 +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.
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.
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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
2014-07-07 00:19:45 +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
*/
#ifndef SETTINGSWIDGET_H
#define SETTINGSWIDGET_H
2014-06-25 04:11:11 +08:00
2014-09-15 02:42:27 +08:00
#include <QHBoxLayout>
#include <QPushButton>
2014-10-17 00:17:25 +08:00
#include <QStyleFactory>
#include <array>
2014-10-17 00:17:25 +08:00
class Camera;
class GenericForm;
class GeneralForm;
class PrivacyForm;
class AVForm;
2014-10-06 02:02:12 +08:00
class QLabel;
class QTabWidget;
class ContentLayout;
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);
~SettingsWidget();
2014-06-25 04:11:11 +08:00
bool isShown() const;
void show(ContentLayout* contentLayout);
2014-10-17 01:24:16 +08:00
void setBodyHeadStyle(QString style);
2015-07-02 01:12:50 +08:00
void showAbout();
signals:
void setShowSystemTray(bool newValue);
void compactToggled(bool compact);
void separateWindowToggled(bool separateWindow);
void groupchatPositionToggled(bool groupchatPosition);
private slots:
void onTabChanged(int);
private:
void retranslateUi();
2014-06-25 04:11:11 +08:00
private:
QWidget *head, *body;
QTabWidget *settingsWidgets;
2014-10-06 02:02:12 +08:00
QLabel *nameLabel, *imgLabel;
std::array<GenericForm*, 5> cfgForms;
int currentIndex;
2014-06-25 04:11:11 +08:00
};
#endif // SETTINGSWIDGET_H