Зачатки ui
This commit is contained in:
30
hlna.py
30
hlna.py
@ -2,7 +2,6 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import zlib
|
||||
import struct
|
||||
import logging
|
||||
@ -15,6 +14,7 @@ import colorama
|
||||
|
||||
from pathlib import Path
|
||||
from rcon.source import Client
|
||||
from PyQt6.QtWidgets import QApplication, QWidget, QMainWindow, QLabel, QPushButton
|
||||
|
||||
home_dir = Path.home()
|
||||
|
||||
@ -333,6 +333,7 @@ def config_password():
|
||||
password_server = input("Укажите пароль Сервера: \n")
|
||||
return password_server
|
||||
|
||||
|
||||
def config_adminpassword():
|
||||
adminpassword_server = input("Укажите пароль Сервера: \n")
|
||||
return adminpassword_server
|
||||
@ -853,5 +854,30 @@ create_dir(dir_server)
|
||||
create_dir(dir_unit)
|
||||
create_dir(dir_logs)
|
||||
|
||||
|
||||
class MainWindow(QMainWindow):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
self.setWindowTitle("HLN-A")
|
||||
button = QPushButton("Выход")
|
||||
button.setCheckable(True)
|
||||
button.clicked.connect(self.button_click)
|
||||
self.setCentralWidget(button)
|
||||
|
||||
def button_click(self):
|
||||
exit()
|
||||
|
||||
|
||||
def hlnag():
|
||||
if len(sys.argv) > 1:
|
||||
hlna()
|
||||
else:
|
||||
app = QApplication(sys.argv)
|
||||
hlnag_gui_window = MainWindow()
|
||||
hlnag_gui_window.show()
|
||||
sys.exit(app.exec())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
hlna()
|
||||
hlnag()
|
||||
|
Reference in New Issue
Block a user