Skip to content
Alexander Richter edited this page Oct 22, 2017 · 16 revisions

PATH: plex/lib/utils/arUtil.py

arutil

arutil_origin

Default UI and functions for new scripts with and without UI.

import os

from PySide import QtGui, QtCore, QtUiTools

import libLog
from arUtil import ArUtil

#*********************************************************************
# VARIABLE
TITLE = os.path.splitext(os.path.basename(__file__))[0]
LOG   = libLog.init(script=TITLE)


#*********************************************************************
# CLASS
class NewScript(ArUtil):

    def __init__(self):
        super(NewScript, self).__init__()

        path_ui = ("/").join([os.path.dirname(__file__), "ui", TITLE + ".ui"])
        self.wgNewScript = QtUiTools.QUiLoader().load(path_ui)

        self.wgHeader.setWindowTitle(TITLE)
        self.resize_widget(self.wgNewScript)
        self.wgHeader.layMain.addWidget(self.wgNewScript, 0, 0)

        self.wgNewScript.show()
Clone this wiki locally