Commit 9372a6b0 authored by holukas's avatar holukas
Browse files

Added links in logo section

parent 26a00aea
......@@ -2,9 +2,10 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="254ecb79-655b-4854-8af6-177bb7347e8a" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bico/gui/gui.css" beforeDir="false" afterPath="$PROJECT_DIR$/bico/gui/gui.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bico/bico.py" beforeDir="false" afterPath="$PROJECT_DIR$/bico/bico.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bico/gui/gui.py" beforeDir="false" afterPath="$PROJECT_DIR$/bico/gui/gui.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bico/settings/_version.py" beforeDir="false" afterPath="$PROJECT_DIR$/bico/settings/_version.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -278,7 +279,8 @@
<workItem from="1607354506298" duration="1858000" />
<workItem from="1607380059042" duration="6278000" />
<workItem from="1607436447683" duration="6112000" />
<workItem from="1607504715733" duration="5889000" />
<workItem from="1607504715733" duration="6609000" />
<workItem from="1607594405028" duration="980000" />
</task>
<servers />
</component>
......@@ -311,7 +313,7 @@
<SUITE FILE_PATH="coverage/BICO$main.coverage" NAME="bico Coverage Results" MODIFIED="1598258463691" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/bico" />
<SUITE FILE_PATH="coverage/BICO_Binary_Converter$gui.coverage" NAME="gui Coverage Results" MODIFIED="1606435918815" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/bico" />
<SUITE FILE_PATH="coverage/BICO_Binary_Converter$main.coverage" NAME="main Coverage Results" MODIFIED="1596498134562" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/bico" />
<SUITE FILE_PATH="coverage/BICO_Binary_Converter$start_bico.coverage" NAME="start_bico Coverage Results" MODIFIED="1607520488024" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/bico" />
<SUITE FILE_PATH="coverage/BICO_Binary_Converter$start_bico.coverage" NAME="start_bico Coverage Results" MODIFIED="1607595278379" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/bico" />
<SUITE FILE_PATH="coverage/BICO_Binary_Converter$example.coverage" NAME="example Coverage Results" MODIFIED="1606348759035" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/example" />
</component>
</project>
\ No newline at end of file
......@@ -7,6 +7,7 @@ from shutil import copyfile
import pandas as pd
from PyQt5 import QtCore as qtc
from PyQt5 import QtWidgets as qtw
from PyQt5 import QtGui as qtg
import ops.logger
import ops.setup
......@@ -233,8 +234,18 @@ class Bico(qtw.QMainWindow, Ui_MainWindow):
self.set_gui_checkbox(checkbox=self.chk_output_plots_ts_agg,
state=self.settings_dict['plot_ts_agg'])
def link(self, link_str):
"""Call hyperlink from label, opens in browser"""
qtg.QDesktopServices.openUrl(qtc.QUrl(link_str))
def connections(self):
"""Connect GUI elements to functions"""
# Logo
self.lbl_link_releases.linkActivated.connect(self.link)
self.lbl_link_source_code.linkActivated.connect(self.link)
self.lbl_link_license.linkActivated.connect(self.link)
self.lbl_link_help.linkActivated.connect(self.link)
# Raw Data
self.btn_rawdata_source_folder.clicked.connect(lambda: self.select_dir(
start_dir=self.settings_dict['dir_source'], dir_setting='dir_source',
......
......@@ -6,7 +6,7 @@ from PyQt5.QtGui import QPixmap
from gui import gui_elements
from help import tooltips
from settings._version import __version__, __date__
import settings._version as info
class Ui_MainWindow(object):
......@@ -65,17 +65,31 @@ class Ui_MainWindow(object):
label_txt = qtw.QLabel("BICO - Binary Conversion")
label_txt.setProperty('labelClass', 'header_3')
label_txt.setAlignment(qtc.Qt.AlignCenter | qtc.Qt.AlignVCenter)
label_txt2 = qtw.QLabel("Convert binary files to ASCII")
label_txt2.setAlignment(qtc.Qt.AlignCenter | qtc.Qt.AlignVCenter)
label_txt3 = qtw.QLabel(f"v{__version__} / {__date__}")
label_txt3 = qtw.QLabel(f"v{info.__version__} / {info.__date__}")
label_txt3.setAlignment(qtc.Qt.AlignCenter | qtc.Qt.AlignVCenter)
self.lbl_link_releases = qtw.QLabel(f"<a href='{info.__link_releases__}'>Releases</a>\n")
self.lbl_link_source_code = qtw.QLabel(f"<a href='{info.__link_source_code__}'>Source Code</a>\n")
self.lbl_link_license = qtw.QLabel(f"<a href='{info.__license__}'>License</a>\n")
self.lbl_link_help = qtw.QLabel(f"<a href='{info.__link_wiki__}'>Help</a>\n")
# label_txt_links.setAlignment(qtc.Qt.AlignCenter | qtc.Qt.AlignVCenter)
grid.addWidget(label_image, 0, 0)
grid.addWidget(qtw.QLabel(), 1, 0)
grid.addWidget(label_txt, 2, 0)
grid.addWidget(label_txt2, 3, 0)
grid.addWidget(label_txt3, 4, 0)
grid.setRowStretch(5, 1)
grid.addWidget(self.lbl_link_releases, 5, 0)
grid.addWidget(self.lbl_link_source_code, 6, 0)
grid.addWidget(self.lbl_link_license, 7, 0)
grid.addWidget(self.lbl_link_help, 8, 0)
grid.setRowStretch(9, 1)
section.setLayout(grid)
return section
......
__version__ = "0.0.1"
__date__ = "9 Dec 2020"
__date__ = "10 Dec 2020"
__link_source_code__ = "https://gitlab.ethz.ch/holukas/bico"
__link_releases__ = "https://gitlab.ethz.ch/holukas/bico/-/releases"
__link_wiki__ = "https://gitlab.ethz.ch/holukas/bico/-/wikis/home"
__license__ = "https://gitlab.ethz.ch/holukas/bico/-/blob/master/LICENSE"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment