11#include " view/Ui.hpp"
22#include " view/Levels/Select/Filter.hpp"
33#include < qcombobox.h>
4+ #include < qnamespace.h>
45
56Ui::Ui (QWidget *parent)
67 : QWidget(parent),
@@ -95,6 +96,11 @@ void Ui::setShortCuts() {
9596 filterGroupBoxSearch->lineEditSearch ->setFocus ();
9697 }
9798 }
99+ // Setup save
100+ if (this ->tabs ->currentWidget () == this ->setup ) {
101+ this ->setup ->settings ->frameLevelSetup ->
102+ levelControl->commandLinkButtonLSSave ->click ();
103+ }
98104 });
99105
100106 // Search Type
@@ -172,15 +178,21 @@ void Ui::setShortCuts() {
172178 connectShortCut (QKeySequence (Qt::CTRL | Qt::Key_I),
173179 [this ]() -> void {
174180 if (this ->tabs ->currentWidget () == this ->levels ) {
181+ // Activate info
175182 if (this ->levels ->stackedWidget ->currentWidget () ==
176183 this ->levels ->select ) {
177184 this ->levels ->select ->stackedWidgetBar ->
178185 navigateWidgetBar->pushButtonInfo ->click ();
179186 }
187+ // Info text focus
188+ if (this ->levels ->stackedWidget ->currentWidget () ==
189+ this ->levels ->info ) {
190+ this ->levels ->info ->infoContent ->infoWebEngineView ->setFocus ();
191+ }
180192 }
181193 });
182194
183- // Go Back
195+ // Info/Walkthrough Go Back
184196 connectShortCut (QKeySequence (Qt::CTRL | Qt::Key_B),
185197 [this ]() -> void {
186198 if (this ->tabs ->currentWidget () == this ->levels ) {
@@ -191,7 +203,7 @@ void Ui::setShortCuts() {
191203 }
192204 });
193205
194- // Walkthrough
206+ // Info Go to Walkthrough
195207 connectShortCut (QKeySequence (Qt::CTRL | Qt::Key_W),
196208 [this ]() -> void {
197209 if (this ->tabs ->currentWidget () == this ->levels ) {
@@ -202,6 +214,18 @@ void Ui::setShortCuts() {
202214 }
203215 });
204216
217+
218+ // Info coverList focus
219+ connectShortCut (QKeySequence (Qt::CTRL | Qt::Key_C),
220+ [this ]() -> void {
221+ if (this ->tabs ->currentWidget () == this ->levels ) {
222+ if (this ->levels ->stackedWidget ->currentWidget () ==
223+ this ->levels ->info ) {
224+ this ->levels ->info ->infoContent ->coverListWidget ->setFocus ();
225+ }
226+ }
227+ });
228+
205229 // Select Filter
206230 connectShortCut (QKeySequence (Qt::CTRL | Qt::Key_Y),
207231 [this ]() -> void {
@@ -232,6 +256,12 @@ void Ui::setShortCuts() {
232256 filterGroupBoxSort->focusSelected ();
233257 }
234258 }
259+
260+ // Setup reset
261+ if (this ->tabs ->currentWidget () == this ->setup ) {
262+ this ->setup ->settings ->frameLevelSetup ->
263+ levelControl->commandLinkButtonLSReset ->click ();
264+ }
235265 });
236266
237267 // Download
@@ -251,6 +281,7 @@ void Ui::setShortCuts() {
251281 [this ]() -> void {
252282 if (this ->tabs ->currentWidget () != this ->levels ) {
253283 this ->tabs ->setCurrentWidget (this ->levels );
284+ this ->levels ->select ->levelViewList ->setFocus ();
254285 }
255286 });
256287
@@ -259,6 +290,19 @@ void Ui::setShortCuts() {
259290 [this ]() -> void {
260291 if (this ->tabs ->currentWidget () != this ->setup ) {
261292 this ->tabs ->setCurrentWidget (this ->setup );
293+ this ->setup ->settings ->frameLevelSetup ->
294+ frameLevelSetupSettings->widgetEnvironmentVariables ->
295+ lineEditEnvironmentVariables->setFocus ();
296+ }
297+ });
298+
299+ // Setup environment
300+ connectShortCut (QKeySequence (Qt::CTRL | Qt::Key_E),
301+ [this ]() -> void {
302+ if (this ->tabs ->currentWidget () == this ->setup ) {
303+ this ->setup ->settings ->frameLevelSetup ->
304+ frameLevelSetupSettings->widgetEnvironmentVariables ->
305+ lineEditEnvironmentVariables->setFocus ();
262306 }
263307 });
264308}
0 commit comments