developing gui

This commit is contained in:
BarsTiger
2022-05-14 22:31:53 +03:00
parent 5fc74325ff
commit e013f0681f
9 changed files with 2876 additions and 2433 deletions

View File

@@ -38,6 +38,8 @@ def handleMenuClick(text):
ui.pagesWidget.setCurrentIndex(0)
case "Screenshot":
ui.pagesWidget.setCurrentIndex(1)
case "Wallpaper":
ui.pagesWidget.setCurrentIndex(2)
ui.leftMenu.itemClicked.connect(lambda: handleMenuClick(ui.leftMenu.currentItem().text()))

View File

@@ -172,6 +172,11 @@ class Ui_MainWindow(object):
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)
@@ -182,24 +187,24 @@ class Ui_MainWindow(object):
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.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.verticalLayout_2.addWidget(self.availableDevices)
self.devicesButtonLayout.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.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")
@@ -228,11 +233,74 @@ class Ui_MainWindow(object):
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(0)
self.leftMenu.setCurrentRow(-1)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
@@ -246,10 +314,22 @@ class Ui_MainWindow(object):
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.pushButton_2.setText(_translate("MainWindow", "Connect"))
self.pushButton.setText(_translate("MainWindow", "Ping"))
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

View File

@@ -46,7 +46,8 @@
}
QScrollBar:vertical {
QScrollBar:vertical,
QScrollBar:horizontal {
border: none;
background: rgb(30, 30, 30);
width: 10px;
@@ -54,14 +55,17 @@ QScrollBar:vertical {
border-radius: 0px;
}
QScrollBar::handle:vertical {
QScrollBar::handle:vertical,
QScrollBar::handle:horizontal {
background-color: rgb(139, 139, 139);
min-height: 30px;
border-radius: 5px;
}
QScrollBar::handle:vertical:hover,
QScrollBar::handle:vertical:pressed {
QScrollBar::handle:vertical:pressed,
QScrollBar::handle:horizontal:hover,
QScrollBar::handle:horizontal:pressed {
background-color: rgb(149, 149, 149);
}
@@ -73,7 +77,9 @@ QScrollBar::down-arrow:vertical {
}
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical,
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical{
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical,
QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal,
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
background: none;
}
@@ -99,7 +105,7 @@ QPushButton:disabled {
}
QLineEdit {
QLineEdit, QTextBrowser, QPlainTextEdit, QTextEdit {
border-width: 1px;
border-radius: 5px;
border-style: solid;
@@ -120,14 +126,15 @@ QListWidget {
}
QListWidget:item {
background-color: #242424;
selection-color: white;
selection-color: white;
}
QListWidget:item:hover {
background-color: #323232;
}
QListWidget:item:selected {
background-color: #777777;
}</string>
}
</string>
</property>
<property name="locale">
<locale language="Russian" country="Ukraine"/>
@@ -222,7 +229,7 @@ QListWidget:item:selected {
<enum>QListView::Fixed</enum>
</property>
<property name="currentRow">
<number>0</number>
<number>-1</number>
</property>
<item>
<property name="text">
@@ -251,6 +258,33 @@ QListWidget:item:selected {
<normaloff>:/img/img/screenshot.png</normaloff>:/img/img/screenshot.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Wallpaper</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/img/img/wallpaper.png</normaloff>:/img/img/wallpaper.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Console</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/img/img/cmd.png</normaloff>:/img/img/cmd.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Python</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/img/img/python.png</normaloff>:/img/img/python.png</iconset>
</property>
</item>
</widget>
</item>
<item>
@@ -261,8 +295,11 @@ QListWidget:item:selected {
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>4</number>
</property>
<widget class="QWidget" name="devicesPage">
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QVBoxLayout" name="devicesButtonLayout">
<item>
<widget class="QListWidget" name="availableDevices">
<property name="focusPolicy">
@@ -276,7 +313,7 @@ QListWidget:item:selected {
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="pushButton_2">
<widget class="QPushButton" name="connectButton">
<property name="minimumSize">
<size>
<width>0</width>
@@ -289,7 +326,7 @@ QListWidget:item:selected {
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<widget class="QPushButton" name="pingButton">
<property name="minimumSize">
<size>
<width>0</width>
@@ -373,6 +410,276 @@ QListWidget:item:selected {
</item>
</layout>
</widget>
<widget class="QWidget" name="wallpaperPage">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item alignment="Qt::AlignTop">
<widget class="QWidget" name="wallpaperSetLayout" native="true">
<layout class="QHBoxLayout" name="wallpaperSetterLayout">
<item>
<widget class="QLineEdit" name="wallpaperUrlBox">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="placeholderText">
<string>Local or web link to wallpaper</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="setWallpaperButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>Set wallpaper</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="QWidget" name="wallpaperEngineControlLayout" native="true">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="controlWallpaperEngineLabel">
<property name="text">
<string>Wallpaper Engine control</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="QWidget" name="wallpaperEngineControlHorizontalLayout" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="stopWallpaperEngineButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>Stop</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pauseWallpaperEngineButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>Pause</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="playWallpaperEngineButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>Play</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="muteWallpaperEngineButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>Mute</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="unmuteWallpaperEngineButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>Unmute</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QPushButton" name="wallpaperScreenshotButton">
<property name="minimumSize">
<size>
<width>300</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Set screenshot as wallpaper</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacerWallpaperPage">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="daunApWallpaperLabel">
<property name="text">
<string>Use Python Console with daunApi also</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="consolePage">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QWidget" name="sendCommandLayout" native="true">
<layout class="QHBoxLayout" name="wallpaperSetterLayout_2">
<item>
<widget class="QLineEdit" name="commandBox">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="placeholderText">
<string>Type command here</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="sendCommandButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>Send</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QTextBrowser" name="logsConsole"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="pythonPage">
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QWidget" name="pythonEditWigdet" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<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 alignment="Qt::AlignTop">
<widget class="QTextEdit" name="pythonScriptEditor">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextEditorInteraction</set>
</property>
<property name="placeholderText">
<string>import os; os.system(&quot;systeminfo&quot;)</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="execPythonButton">
<property name="minimumSize">
<size>
<width>75</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Execute</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QTextBrowser" name="logsPytoon"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>

View File

@@ -1,5 +1,8 @@
<RCC>
<qresource prefix="img">
<file>img/python.png</file>
<file>img/cmd.png</file>
<file>img/wallpaper.png</file>
<file>img/logo.png</file>
<file>img/screen-template.png</file>
<file>img/devices.png</file>

File diff suppressed because it is too large Load Diff

BIN
admin/gui/img/cmd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

BIN
admin/gui/img/python.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
admin/gui/img/wallpaper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

View File

@@ -6,7 +6,8 @@ QWidget {
}
QScrollBar:vertical {
QScrollBar:vertical,
QScrollBar:horizontal {
border: none;
background: rgb(30, 30, 30);
width: 10px;
@@ -14,14 +15,17 @@ QScrollBar:vertical {
border-radius: 0px;
}
QScrollBar::handle:vertical {
QScrollBar::handle:vertical,
QScrollBar::handle:horizontal {
background-color: rgb(139, 139, 139);
min-height: 30px;
border-radius: 5px;
}
QScrollBar::handle:vertical:hover,
QScrollBar::handle:vertical:pressed {
QScrollBar::handle:vertical:pressed,
QScrollBar::handle:horizontal:hover,
QScrollBar::handle:horizontal:pressed {
background-color: rgb(149, 149, 149);
}
@@ -33,7 +37,9 @@ QScrollBar::down-arrow:vertical {
}
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical,
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical{
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical,
QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal,
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
background: none;
}
@@ -59,7 +65,7 @@ QPushButton:disabled {
}
QLineEdit {
QLineEdit, QTextBrowser, QPlainTextEdit, QTextEdit {
border-width: 1px;
border-radius: 5px;
border-style: solid;