#include <editcommanddialog.h>
Inherits QDialog.
Definition at line 33 of file editcommanddialog.h.
◆ EditCommandDialog()
EditCommandDialog::EditCommandDialog |
( |
const QStringList & |
groups, |
|
|
const QString & |
group, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
|
explicit |
◆ ~EditCommandDialog()
EditCommandDialog::~EditCommandDialog |
( |
| ) |
|
◆ commandKeyPressed
void EditCommandDialog::commandKeyPressed |
( |
Qt::Key |
key, |
|
|
Qt::KeyboardModifiers |
keyModifiers, |
|
|
bool |
release |
|
) |
| |
|
privateslot |
◆ fromCommand()
void EditCommandDialog::fromCommand |
( |
const Command & |
command | ) |
|
Definition at line 184 of file editcommanddialog.cpp.
References Command::getArgString(), Command::getAssociateKey(), Command::getCommand(), Command::getDescription(), Command::getGroup(), Command::getKey(), Command::getKeyModifiers(), Command::getRelease(), m_key, m_keyModifiers, setKeyAssociate(), setKeyLabel(), and ui.
Referenced by MainWindow::on_commandEdit_clicked(), and MainWindow::on_commandNew_clicked().
186 ui->group->lineEdit()->setText(command.
getGroup());
Qt::KeyboardModifiers getKeyModifiers() const
const QString & getDescription() const
Qt::KeyboardModifiers m_keyModifiers
const QString & getArgString() const
const QString & getGroup() const
Ui::EditCommandDialog * ui
bool getAssociateKey() const
const QString & getCommand() const
◆ getArguments()
QString EditCommandDialog::getArguments |
( |
| ) |
const |
◆ getAssociateKey()
bool EditCommandDialog::getAssociateKey |
( |
| ) |
const |
◆ getCommand()
QString EditCommandDialog::getCommand |
( |
| ) |
const |
◆ getDescription()
QString EditCommandDialog::getDescription |
( |
| ) |
const |
◆ getGroup()
QString EditCommandDialog::getGroup |
( |
| ) |
const |
◆ getKey()
Qt::Key EditCommandDialog::getKey |
( |
| ) |
const |
◆ getKeyModifiers()
Qt::KeyboardModifiers EditCommandDialog::getKeyModifiers |
( |
| ) |
const |
◆ getRelease()
bool EditCommandDialog::getRelease |
( |
| ) |
const |
◆ on_keyCapture_toggled
void EditCommandDialog::on_keyCapture_toggled |
( |
bool |
checked | ) |
|
|
privateslot |
◆ on_showFileDialog_clicked
void EditCommandDialog::on_showFileDialog_clicked |
( |
bool |
checked | ) |
|
|
privateslot |
Definition at line 126 of file editcommanddialog.cpp.
References ui.
129 QString commandFileName =
ui->command->text();
130 QFileInfo commandFileInfo(commandFileName);
131 QString commandFolderName = commandFileInfo.baseName();
132 QFileInfo commandDirInfo(commandFolderName);
135 if (commandFileInfo.exists()) {
136 dirStr = commandFileName;
137 }
else if (commandDirInfo.exists()) {
138 dirStr = commandFolderName;
143 QString fileName = QFileDialog::getOpenFileName(
145 tr(
"Select command"),
147 tr(
"All (*);;Python (*.py);;Shell (*.sh *.bat);;Binary (*.bin *.exe)"), 0, QFileDialog::DontUseNativeDialog);
149 if (fileName !=
"") {
150 ui->command->setText(fileName);
Ui::EditCommandDialog * ui
◆ setArguments()
void EditCommandDialog::setArguments |
( |
const QString & |
arguments | ) |
|
◆ setAssociateKey()
void EditCommandDialog::setAssociateKey |
( |
bool |
associate | ) |
|
◆ setCommand()
void EditCommandDialog::setCommand |
( |
const QString & |
command | ) |
|
◆ setDescription()
void EditCommandDialog::setDescription |
( |
const QString & |
description | ) |
|
Definition at line 63 of file editcommanddialog.cpp.
References ui.
65 ui->description->setText(description);
Ui::EditCommandDialog * ui
◆ setGroup()
void EditCommandDialog::setGroup |
( |
const QString & |
group | ) |
|
Definition at line 58 of file editcommanddialog.cpp.
References ui.
60 ui->group->lineEdit()->setText(group);
Ui::EditCommandDialog * ui
◆ setKey()
void EditCommandDialog::setKey |
( |
Qt::Key |
key, |
|
|
Qt::KeyboardModifiers |
modifiers |
|
) |
| |
◆ setKeyAssociate()
void EditCommandDialog::setKeyAssociate |
( |
| ) |
|
|
private |
◆ setKeyLabel()
void EditCommandDialog::setKeyLabel |
( |
| ) |
|
|
private |
◆ setRelease()
void EditCommandDialog::setRelease |
( |
bool |
release | ) |
|
◆ toCommand()
void EditCommandDialog::toCommand |
( |
Command & |
command | ) |
const |
Definition at line 172 of file editcommanddialog.cpp.
References m_key, m_keyModifiers, Command::setArgString(), Command::setAssociateKey(), Command::setCommand(), Command::setDescription(), Command::setGroup(), Command::setKey(), Command::setKeyModifiers(), Command::setRelease(), and ui.
Referenced by MainWindow::on_commandNew_clicked().
void setRelease(bool release)
void setArgString(const QString &argString)
void setDescription(const QString &description)
Qt::KeyboardModifiers m_keyModifiers
void setCommand(const QString &command)
void setAssociateKey(bool associate)
Ui::EditCommandDialog * ui
void setGroup(const QString &group)
void setKeyModifiers(Qt::KeyboardModifiers keyModifiers)
◆ m_commandKeyReceiver
◆ m_key
Qt::Key EditCommandDialog::m_key |
|
private |
◆ m_keyModifiers
Qt::KeyboardModifiers EditCommandDialog::m_keyModifiers |
|
private |
◆ ui
Ui::EditCommandDialog* EditCommandDialog::ui |
|
private |
Definition at line 60 of file editcommanddialog.h.
Referenced by commandKeyPressed(), EditCommandDialog(), fromCommand(), getArguments(), getAssociateKey(), getCommand(), getDescription(), getGroup(), getRelease(), on_showFileDialog_clicked(), setArguments(), setAssociateKey(), setCommand(), setDescription(), setGroup(), setKeyAssociate(), setKeyLabel(), setRelease(), toCommand(), and ~EditCommandDialog().
The documentation for this class was generated from the following files: