-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor changes related to app_info and lib_info
- Loading branch information
giumas
committed
Jan 13, 2019
1 parent
5e6049b
commit 077797d
Showing
20 changed files
with
537 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,12 @@ | |
""" | ||
|
||
import logging | ||
|
||
log = logging.getLogger(__name__) | ||
log.addHandler(logging.NullHandler()) | ||
|
||
name = "SIS" | ||
__version__ = '0.4.0' | ||
__version__ = '1.0.0' | ||
__author__ = '[email protected]' | ||
__license__ = 'LGPLv3 license' | ||
__copyright__ = 'Copyright 2019 University of New Hampshire, Center for Coastal and Ocean Mapping' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import os | ||
from hyo2.abc.app.app_info import AppInfo | ||
from hyo2.sis import name, __version__ | ||
|
||
app_info = AppInfo() | ||
|
||
app_info.app_name = name | ||
app_info.app_version = __version__ | ||
app_info.app_author = "Giuseppe Masetti(UNH,CCOM)" | ||
app_info.app_author_email = "[email protected]" | ||
|
||
app_info.app_license = "LGPLv3" | ||
app_info.app_license_url = "https://www.hydroffice.org/license/" | ||
|
||
app_info.app_path = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
app_info.app_url = "https://www.hydroffice.org/soundspeed/" | ||
app_info.app_manual_url = "https://www.hydroffice.org/manuals/soundspeed/index.html" | ||
app_info.app_support_email = "[email protected]" | ||
app_info.app_latest_url = "https://www.hydroffice.org/latest/soundspeedmanager.txt" | ||
|
||
app_info.app_media_path = os.path.join(app_info.app_path, "media") | ||
app_info.app_main_window_object_name = "MainWindow" | ||
app_info.app_license_path = os.path.join(app_info.app_media_path, "LICENSE") | ||
app_info.app_icon_path = os.path.join(app_info.app_media_path, "app_icon.png") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,13 @@ | |
from PySide2 import QtCore, QtGui, QtWidgets | ||
|
||
from hyo2.sis.lib.process import SisProcess | ||
from hyo2.sis.gui.infoviewer import InfoViewerDialog | ||
from hyo2.sis.app.infoviewer import InfoViewerDialog | ||
from hyo2.abc.app.qt_progress import QtProgress | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class ControlPanel(QtWidgets.QWidget): | ||
|
||
here = os.path.abspath(os.path.dirname(__file__)).replace("\\", "/") | ||
|
||
def __init__(self): | ||
|
@@ -45,10 +44,10 @@ def __init__(self): | |
self._make_sis_commands() | ||
|
||
self.vbox.addSpacing(12) | ||
credits = QtWidgets.QLabel("<i>Comments and suggestions:</i> " | ||
"<a href='mailto:[email protected]'>[email protected]</a>") | ||
credits.setOpenExternalLinks(True) | ||
self.vbox.addWidget(credits) | ||
comments = QtWidgets.QLabel("<i>Comments and suggestions:</i> " | ||
"<a href='mailto:[email protected]'>[email protected]</a>") | ||
comments.setOpenExternalLinks(True) | ||
self.vbox.addWidget(comments) | ||
|
||
# info viewer | ||
self.info_viewer = InfoViewerDialog(self) | ||
|
@@ -87,7 +86,7 @@ def _make_sis_settings(self): | |
self.set_output_ip = QtWidgets.QLineEdit("") | ||
hbox.addWidget(self.set_output_ip) | ||
octet = "(?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])" | ||
reg_ex = QtCore.QRegExp("^%s\.%s\.%s\.%s$" % (octet, octet, octet, octet)) | ||
reg_ex = QtCore.QRegExp(r"^%s\.%s\.%s\.%s$" % (octet, octet, octet, octet)) | ||
validator = QtGui.QRegExpValidator(reg_ex) | ||
self.set_output_ip.setValidator(validator) | ||
self.set_output_ip.setText("127.0.0.1") | ||
|
@@ -200,8 +199,8 @@ def _add_source_files(self): | |
# ask the file path to the user | ||
# noinspection PyCallByClass | ||
selections, _ = QtWidgets.QFileDialog.getOpenFileNames(self, "Add Kongsberg data files", source_folder, | ||
"Kongsberg file (*.all);;All files (*.*)", None, | ||
QtWidgets.QFileDialog.ExistingFiles) | ||
"Kongsberg file (*.all);;All files (*.*)", None, | ||
QtWidgets.QFileDialog.ExistingFiles) | ||
if not selections: | ||
logger.debug('no selection') | ||
return | ||
|
@@ -233,7 +232,6 @@ def monitoring(self): | |
data = self.conn.recv() | ||
|
||
if isinstance(data, str): | ||
|
||
self.info_viewer.append(data) | ||
# logger.debug("%s" % data) | ||
|
||
|
@@ -247,7 +245,7 @@ def start_emulation(self): | |
if self.sis.is_alive(): | ||
# noinspection PyCallByClass | ||
QtWidgets.QMessageBox.warning(self, "Emulator running ...", "The emulator is running! Stop it", | ||
QtWidgets.QMessageBox.Ok, QtWidgets.QMessageBox.Ok) | ||
QtWidgets.QMessageBox.Ok, QtWidgets.QMessageBox.Ok) | ||
return | ||
|
||
self.info_viewer.viewer.verticalScrollBar().setValue(self.info_viewer.viewer.verticalScrollBar().maximum()) | ||
|
@@ -284,7 +282,6 @@ def start_emulation(self): | |
def stop_emulation(self): | ||
logger.debug("stop SIS") | ||
if self.sis: | ||
|
||
progress = QtProgress(self) | ||
progress.start(title="Halting", text="Wait while threads stop") | ||
progress.update(value=20) | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.