Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /home/ift/52_procpy/dataninja/test/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : //home/ift/52_procpy/dataninja/test/tss_dash_board.py

import sys
import math
from PyQt5.QtWidgets import QWidget, QApplication, QSlider, QPushButton, QLabel, QCheckBox, QDial
from PyQt5.QtGui import QPainter, QColor, QPen, QBrush, QPainterPath
from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtGui import QPalette, QPixmap, QColor,QFont
import random
import math
import numpy as np
import os,re,sys,time
from PyQt5.QtWidgets import QApplication, QWidget, QFrame, QTreeWidget,QPushButton
from procpy.tss.treeview import Treeview
from PyQt5.QtCore import QTimer
from opcua import ua, Client
import time
# try:
#     from procpy.tss import regler
# except:
#     from tss import regler

color = 0
curvStartX = 30
curvStartY = 260
curvWidth = 500
curvHeight = 200
scale =10
maxvalue=300000
curvStep = curvWidth / scale


class Dashboard(QWidget):
    def __init__(self):
        super().__init__()
        self.initUI()

    def initUI(self):
        self.step = 0
        self.setAutoFillBackground(True)
        p = self.palette()
        p.setColor(self.backgroundRole(), Qt.lightGray)
        self.setPalette(p)

        self.setWindowTitle("Dashboard")
        self.label1 = QLabel(self)
        self.label1.setPixmap(QPixmap('logo.jpg'))
        self.label1.setGeometry(0, 0, 104, 38)

        self.dial = QDial(self)
        self.dial.setGeometry(200, 0, 250, 250)

        self.btn_start = QPushButton('Run', self)
        self.btn_start.move(30, 80)
        self.btn_start.clicked.connect(self.doRunAction)

        self.setStyleSheet('QDial{background-color:rgb(120,120,45)}')
        self.setStyleSheet('QWidget{background-color:rgb(173,216,230)}')
        # client = Client("opc.tcp://localhost:4842/freeopcua/regler/")
        # root   = client.get_root_node()
        # a = root.get_child(["0:Objects", "0:regler", "0:soll"])
        # print(a.get_value())
        self.value = 0
        self.size = 0
        self.stepArray = [0 for x in range(0, maxvalue)]
        self.valueArray = [0 for x in range(0,maxvalue)]

        self.label_start_u = QLabel('0 S', self)
        self.label_start_u.setGeometry(curvStartX, curvStartY + curvHeight + 5, 20, 20)
        self.label_end_u = QLabel('20 S', self)
        self.label_end_u.setGeometry(curvWidth + curvStartX, curvStartY + curvHeight + 5, 20, 20)
        self.timer = QTimer(self)
        self.timer.timeout.connect(self.change_array_val)

        self.amplification = curvHeight / (2 * 100) * (self.value + 1)
        self.points = (
        curvStartX + int(self.step / 100), (curvStartY + curvStartY + curvHeight + 50 * math.sin(self.value)) / 2)
        self.path = QPainterPath()
        self.xPrev = int(curvStartX + curvStep)
        self.yPrev = int((curvStartY + curvStartY + curvHeight) / 2)
        self.xCurrent = int(curvStartX + curvStep)
        self.yCurrent = int((curvStartY + curvStartY + curvHeight) / 2)
        self.show()

    def change_array_val(self):
        if self.step < maxvalue:
            self.step = self.step + 1
            self.stepArray[self.size]=self.step
            self.valueArray[self.size]=self.value
            self.size = self.size+1
            # print(self.step)
        elif self.step>=maxvalue:
            self.step = 0
            self.size = 0
        self.step = self.step

    def change_meter_val(self, value):
       print("the meter value is: ",value)

    def doRunAction(self, value):
        self.shape = 1
        self.siganl = 0
        self.timer.start()
        client = Client("opc.tcp://localhost:4842/tss/regler/")
        client.connect()
        root = client.get_root_node()
        self.a = root.get_child(["0:Objects","0:regler","0:motoren","0:a"])
        print(self.a.get_value())
        # while 0 ==0:
        #     self.value=a.get_value()/50
        #     print(self.value)

    def paintEvent(self, e):
        qp = QPainter()
        pen = QPen(Qt.blue, 2, Qt.SolidLine)
        qp.begin(self)
        qp.setPen(pen)
        qp.drawLine(curvStartX, curvStartY, curvWidth + curvStartX, curvStartY)
        qp.drawLine(curvStartX, curvStartY, curvStartX, curvStartY + curvHeight)
        qp.drawLine(curvStartX, curvStartY + curvHeight, curvWidth + curvStartX, curvStartY + curvHeight)
        qp.drawLine(curvStartX + curvWidth, curvStartY, curvWidth + curvStartX, curvStartY + curvHeight)
        pen = QPen(Qt.blue, 5, Qt.SolidLine)
        #qp.drawLine(curvStartX - 10, 0, curvStartX - 10, 600)
        qp.setPen(pen)


        pen2 = QPen(Qt.red, 2)
        qp.setPen(pen2)
        if self.size > 0:
            for index in range(0, self.size-1):
                self.value=self.a.get_value()
                print(self.value)
                qp.drawPoint(curvStartX + int(self.stepArray[index] / 5),
                             (curvStartY + curvStartY + curvHeight + self.valueArray[index]/2 * math.sin(curvStartX + int(self.stepArray[index] / 50))) / 2)


        self.update()
        qp.end()


if __name__ == '__main__':
    app = QApplication(sys.argv)
    dash = Dashboard()
    sys.exit(app.exec_())

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net