adding daun to startup
This commit is contained in:
42
admin/daunRat_admin.py
Normal file
42
admin/daunRat_admin.py
Normal file
@@ -0,0 +1,42 @@
|
||||
import sys
|
||||
from PyQt5 import QtWidgets, QtCore, QtGui
|
||||
sys.path.append('gui')
|
||||
|
||||
try:
|
||||
from gui import Ui_MainWindow
|
||||
except ImportError:
|
||||
from gui.gui import Ui_MainWindow
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
MainWindow = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
ui.setupUi(MainWindow)
|
||||
MainWindow.show()
|
||||
|
||||
|
||||
def openMenu():
|
||||
width = ui.leftMenu.geometry().width()
|
||||
Ui_MainWindow.animation = QtCore.QPropertyAnimation(ui.leftMenu, b"minimumWidth")
|
||||
Ui_MainWindow.animation.setDuration(300)
|
||||
if width == 60:
|
||||
Ui_MainWindow.animation.setStartValue(60)
|
||||
Ui_MainWindow.animation.setEndValue(200)
|
||||
else:
|
||||
Ui_MainWindow.animation.setStartValue(200)
|
||||
Ui_MainWindow.animation.setEndValue(60)
|
||||
Ui_MainWindow.animation.start()
|
||||
|
||||
|
||||
def handleMenuClick(text):
|
||||
match text:
|
||||
case "Menu":
|
||||
openMenu()
|
||||
case "Devices":
|
||||
ui.pagesWidget.setCurrentIndex(0)
|
||||
case "Screenshot":
|
||||
ui.pagesWidget.setCurrentIndex(1)
|
||||
|
||||
|
||||
ui.leftMenu.itemClicked.connect(lambda: handleMenuClick(ui.leftMenu.currentItem().text()))
|
||||
|
||||
sys.exit(app.exec_())
|
||||
0
admin/gui/functions.py
Normal file
0
admin/gui/functions.py
Normal file
263
admin/gui/gui.py
Normal file
263
admin/gui/gui.py
Normal file
@@ -0,0 +1,263 @@
|
||||
# -*- 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)
|
||||
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.verticalLayout_2 = QtWidgets.QVBoxLayout(self.devicesPage)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.availableDevices = QtWidgets.QListWidget(self.devicesPage)
|
||||
self.availableDevices.setFocusPolicy(QtCore.Qt.TabFocus)
|
||||
self.availableDevices.setObjectName("availableDevices")
|
||||
self.verticalLayout_2.addWidget(self.availableDevices)
|
||||
self.devicesButtonsLayout = QtWidgets.QHBoxLayout()
|
||||
self.devicesButtonsLayout.setSpacing(6)
|
||||
self.devicesButtonsLayout.setObjectName("devicesButtonsLayout")
|
||||
self.pushButton_2 = QtWidgets.QPushButton(self.devicesPage)
|
||||
self.pushButton_2.setMinimumSize(QtCore.QSize(0, 30))
|
||||
self.pushButton_2.setObjectName("pushButton_2")
|
||||
self.devicesButtonsLayout.addWidget(self.pushButton_2)
|
||||
self.pushButton = QtWidgets.QPushButton(self.devicesPage)
|
||||
self.pushButton.setMinimumSize(QtCore.QSize(0, 30))
|
||||
self.pushButton.setObjectName("pushButton")
|
||||
self.devicesButtonsLayout.addWidget(self.pushButton)
|
||||
self.verticalLayout_2.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.horizontalLayout.addWidget(self.pagesWidget)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.leftMenu.setCurrentRow(0)
|
||||
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"))
|
||||
self.leftMenu.setSortingEnabled(__sortingEnabled)
|
||||
self.pushButton_2.setText(_translate("MainWindow", "Connect"))
|
||||
self.pushButton.setText(_translate("MainWindow", "Ping"))
|
||||
self.takeScreenshotButton.setText(_translate("MainWindow", "Take screenshot"))
|
||||
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_())
|
||||
385
admin/gui/gui.ui
Normal file
385
admin/gui/gui.ui
Normal file
@@ -0,0 +1,385 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>700</width>
|
||||
<height>380</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>70</horstretch>
|
||||
<verstretch>36</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>700</width>
|
||||
<height>380</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>daunRat admin</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/img/img/logo.png</normaloff>:/img/img/logo.png</iconset>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget {
|
||||
background-color: rgb(30, 30, 30);
|
||||
color: rgb(255, 255, 255);
|
||||
font: 10pt "Segoe UI";
|
||||
}
|
||||
|
||||
|
||||
QScrollBar:vertical {
|
||||
border: none;
|
||||
background: rgb(30, 30, 30);
|
||||
width: 10px;
|
||||
margin: 15px 0 15px 0;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical {
|
||||
background-color: rgb(139, 139, 139);
|
||||
min-height: 30px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical:hover,
|
||||
QScrollBar::handle:vertical:pressed {
|
||||
background-color: rgb(149, 149, 149);
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:vertical,
|
||||
QScrollBar::add-line:vertical,
|
||||
QScrollBar::up-arrow:vertical,
|
||||
QScrollBar::down-arrow:vertical {
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical,
|
||||
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical{
|
||||
background: none;
|
||||
}
|
||||
|
||||
|
||||
QPushButton {
|
||||
color: white;
|
||||
border-width: 1px;
|
||||
border-radius:6px;
|
||||
border-style: solid;
|
||||
border-color: #303030;
|
||||
background-color: #2c2d2e;
|
||||
}
|
||||
QPushButton:hover {
|
||||
border-width: 2px;
|
||||
background-color: #323232;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: #262728;
|
||||
}
|
||||
QPushButton:disabled {
|
||||
background-color: #434343;
|
||||
border-color: #0000;
|
||||
}
|
||||
|
||||
|
||||
QLineEdit {
|
||||
border-width: 1px;
|
||||
border-radius: 5px;
|
||||
border-style: solid;
|
||||
border-color: #303030;
|
||||
background-color: #242424;
|
||||
font: 10pt "Segoe UI";
|
||||
}
|
||||
|
||||
|
||||
QListWidget {
|
||||
border-width: 1px;
|
||||
border-radius: 15px;
|
||||
border-style: solid;
|
||||
border-color: #303030;
|
||||
padding: 10px;
|
||||
background-color: #242424;
|
||||
font: 10pt "Segoe UI";
|
||||
}
|
||||
QListWidget:item {
|
||||
background-color: #242424;
|
||||
selection-color: white;
|
||||
}
|
||||
QListWidget:item:hover {
|
||||
background-color: #323232;
|
||||
}
|
||||
QListWidget:item:selected {
|
||||
background-color: #777777;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="locale">
|
||||
<locale language="Russian" country="Ukraine"/>
|
||||
</property>
|
||||
<property name="dockOptions">
|
||||
<set>QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks</set>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QListWidget" name="leftMenu">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QListWidget {
|
||||
border-width: 0px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
padding: 0px;
|
||||
background-color: #242424;
|
||||
font: 10pt "Segoe UI";
|
||||
}
|
||||
QListWidget:item {
|
||||
padding-left: 10px;
|
||||
height: 60px;
|
||||
background-color: #191919;
|
||||
selection-color: rgba(255, 255, 255);
|
||||
}
|
||||
QListWidget:item:hover {
|
||||
background-color: #323232;
|
||||
}
|
||||
QListWidget:item:selected {
|
||||
background-color: #262728;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="autoScroll">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="tabKeyNavigation">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="textElideMode">
|
||||
<enum>Qt::ElideRight</enum>
|
||||
</property>
|
||||
<property name="resizeMode">
|
||||
<enum>QListView::Fixed</enum>
|
||||
</property>
|
||||
<property name="currentRow">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Menu</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/img/img/menu.png</normaloff>:/img/img/menu.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Devices</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/img/img/devices.png</normaloff>:/img/img/devices.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Screenshot</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/img/img/screenshot.png</normaloff>:/img/img/screenshot.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="pagesWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<widget class="QWidget" name="devicesPage">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QListWidget" name="availableDevices">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::TabFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="devicesButtonsLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ping</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="screenshotPage">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QWidget" name="screenshotLayout" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="screenshotLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="images.qrc">:/img/img/screen-template.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="takeScreenshotButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton {
|
||||
border-radius: 0px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Take screenshot</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
9
admin/gui/images.qrc
Normal file
9
admin/gui/images.qrc
Normal file
@@ -0,0 +1,9 @@
|
||||
<RCC>
|
||||
<qresource prefix="img">
|
||||
<file>img/logo.png</file>
|
||||
<file>img/screen-template.png</file>
|
||||
<file>img/devices.png</file>
|
||||
<file>img/screenshot.png</file>
|
||||
<file>img/menu.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
6062
admin/gui/images_rc.py
Normal file
6062
admin/gui/images_rc.py
Normal file
File diff suppressed because it is too large
Load Diff
BIN
admin/gui/img/devices.png
Normal file
BIN
admin/gui/img/devices.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1008 B |
BIN
admin/gui/img/logo.png
Normal file
BIN
admin/gui/img/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
admin/gui/img/menu.png
Normal file
BIN
admin/gui/img/menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
admin/gui/img/screen-template.png
Normal file
BIN
admin/gui/img/screen-template.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
BIN
admin/gui/img/screenshot.png
Normal file
BIN
admin/gui/img/screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
114
admin/gui/styles.py
Normal file
114
admin/gui/styles.py
Normal file
@@ -0,0 +1,114 @@
|
||||
centralwidget = """
|
||||
QWidget {
|
||||
background-color: rgb(30, 30, 30);
|
||||
color: rgb(255, 255, 255);
|
||||
font: 10pt "Segoe UI";
|
||||
}
|
||||
|
||||
|
||||
QScrollBar:vertical {
|
||||
border: none;
|
||||
background: rgb(30, 30, 30);
|
||||
width: 10px;
|
||||
margin: 15px 0 15px 0;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical {
|
||||
background-color: rgb(139, 139, 139);
|
||||
min-height: 30px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical:hover,
|
||||
QScrollBar::handle:vertical:pressed {
|
||||
background-color: rgb(149, 149, 149);
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:vertical,
|
||||
QScrollBar::add-line:vertical,
|
||||
QScrollBar::up-arrow:vertical,
|
||||
QScrollBar::down-arrow:vertical {
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical,
|
||||
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical{
|
||||
background: none;
|
||||
}
|
||||
|
||||
|
||||
QPushButton {
|
||||
color: white;
|
||||
border-width: 1px;
|
||||
border-radius:6px;
|
||||
border-style: solid;
|
||||
border-color: #303030;
|
||||
background-color: #2c2d2e;
|
||||
}
|
||||
QPushButton:hover {
|
||||
border-width: 2px;
|
||||
background-color: #323232;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: #262728;
|
||||
}
|
||||
QPushButton:disabled {
|
||||
background-color: #434343;
|
||||
border-color: #0000;
|
||||
}
|
||||
|
||||
|
||||
QLineEdit {
|
||||
border-width: 1px;
|
||||
border-radius: 5px;
|
||||
border-style: solid;
|
||||
border-color: #303030;
|
||||
background-color: #242424;
|
||||
font: 10pt "Segoe UI";
|
||||
}
|
||||
|
||||
|
||||
QListWidget {
|
||||
border-width: 1px;
|
||||
border-radius: 15px;
|
||||
border-style: solid;
|
||||
border-color: #303030;
|
||||
padding: 10px;
|
||||
background-color: #242424;
|
||||
font: 10pt "Segoe UI";
|
||||
}
|
||||
QListWidget:item {
|
||||
background-color: #242424;
|
||||
selection-color: white;
|
||||
}
|
||||
QListWidget:item:hover {
|
||||
background-color: #323232;
|
||||
}
|
||||
QListWidget:item:selected {
|
||||
background-color: #777777;
|
||||
}
|
||||
"""
|
||||
|
||||
menupage = """
|
||||
QListWidget {
|
||||
border-width: 0px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
padding: 0px;
|
||||
background-color: #242424;
|
||||
font: 10pt "Segoe UI";
|
||||
}
|
||||
QListWidget:item {
|
||||
padding-left: 10px;
|
||||
height: 60px;
|
||||
background-color: #191919;
|
||||
selection-color: rgba(255, 255, 255);
|
||||
}
|
||||
QListWidget:item:hover {
|
||||
background-color: #323232;
|
||||
}
|
||||
QListWidget:item:selected {
|
||||
background-color: #262728;
|
||||
}
|
||||
"""
|
||||
Reference in New Issue
Block a user