mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-13 17:09:05 -05:00
Formatting changes based on feedback, improved delta times data entry
This commit is contained in:
@@ -73,7 +73,7 @@ public:
|
||||
|
||||
void retranslateUi(QDialog *assets)
|
||||
{
|
||||
assets->setWindowTitle(QCoreApplication::translate("assets", "Dialog", nullptr));
|
||||
assets->setWindowTitle(QCoreApplication::translate("assets", "Select assets to include", nullptr));
|
||||
#if QT_CONFIG(tooltip)
|
||||
treeView->setToolTip(QCoreApplication::translate("assets", "<html><head/><body><p>Expand arrow entries to browse assets in this OpenSpace installation. Enable checkbox to include an asset. Those assets highlighted in red are present in the profile but do not exist in this OpenSpace installation.</p></body></html>", nullptr));
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
#if QT_CONFIG(tooltip)
|
||||
line_node->setToolTip(QCoreApplication::translate("markNodes", "<html><head/><body><p>Name of scenegraph node to add to list of "interesting" nodes</p></body></html>", nullptr));
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
button_add->setText(QCoreApplication::translate("markNodes", "Add New", nullptr));
|
||||
button_add->setText(QCoreApplication::translate("markNodes", "Add", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
time->setWindowTitle(QCoreApplication::translate("time", "Time", nullptr));
|
||||
label_relative->setText(QCoreApplication::translate("time", "Relative Time:", nullptr));
|
||||
#if QT_CONFIG(tooltip)
|
||||
line_relative->setToolTip(QCoreApplication::translate("time", "<html><head/><body><p>String for relative time to actual (e.g. "-1d" for back 1 day)</p></body></html>", nullptr));
|
||||
line_relative->setToolTip(QCoreApplication::translate("time", "<html><head/><body><p>String for relative time from actual (e.g. "-1d" for back 1 day, "now" for current time, "+2w" for forward 2 weeks)</p></body></html>", nullptr));
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
#if QT_CONFIG(tooltip)
|
||||
combo_type->setToolTip(QCoreApplication::translate("time", "<html><head/><body><p>Types: Absolute defined time or Relative to actual time</p></body></html>", nullptr));
|
||||
|
||||
@@ -12,7 +12,7 @@ assets::assets(openspace::Profile* imported, const std::string reportAssets, QWi
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::assets)
|
||||
, _imported(imported)
|
||||
, _assetTreeModel(tr("Asset"), tr("Enabled"), tr("Var Name"))
|
||||
, _assetTreeModel(tr("Asset"), tr("Enabled"), tr("Variable Name"))
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ void deltaTimes::addDeltaTimeValue() {
|
||||
ui->listWidget->addItem(new QListWidgetItem(messageAddValue));
|
||||
}
|
||||
ui->listWidget->setCurrentRow(ui->listWidget->count() - 1);
|
||||
ui->line_seconds->setFocus(Qt::OtherFocusReason);
|
||||
_editModeNewItem = true;
|
||||
}
|
||||
|
||||
@@ -215,6 +216,7 @@ void deltaTimes::transitionToEditMode(void) {
|
||||
ui->button_save->setDisabled(false);
|
||||
ui->buttonBox->setDisabled(true);
|
||||
|
||||
ui->line_seconds->setFocus(Qt::OtherFocusReason);
|
||||
editBoxDisabled(false);
|
||||
}
|
||||
|
||||
@@ -226,6 +228,7 @@ void deltaTimes::transitionFromEditMode(void) {
|
||||
ui->button_save->setDisabled(true);
|
||||
ui->buttonBox->setDisabled(false);
|
||||
|
||||
ui->button_add->setFocus(Qt::OtherFocusReason);
|
||||
editBoxDisabled(true);
|
||||
ui->label_adjust->setText("<font color='black'>Set Delta Time</font>");
|
||||
}
|
||||
@@ -263,7 +266,16 @@ deltaTimes::~deltaTimes() {
|
||||
|
||||
void deltaTimes::keyPressEvent(QKeyEvent *evt)
|
||||
{
|
||||
if(evt->key() == Qt::Key_Enter || evt->key() == Qt::Key_Return)
|
||||
return;
|
||||
if(evt->key() == Qt::Key_Enter || evt->key() == Qt::Key_Return) {
|
||||
if (_editModeNewItem) {
|
||||
saveDeltaTimeValue();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
addDeltaTimeValue();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
QDialog::keyPressEvent(evt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user