summaryrefslogtreecommitdiff
path: root/src/browser/Welcome.py
blob: c1b7eeab7e1e3806a5ba13bda79dd17c7f64d5a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from PyQt5 import QtCore, QtWidgets
import os


class Welcome(QtWidgets.QWidget):
    """
    It contains class responsible for content of dock area part of initial esim Window.
    It creates Welcome page of eSim as shown below in image. The library/browser/welcome.html file is used for html content.
    """

    def __init__(self):
        QtWidgets.QWidget.__init__(self)
        self.vlayout = QtWidgets.QVBoxLayout()
        self.browser = QtWidgets.QTextBrowser()

        init_path = '../../'
        if os.name == 'nt':
            init_path = ''

        self.browser.setSource(QtCore.QUrl(
            init_path + "library/browser/welcome.html")
        )
        self.browser.setOpenExternalLinks(True)
        self.browser.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)

        self.vlayout.addWidget(self.browser)
        self.setLayout(self.vlayout)
        self.show()