diff --git a/pic.qrc b/pic.qrc new file mode 100644 index 0000000..19fe577 --- /dev/null +++ b/pic.qrc @@ -0,0 +1,6 @@ + + + plugins/In_one/pic/2.png + plugins/In_one/pic/1.png + + diff --git a/plugins/In_one/main.py b/plugins/In_one/main.py index 9992438..2050cab 100644 --- a/plugins/In_one/main.py +++ b/plugins/In_one/main.py @@ -3,9 +3,10 @@ import os import pdb from threading import Thread import numpy as np +from plugins.basic_change.main import MyDialog from rscder.gui.actions import ActionManager from rscder.plugins.basic import BasicPlugin -from PyQt5.QtWidgets import QAction, QDialog, QHBoxLayout, QVBoxLayout, QPushButton,QWidget,QLabel,QLineEdit,QPushButton,QPixmap +from PyQt5.QtWidgets import QAction, QDialog, QHBoxLayout, QVBoxLayout, QPushButton,QWidget,QLabel,QLineEdit,QPushButton from PyQt5.QtGui import QIcon,QPixmap from PyQt5.QtCore import Qt from rscder.gui.layercombox import RasterLayerCombox @@ -17,11 +18,11 @@ from plugins.In_one import pic class LockerButton(QPushButton): def __init__(self,parent=NULL): super(LockerButton,self).__init__(parent) - m_imageLabel = QLabel + m_imageLabel = QLabel(self) m_imageLabel.setFixedWidth(20) m_imageLabel.setScaledContents(True) m_imageLabel.setStyleSheet("QLabel{background-color:transparent;}") - m_textLabel = QLabel + m_textLabel = QLabel(self) m_textLabel.setStyleSheet("QLabel{background-color:transparent;}") self.m_imageLabel=m_imageLabel self.m_textLabel=m_textLabel @@ -30,8 +31,8 @@ class LockerButton(QPushButton): mainLayout.addWidget(self.m_imageLabel) mainLayout.addWidget(self.m_textLabel) - mainLayout.setMargin(0) - mainLayout.setSpacing(0) + # mainLayout.set + # mainLayout.setSpacing(0) self.setLayout(mainLayout) def SetImageLabel(self, pixmap:QPixmap): self.m_imageLabel.setPixmap(pixmap) @@ -49,12 +50,13 @@ class AllInOne(QDialog): #预处理 filterWeight=QWidget(self) - self.filerButton =LockerButton(); - self.filerButton.setObjectName("LockerButton") - self.filerButton.SetTextLabel("大小") - self.filerButton.SetImageLabel(QPixmap('../pic/右箭头.png')) - self.filerButton.setStyleSheet("#LockerButton{background-color:transparent}" - "#LockerButton:hover{background-color:rgba(195,195,195,0.4)}") + filterlayout=QVBoxLayout() + filerButton =LockerButton(filterWeight); + filerButton.setObjectName("LockerButton") + filerButton.SetTextLabel("大小") + filerButton.SetImageLabel(QPixmap('../pic/右箭头.png')) + filerButton.setStyleSheet("#LockerButton{background-color:transparent;border:none;}" + "#LockerButton:hover{background-color:rgba(195,195,195,0.4);border:none;}") self.layer_combox = RasterLayerCombox(self) layer_label = QLabel('图层:') hbox = QHBoxLayout() @@ -70,27 +72,31 @@ class AllInOne(QDialog): time_label.setText('X') self.x_size_input = x_size_input self.y_size_input = y_size_input - hlayout1 = QHBoxLayout(self) + hlayout1 = QHBoxLayout() hlayout1.addWidget(size_label) hlayout1.addWidget(x_size_input) hlayout1.addWidget(time_label) hlayout1.addWidget(y_size_input) - vlayout = QVBoxLayout(self) - vlayout.addWidget(self.filerButton) + vlayout = QVBoxLayout() + # vlayout.addWidget(filerButton) vlayout.addLayout(hbox) vlayout.addLayout(hlayout1) filterWeight.setLayout(vlayout) - + filterlayout.addWidget(filerButton) + filterlayout.addWidget(filterWeight) #变化检测 changeWeight=QWidget(self) totalvlayout=QVBoxLayout() - totalvlayout.addWidget(filterWeight) + totalvlayout.addLayout(filterlayout) + + totalvlayout.addStretch() + self.setLayout(totalvlayout) - self.filerButton.clicked.connect(lambda: self.hide(self.filerButton,filterWeight)) + filerButton.clicked.connect(lambda: self.hide(filerButton,filterWeight)) def hide(self,button:LockerButton,weight:QWidget): if ((button.hide_)%2)==1: @@ -99,7 +105,7 @@ class AllInOne(QDialog): else: weight.setVisible(True) button.SetImageLabel(QPixmap('../pic/下箭头.png')) - + button.hide_=(button.hide_)%2+1 class InOnePlugin(BasicPlugin): @staticmethod def info(): @@ -119,4 +125,5 @@ class InOnePlugin(BasicPlugin): def run(self): - pass \ No newline at end of file + myDialog=AllInOne(self.mainwindow) + myDialog.show() \ No newline at end of file diff --git a/plugins/In_one/pic.py b/plugins/In_one/pic.py index 5f0182a..dc7ef9d 100644 --- a/plugins/In_one/pic.py +++ b/plugins/In_one/pic.py @@ -132,35 +132,49 @@ qt_resource_data = b"\ " qt_resource_name = b"\ +\x00\x07\ +\x07\x3b\xe0\xb3\ +\x00\x70\ +\x00\x6c\x00\x75\x00\x67\x00\x69\x00\x6e\x00\x73\ +\x00\x06\ +\x05\x04\x66\x45\ +\x00\x49\ +\x00\x6e\x00\x5f\x00\x6f\x00\x6e\x00\x65\ \x00\x03\ \x00\x00\x76\xf3\ \x00\x70\ \x00\x69\x00\x63\ -\x00\x07\ -\x0f\x07\xfb\x67\ -\x4e\x0b\ -\x7b\xad\x59\x34\x00\x2e\x00\x70\x00\x6e\x00\x67\ -\x00\x07\ -\x07\x07\xef\x47\ -\x53\xf3\ -\x7b\xad\x59\x34\x00\x2e\x00\x70\x00\x6e\x00\x67\ +\x00\x05\ +\x00\x35\x57\x47\ +\x00\x32\ +\x00\x2e\x00\x70\x00\x6e\x00\x67\ +\x00\x05\ +\x00\x34\x57\x47\ +\x00\x31\ +\x00\x2e\x00\x70\x00\x6e\x00\x67\ " qt_resource_struct_v1 = b"\ \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ -\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x02\ -\x00\x00\x00\x20\x00\x00\x00\x00\x00\x01\x00\x00\x03\xa2\ -\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\ +\x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\ +\x00\x00\x00\x26\x00\x02\x00\x00\x00\x02\x00\x00\x00\x04\ +\x00\x00\x00\x42\x00\x00\x00\x00\x00\x01\x00\x00\x03\xa2\ +\x00\x00\x00\x32\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ " qt_resource_struct_v2 = b"\ \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ \x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x02\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\ \x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x20\x00\x00\x00\x00\x00\x01\x00\x00\x03\xa2\ +\x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x26\x00\x02\x00\x00\x00\x02\x00\x00\x00\x04\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x42\x00\x00\x00\x00\x00\x01\x00\x00\x03\xa2\ \x00\x00\x01\x81\x56\x1e\xac\xc9\ -\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +\x00\x00\x00\x32\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ \x00\x00\x01\x81\x56\x1e\xbb\xa5\ " diff --git a/plugins/In_one/pic/1.png b/plugins/In_one/pic/1.png new file mode 100644 index 0000000..298ae8a Binary files /dev/null and b/plugins/In_one/pic/1.png differ diff --git a/plugins/In_one/pic/2.png b/plugins/In_one/pic/2.png new file mode 100644 index 0000000..8c8c44b Binary files /dev/null and b/plugins/In_one/pic/2.png differ diff --git a/plugins/plugins.yaml b/plugins/plugins.yaml index bf506ab..e3ffab5 100644 --- a/plugins/plugins.yaml +++ b/plugins/plugins.yaml @@ -46,4 +46,11 @@ module: evaluation name: Evaluation path: ./plugin\evaluation + version: 1.0.0 +- author: RSCDER + description: AllinOne + enabled: true + module: In_one + name: AllinOne + path: ./plugin\In_one version: 1.0.0 \ No newline at end of file