from PyQt6.QtWidgets import QMainWindow, QToolBar, QFileDialog
from PyQt6.QtWebEngineWidgets import QWebEngineView
-from PyQt6.QtGui import QAction
+from PyQt6.QtGui import QAction, QIcon
from PyQt6.QtCore import QUrl
import os, webbrowser
self.webview=QWebEngineView()
self.setCentralWidget(self.webview)
+ self.setWindowIcon(QIcon(os.path.join("resource", "icon_medscript.ico")))
def update(self, file):
try:
# You should have received a copy of the GNU General Public License along with MedScript. If not, see <https://www.gnu.org/licenses/>.
from PyQt6.QtWidgets import QWidget, QMainWindow, QFormLayout, QPushButton, QLabel, QLineEdit, QTextEdit, QStatusBar, QMessageBox
-import json
+from PyQt6.QtGui import QIcon
+import os, json
from config import config
class EditPrescriber(QMainWindow):
self.setStatusBar(self.statusbar)
self.setCentralWidget(widget)
+ self.setWindowIcon(QIcon(os.path.join("resource", "icon_medscript.ico")))
self.load()
from PyQt6.QtWidgets import QMainWindow
from PyQt6.QtWebEngineWidgets import QWebEngineView
from PyQt6.QtCore import QUrl
+from PyQt6.QtGui import QIcon
class ViewBox(QMainWindow):
def __init__(self, *args, **kwargs):
self.webview=QWebEngineView()
self.setCentralWidget(self.webview)
+ self.setWindowIcon(QIcon(os.path.join("resource", "icon_medscript.ico")))
+
def open(self, file):
self.webview.load(QUrl("file:///"+os.path.abspath(file).replace(os.sep, "/")))
if(self.save_state==md5(self.prescription.get_json().encode()).hexdigest()):
target=self.renderer.render(self.current_file.directory.name)
self.signal_view.emit(target)
- self.renderbox.show()
+ self.renderbox.showMaximized()
else:
QMessageBox.information(self,"Save first", "Please save the file before rendering.")
self.cmd_open(config["filename"])
else:
self.cmd_new()
- self.show()
+ self.setWindowIcon(QIcon(os.path.join("resource", "icon_medscript.ico")))
+ self.showMaximized()