Commit 1b70bfc5 authored by Radoslav Mráz's avatar Radoslav Mráz
Browse files

Make links in the about box accessible and selectable by keyboard + define tab order

parent 236d5e74
Loading
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -241,6 +241,16 @@ class MAPHIS(QMainWindow):
        self.about_box: QDialog = QDialog()
        self.about_box_ui.setupUi(self.about_box)
        self.about_box_ui.lblVersion.setText(f'version {MAPHIS_VERSION}')

        self.about_box.setTabOrder(self.about_box_ui.lblWebsite, self.about_box_ui.lblFAQ)
        self.about_box.setTabOrder(self.about_box_ui.lblFAQ, self.about_box_ui.lblProjectRepoURL)
        self.about_box.setTabOrder(self.about_box_ui.lblProjectRepoURL, self.about_box_ui.lblMailMatulaP)
        self.about_box.setTabOrder(self.about_box_ui.lblMailMatulaP, self.about_box_ui.lblMailMrazR)
        self.about_box.setTabOrder(self.about_box_ui.lblMailMrazR, self.about_box_ui.lblMailPekarM)
        self.about_box.setTabOrder(self.about_box_ui.lblMailPekarM, self.about_box_ui.lblMailPekarS)
        self.about_box.setTabOrder(self.about_box_ui.lblMailPekarS, self.about_box_ui.lblMailStepkaK)
        self.about_box.setTabOrder(self.about_box_ui.lblMailStepkaK, self.about_box_ui.lblCBIA)

        self.license_text_browser = QTextBrowser()
        self.license_text_browser.setWindowModality(Qt.WindowModality.ApplicationModal)
        self.license_text_browser.setWindowTitle('License')
+78 −8
Original line number Diff line number Diff line
@@ -83,9 +83,9 @@
      </widget>
     </item>
     <item alignment="Qt::AlignHCenter">
      <widget class="QLabel" name="lblGitlab">
      <widget class="QLabel" name="lblWebsite">
       <property name="text">
        <string>Website (tutorials &amp; FAQ): https://maphis.fi.muni.cz</string>
        <string>Website: https://maphis.fi.muni.cz</string>
       </property>
       <property name="textFormat">
        <enum>Qt::MarkdownText</enum>
@@ -93,6 +93,34 @@
       <property name="openExternalLinks">
        <bool>true</bool>
       </property>
       <property name="textInteractionFlags">
        <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
       </property>
       <property name="buddy">
        <cstring>lblFAQ</cstring>
       </property>
      </widget>
     </item>
     <item alignment="Qt::AlignHCenter">
      <widget class="QLabel" name="lblFAQ">
       <property name="text">
        <string>Frequently asked questions: https://maphis.fi.muni.cz/FAQ</string>
       </property>
       <property name="textFormat">
        <enum>Qt::MarkdownText</enum>
       </property>
       <property name="alignment">
        <set>Qt::AlignCenter</set>
       </property>
       <property name="openExternalLinks">
        <bool>true</bool>
       </property>
       <property name="textInteractionFlags">
        <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
       </property>
       <property name="buddy">
        <cstring>lblProjectRepoURL</cstring>
       </property>
      </widget>
     </item>
     <item alignment="Qt::AlignHCenter">
@@ -106,6 +134,12 @@
       <property name="openExternalLinks">
        <bool>true</bool>
       </property>
       <property name="textInteractionFlags">
        <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
       </property>
       <property name="buddy">
        <cstring>lblMailMatulaP</cstring>
       </property>
      </widget>
     </item>
     <item>
@@ -122,7 +156,7 @@
         </widget>
        </item>
        <item row="2" column="1">
         <widget class="QLabel" name="label_6">
         <widget class="QLabel" name="lblMailPekarM">
          <property name="text">
           <string>matej.pekar120@gmail.com</string>
          </property>
@@ -132,6 +166,12 @@
          <property name="openExternalLinks">
           <bool>true</bool>
          </property>
          <property name="textInteractionFlags">
           <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
          </property>
          <property name="buddy">
           <cstring>lblMailPekarS</cstring>
          </property>
         </widget>
        </item>
        <item row="3" column="0">
@@ -156,7 +196,7 @@
         </widget>
        </item>
        <item row="4" column="1">
         <widget class="QLabel" name="label_10">
         <widget class="QLabel" name="lblMailStepkaK">
          <property name="text">
           <string>172454@mail.muni.cz</string>
          </property>
@@ -166,10 +206,16 @@
          <property name="openExternalLinks">
           <bool>true</bool>
          </property>
          <property name="textInteractionFlags">
           <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
          </property>
          <property name="buddy">
           <cstring>lblCBIA</cstring>
          </property>
         </widget>
        </item>
        <item row="0" column="1">
         <widget class="QLabel" name="label_2">
         <widget class="QLabel" name="lblMailMatulaP">
          <property name="text">
           <string>pem@fi.muni.cz</string>
          </property>
@@ -179,6 +225,12 @@
          <property name="openExternalLinks">
           <bool>true</bool>
          </property>
          <property name="textInteractionFlags">
           <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
          </property>
          <property name="buddy">
           <cstring>lblMailMrazR</cstring>
          </property>
         </widget>
        </item>
        <item row="4" column="0">
@@ -189,7 +241,7 @@
         </widget>
        </item>
        <item row="1" column="1">
         <widget class="QLabel" name="label_4">
         <widget class="QLabel" name="lblMailMrazR">
          <property name="text">
           <string>radoslav.mraz95@gmail.com</string>
          </property>
@@ -199,10 +251,16 @@
          <property name="openExternalLinks">
           <bool>true</bool>
          </property>
          <property name="textInteractionFlags">
           <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
          </property>
          <property name="buddy">
           <cstring>lblMailPekarM</cstring>
          </property>
         </widget>
        </item>
        <item row="3" column="1">
         <widget class="QLabel" name="label_8">
         <widget class="QLabel" name="lblMailPekarS">
          <property name="text">
           <string>56765@muni.cz</string>
          </property>
@@ -212,6 +270,12 @@
          <property name="openExternalLinks">
           <bool>true</bool>
          </property>
          <property name="textInteractionFlags">
           <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
          </property>
          <property name="buddy">
           <cstring>lblMailStepkaK</cstring>
          </property>
         </widget>
        </item>
       </layout>
@@ -220,7 +284,7 @@
     <item alignment="Qt::AlignHCenter">
      <widget class="QLabel" name="lblCBIA">
       <property name="text">
        <string>Developed at CBIA https://cbia.fi.muni.cz/</string>
        <string>Developed at CBIA https://cbia.fi.muni.cz</string>
       </property>
       <property name="textFormat">
        <enum>Qt::MarkdownText</enum>
@@ -228,6 +292,12 @@
       <property name="openExternalLinks">
        <bool>true</bool>
       </property>
       <property name="textInteractionFlags">
        <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
       </property>
       <property name="buddy">
        <cstring>lblWebsite</cstring>
       </property>
      </widget>
     </item>
    </layout>
+66 −37
Original line number Diff line number Diff line
@@ -64,17 +64,28 @@ class Ui_AboutMAPHIS(object):

        self.verticalLayout.addWidget(self.lblLicense, 0, Qt.AlignHCenter)

        self.lblGitlab = QLabel(AboutMAPHIS)
        self.lblGitlab.setObjectName(u"lblGitlab")
        self.lblGitlab.setTextFormat(Qt.MarkdownText)
        self.lblGitlab.setOpenExternalLinks(True)
        self.lblWebsite = QLabel(AboutMAPHIS)
        self.lblWebsite.setObjectName(u"lblWebsite")
        self.lblWebsite.setTextFormat(Qt.MarkdownText)
        self.lblWebsite.setOpenExternalLinks(True)
        self.lblWebsite.setTextInteractionFlags(Qt.LinksAccessibleByKeyboard|Qt.LinksAccessibleByMouse|Qt.TextBrowserInteraction|Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse)

        self.verticalLayout.addWidget(self.lblGitlab, 0, Qt.AlignHCenter)
        self.verticalLayout.addWidget(self.lblWebsite, 0, Qt.AlignHCenter)

        self.lblFAQ = QLabel(AboutMAPHIS)
        self.lblFAQ.setObjectName(u"lblFAQ")
        self.lblFAQ.setTextFormat(Qt.MarkdownText)
        self.lblFAQ.setAlignment(Qt.AlignCenter)
        self.lblFAQ.setOpenExternalLinks(True)
        self.lblFAQ.setTextInteractionFlags(Qt.LinksAccessibleByKeyboard|Qt.LinksAccessibleByMouse|Qt.TextBrowserInteraction|Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse)

        self.verticalLayout.addWidget(self.lblFAQ, 0, Qt.AlignHCenter)

        self.lblProjectRepoURL = QLabel(AboutMAPHIS)
        self.lblProjectRepoURL.setObjectName(u"lblProjectRepoURL")
        self.lblProjectRepoURL.setTextFormat(Qt.MarkdownText)
        self.lblProjectRepoURL.setOpenExternalLinks(True)
        self.lblProjectRepoURL.setTextInteractionFlags(Qt.LinksAccessibleByKeyboard|Qt.LinksAccessibleByMouse|Qt.TextBrowserInteraction|Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse)

        self.verticalLayout.addWidget(self.lblProjectRepoURL, 0, Qt.AlignHCenter)

@@ -87,12 +98,13 @@ class Ui_AboutMAPHIS(object):

        self.gridLayout_2.addWidget(self.label_5, 2, 0, 1, 1)

        self.label_6 = QLabel(self.gridAuthors)
        self.label_6.setObjectName(u"label_6")
        self.label_6.setTextFormat(Qt.MarkdownText)
        self.label_6.setOpenExternalLinks(True)
        self.lblMailPekarM = QLabel(self.gridAuthors)
        self.lblMailPekarM.setObjectName(u"lblMailPekarM")
        self.lblMailPekarM.setTextFormat(Qt.MarkdownText)
        self.lblMailPekarM.setOpenExternalLinks(True)
        self.lblMailPekarM.setTextInteractionFlags(Qt.LinksAccessibleByKeyboard|Qt.LinksAccessibleByMouse|Qt.TextBrowserInteraction|Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse)

        self.gridLayout_2.addWidget(self.label_6, 2, 1, 1, 1)
        self.gridLayout_2.addWidget(self.lblMailPekarM, 2, 1, 1, 1)

        self.label_7 = QLabel(self.gridAuthors)
        self.label_7.setObjectName(u"label_7")
