settingswidget.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 <QValidator>
  23. #include <QMessageBox>
  24. #include <QProcess>
  25. #include <QDebug>
  26. namespace Ui {
  27. class SettingsWidget;
  28. }
  29. class SettingsWidget : public QWidget
  30. {
  31. Q_OBJECT
  32. public:
  33. explicit SettingsWidget(QWidget *parent = nullptr);
  34. ~SettingsWidget();
  35. private slots:
  36. void onThemeGroup_buttonClicked(int theme_id);
  37. void on_aboutPushButton_clicked();
  38. void on_acSortComboBox_currentIndexChanged(int index);
  39. void on_acAllowIncompleteComboBox_currentIndexChanged(int index);
  40. void on_prefixLineEdit_textChanged(const QString &arg1);
  41. void on_lastnameLineEdit_editingFinished();
  42. void on_firstnameLineEdit_editingFinished();
  43. void on_employeeidLineEdit_editingFinished();
  44. void on_emailLineEdit_editingFinished();
  45. void on_phoneLineEdit_editingFinished();
  46. void on_aliasComboBox_currentIndexChanged(int index);
  47. void on_functionComboBox_currentIndexChanged(const QString &arg1);
  48. void on_rulesComboBox_currentIndexChanged(const QString &arg1);
  49. void on_approachComboBox_currentIndexChanged(const QString &arg1);
  50. void on_nightComboBox_currentIndexChanged(int index);
  51. void on_pilotSortComboBox_currentIndexChanged(int index);
  52. void on_logbookViewComboBox_currentIndexChanged(int index);
  53. void on_companyLineEdit_editingFinished();
  54. private:
  55. Ui::SettingsWidget *ui;
  56. void readSettings();
  57. void setupValidators();
  58. void updatePersonalDetails();
  59. signals:
  60. void viewSelectionChanged(int view_id);
  61. };
  62. #endif // SETTINGSWIDGET_H