Esempio n. 1
0
                            if 0 <= v < 10 and 0 <= u < 10:
                                if str(self.map.item(v, u).text()) == '.':
                                    self.map.setItem(v, u, new_cell_mul())


if __name__ == '__main__':  # Дописать
    app = QApplication(sys.argv)

    loading_window = LoadingMain()
    startmenu_window = StartMenuMain()
    settings_window = SettingsMain()
    rules_window = RulesMain()
    ready_window = ReadyMain()
    pvp_window = PVPMain()
    win_window = WinMain()

    windows = QStackedWidget()
    windows.addWidget(loading_window)  # 0
    windows.addWidget(startmenu_window)  # 1
    windows.addWidget(settings_window)  # 2
    windows.addWidget(rules_window)  # 3
    windows.addWidget(ready_window)  # 4
    windows.addWidget(pvp_window)  # 5
    windows.addWidget(win_window)  # 6

    windows.setWindowTitle("SEA BATTLE")
    windows.setWindowIcon(QIcon("images/icon.svg"))
    windows.resize(*SCREEN_SIZE[0])
    windows.show()
    sys.exit(app.exec())
Esempio n. 2
0
import sys
from PyQt5.QtWidgets import QApplication, QStackedWidget
from PyQt5 import QtGui

from Login.View.ViewLogin import ViewLogin

if __name__ == '__main__':
    app = QApplication(sys.argv)

    widget = QStackedWidget()

    Vista_login = ViewLogin(widget)

    widget.addWidget(Vista_login)
    widget.setStyleSheet("background-color: rgb(254, 235, 156)")
    widget.setWindowTitle("Cinema")
    icon = QtGui.QIcon()
    icon.addPixmap(QtGui.QPixmap("images/biglietto.png"), QtGui.QIcon.Normal,
                   QtGui.QIcon.Off)
    widget.setWindowIcon(icon)
    # Spostamento widget al centro (fissare dimensione login al max per mantenere tutto al centro)
    widget.show()
    centerPoint = QtGui.QScreen.availableGeometry(app.primaryScreen()).center()
    fg = widget.frameGeometry()
    fg.moveCenter(centerPoint)
    widget.move(fg.topLeft())

    sys.exit(app.exec())