@@ -109,38 +121,42 @@ class Ui_AboutMAPHIS(object):

        self.gridLayout_2.addWidget(self.label_3, 1, 0, 1, 1)

        self.label_10 = QLabel(self.gridAuthors)
        self.label_10.setObjectName(u"label_10")
        self.label_10.setTextFormat(Qt.MarkdownText)
        self.label_10.setOpenExternalLinks(True)
        self.lblMailStepkaK = QLabel(self.gridAuthors)
        self.lblMailStepkaK.setObjectName(u"lblMailStepkaK")
        self.lblMailStepkaK.setTextFormat(Qt.MarkdownText)
        self.lblMailStepkaK.setOpenExternalLinks(True)
        self.lblMailStepkaK.setTextInteractionFlags(Qt.LinksAccessibleByKeyboard|Qt.LinksAccessibleByMouse|Qt.TextBrowserInteraction|Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse)

        self.gridLayout_2.addWidget(self.label_10, 4, 1, 1, 1)
        self.gridLayout_2.addWidget(self.lblMailStepkaK, 4, 1, 1, 1)

        self.label_2 = QLabel(self.gridAuthors)
        self.label_2.setObjectName(u"label_2")
        self.label_2.setTextFormat(Qt.MarkdownText)
        self.label_2.setOpenExternalLinks(True)
        self.lblMailMatulaP = QLabel(self.gridAuthors)
        self.lblMailMatulaP.setObjectName(u"lblMailMatulaP")
        self.lblMailMatulaP.setTextFormat(Qt.MarkdownText)
        self.lblMailMatulaP.setOpenExternalLinks(True)
        self.lblMailMatulaP.setTextInteractionFlags(Qt.LinksAccessibleByKeyboard|Qt.LinksAccessibleByMouse|Qt.TextBrowserInteraction|Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse)

        self.gridLayout_2.addWidget(self.label_2, 0, 1, 1, 1)
        self.gridLayout_2.addWidget(self.lblMailMatulaP, 0, 1, 1, 1)

        self.label_9 = QLabel(self.gridAuthors)
        self.label_9.setObjectName(u"label_9")

        self.gridLayout_2.addWidget(self.label_9, 4, 0, 1, 1)

        self.label_4 = QLabel(self.gridAuthors)
        self.label_4.setObjectName(u"label_4")
        self.label_4.setTextFormat(Qt.MarkdownText)
        self.label_4.setOpenExternalLinks(True)
        self.lblMailMrazR = QLabel(self.gridAuthors)
        self.lblMailMrazR.setObjectName(u"lblMailMrazR")
        self.lblMailMrazR.setTextFormat(Qt.MarkdownText)
        self.lblMailMrazR.setOpenExternalLinks(True)
        self.lblMailMrazR.setTextInteractionFlags(Qt.LinksAccessibleByKeyboard|Qt.LinksAccessibleByMouse|Qt.TextBrowserInteraction|Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse)

        self.gridLayout_2.addWidget(self.label_4, 1, 1, 1, 1)
        self.gridLayout_2.addWidget(self.lblMailMrazR, 1, 1, 1, 1)

        self.label_8 = QLabel(self.gridAuthors)
        self.label_8.setObjectName(u"label_8")
        self.label_8.setTextFormat(Qt.MarkdownText)
        self.label_8.setOpenExternalLinks(True)
        self.lblMailPekarS = QLabel(self.gridAuthors)
        self.lblMailPekarS.setObjectName(u"lblMailPekarS")
        self.lblMailPekarS.setTextFormat(Qt.MarkdownText)
        self.lblMailPekarS.setOpenExternalLinks(True)
        self.lblMailPekarS.setTextInteractionFlags(Qt.LinksAccessibleByKeyboard|Qt.LinksAccessibleByMouse|Qt.TextBrowserInteraction|Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse)

        self.gridLayout_2.addWidget(self.label_8, 3, 1, 1, 1)
        self.gridLayout_2.addWidget(self.lblMailPekarS, 3, 1, 1, 1)


        self.verticalLayout.addWidget(self.gridAuthors)
@@ -149,12 +165,24 @@ class Ui_AboutMAPHIS(object):
        self.lblCBIA.setObjectName(u"lblCBIA")
        self.lblCBIA.setTextFormat(Qt.MarkdownText)
        self.lblCBIA.setOpenExternalLinks(True)
        self.lblCBIA.setTextInteractionFlags(Qt.LinksAccessibleByKeyboard|Qt.LinksAccessibleByMouse|Qt.TextBrowserInteraction|Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse)

        self.verticalLayout.addWidget(self.lblCBIA, 0, Qt.AlignHCenter)


        self.horizontalLayout.addLayout(self.verticalLayout)

