# Path: src/helpers/utils.py
# def clamp(value, minimum, maximum):
# def enum(*sequential, **named):
# def sign(v):
# def cmp(a, b):
# def snap_ceil(value, increment):
# def snap(value, increment):
# def snap_point(point, increment):
# def create_image(width, height):
# def load_image(file):
# def get_file_extension(file_path):
# def show_open_file_dialog(label, name_filter, init_dir=None):
# def show_open_files_dialog(label, name_filter, init_dir=None):
# def show_save_file_dialog(label, name_filter, init_dir=None):
# def show_save_to_folder_dialog(label, init_dir=None):
# def show_info_message(parent, title, msg):
# def get_folder_path_from_filepath(file_path):
# def image_to_byte_array(image):
# def byte_array_to_image(byte_array):
# def generate_checkerboard_tile(size, color1, color2):
# def generate_random_color(hue=None, sat=None, val=None):
# def make_directory(root_folder, dir_name):


from PyQt5.QtCore import Qt, pyqtSignal, QRect
from PyQt5.QtGui import QPainter, QColor
from PyQt5.QtWidgets import QWidget, QSizePolicy
from src.helpers import utils

        pointer_x = e.pos().y() - self._scrollOffset

        if self._hoveredItem is not None:

            if e.button() == Qt.RightButton:

                self._item_drag_begin(self._hoveredItem, pointer_x)

            elif e.button() == Qt.LeftButton:

                if self._selectedItem is not None:
                    self._selectedItem.selected = False
                    self._selectedItem = None

                self._selectedItem = self._hoveredItem

                self._hoveredItem.selected = True

                self.selectedItemChanged.emit(self._selectedItem.index)

                self.update()

                #-------------------------------------------------------------------------------

    def mouseReleaseEvent(self, e):

        if e.button() == Qt.RightButton:

            if self._draggedItem is not None:

# Path: src/helpers/utils.py
# def clamp(value, minimum, maximum):
# def enum(*sequential, **named):
# def sign(v):
# def cmp(a, b):
# def snap_ceil(value, increment):
# def snap(value, increment):
# def snap_point(point, increment):
# def create_image(width, height):
# def load_image(file):
# def get_file_extension(file_path):
# def show_open_file_dialog(label, name_filter, init_dir=None):
# def show_open_files_dialog(label, name_filter, init_dir=None):
# def show_save_file_dialog(label, name_filter, init_dir=None):
# def show_save_to_folder_dialog(label, init_dir=None):
# def show_info_message(parent, title, msg):
# def get_folder_path_from_filepath(file_path):
# def image_to_byte_array(image):
# def byte_array_to_image(byte_array):
# def generate_checkerboard_tile(size, color1, color2):
# def generate_random_color(hue=None, sat=None, val=None):
# def make_directory(root_folder, dir_name):


# Path: src/view/draggable_list_base_widget.py
from PyQt5.QtCore import Qt, pyqtSignal, QRect
from PyQt5.QtGui import QPainter, QColor
from PyQt5.QtWidgets import QWidget, QSizePolicy
from src.helpers import utils


        pointer_x = e.pos().y() - self._scrollOffset

        if self._hoveredItem is not None:

            if e.button() == Qt.RightButton:

                self._item_drag_begin(self._hoveredItem, pointer_x)

            elif e.button() == Qt.LeftButton:

                if self._selectedItem is not None:
                    self._selectedItem.selected = False
                    self._selectedItem = None

                self._selectedItem = self._hoveredItem

                self._hoveredItem.selected = True

                self.selectedItemChanged.emit(self._selectedItem.index)

                self.update()

                #-------------------------------------------------------------------------------

    def mouseReleaseEvent(self, e):

        if e.button() == Qt.RightButton:

            if self._draggedItem is not None:

                self._item_drag_end(self._draggedItem)