Active "add" buttons with enter keyboard

Closes #4
This commit is contained in:
Marcel Kapfer 2020-09-10 23:48:34 +02:00
parent 38e03373b6
commit dec5ccd7a8
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09
2 changed files with 106 additions and 14 deletions

View file

@ -101,6 +101,7 @@ class Ui_MainWindow(object):
self.b_category_remove.setObjectName("b_category_remove")
self.horizontalLayout_15.addWidget(self.b_category_remove)
self.b_category_add = QtWidgets.QPushButton(self.t_basics)
self.b_category_add.setAutoDefault(True)
self.b_category_add.setObjectName("b_category_add")
self.horizontalLayout_15.addWidget(self.b_category_add)
self.verticalLayout_8.addLayout(self.horizontalLayout_15)
@ -154,6 +155,7 @@ class Ui_MainWindow(object):
self.b_ingredient_remove.setObjectName("b_ingredient_remove")
self.horizontalLayout_13.addWidget(self.b_ingredient_remove)
self.b_ingredient_add = QtWidgets.QPushButton(self.t_ingredients)
self.b_ingredient_add.setAutoDefault(True)
self.b_ingredient_add.setObjectName("b_ingredient_add")
self.horizontalLayout_13.addWidget(self.b_ingredient_add)
self.verticalLayout_7.addLayout(self.horizontalLayout_13)
@ -187,6 +189,7 @@ class Ui_MainWindow(object):
self.b_utensil_remove.setObjectName("b_utensil_remove")
self.horizontalLayout_12.addWidget(self.b_utensil_remove)
self.b_utensil_add = QtWidgets.QPushButton(self.t_utensils)
self.b_utensil_add.setAutoDefault(True)
self.b_utensil_add.setObjectName("b_utensil_add")
self.horizontalLayout_12.addWidget(self.b_utensil_add)
self.verticalLayout_6.addLayout(self.horizontalLayout_12)
@ -206,6 +209,7 @@ class Ui_MainWindow(object):
spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_9.addItem(spacerItem7)
self.b_step_add = QtWidgets.QPushButton(self.t_steps)
self.b_step_add.setAutoDefault(True)
self.b_step_add.setObjectName("b_step_add")
self.horizontalLayout_9.addWidget(self.b_step_add)
self.verticalLayout_5.addLayout(self.horizontalLayout_9)
@ -239,6 +243,7 @@ class Ui_MainWindow(object):
spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_7.addItem(spacerItem9)
self.b_note_add = QtWidgets.QPushButton(self.t_notes)
self.b_note_add.setAutoDefault(True)
self.b_note_add.setObjectName("b_note_add")
self.horizontalLayout_7.addWidget(self.b_note_add)
self.verticalLayout_4.addLayout(self.horizontalLayout_7)
@ -272,6 +277,7 @@ class Ui_MainWindow(object):
spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_5.addItem(spacerItem11)
self.b_tip_add = QtWidgets.QPushButton(self.t_tips)
self.b_tip_add.setAutoDefault(True)
self.b_tip_add.setObjectName("b_tip_add")
self.horizontalLayout_5.addWidget(self.b_tip_add)
self.verticalLayout_2.addLayout(self.horizontalLayout_5)
@ -305,6 +311,7 @@ class Ui_MainWindow(object):
spacerItem13 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem13)
self.b_variation_add = QtWidgets.QPushButton(self.t_variations)
self.b_variation_add.setAutoDefault(True)
self.b_variation_add.setObjectName("b_variation_add")
self.horizontalLayout_3.addWidget(self.b_variation_add)
self.verticalLayout_3.addLayout(self.horizontalLayout_3)
@ -338,6 +345,7 @@ class Ui_MainWindow(object):
spacerItem15 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem15)
self.b_rating_add = QtWidgets.QPushButton(self.t_rating)
self.b_rating_add.setAutoDefault(True)
self.b_rating_add.setObjectName("b_rating_add")
self.horizontalLayout_2.addWidget(self.b_rating_add)
self.verticalLayout.addLayout(self.horizontalLayout_2)
@ -388,22 +396,52 @@ class Ui_MainWindow(object):
MainWindow.setTabOrder(self.e_time, self.e_rating_overall)
MainWindow.setTabOrder(self.e_rating_overall, self.e_url)
MainWindow.setTabOrder(self.e_url, self.e_category)
MainWindow.setTabOrder(self.e_category, self.e_ingredient)
MainWindow.setTabOrder(self.e_category, self.b_category_add)
MainWindow.setTabOrder(self.b_category_add, self.v_categories)
MainWindow.setTabOrder(self.v_categories, self.b_category_remove)
MainWindow.setTabOrder(self.b_category_remove, self.e_ingredient)
MainWindow.setTabOrder(self.e_ingredient, self.c_heading)
MainWindow.setTabOrder(self.c_heading, self.e_amount)
MainWindow.setTabOrder(self.e_amount, self.v_ingredients)
MainWindow.setTabOrder(self.v_ingredients, self.e_utensil)
MainWindow.setTabOrder(self.e_utensil, self.v_utensils)
MainWindow.setTabOrder(self.v_utensils, self.e_step)
MainWindow.setTabOrder(self.e_step, self.v_steps)
MainWindow.setTabOrder(self.v_steps, self.e_note)
MainWindow.setTabOrder(self.e_note, self.v_notes)
MainWindow.setTabOrder(self.v_notes, self.e_tip)
MainWindow.setTabOrder(self.e_tip, self.v_tips)
MainWindow.setTabOrder(self.v_tips, self.e_variation)
MainWindow.setTabOrder(self.e_variation, self.v_variations)
MainWindow.setTabOrder(self.v_variations, self.e_rating)
MainWindow.setTabOrder(self.e_rating, self.v_ratings)
MainWindow.setTabOrder(self.e_amount, self.b_ingredient_add)
MainWindow.setTabOrder(self.b_ingredient_add, self.v_ingredients)
MainWindow.setTabOrder(self.v_ingredients, self.b_ingredient_remove)
MainWindow.setTabOrder(self.b_ingredient_remove, self.e_utensil)
MainWindow.setTabOrder(self.e_utensil, self.b_utensil_add)
MainWindow.setTabOrder(self.b_utensil_add, self.v_utensils)
MainWindow.setTabOrder(self.v_utensils, self.b_utensil_remove)
MainWindow.setTabOrder(self.b_utensil_remove, self.e_step)
MainWindow.setTabOrder(self.e_step, self.b_step_add)
MainWindow.setTabOrder(self.b_step_add, self.v_steps)
MainWindow.setTabOrder(self.v_steps, self.b_step_edit)
MainWindow.setTabOrder(self.b_step_edit, self.b_step_replace)
MainWindow.setTabOrder(self.b_step_replace, self.b_step_remove)
MainWindow.setTabOrder(self.b_step_remove, self.e_note)
MainWindow.setTabOrder(self.e_note, self.b_note_add)
MainWindow.setTabOrder(self.b_note_add, self.v_notes)
MainWindow.setTabOrder(self.v_notes, self.b_note_edit)
MainWindow.setTabOrder(self.b_note_edit, self.b_note_replace)
MainWindow.setTabOrder(self.b_note_replace, self.b_note_remove)
MainWindow.setTabOrder(self.b_note_remove, self.e_tip)
MainWindow.setTabOrder(self.e_tip, self.b_tip_add)
MainWindow.setTabOrder(self.b_tip_add, self.v_tips)
MainWindow.setTabOrder(self.v_tips, self.b_tip_edit)
MainWindow.setTabOrder(self.b_tip_edit, self.b_tip_replace)
MainWindow.setTabOrder(self.b_tip_replace, self.b_tip_remove)
MainWindow.setTabOrder(self.b_tip_remove, self.e_variation)
MainWindow.setTabOrder(self.e_variation, self.b_variation_add)
MainWindow.setTabOrder(self.b_variation_add, self.v_variations)
MainWindow.setTabOrder(self.v_variations, self.b_variation_edit)
MainWindow.setTabOrder(self.b_variation_edit, self.b_variation_replace)
MainWindow.setTabOrder(self.b_variation_replace, self.b_variation_remove)
MainWindow.setTabOrder(self.b_variation_remove, self.e_rating)
MainWindow.setTabOrder(self.e_rating, self.b_rating_add)
MainWindow.setTabOrder(self.b_rating_add, self.v_ratings)
MainWindow.setTabOrder(self.v_ratings, self.b_rating_edit)
MainWindow.setTabOrder(self.b_rating_edit, self.b_rating_replace)
MainWindow.setTabOrder(self.b_rating_replace, self.b_rating_remove)
MainWindow.setTabOrder(self.b_rating_remove, self.b_create)
MainWindow.setTabOrder(self.b_create, self.tabWidget)
MainWindow.setTabOrder(self.tabWidget, self.b_cancel)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate

