summaryrefslogtreecommitdiff
path: root/ldmicro
diff options
context:
space:
mode:
authorakshay-c2019-05-07 12:05:55 +0530
committerakshay-c2019-05-07 12:05:55 +0530
commitacd4a8caeee6e40469b879c892abb26780a5f8e5 (patch)
treeec13b7f96900b8d3bdd19a786223a856c027ce1b /ldmicro
parentf6250bab468eadfc020922040966d6ba75edd341 (diff)
downloadLDmicroQt-acd4a8caeee6e40469b879c892abb26780a5f8e5.tar.gz
LDmicroQt-acd4a8caeee6e40469b879c892abb26780a5f8e5.tar.bz2
LDmicroQt-acd4a8caeee6e40469b879c892abb26780a5f8e5.zip
Set initial focus controls for dialogboxes
Diffstat (limited to 'ldmicro')
-rw-r--r--ldmicro/coildialog.cpp1
-rw-r--r--ldmicro/commentdialog.cpp1
-rw-r--r--ldmicro/contactsdialog.cpp1
-rw-r--r--ldmicro/lutdialog.cpp1
-rw-r--r--ldmicro/resetdialog.cpp1
-rw-r--r--ldmicro/simpledialog.cpp1
6 files changed, 6 insertions, 0 deletions
diff --git a/ldmicro/coildialog.cpp b/ldmicro/coildialog.cpp
index f6677b9..eae0a3f 100644
--- a/ldmicro/coildialog.cpp
+++ b/ldmicro/coildialog.cpp
@@ -128,6 +128,7 @@ void ShowCoilDialog(BOOL *negated, BOOL *setOnly, BOOL *resetOnly, char *name)
} else {
NormalRadio->setChecked(TRUE);
}
+ NameTextbox->setFocus();
int ret = CoilDialog->exec();
switch(ret)
{
diff --git a/ldmicro/commentdialog.cpp b/ldmicro/commentdialog.cpp
index 1b7bffe..8e29528 100644
--- a/ldmicro/commentdialog.cpp
+++ b/ldmicro/commentdialog.cpp
@@ -67,6 +67,7 @@ void ShowCommentDialog(char *comment)
CommentGrid = new QGridLayout(CommentDialog);
MakeControls();
CommentTextbox->setText(comment);
+ CommentTextbox->setFocus();
int ret = CommentDialog->exec();
switch(ret)
{
diff --git a/ldmicro/contactsdialog.cpp b/ldmicro/contactsdialog.cpp
index 40d8055..be04b15 100644
--- a/ldmicro/contactsdialog.cpp
+++ b/ldmicro/contactsdialog.cpp
@@ -108,6 +108,7 @@ void ShowContactsDialog(BOOL *negated, char *name)
NameTextbox->setValidator(
new QRegExpValidator(
QRegExp("[a-zA-Z0-9_]+")));
+ NameTextbox->setFocus();
if(name[0] == 'R') {
SourceInternalRelayRadio->setChecked(TRUE);
diff --git a/ldmicro/lutdialog.cpp b/ldmicro/lutdialog.cpp
index b6e3433..bd13fc8 100644
--- a/ldmicro/lutdialog.cpp
+++ b/ldmicro/lutdialog.cpp
@@ -354,6 +354,7 @@ void ShowLookUpTableDialog(ElemLeaf *l)
sprintf(buf, "%d", t->count);
CountTextbox->setText(buf);
AsStringCheckbox->setChecked(asString);
+ DestTextbox->setFocus();
PrevTableAsString[0] = NULL;
int ret = LutDialog->exec();
switch(ret)
diff --git a/ldmicro/resetdialog.cpp b/ldmicro/resetdialog.cpp
index 0d155b8..ba79def 100644
--- a/ldmicro/resetdialog.cpp
+++ b/ldmicro/resetdialog.cpp
@@ -99,6 +99,7 @@ void ShowResetDialog(char *name)
TypeCounterRadio->setChecked(TRUE);
}
NameTextbox->setText(name + 1);
+ NameTextbox->setFocus();
int ret = ResetDialog->exec();
switch(ret)
diff --git a/ldmicro/simpledialog.cpp b/ldmicro/simpledialog.cpp
index c9a9e77..a22ae99 100644
--- a/ldmicro/simpledialog.cpp
+++ b/ldmicro/simpledialog.cpp
@@ -150,6 +150,7 @@ BOOL ShowSimpleDialog(char *title, int boxes, char **labels, DWORD numOnlyMask,
QRegExp("[a-zA-Z0-9_'-]+")));
}
}
+ Textboxes[0]->setFocus();
int ret = SimpleDialog->exec();
switch(ret)
{