1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-09 01:56:05 -05:00
sdrangel/sdrgui/gui/editcommanddialog.h

77 lines
2.9 KiB
C
Raw Normal View History

2018-01-04 05:11:53 -05:00
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
2018-01-04 05:11:53 -05:00
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef SDRGUI_GUI_EDITCOMMANDDIALOG_H_
#define SDRGUI_GUI_EDITCOMMANDDIALOG_H_
#include <QDialog>
#include <vector>
#include "export.h"
2018-03-03 14:23:38 -05:00
2018-01-04 05:11:53 -05:00
namespace Ui {
class EditCommandDialog;
}
class Command;
class CommandKeyReceiver;
2018-01-04 05:11:53 -05:00
2018-03-03 14:23:38 -05:00
class SDRGUI_API EditCommandDialog : public QDialog {
2018-01-04 05:11:53 -05:00
Q_OBJECT
public:
explicit EditCommandDialog(const QStringList& groups, const QString& group, QWidget* parent = 0);
~EditCommandDialog();
QString getGroup() const;
void setGroup(const QString& group);
QString getDescription() const;
void setDescription(const QString& description);
QString getCommand() const;
void setCommand(const QString& command);
QString getArguments() const;
void setArguments(const QString& arguments);
Qt::Key getKey() const;
Qt::KeyboardModifiers getKeyModifiers() const;
void setKey(Qt::Key key, Qt::KeyboardModifiers modifiers);
bool getAssociateKey() const;
void setAssociateKey(bool associate);
bool getRelease() const;
void setRelease(bool release);
void toCommand(Command& command) const;
void fromCommand(const Command& command);
private:
Ui::EditCommandDialog* ui;
Qt::Key m_key;
Qt::KeyboardModifiers m_keyModifiers;
CommandKeyReceiver *m_commandKeyReceiver;
2018-01-04 05:11:53 -05:00
void setKeyLabel();
void setKeyAssociate();
private slots:
void on_showFileDialog_clicked(bool checked);
void on_keyCapture_toggled(bool checked);
void commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release);
2018-01-04 05:11:53 -05:00
};
#endif /* SDRGUI_GUI_EDITCOMMANDDIALOG_H_ */