Exemplo n.º 1
0
 def set_theme(self):
     """
     配置sty
     :return:
     """
     theme = dy.MTheme(theme="dark")
     theme.apply(self)
 def set_theme(self):
     theme = dy.MTheme(theme="drak")
     theme.apply(self)
     self.setStyleSheet(
         "QTextEdit#assetText{border:0px; border-radius: 0px; background-color: rgb(40, 40, 40)}"
     )
     self.textureScroll.setStyleSheet(
         "QScrollArea#textureScroll{border:0px; border-radius: 0px; background-color: rgb(40, 40, 40)}"
     )
Exemplo n.º 3
0
 def set_theme(self):
     theme = dy.MTheme(theme="dark")
     theme.apply(self)
     self.setStyleSheet(
         "QWidget#assetScrollArea{border:0px; border-radius: 0px; background-color: rgb(40, 40, 40)}"
         "QWidget#uploadScrollArea{border:0px; border-radius: 0px; background-color: rgb(40, 40, 40)}"
         "QLineEdit{background-color: rgb(50, 50, 50)}"
         "QTextEdit{background-color: rgb(50, 50, 50)}"
         "QCheckBox{background-color: rgb(40, 40, 40)}")
Exemplo n.º 4
0
    def set_style_sheet(self, theme="dark"):
        """
        设置 styleSheet
        :param theme:  (str) theme of dy widget
        :return:
        """

        widget_theme = dy.MTheme(theme=theme)
        widget_theme.apply(self)
    def __init__(self, text):
        super(ScreenShot, self).__init__()
        self.mainLayout = QVBoxLayout(self)
        self.imageLabel = QLabel()
        self.screenButton = ScreenShotButton(text=text)
        self.mainLayout.addWidget(self.imageLabel)
        self.mainLayout.setContentsMargins(0, 0, 0, 0)
        self.mainLayout.addWidget(self.screenButton)

        dy.MTheme(theme="dark").apply(self)

        self.temp_preview = os.path.join(tempfile.gettempdir(), "preview.jpg")

        self.screenButton.clicked.connect(self._on_camera_clicked)
        self.thumbnail_changed.connect(self._on_thumbnail_changed)
Exemplo n.º 6
0
    def __init__(self):
        super(FileListWidget, self).__init__()
        self.MainLayout = QtWidgets.QVBoxLayout(self)
        self.MainLayout.setContentsMargins(0, 0, 0, 0)

        self.work_list = ListView()

        self.model = dy.MTableModel()
        self.model.set_header_list(self.view_heard)
        self.model_sort = dy.MSortFilterModel()
        self.model_sort.setSourceModel(self.model)

        self.work_list.set_header_list(self.view_heard)
        self.model_sort.set_header_list(self.view_heard)
        self.work_list.setModel(self.model_sort)

        self.setup_ui()

        theme = dy.MTheme("dark")
        theme.apply(self)
Exemplo n.º 7
0
    def __init__(self):
        super(WorkBench, self).__init__()
        # self.setFixedSize(300, 600)
        self.MainLayout = QtWidgets.QGridLayout(self)

        self.warningButton = TaskInfoWidget(u"警告任务", 3)
        self.feedbackButton = TaskInfoWidget(u"反馈任务", 2)
        self.todayTaskButton = TaskInfoWidget(u"今日任务", 1)
        self.weekTaskButton = TaskInfoWidget(u"本周任务", 0)
        self.dailyTaskButton = TaskInfoWidget(u"审核任务", 0)
        self.doneTaskButton = TaskInfoWidget(u"完成任务", 0)

        self.MainLayout.addWidget(self.warningButton, 0, 0)
        self.MainLayout.addWidget(self.feedbackButton, 0, 1)
        self.MainLayout.addWidget(self.todayTaskButton, 1, 0)
        self.MainLayout.addWidget(self.weekTaskButton, 1, 1)
        self.MainLayout.addWidget(self.dailyTaskButton, 2, 0)
        self.MainLayout.addWidget(self.doneTaskButton, 2, 1)

        theme = dy.MTheme("dark")
        theme.apply(self)
Exemplo n.º 8
0
 def set_theme(self):
     theme = dy.MTheme("dark")
     theme.apply(self.start_task_button)
     theme.apply(self.publish_task_button)
Exemplo n.º 9
0
 def set_theme(self):
     theme = dy.MTheme("dark")
     theme.apply(self)
Exemplo n.º 10
0
# @FileName     :task_info_widget.py
# @Author       :LiuYang


import dayu_widgets as dy

