Changed gui element focus and tab behavior

This commit is contained in:
Gene Payne
2020-09-26 10:28:15 -06:00
parent af4767d406
commit 8329934675
4 changed files with 10 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ keybindings::keybindings(openspace::Profile* imported, QWidget *parent)
connect(ui->button_remove, SIGNAL(clicked()), this, SLOT(listItemRemove()));
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(parseSelections()));
ui->text_script->setTabChangesFocus(true);
transitionFromEditMode();
}

View File

@@ -28,6 +28,7 @@ meta::meta(openspace::Profile* imported, QWidget *parent)
ui->line_license->setText("");
}
ui->text_description->setTabChangesFocus(true);
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(save()));
}

View File

@@ -23,6 +23,8 @@ osmodules::osmodules(openspace::Profile* imported, QWidget *parent)
connect(ui->button_remove, SIGNAL(clicked()), this, SLOT(listItemRemove()));
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(parseSelections()));
ui->line_loaded->setTabChangesFocus(true);
ui->line_notLoaded->setTabChangesFocus(true);
transitionFromEditMode();
}

View File

@@ -19,6 +19,10 @@ ostime::ostime(openspace::Profile* imported, QWidget *parent)
if (_data.time == "") {
_data.time = "now";
}
ui->line_relative->setSelection(0, ui->line_relative->text().length());
}
else {
ui->dateEdit->setSelectedSection(QDateTimeEdit::YearSection);
}
}
else {
@@ -47,6 +51,7 @@ void ostime::enableAccordingToType(int idx) {
else {
ui->line_relative->setText(QString(_data.time.c_str()));
}
ui->line_relative->setFocus(Qt::OtherFocusReason);
}
else {
ui->label_relative->setText("<font color='gray'>Relative Time:</font>");
@@ -56,6 +61,7 @@ void ostime::enableAccordingToType(int idx) {
ui->dateEdit->setDate(QDate::fromString(importDate, Qt::DateFormat::ISODate));
ui->timeEdit->setTime(QTime::fromString(importTime));
ui->line_relative->setText("");
ui->dateEdit->setFocus(Qt::OtherFocusReason);
}
}