implemented much of the general tab and behavior tab in the PreferencesDialog

This commit is contained in:
itsmattkc
2019-12-31 14:40:52 +11:00
parent 970f4b4793
commit acfbe421e2
11 changed files with 189 additions and 73 deletions
+6 -1
View File
@@ -144,9 +144,14 @@ void SequenceDialog::SetUndoable(bool u)
make_undoable_ = u;
}
void SequenceDialog::SetNameIsEditable(bool e)
{
name_field_->setEnabled(e);
}
void SequenceDialog::accept()
{
if (name_field_->text().isEmpty()) {
if (name_field_->isEnabled() && name_field_->text().isEmpty()) {
QMessageBox::critical(this, tr("Error editing Sequence"), tr("Please enter a name for this Sequence."));
return;
}
+8 -1
View File
@@ -71,10 +71,17 @@ public:
/**
* @brief Set whether the parameter changes should be made into an undo command or not
*
* @param u
* Defaults to true.
*/
void SetUndoable(bool u);
/**
* @brief Set whether the name of this Sequence can be edited with this dialog
*
* Defaults to true.
*/
void SetNameIsEditable(bool e);
public slots:
/**
* @brief Function called when the user presses OK