SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
cwkeyergui.h
Go to the documentation of this file.
1 // Copyright (C) 2016 F4EXB //
3 // written by Edouard Griffiths //
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 as 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 V3 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 <http://www.gnu.org/licenses/>. //
18 
19 #ifndef SDRBASE_GUI_CWKEYERGUI_H_
20 #define SDRBASE_GUI_CWKEYERGUI_H_
21 
22 #include <QWidget>
23 #include "dsp/dsptypes.h"
24 #include "export.h"
25 #include "settings/serializable.h"
26 #include "dsp/cwkeyersettings.h"
27 
28 namespace Ui {
29  class CWKeyerGUI;
30 }
31 
32 class QLabel;
33 class MessageQueue;
34 class CWKeyer;
35 class CWKeyerSettings;
36 class CommandKeyReceiver;
37 
38 class SDRGUI_API CWKeyerGUI : public QWidget, public Serializable {
39  Q_OBJECT
40 
41 public:
42  explicit CWKeyerGUI(QWidget* parent = nullptr);
43  ~CWKeyerGUI();
44 
45  void setCWKeyer(CWKeyer* cwKeyer);
46 
47  void resetToDefaults();
48  QByteArray serialize() const;
49  bool deserialize(const QByteArray& data);
50 
51  void setSettings(const CWKeyerSettings& settings) { m_settings = settings; }
52  void displaySettings();
53 
54 private:
55  enum KeyScope
56  {
59  DashKeyScope
60  };
61 
62  Ui::CWKeyerGUI* ui;
63 
69 
70  void applySettings(bool force = false);
71  void blockApplySettings(bool block);
72  void setKeyLabel(QLabel *label, Qt::Key key, Qt::KeyboardModifiers keyModifiers);
73 
74 private slots:
75  void on_cwTextClear_clicked(bool checked);
76  void on_cwTextEdit_editingFinished();
77  void on_cwSpeed_valueChanged(int value);
78  void on_playDots_toggled(bool checked);
79  void on_playDashes_toggled(bool checked);
80  void on_playText_toggled(bool checked);
81  void on_playLoopCW_toggled(bool checked);
82  void on_playStop_toggled(bool checked);
83  void on_keyingStyle_toggled(bool checked);
84  void on_keyDotCapture_toggled(bool checked);
85  void on_keyDashCapture_toggled(bool checked);
86  void on_keyboardKeyer_toggled(bool checked);
87  void commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release);
88  void keyboardKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release);
89 };
90 
91 
92 #endif /* SDRBASE_GUI_CWKEYERGUI_H_ */
void setSettings(const CWKeyerSettings &settings)
Definition: cwkeyergui.h:51
bool m_doApplySettings
Definition: cwkeyergui.h:66
#define SDRGUI_API
Definition: export.h:52
CWKeyer * m_cwKeyer
Definition: cwkeyergui.h:64
CommandKeyReceiver * m_commandKeyReceiver
Definition: cwkeyergui.h:67
CWKeyerSettings m_settings
Definition: cwkeyergui.h:65
KeyScope m_keyScope
Definition: cwkeyergui.h:68
Ui::CWKeyerGUI * ui
Definition: cwkeyergui.h:62