def __init__(self, *args, **kwargs): super(ClockWindow, self).__init__(*args, **kwargs) self.time = now() self.clockWidget = ClockWidget() self.hourEdit = QSpinBox() self.hourEdit.setRange(0, 23) self.minEdit = QSpinBox() self.minEdit.setRange(0, 59) self.masterLayout = QVBoxLayout() self.editlayout = QFormLayout() self.editlayout.addRow('Hour:', self.hourEdit) self.editlayout.addRow('Minute:', self.minEdit) self.masterLayout.addWidget(self.clockWidget) self.masterLayout.addLayout(self.editlayout) self.setLayout(self.masterLayout) self.hourEdit.valueChanged.connect(self.time_changed) self.minEdit.valueChanged.connect(self.time_changed) style_text = resource.get_style("calendar") self.setStyleSheet(style_text) self.set_time(self.time)
def __init__(self, *args, **kwargs): super(TimedeltaWidget, self).__init__(*args, **kwargs) self.setWindowFlags(Qt.Popup) self.yearEdit = QSpinBox() self.monthEdit = QSpinBox() self.dayEdit = QSpinBox() self.hourEdit = QSpinBox() self.minuteEdit = QSpinBox() self.secondEdit = QSpinBox() self.formLayout = QFormLayout() self.formLayout.addRow('Year:', self.yearEdit) self.formLayout.addRow('Month:', self.monthEdit) self.formLayout.addRow('Day:', self.dayEdit) self.layout2 = QHBoxLayout() self.layout2.addWidget(self.hourEdit) self.layout2.addWidget(QLabel(':')) self.layout2.addWidget(self.minuteEdit) self.layout2.addWidget(QLabel(':')) self.layout2.addWidget(self.secondEdit) self.masterLayout = QVBoxLayout() self.masterLayout.addLayout(self.formLayout) self.masterLayout.addLayout(self.layout2) self.setLayout(self.masterLayout) style_text = resource.get_style("calendar") self.setStyleSheet(style_text) self.resize(300, 160)
def __init__(self, parent=None): super(Calendar, self).__init__(parent) self.setWindowFlags(Qt.Popup) self.setMaximumHeight(220) style_text = resource.get_style("calendar") self.setStyleSheet(style_text)
def __init__(self, parent=None): super(OtherMenu, self).__init__(parent) for page in PROJECT_PAGES: action = QAction(resource.get_qicon("icon", page + ".png"), page, self) action.triggered.connect(self.action_triggered) self.addAction(action) styleText = resource.get_style("pagemenu") self.setStyleSheet(styleText)
def init_ui(self): self.add_tab(QLabel("My Task"), ArtistTabButton("My Task"), "My Task") self.add_tab(QLabel("My Note"), ArtistTabButton("My Note"), "My Note") self.add_tab(QLabel("Personal Info"), ArtistTabButton("Personal Info"), "Personal Info") self.load_tab(align=Qt.AlignRight) self.tabWidget.tabBar().setObjectName("ArtistMainWindow_TabBar") self.tabWidget.setObjectName("ArtistMainWindow") self.set_back_color("white") styleText = resource.get_style("artist") self.setStyleSheet(styleText)
def initUi(self): self.masterLayout = QVBoxLayout() self.label = QLabel() self.capTitleLayout = QHBoxLayout() self.capTitle = QLabel("test_v001") self.capTitleLayout.addWidget(self.capTitle) self.viewWidget = QWidget() self.viewWidget.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.viewLabel = QLabel(self.viewWidget) self.viewLabel.setScaledContents(True) self.viewLabel.setStyleSheet("background:black") # self.viewLabel.setAutoFillBackground(True) self.viewLabel.setAlignment(Qt.AlignCenter) # self.viewLabel.setPixmap(QPixmap("test01.png")) self.sliderLayout = QHBoxLayout() self.frameInEdit = LineEdit("1") self.frameInEdit.setMaximumWidth(50) self.playSlider = PlaySlider() self.frameOutEdit = LineEdit("100") self.frameOutEdit.setMaximumWidth(50) self.sliderLayout.addWidget(self.frameInEdit) self.sliderLayout.addWidget(self.playSlider) self.sliderLayout.addWidget(self.frameOutEdit) self.buttonLayout = QHBoxLayout() self.fpsEdit = FpsLineEdit() self.fpsEdit.setMaximumWidth(50) self.frameInButton = LabelButton1(text="I") self.frameOutButton = LabelButton1(text="O") self.stopBackwardButton = LabelButton1(icon="stop") self.stopBackwardButton.setVisible(False) self.playBackwardButton = LabelButton1(icon="play_backward") self.stopForwardButton = LabelButton1(icon="stop") self.stopForwardButton.setVisible(False) self.playForwardButton = LabelButton1(icon="play_forward") self.lastFrameButton = LabelButton1(icon="last_frame") self.nextFrameButton = LabelButton1(icon="next_frame") self.skipBackwardButton = LabelButton1(icon="skip_backward") self.skipForwardButton = LabelButton1(icon="skip_forward") self.currentFrameEdit = LineEdit() self.currentFrameEdit.setMaximumWidth(50) self.skipStepsEdit = LineEdit("10") self.skipStepsEdit.setMaximumWidth(50) self.lockRangeButton = LabelButton2(icon="lock_range") self.buttonLayout.addWidget(self.fpsEdit) self.buttonLayout.addStretch() self.buttonLayout.addWidget(self.frameInButton) self.buttonLayout.addWidget(self.lastFrameButton) self.buttonLayout.addWidget(self.stopBackwardButton) self.buttonLayout.addWidget(self.playBackwardButton) self.buttonLayout.addWidget(self.currentFrameEdit) self.buttonLayout.addWidget(self.stopForwardButton) self.buttonLayout.addWidget(self.playForwardButton) self.buttonLayout.addWidget(self.nextFrameButton) self.buttonLayout.addWidget(self.frameOutButton) self.buttonLayout.addSpacing(50) self.buttonLayout.addWidget(self.skipBackwardButton) self.buttonLayout.addWidget(self.skipStepsEdit) self.buttonLayout.addWidget(self.skipForwardButton) self.buttonLayout.addStretch() self.buttonLayout.addWidget(self.lockRangeButton) self.masterLayout.addLayout(self.capTitleLayout) self.masterLayout.addWidget(self.viewWidget) self.masterLayout.addLayout(self.sliderLayout) self.masterLayout.addLayout(self.buttonLayout) self.setLayout(self.masterLayout) styleText = resource.get_style("player") self.setStyleSheet(styleText)
def init_ui(self): self.projectLabel = QLabel("UNKNOW") self.projectLabel.setObjectName("projectLabel") self.projectLabel.setFont(QFont("Roman times", 12, QFont.Bold)) self.projectLabel.setFixedHeight(35) self.projectLabel.setMinimumWidth(70) self.projectLabel.setAlignment(Qt.AlignCenter) self.projectLabel.setContentsMargins(10, 0, 10, 0) self.mediaWindow = MediaMainWindow() self.shotsWindow = ShotMainWindow(parent=self) self.add_head(self.projectLabel) self.add_tab(QLabel("Overview"), ProjectTabButton("Overview"), "Overview") self.add_tab(QLabel("Detail"), ProjectTabButton("Detail"), "Detail") self.add_tab(QLabel("Assets"), ProjectTabButton("Assets"), "Assets") self.add_tab(QLabel("Versons"), ProjectTabButton("Versons"), "Versons") self.add_tab(QLabel("Notes"), ProjectTabButton("Notes"), "Notes") self.shotsButton = ProjectTabButton("Shots") self.shotsButton.defaultPage = [{ "pagename": 'All', "coreproperty": {} }] # self.shotsButton.set_core_property({'showId': 1}) self.add_tab(self.shotsWindow, self.shotsButton, "Shots") self.add_tab(self.mediaWindow, MediaTabButton("Media"), "Media") self.add_tab(QLabel("Sequences"), ProjectTabButton("Sequences", hide=True), "Sequences") self.add_tab(QLabel("Assettypes"), ProjectTabButton("Assettypes", hide=True), "Assettypes") self.add_tab(QLabel("Persons"), ProjectTabButton("Persons", hide=True), "Persons") self.add_tab(QLabel("Departments"), ProjectTabButton("Departments", hide=True), "Departments") self.add_tab(QLabel("Groups"), ProjectTabButton("Groups", hide=True), "Groups") self.add_tab(QLabel("PermissionGroups"), ProjectTabButton("PermissionGroups", hide=True), "PermissionGroups") self.add_tab(QLabel("Files"), ProjectTabButton("Files", hide=True), "Files") self.add_tab(QLabel("Tasks"), ProjectTabButton("Tasks", hide=True), "Tasks") self.add_tab(QLabel("Timelogs"), ProjectTabButton("Timelogs", hide=True), "Timelogs") self.add_tab(QLabel("Tags"), ProjectTabButton("Tags", hide=True), "Tags") self.add_tab(QLabel("Status"), ProjectTabButton("Status", hide=True), "Status") self.add_tab(QLabel("PipelineSteps"), ProjectTabButton("PipelineSteps", hide=True), "PipelineSteps") self.add_tab(QLabel("Playlists"), ProjectTabButton("Playlists", hide=True), "Playlists") projectMenu = OtherMenu(self) self.otherTabButton = ProjectTabButton("Others", menu=projectMenu) self.add_tab(QLabel("Others"), self.otherTabButton, "Others") # self.add_tail(QLabel("zzz")) self.load_tab() self.setObjectName("ProjectMainWindow") self.tabWidget.setObjectName("ProjectMainWindowTab") self.set_back_color("rgb(200,200,200)") styleText = resource.get_style("project") self.setStyleSheet(styleText)
# -*- coding: utf-8 -*- # __author__ = 'XingHuan' # 6/30/2018 from sins.utils.res import resource scrollbar_style = resource.get_style('scrollbar')