settingswidget.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. #include "src/classes/asettings.h"
  27. #include "src/database/db.h"
  28. #include "src/classes/pilot.h"
  29. namespace Ui {
  30. class SettingsWidget;
  31. }
  32. class SettingsWidget : public QWidget
  33. {
  34. Q_OBJECT
  35. public:
  36. explicit SettingsWidget(QWidget *parent = nullptr);
  37. ~SettingsWidget();
  38. private slots:
  39. void themeGroup_toggled(int id);
  40. void on_aboutPushButton_clicked();
  41. void on_acSortComboBox_currentIndexChanged(int index);
  42. void on_acAllowIncompleteComboBox_currentIndexChanged(int index);
  43. void on_prefixLineEdit_textChanged(const QString &arg1);
  44. void on_piclastnameLineEdit_editingFinished();
  45. void on_picfirstnameLineEdit_editingFinished();
  46. void on_employeeidLineEdit_editingFinished();
  47. void on_emailLineEdit_editingFinished();
  48. void on_phoneLineEdit_editingFinished();
  49. void on_aliasComboBox_currentIndexChanged(int index);
  50. void on_functionComboBox_currentIndexChanged(const QString &arg1);
  51. void on_rulesComboBox_currentIndexChanged(const QString &arg1);
  52. void on_approachComboBox_currentIndexChanged(const QString &arg1);
  53. void on_nightComboBox_currentIndexChanged(int index);
  54. void on_pilotSortComboBox_currentIndexChanged(int index);
  55. void on_logbookViewComboBox_currentIndexChanged(int index);
  56. void on_companyLineEdit_editingFinished();
  57. private:
  58. Ui::SettingsWidget *ui;
  59. void fillSettings();
  60. void setupValidators();
  61. void updatePersonalDetails();
  62. signals:
  63. void logbookviewSelectionChanged(int view_id);
  64. };
  65. #endif // SETTINGSWIDGET_H