def __init__(self, define_path='', define_type=None):
        super(MTTFilterFileDialog, self).__init__(get_maya_window())

        self.supported_node_type = sorted([
            node_type for (node_type, nice, attr) in MTTSettings.SUPPORTED_TYPE
        ])

        self.defined_path = (define_path if os.path.isdir(define_path)
                             or define_path == SOURCEIMAGES_TAG else None)

        self.defined_type = (define_type if define_type
                             in self.supported_node_type else None)

        self.path_edit = None
        self.filter_reset_btn = None
        self.filter_line = None
        self.parent_folder_btn = None
        self.files_model = None
        self.files_list = None
        self.bookmark_list = None
        self.bookmark_list_sel_model = None
        self.types = None

        # move window to cursor position
        win_geo = MTTSettings.value('FilterFileDialog/windowGeometry',
                                    QRect(0, 0, 400, 300))
        self.setGeometry(win_geo)
        mouse_pos = QCursor.pos()
        mouse_pos.setX(mouse_pos.x() - (win_geo.width() * 0.5))
        self.move(mouse_pos)

        self.__create_ui()

        self.filter_line.setFocus()
        self.on_change_root_path(self.defined_path or SOURCEIMAGES_TAG)
    def __init__(self, parent=get_maya_window()):
        super(MTTViewer, self).__init__(parent)

        if cmds.control(VIEWER_NAME, exists=True):
            cmds.deleteUI(VIEWER_NAME, window=True)

        self.parent = parent
        self.setObjectName(VIEWER_NAME)
        self.setWindowTitle(VIEWER_TITLE)
        self.setWindowIcon(QIcon(WINDOW_ICON))

        self.texture_path = None
        self.texture_compare_path = None
        self.is_mtt_sender = False

        # UI variables
        self.viewer_statusbar = None
        self.graphics_view = None
        self.channel_btn = dict()
        self.fit_btn = None
        self.reset_zoom_btn = None
        self.toggle_tile_btn = None
        self.toggle_compare_btn = None
        self.toggle_picker_btn = None
        self.settings_btn = None

        # create UI
        self.__create_ui()
        # self.setMouseTracking(True)

        # restore geometry
        self.restoreGeometry(MTTSettings.value('Viewer/windowGeometry'))
    def __init__(self, parent=get_maya_window()):
        super(MTTViewer, self).__init__(parent)

        if cmds.control(VIEWER_NAME, exists=True):
            cmds.deleteUI(VIEWER_NAME, window=True)

        self.parent = parent
        self.setObjectName(VIEWER_NAME)
        self.setWindowTitle(VIEWER_TITLE)
        self.setWindowIcon(QIcon(WINDOW_ICON))

        self.texture_path = None
        self.texture_compare_path = None
        self.is_mtt_sender = False

        # UI variables
        self.viewer_statusbar = None
        self.graphics_view = None
        self.channel_btn = dict()
        self.fit_btn = None
        self.reset_zoom_btn = None
        self.toggle_tile_btn = None
        self.toggle_compare_btn = None
        self.toggle_picker_btn = None
        self.settings_btn = None

        # create UI
        self.__create_ui()
        # self.setMouseTracking(True)

        # restore geometry
        self.restoreGeometry(MTTSettings.value('Viewer/windowGeometry'))
    def __init__(self, parent=get_maya_window()):
        super(MTTQuickFilterManager, self).__init__(parent)

        # create UI
        main_layout = QVBoxLayout(self)
        main_layout.setSpacing(2)
        main_layout.setContentsMargins(4, 4, 4, 4)

        list_layout = QHBoxLayout(self)
        self.quick_filter_wildcard_ui = _QuickFilterUI('Wildcard')
        list_layout.addLayout(self.quick_filter_wildcard_ui)

        self.quick_filter_regex_ui = _QuickFilterUI('RegularExpression')
        list_layout.addLayout(self.quick_filter_regex_ui)

        main_layout.addLayout(list_layout)

        main_layout.addSpacing(2)

        buttons_layout = QHBoxLayout(self)
        save_button = QPushButton('&Save')
        save_button.clicked.connect(self.accept)
        buttons_layout.addWidget(save_button)

        cancel_button = QPushButton('&Cancel')
        cancel_button.clicked.connect(self.reject)
        buttons_layout.addWidget(cancel_button)

        main_layout.addLayout(buttons_layout)

        # populate lists
        items_str = MTTSettings.value('filterQuickWordsWildcard')
        if items_str:
            self.quick_filter_wildcard_ui.populate(
                quick_filter_words=items_str.split(';;'))

        items_str = MTTSettings.value('filterQuickWordsRegExp')
        if items_str:
            self.quick_filter_regex_ui.populate(
                quick_filter_words=items_str.split(';;'))

        # adjust UI
        self.setWindowTitle(WINDOW_TITLE)
        self.setWindowIcon(QIcon(WINDOW_ICON))
        self.setModal(True)
        self.resize(300, 200)
    def __init__(self, define_path='', define_type=None):
        super(MTTFilterFileDialog, self).__init__(get_maya_window())

        self.supported_node_type = sorted(
            [node_type
             for (node_type, nice, attr) in MTTSettings.SUPPORTED_TYPE])

        self.defined_path = (
            define_path
            if os.path.isdir(define_path) or define_path == SOURCEIMAGES_TAG
            else None)

        self.defined_type = (
            define_type
            if define_type in self.supported_node_type
            else None)

        self.path_edit = None
        self.filter_reset_btn = None
        self.filter_line = None
        self.parent_folder_btn = None
        self.files_model = None
        self.files_list = None
        self.bookmark_list = None
        self.bookmark_list_sel_model = None
        self.types = None

        # move window to cursor position
        win_geo = MTTSettings.value(
            'FilterFileDialog/windowGeometry', QRect(0, 0, 400, 300))
        self.setGeometry(win_geo)
        mouse_pos = QCursor.pos()
        mouse_pos.setX(mouse_pos.x() - (win_geo.width() * 0.5))
        self.move(mouse_pos)

        self.__create_ui()

        self.filter_line.setFocus()
        self.on_change_root_path(self.defined_path or SOURCEIMAGES_TAG)