#pragma once #include #include #include #include #include #include #include #include #include #include "KeychainClass.hpp" class ParametersProvider : public QDialog { Q_OBJECT public: struct settings { std::string userS, passS, imapS; int port; }; explicit ParametersProvider(QWidget *parent = nullptr); ~ParametersProvider() = default; void setFocusInternal(); const settings &getSettings(); signals: void done(); public slots: // Keychain to save password void keyRead(const QString &key, const QString &value); // When clicking OK void start(); private: settings sett; QLineEdit *userField, *passField, *imapField, *portField; KeychainClass keychain; QSettings mSettings; };