settingswidget.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. *openPilot Log - A FOSS Pilot Logbook Application
  3. *Copyright (C) 2020 Felix Turowsky
  4. *
  5. *This program is free software: you can redistribute it and/or modify
  6. *it under the terms of the GNU General Public License as published by
  7. *the Free Software Foundation, either version 3 of the License, or
  8. *(at your option) any later version.
  9. *
  10. *This program is distributed in the hope that it will be useful,
  11. *but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. *GNU General Public License for more details.
  14. *
  15. *You should have received a copy of the GNU General Public License
  16. *along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. */
  18. #ifndef SETTINGSWIDGET_H
  19. #define SETTINGSWIDGET_H
  20. #include <QWidget>
  21. #include <QButtonGroup>
  22. #include <QRegExp>
  23. #include <QValidator>
  24. #include <QMessageBox>
  25. #include <QProcess>
  26. #include <QDebug>
  27. #include "src/classes/settings.h"
  28. #include "src/database/db.h"
  29. #include "src/classes/pilot.h"
  30. namespace Ui {
  31. class SettingsWidget;
  32. }
  33. class SettingsWidget : public QWidget
  34. {
  35. Q_OBJECT
  36. public:
  37. explicit SettingsWidget(QWidget *parent = nullptr);
  38. ~SettingsWidget();
  39. private slots:
  40. void themeGroup_toggled(int id);
  41. void on_aboutPushButton_clicked();
  42. void on_acSortComboBox_currentIndexChanged(int index);
  43. void on_acAllowIncompleteComboBox_currentIndexChanged(int index);
  44. void on_prefixLineEdit_textChanged(const QString &arg1);
  45. void on_piclastnameLineEdit_editingFinished();
  46. void on_picfirstnameLineEdit_editingFinished();
  47. void on_employeeidLineEdit_editingFinished();
  48. void on_emailLineEdit_editingFinished();
  49. void on_phoneLineEdit_editingFinished();
  50. void on_aliasComboBox_currentIndexChanged(int index);
  51. void on_functionComboBox_currentIndexChanged(const QString &arg1);
  52. void on_rulesComboBox_currentIndexChanged(const QString &arg1);
  53. void on_approachComboBox_currentIndexChanged(const QString &arg1);
  54. void on_nightComboBox_currentIndexChanged(int index);
  55. void on_pilotSortComboBox_currentIndexChanged(int index);
  56. void on_logbookViewComboBox_currentIndexChanged(int index);
  57. void on_companyLineEdit_editingFinished();
  58. private:
  59. Ui::SettingsWidget *ui;
  60. void fillSettings();
  61. void setupValidators();
  62. void updatePersonalDetails();
  63. };
  64. #endif // SETTINGSWIDGET_H