settingswidget.h
/*
*openPilotLog - A FOSS Pilot Logbook Application
*Copyright (C) 2020-2022 Felix Turowsky
*
*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 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 General Public License for more details.
*
*You should have received a copy of the GNU General Public License
*along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SETTINGSWIDGET_H
#define SETTINGSWIDGET_H
#include <QWidget>
#include <QButtonGroup>
#include <QValidator>
#include <QProcess>
#include <QDebug>
#include <QFontDialog>
namespace Ui {
class SettingsWidget;
}
class SettingsWidget : public QWidget
{
Q_OBJECT
public:
explicit SettingsWidget(QWidget *parent = nullptr);
~SettingsWidget();
enum SettingSignal {LogbookWidget, HomeWidget, AircraftWidget, PilotsWidget, MainWindow};
private slots:
void on_aboutPushButton_clicked();
void on_acftSortComboBox_currentIndexChanged(int index);
void on_prefixLineEdit_textChanged(const QString &arg1);
void on_lastnameLineEdit_editingFinished();
void on_firstnameLineEdit_editingFinished();
void on_employeeidLineEdit_editingFinished();
void on_emailLineEdit_editingFinished();
void on_phoneLineEdit_editingFinished();
void on_aliasComboBox_currentIndexChanged(int index);
void on_functionComboBox_currentIndexChanged(int arg1);
void on_rulesComboBox_currentIndexChanged(int arg1);
void on_approachComboBox_currentIndexChanged(int arg1);
void on_nightComboBox_currentIndexChanged(int index);
void on_pilotSortComboBox_currentIndexChanged(int index);
void on_logbookViewComboBox_currentIndexChanged(int index);
void on_companyLineEdit_editingFinished();
void on_styleComboBox_currentTextChanged(const QString& new_style_setting);
void on_fontComboBox_currentFontChanged(const QFont &f);
void on_fontSpinBox_valueChanged(int arg1);
void on_fontCheckBox_stateChanged(int arg1);
void on_resetStylePushButton_clicked();
void on_currLicDateEdit_userDateChanged(const QDate &date);
void on_currTrDateEdit_userDateChanged(const QDate &date);
void on_currLckDateEdit_userDateChanged(const QDate &date);
void on_currMedDateEdit_userDateChanged(const QDate &date);
void on_currCustom1DateEdit_userDateChanged(const QDate &date);
void on_currCustom2DateEdit_userDateChanged(const QDate &date);
void on_currToLdgCheckBox_stateChanged(int arg1);
void on_currLicCheckBox_stateChanged(int arg1);
void on_currTrCheckBox_stateChanged(int arg1);
void on_currLckCheckBox_stateChanged(int arg1);
void on_currMedCheckBox_stateChanged(int arg1);
void on_currCustom1CheckBox_stateChanged(int arg1);
void on_currCustom2CheckBox_stateChanged(int arg1);
void on_currCustom1LineEdit_editingFinished();
void on_currCustom2LineEdit_editingFinished();
void on_languageComboBox_activated(int arg1);
private:
Ui::SettingsWidget *ui;
void readSettings();
void setupValidators();
void setupComboBoxes();
void setupDateEdits();
void loadBackupWidget();
void updatePersonalDetails();
bool usingStylesheet();
signals:
void settingChanged(SettingsWidget::SettingSignal widget);
protected:
void changeEvent(QEvent* event) override;
};
#endif // SETTINGSWIDGET_H
AircraftWidget
The AircraftWidget is used to view, edit, delete or add new tails.
Definition: aircraftwidget.h:54
HomeWidget
The HomeWidget is the welcome screen of the application.
Definition: homewidget.h:43
LogbookWidget
The LogbookWidget displays data from the database in a QSqlTableView fed by a QSqlQuery Model.
Definition: logbookwidget.h:48
PilotsWidget
The PilotsWidget is used to view, edit, delete or add new pilots.
Definition: pilotswidget.h:53
SettingsWidget
The SettingsWidget is used to to display and alter Settings.
Definition: settingswidget.h:41
SettingsWidget::settingChanged
void settingChanged(SettingsWidget::SettingSignal widget)
settingChanged is emitted when a setting change occurs that needs to trigger an update (repaint) to a...
SettingsWidget::SettingSignal
SettingSignal
enumerates Widgets that need to receive a signal when a setting is updated.
Definition: settingswidget.h:51
SettingsWidget::changeEvent
void changeEvent(QEvent *event) override
Handles change events, like updating the UI to new localisation.
Definition: settingswidget.cpp:48