Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
lidongxun967 authored Jul 1, 2023
1 parent b9f5693 commit f2e1924
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 26 deletions.
14 changes: 12 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
import webbrowser
from pyperclip import copy
import pyperclip

from PySide6 import QtWidgets
from PySide6.QtWidgets import *
Expand All @@ -21,6 +21,8 @@ def __init__(self, parent = None) :
self.ui.dx_jd.clicked.connect(self.dx_jd)
self.ui.dx_gs.clicked.connect(self.dx_gs)
self.ui.about.clicked.connect(self.about)
self.ui.copy_1.clicked.connect(self.copy_1)
self.ui.copy_2.clicked.connect(self.copy_2)
self.ui.copy_tp.clicked.connect(self.copy_tp)


Expand Down Expand Up @@ -50,7 +52,15 @@ def about(self):

def copy_tp(self):
global tp
copy(tp)
pyperclip.copy(tp)

def copy_1(self):
self.ui.xyt_1.setText(pyperclip.paste())

def copy_2(self):
self.ui.xyt_2.setText(pyperclip.paste())





Expand Down
49 changes: 36 additions & 13 deletions qtgui.ui
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@
</property>
</widget>
</item>
<item row="1" column="2" colspan="2">
<widget class="QLineEdit" name="xyt_1"/>
</item>
<item row="4" column="1" colspan="2">
<widget class="QPushButton" name="dx_gs">
<property name="enabled">
Expand Down Expand Up @@ -124,16 +121,6 @@ li.checked::marker { content: &quot;\2612&quot;; }
<item row="1" column="4" rowspan="3" colspan="2">
<widget class="QTextBrowser" name="print_out"/>
</item>
<item row="2" column="2" colspan="2">
<widget class="QLineEdit" name="xyt_2">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="font">
Expand Down Expand Up @@ -165,6 +152,40 @@ li.checked::marker { content: &quot;\2612&quot;; }
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="xyt_1">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLineEdit" name="xyt_2">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="copy_1">
<property name="text">
<string>读取剪贴板</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QPushButton" name="copy_2">
<property name="text">
<string>读取剪贴板</string>
</property>
</widget>
</item>
</layout>
<zorder>print_out</zorder>
<zorder>label</zorder>
Expand All @@ -178,6 +199,8 @@ li.checked::marker { content: &quot;\2612&quot;; }
<zorder>about</zorder>
<zorder>label_4</zorder>
<zorder>copy_tp</zorder>
<zorder>copy_1</zorder>
<zorder>copy_2</zorder>
</widget>
</widget>
<resources/>
Expand Down
37 changes: 26 additions & 11 deletions qtgui_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ def setupUi(self, MainWindow):

self.gridLayout.addWidget(self.label_3, 2, 0, 1, 2)

self.xyt_1 = QLineEdit(self.centralwidget)
self.xyt_1.setObjectName(u"xyt_1")

self.gridLayout.addWidget(self.xyt_1, 1, 2, 1, 2)

self.dx_gs = QPushButton(self.centralwidget)
self.dx_gs.setObjectName(u"dx_gs")
self.dx_gs.setEnabled(True)
Expand Down Expand Up @@ -87,12 +82,6 @@ def setupUi(self, MainWindow):

self.gridLayout.addWidget(self.print_out, 1, 4, 3, 2)

self.xyt_2 = QLineEdit(self.centralwidget)
self.xyt_2.setObjectName(u"xyt_2")
self.xyt_2.setMinimumSize(QSize(200, 0))

self.gridLayout.addWidget(self.xyt_2, 2, 2, 1, 2)

self.label_2 = QLabel(self.centralwidget)
self.label_2.setObjectName(u"label_2")
self.label_2.setFont(font1)
Expand All @@ -106,6 +95,28 @@ def setupUi(self, MainWindow):

self.gridLayout.addWidget(self.copy_tp, 4, 3, 1, 2)

self.xyt_1 = QLineEdit(self.centralwidget)
self.xyt_1.setObjectName(u"xyt_1")
self.xyt_1.setMinimumSize(QSize(200, 0))

self.gridLayout.addWidget(self.xyt_1, 1, 2, 1, 1)

self.xyt_2 = QLineEdit(self.centralwidget)
self.xyt_2.setObjectName(u"xyt_2")
self.xyt_2.setMinimumSize(QSize(200, 0))

self.gridLayout.addWidget(self.xyt_2, 2, 2, 1, 1)

self.copy_1 = QPushButton(self.centralwidget)
self.copy_1.setObjectName(u"copy_1")

self.gridLayout.addWidget(self.copy_1, 1, 3, 1, 1)

self.copy_2 = QPushButton(self.centralwidget)
self.copy_2.setObjectName(u"copy_2")

self.gridLayout.addWidget(self.copy_2, 2, 3, 1, 1)

MainWindow.setCentralWidget(self.centralwidget)
self.print_out.raise_()
self.label.raise_()
Expand All @@ -119,6 +130,8 @@ def setupUi(self, MainWindow):
self.about.raise_()
self.label_4.raise_()
self.copy_tp.raise_()
self.copy_1.raise_()
self.copy_2.raise_()

self.retranslateUi(MainWindow)

Expand Down Expand Up @@ -150,5 +163,7 @@ def retranslateUi(self, MainWindow):
"\u884c\u4f30\u7b97</span></p></body></html>", None))
self.label_2.setText(QCoreApplication.translate("MainWindow", u"\u4f4d\u7f6e1\uff08\u59cb\u7ec8\u9700\u8981\uff09\uff1a", None))
self.copy_tp.setText(QCoreApplication.translate("MainWindow", u"\u590d\u5236TP\u6307\u4ee4", None))
self.copy_1.setText(QCoreApplication.translate("MainWindow", u"\u8bfb\u53d6\u526a\u8d34\u677f", None))
self.copy_2.setText(QCoreApplication.translate("MainWindow", u"\u8bfb\u53d6\u526a\u8d34\u677f", None))
# retranslateUi

0 comments on commit f2e1924

Please sign in to comment.