from PySide2 import QtWidgets
from PySide2 import QtCore
from PySide2 import QtGui
from functools import partial
from Libs import package
import os

from dayu_widgets.mixin import stacked_animation_mixin

Theme = dy.MTheme("datk")


class TaskInfoWidget(QtWidgets.QFrame):
    def __init__(self):
        super(TaskInfoWidget, self).__init__()
        self.task_id = None

        self.setObjectName("TaskInfoWidget")
        self.setStyleSheet("background-color:#333333")

        self.MainLayout = QtWidgets.QHBoxLayout(self)
        self.MainLayout.setContentsMargins(0, 0, 0, 0)
        self.LeftWidget = HideWidget()

        self.RightLayout = QtWidgets.QVBoxLayout()
Exemplo n.º 11
0
        self.PropLabel = dy.MLabel("道具").strong().h2()

        self.SCLayout = QtWidgets.QVBoxLayout()
        self.SCLabel = dy.MLabel("场景").strong().h2()

        self.setup_ui()

    def setup_ui(self):
        self.MainLayout.addLayout(self.RootPathLayout)
        self.MainLayout.addWidget(dy.MDivider(""))
        self.MainLayout.addLayout(self.CategoryLayout)

        self.RootPathLayout.addWidget(self.RootPathLabel)
        self.RootPathLayout.addWidget(self.RootPathLine)
        self.RootPathLayout.addWidget(self.RootPathButton)

        self.CategoryLayout.addLayout(self.CHLayout)
        self.CategoryLayout.addLayout(self.PropLayout)
        self.CategoryLayout.addLayout(self.SCLayout)

        self.CHLayout.addWidget(self.CHLabel)
        self.PropLayout.addWidget(self.PropLabel)
        self.SCLayout.addWidget(self.SCLabel)


if __name__ == '__main__':
    theme = dy.MTheme(theme="dark")
    window = SetLibraryUI()
    theme.apply(window)
    window.show()
 def set_theme(self):
     theme = dy.MTheme(theme="dark")
     theme.apply(self)
     self.modifyButton.setStyleSheet("border-radius: 15px;")
Exemplo n.º 13
0
# _ * _ coding: utf-8 _ * _ #
# @Time         :2020/7/23 17:22
# @FileName     :project_information_widget.py
# @Author       :LiuYang
import dayu_widgets as dy
from PySide2 import QtWidgets
from collections import OrderedDict

Theme = dy.MTheme("dark")


class ProjectInfoWidget(QtWidgets.QWidget):
    def __init__(self):
        super(ProjectInfoWidget, self).__init__()
        self.MainLayout = QtWidgets.QVBoxLayout(self)

        self.BasicInformationLabel = dy.MLabel(u"基础信息").h3()
        self.BasicInformationLayout = QtWidgets.QVBoxLayout()

        self.DeliveryInformationLabel = dy.MLabel(u"交付信息").h3()

        self.DeliveryInformationLayout = QtWidgets.QVBoxLayout()

        self.setup_ui()
        self.set_style_sheet()

    def setup_ui(self):
        self.MainLayout.addWidget(self.BasicInformationLabel)
        self.MainLayout.addLayout(self.BasicInformationLayout)
        self.MainLayout.addWidget(self.DeliveryInformationLabel)
        self.MainLayout.addLayout(self.DeliveryInformationLayout)
Exemplo n.º 14
0
    #         task = next(tasks["entity"])
    #
    #         task_data = {"task_id": task.id,
    #                      "task_name": task.name,
    #                      "status": task.task_status,
    #                      "status_list": [u"未开始", u"已就绪", u"已取消", u"进行中", u"审核中", u"反馈", u"已完成"],
    #                      "man_hour": task.man_hour,
    #                      "executor": u"刘阳",
    #                      "plan_start_time": task.plan_start_time,
    #                      "plan_end_time": task.plan_end_time}
    #
    #         asset = tm.asset.find_one(filters=[["id", "is", task.entity_id]])
    #
    #         task_data.update({"asset_name": asset.name,
    #                           "asset_category": asset.asset_category,
    #                           "asset_grade": asset.asset_grade})
    #
    #         data_list.append(task_data)
    #     except StopIteration:
    #         break
    #
    # end_time = time.time()
    # print end_time - start_time
    # data_list = File.File(package.get("Data/TempData.yaml")).read_data_from_file()
    theme = dy.MTheme("light")
    app = QtWidgets.QApplication([])
    window = WorkWidget()
    theme.apply(window)
    window.show()
    app.exec_()