File indexing completed on 2024-06-16 04:16:17

0001 /*
0002  *  SPDX-FileCopyrightText: 2020 Dmitrii Utkin <loentar@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: LGPL-2.1-only
0005  */
0006 
0007 #ifndef RECORDER_PROFILE_SETTINGS_H
0008 #define RECORDER_PROFILE_SETTINGS_H
0009 
0010 #include <QDialog>
0011 
0012 namespace Ui
0013 {
0014 class RecorderProfileSettings;
0015 }
0016 
0017 struct RecorderProfile;
0018 
0019 class RecorderProfileSettings : public QDialog
0020 {
0021     Q_OBJECT
0022 
0023 public:
0024     explicit RecorderProfileSettings(QWidget *parent = nullptr);
0025     ~RecorderProfileSettings();
0026 
0027     // returns true if profile changed
0028     bool editProfile(RecorderProfile *profile, const RecorderProfile &defaultProfile);
0029 
0030     void setPreview(const QString &preview);
0031 
0032 Q_SIGNALS:
0033     void requestPreview(QString arguments);
0034 
0035 private Q_SLOTS:
0036     void onInputChanged();
0037     void onLinkActivated(const QString &link);
0038     void onPreviewToggled(bool checked);
0039 
0040 private:
0041     void fillProfile(const RecorderProfile &profile);
0042 
0043 private:
0044     Ui::RecorderProfileSettings *ui;
0045 };
0046 
0047 #endif // RECORDER_PROFILE_SETTINGS_H