Files
daunRat/admin/gui/gui.py
2022-05-14 22:31:53 +03:00

344 lines
17 KiB
Python

# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(700, 380)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(70)
sizePolicy.setVerticalStretch(36)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
MainWindow.setMinimumSize(QtCore.QSize(700, 380))
MainWindow.setSizeIncrement(QtCore.QSize(0, 0))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/img/img/logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
MainWindow.setAutoFillBackground(False)
MainWindow.setStyleSheet("QWidget {\n"
" background-color: rgb(30, 30, 30);\n"
" color: rgb(255, 255, 255);\n"
" font: 10pt \"Segoe UI\";\n"
"}\n"
"\n"
"\n"
"QScrollBar:vertical {\n"
" border: none;\n"
" background: rgb(30, 30, 30);\n"
" width: 10px;\n"
" margin: 15px 0 15px 0;\n"
" border-radius: 0px;\n"
"}\n"
"\n"
"QScrollBar::handle:vertical { \n"
" background-color: rgb(139, 139, 139);\n"
" min-height: 30px;\n"
" border-radius: 5px;\n"
"}\n"
"\n"
"QScrollBar::handle:vertical:hover,\n"
"QScrollBar::handle:vertical:pressed { \n"
" background-color: rgb(149, 149, 149);\n"
"}\n"
"\n"
"QScrollBar::sub-line:vertical,\n"
"QScrollBar::add-line:vertical,\n"
"QScrollBar::up-arrow:vertical,\n"
"QScrollBar::down-arrow:vertical {\n"
" height: 0px;\n"
"}\n"
"\n"
"QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical,\n"
"QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical{\n"
" background: none;\n"
"}\n"
"\n"
"\n"
"QPushButton {\n"
" color: white;\n"
" border-width: 1px;\n"
" border-radius:6px;\n"
" border-style: solid;\n"
" border-color: #303030;\n"
" background-color: #2c2d2e;\n"
"}\n"
"QPushButton:hover {\n"
" border-width: 2px;\n"
" background-color: #323232;\n"
"}\n"
"QPushButton:pressed {\n"
" background-color: #262728;\n"
"}\n"
"QPushButton:disabled {\n"
" background-color: #434343;\n"
" border-color: #0000;\n"
"}\n"
"\n"
"\n"
"QLineEdit {\n"
" border-width: 1px;\n"
" border-radius: 5px;\n"
" border-style: solid;\n"
" border-color: #303030;\n"
" background-color: #242424;\n"
" font: 10pt \"Segoe UI\";\n"
"}\n"
"\n"
"\n"
"QListWidget {\n"
" border-width: 1px;\n"
" border-radius: 15px;\n"
" border-style: solid;\n"
" border-color: #303030;\n"
" padding: 10px;\n"
" background-color: #242424;\n"
" font: 10pt \"Segoe UI\";\n"
"}\n"
"QListWidget:item {\n"
" background-color: #242424;\n"
" selection-color: white;\n"
"}\n"
"QListWidget:item:hover {\n"
" background-color: #323232;\n"
"}\n"
"QListWidget:item:selected {\n"
" background-color: #777777;\n"
"}")
MainWindow.setLocale(QtCore.QLocale(QtCore.QLocale.Russian, QtCore.QLocale.Ukraine))
MainWindow.setDockOptions(QtWidgets.QMainWindow.AllowTabbedDocks|QtWidgets.QMainWindow.AnimatedDocks)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setSpacing(0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.leftMenu = QtWidgets.QListWidget(self.centralwidget)
self.leftMenu.setMinimumSize(QtCore.QSize(60, 0))
self.leftMenu.setMaximumSize(QtCore.QSize(60, 16777215))
self.leftMenu.setFocusPolicy(QtCore.Qt.NoFocus)
self.leftMenu.setStyleSheet("QListWidget {\n"
" border-width: 0px;\n"
" border-radius: 0px;\n"
" border: none;\n"
" padding: 0px;\n"
" background-color: #242424;\n"
" font: 10pt \"Segoe UI\";\n"
"}\n"
"QListWidget:item {\n"
" padding-left: 10px;\n"
" height: 60px;\n"
" background-color: #191919;\n"
" selection-color: rgba(255, 255, 255);\n"
"}\n"
"QListWidget:item:hover {\n"
" background-color: #323232;\n"
"}\n"
"QListWidget:item:selected {\n"
" background-color: #262728;\n"
"}")
self.leftMenu.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.leftMenu.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.leftMenu.setAutoScroll(False)
self.leftMenu.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
self.leftMenu.setTabKeyNavigation(False)
self.leftMenu.setProperty("showDropIndicator", False)
self.leftMenu.setIconSize(QtCore.QSize(30, 30))
self.leftMenu.setTextElideMode(QtCore.Qt.ElideRight)
self.leftMenu.setResizeMode(QtWidgets.QListView.Fixed)
self.leftMenu.setObjectName("leftMenu")
item = QtWidgets.QListWidgetItem()
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/img/img/menu.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
item.setIcon(icon1)
self.leftMenu.addItem(item)
item = QtWidgets.QListWidgetItem()
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/img/img/devices.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
item.setIcon(icon2)
self.leftMenu.addItem(item)
item = QtWidgets.QListWidgetItem()
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/img/img/screenshot.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
item.setIcon(icon3)
self.leftMenu.addItem(item)
item = QtWidgets.QListWidgetItem()
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/img/img/wallpaper.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
item.setIcon(icon4)
self.leftMenu.addItem(item)
self.horizontalLayout.addWidget(self.leftMenu)
self.pagesWidget = QtWidgets.QStackedWidget(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pagesWidget.sizePolicy().hasHeightForWidth())
self.pagesWidget.setSizePolicy(sizePolicy)
self.pagesWidget.setObjectName("pagesWidget")
self.devicesPage = QtWidgets.QWidget()
self.devicesPage.setObjectName("devicesPage")
self.devicesButtonLayout = QtWidgets.QVBoxLayout(self.devicesPage)
self.devicesButtonLayout.setObjectName("devicesButtonLayout")
self.availableDevices = QtWidgets.QListWidget(self.devicesPage)
self.availableDevices.setFocusPolicy(QtCore.Qt.TabFocus)
self.availableDevices.setObjectName("availableDevices")
self.devicesButtonLayout.addWidget(self.availableDevices)
self.devicesButtonsLayout = QtWidgets.QHBoxLayout()
self.devicesButtonsLayout.setSpacing(6)
self.devicesButtonsLayout.setObjectName("devicesButtonsLayout")
self.connectButton = QtWidgets.QPushButton(self.devicesPage)
self.connectButton.setMinimumSize(QtCore.QSize(0, 30))
self.connectButton.setObjectName("connectButton")
self.devicesButtonsLayout.addWidget(self.connectButton)
self.pingButton = QtWidgets.QPushButton(self.devicesPage)
self.pingButton.setMinimumSize(QtCore.QSize(0, 30))
self.pingButton.setObjectName("pingButton")
self.devicesButtonsLayout.addWidget(self.pingButton)
self.devicesButtonLayout.addLayout(self.devicesButtonsLayout)
self.pagesWidget.addWidget(self.devicesPage)
self.screenshotPage = QtWidgets.QWidget()
self.screenshotPage.setObjectName("screenshotPage")
self.gridLayout_2 = QtWidgets.QGridLayout(self.screenshotPage)
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
self.gridLayout_2.setSpacing(0)
self.gridLayout_2.setObjectName("gridLayout_2")
self.screenshotLayout = QtWidgets.QWidget(self.screenshotPage)
self.screenshotLayout.setObjectName("screenshotLayout")
self.verticalLayout = QtWidgets.QVBoxLayout(self.screenshotLayout)
self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setSpacing(0)
self.verticalLayout.setObjectName("verticalLayout")
self.screenshotLabel = QtWidgets.QLabel(self.screenshotLayout)
self.screenshotLabel.setText("")
self.screenshotLabel.setPixmap(QtGui.QPixmap(":/img/img/screen-template.png"))
self.screenshotLabel.setScaledContents(True)
self.screenshotLabel.setObjectName("screenshotLabel")
self.verticalLayout.addWidget(self.screenshotLabel)
self.takeScreenshotButton = QtWidgets.QPushButton(self.screenshotLayout)
self.takeScreenshotButton.setStyleSheet("QPushButton {\n"
" border-radius: 0px;\n"
"}")
self.takeScreenshotButton.setObjectName("takeScreenshotButton")
self.verticalLayout.addWidget(self.takeScreenshotButton)
self.gridLayout_2.addWidget(self.screenshotLayout, 0, 0, 1, 1)
self.pagesWidget.addWidget(self.screenshotPage)
self.wallpaperPage = QtWidgets.QWidget()
self.wallpaperPage.setObjectName("wallpaperPage")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.wallpaperPage)
self.verticalLayout_3.setContentsMargins(-1, -1, -1, 9)
self.verticalLayout_3.setSpacing(0)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.wallpaperSetLayout = QtWidgets.QWidget(self.wallpaperPage)
self.wallpaperSetLayout.setObjectName("wallpaperSetLayout")
self.wallpaperSetterLayout = QtWidgets.QHBoxLayout(self.wallpaperSetLayout)
self.wallpaperSetterLayout.setObjectName("wallpaperSetterLayout")
self.wallpaperUrlBox = QtWidgets.QLineEdit(self.wallpaperSetLayout)
self.wallpaperUrlBox.setMinimumSize(QtCore.QSize(0, 30))
self.wallpaperUrlBox.setObjectName("wallpaperUrlBox")
self.wallpaperSetterLayout.addWidget(self.wallpaperUrlBox)
self.setWallpaperButton = QtWidgets.QPushButton(self.wallpaperSetLayout)
self.setWallpaperButton.setMinimumSize(QtCore.QSize(100, 30))
self.setWallpaperButton.setObjectName("setWallpaperButton")
self.wallpaperSetterLayout.addWidget(self.setWallpaperButton)
self.verticalLayout_3.addWidget(self.wallpaperSetLayout, 0, QtCore.Qt.AlignTop)
self.wallpaperEngineControlLayout = QtWidgets.QWidget(self.wallpaperPage)
self.wallpaperEngineControlLayout.setObjectName("wallpaperEngineControlLayout")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.wallpaperEngineControlLayout)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.controlWallpaperEngineLabel = QtWidgets.QLabel(self.wallpaperEngineControlLayout)
self.controlWallpaperEngineLabel.setObjectName("controlWallpaperEngineLabel")
self.verticalLayout_2.addWidget(self.controlWallpaperEngineLabel, 0, QtCore.Qt.AlignHCenter)
self.wallpaperEngineControlHorizontalLayout = QtWidgets.QWidget(self.wallpaperEngineControlLayout)
self.wallpaperEngineControlHorizontalLayout.setObjectName("wallpaperEngineControlHorizontalLayout")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.wallpaperEngineControlHorizontalLayout)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.stopWallpaperEngineButton = QtWidgets.QPushButton(self.wallpaperEngineControlHorizontalLayout)
self.stopWallpaperEngineButton.setMinimumSize(QtCore.QSize(0, 30))
self.stopWallpaperEngineButton.setObjectName("stopWallpaperEngineButton")
self.horizontalLayout_2.addWidget(self.stopWallpaperEngineButton)
self.pauseWallpaperEngineButton = QtWidgets.QPushButton(self.wallpaperEngineControlHorizontalLayout)
self.pauseWallpaperEngineButton.setMinimumSize(QtCore.QSize(0, 30))
self.pauseWallpaperEngineButton.setObjectName("pauseWallpaperEngineButton")
self.horizontalLayout_2.addWidget(self.pauseWallpaperEngineButton)
self.playWallpaperEngineButton = QtWidgets.QPushButton(self.wallpaperEngineControlHorizontalLayout)
self.playWallpaperEngineButton.setMinimumSize(QtCore.QSize(0, 30))
self.playWallpaperEngineButton.setObjectName("playWallpaperEngineButton")
self.horizontalLayout_2.addWidget(self.playWallpaperEngineButton)
self.muteWallpaperEngineButton = QtWidgets.QPushButton(self.wallpaperEngineControlHorizontalLayout)
self.muteWallpaperEngineButton.setMinimumSize(QtCore.QSize(0, 30))
self.muteWallpaperEngineButton.setObjectName("muteWallpaperEngineButton")
self.horizontalLayout_2.addWidget(self.muteWallpaperEngineButton)
self.unmuteWallpaperEngineButton = QtWidgets.QPushButton(self.wallpaperEngineControlHorizontalLayout)
self.unmuteWallpaperEngineButton.setMinimumSize(QtCore.QSize(0, 30))
self.unmuteWallpaperEngineButton.setObjectName("unmuteWallpaperEngineButton")
self.horizontalLayout_2.addWidget(self.unmuteWallpaperEngineButton)
self.verticalLayout_2.addWidget(self.wallpaperEngineControlHorizontalLayout, 0, QtCore.Qt.AlignTop)
self.verticalLayout_3.addWidget(self.wallpaperEngineControlLayout, 0, QtCore.Qt.AlignTop)
self.wallpaperScreenshotButton = QtWidgets.QPushButton(self.wallpaperPage)
self.wallpaperScreenshotButton.setMinimumSize(QtCore.QSize(300, 30))
self.wallpaperScreenshotButton.setMaximumSize(QtCore.QSize(300, 16777215))
self.wallpaperScreenshotButton.setObjectName("wallpaperScreenshotButton")
self.verticalLayout_3.addWidget(self.wallpaperScreenshotButton, 0, QtCore.Qt.AlignHCenter)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout_3.addItem(spacerItem)
self.daunApWallpaperLabel = QtWidgets.QLabel(self.wallpaperPage)
self.daunApWallpaperLabel.setObjectName("daunApWallpaperLabel")
self.verticalLayout_3.addWidget(self.daunApWallpaperLabel)
self.pagesWidget.addWidget(self.wallpaperPage)
self.horizontalLayout.addWidget(self.pagesWidget)
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
self.leftMenu.setCurrentRow(-1)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "daunRat admin"))
__sortingEnabled = self.leftMenu.isSortingEnabled()
self.leftMenu.setSortingEnabled(False)
item = self.leftMenu.item(0)
item.setText(_translate("MainWindow", "Menu"))
item = self.leftMenu.item(1)
item.setText(_translate("MainWindow", "Devices"))
item = self.leftMenu.item(2)
item.setText(_translate("MainWindow", "Screenshot"))
item = self.leftMenu.item(3)
item.setText(_translate("MainWindow", "Wallpaper"))
self.leftMenu.setSortingEnabled(__sortingEnabled)
self.connectButton.setText(_translate("MainWindow", "Connect"))
self.pingButton.setText(_translate("MainWindow", "Ping"))
self.takeScreenshotButton.setText(_translate("MainWindow", "Take screenshot"))
self.wallpaperUrlBox.setPlaceholderText(_translate("MainWindow", "Local or web link to wallpaper"))
self.setWallpaperButton.setText(_translate("MainWindow", "Set wallpaper"))
self.controlWallpaperEngineLabel.setText(_translate("MainWindow", "Wallpaper Engine control"))
self.stopWallpaperEngineButton.setText(_translate("MainWindow", "Stop"))
self.pauseWallpaperEngineButton.setText(_translate("MainWindow", "Pause"))
self.playWallpaperEngineButton.setText(_translate("MainWindow", "Play"))
self.muteWallpaperEngineButton.setText(_translate("MainWindow", "Mute"))
self.unmuteWallpaperEngineButton.setText(_translate("MainWindow", "Unmute"))
self.wallpaperScreenshotButton.setText(_translate("MainWindow", "Set screenshot as wallpaper"))
self.daunApWallpaperLabel.setText(_translate("MainWindow", "Use Python Console with daunApi also"))
import images_rc
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())