View file

@ -200,6 +200,9 @@
<property name="text">
<string>Hinzufügen</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -314,6 +317,9 @@
<property name="text">
<string>Hinzufügen</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -386,6 +392,9 @@
<property name="text">
<string>Hinzufügen</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -435,6 +444,9 @@
<property name="text">
<string>Hinzufügen</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -510,6 +522,9 @@
<property name="text">
<string>Hinzufügen</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -585,6 +600,9 @@
<property name="text">
<string>Hinzufügen</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -660,6 +678,9 @@
<property name="text">
<string>Hinzufügen</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -735,6 +756,9 @@
<property name="text">
<string>Hinzufügen</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -830,22 +854,52 @@
<tabstop>e_rating_overall</tabstop>
<tabstop>e_url</tabstop>
<tabstop>e_category</tabstop>
<tabstop>b_category_add</tabstop>
<tabstop>v_categories</tabstop>
<tabstop>b_category_remove</tabstop>
<tabstop>e_ingredient</tabstop>
<tabstop>c_heading</tabstop>
<tabstop>e_amount</tabstop>
<tabstop>b_ingredient_add</tabstop>
<tabstop>v_ingredients</tabstop>
<tabstop>b_ingredient_remove</tabstop>
<tabstop>e_utensil</tabstop>
<tabstop>b_utensil_add</tabstop>
<tabstop>v_utensils</tabstop>
<tabstop>b_utensil_remove</tabstop>
<tabstop>e_step</tabstop>
<tabstop>b_step_add</tabstop>
<tabstop>v_steps</tabstop>
<tabstop>b_step_edit</tabstop>
<tabstop>b_step_replace</tabstop>
<tabstop>b_step_remove</tabstop>
<tabstop>e_note</tabstop>
<tabstop>b_note_add</tabstop>
<tabstop>v_notes</tabstop>
<tabstop>b_note_edit</tabstop>
<tabstop>b_note_replace</tabstop>
<tabstop>b_note_remove</tabstop>
<tabstop>e_tip</tabstop>
<tabstop>b_tip_add</tabstop>
<tabstop>v_tips</tabstop>
<tabstop>b_tip_edit</tabstop>
<tabstop>b_tip_replace</tabstop>
<tabstop>b_tip_remove</tabstop>
<tabstop>e_variation</tabstop>
<tabstop>b_variation_add</tabstop>
<tabstop>v_variations</tabstop>
<tabstop>b_variation_edit</tabstop>
<tabstop>b_variation_replace</tabstop>
<tabstop>b_variation_remove</tabstop>
<tabstop>e_rating</tabstop>
<tabstop>b_rating_add</tabstop>
<tabstop>v_ratings</tabstop>
<tabstop>b_rating_edit</tabstop>
<tabstop>b_rating_replace</tabstop>
<tabstop>b_rating_remove</tabstop>
<tabstop>b_create</tabstop>
<tabstop>tabWidget</tabstop>
<tabstop>b_cancel</tabstop>
</tabstops>
<resources/>
<connections/>