#if QT_CONFIG(shortcut)
        self.lblWebsite.setBuddy(self.lblFAQ)
        self.lblFAQ.setBuddy(self.lblProjectRepoURL)
        self.lblProjectRepoURL.setBuddy(self.lblMailMatulaP)
        self.lblMailPekarM.setBuddy(self.lblMailPekarS)
        self.lblMailStepkaK.setBuddy(self.lblCBIA)
        self.lblMailMatulaP.setBuddy(self.lblMailMrazR)
        self.lblMailMrazR.setBuddy(self.lblMailPekarM)
        self.lblMailPekarS.setBuddy(self.lblMailStepkaK)
        self.lblCBIA.setBuddy(self.lblWebsite)
#endif // QT_CONFIG(shortcut)

        self.retranslateUi(AboutMAPHIS)

@@ -166,19 +194,20 @@ class Ui_AboutMAPHIS(object):
        self.lblMAPHIS.setText(QCoreApplication.translate("AboutMAPHIS", u"MAPHIS", None))
        self.lblVersion.setText(QCoreApplication.translate("AboutMAPHIS", u"<version>", None))
        self.lblLicense.setText(QCoreApplication.translate("AboutMAPHIS", u"license", None))
        self.lblGitlab.setText(QCoreApplication.translate("AboutMAPHIS", u"Website (tutorials & FAQ): https://maphis.fi.muni.cz", None))
        self.lblWebsite.setText(QCoreApplication.translate("AboutMAPHIS", u"Website: https://maphis.fi.muni.cz", None))
        self.lblFAQ.setText(QCoreApplication.translate("AboutMAPHIS", u"Frequently asked questions: https://maphis.fi.muni.cz/FAQ", None))
        self.lblProjectRepoURL.setText(QCoreApplication.translate("AboutMAPHIS", u"Project repository: https://gitlab.fi.muni.cz/xmraz3/maphis", None))
        self.gridAuthors.setTitle(QCoreApplication.translate("AboutMAPHIS", u"Authors", None))
        self.label_5.setText(QCoreApplication.translate("AboutMAPHIS", u"Mat\u011bj Pek\u00e1r", None))
        self.label_6.setText(QCoreApplication.translate("AboutMAPHIS", u"matej.pekar120@gmail.com", None))
        self.lblMailPekarM.setText(QCoreApplication.translate("AboutMAPHIS", u"matej.pekar120@gmail.com", None))
        self.label_7.setText(QCoreApplication.translate("AboutMAPHIS", u"Stano Pek\u00e1r", None))
        self.label.setText(QCoreApplication.translate("AboutMAPHIS", u"Petr Matula", None))
        self.label_3.setText(QCoreApplication.translate("AboutMAPHIS", u"Radoslav Mr\u00e1z", None))
        self.label_10.setText(QCoreApplication.translate("AboutMAPHIS", u"172454@mail.muni.cz", None))
        self.label_2.setText(QCoreApplication.translate("AboutMAPHIS", u"pem@fi.muni.cz", None))
        self.lblMailStepkaK.setText(QCoreApplication.translate("AboutMAPHIS", u"172454@mail.muni.cz", None))
        self.lblMailMatulaP.setText(QCoreApplication.translate("AboutMAPHIS", u"pem@fi.muni.cz", None))
        self.label_9.setText(QCoreApplication.translate("AboutMAPHIS", u"Karel \u0160t\u011bpka", None))
        self.label_4.setText(QCoreApplication.translate("AboutMAPHIS", u"radoslav.mraz95@gmail.com", None))
        self.label_8.setText(QCoreApplication.translate("AboutMAPHIS", u"56765@muni.cz", None))
        self.lblCBIA.setText(QCoreApplication.translate("AboutMAPHIS", u"Developed at CBIA https://cbia.fi.muni.cz/", None))
        self.lblMailMrazR.setText(QCoreApplication.translate("AboutMAPHIS", u"radoslav.mraz95@gmail.com", None))
        self.lblMailPekarS.setText(QCoreApplication.translate("AboutMAPHIS", u"56765@muni.cz", None))
        self.lblCBIA.setText(QCoreApplication.translate("AboutMAPHIS", u"Developed at CBIA https://cbia.fi.muni.cz", None))
    # retranslateUi