# Path: designer/project_window_qt.py
# class Ui_ProjectWindow(object):
#     def setupUi(self, ProjectWindow):
#     def retranslateUi(self, ProjectWindow):
# 
# Path: interface/about_dialog.py
# class AboutDialog(QtWidgets.QDialog, about_dialog_qt.Ui_Dialog):
#     def __init__(self, parent=None):
# 
# Path: interface/battery_window.py
# class BatteryWindow(QtWidgets.QMainWindow, battery_window_qt.Ui_CognitiveBattery):
#     def __init__(self, base_dir, project_dir, res_width, res_height):
#     def set_default_settings(self):
#     def show_documentation(self):
#     def show_license(self):
#     def show_contribute(self):
#     def show_browse_issues(self):
#     def show_new_issue(self):
#     def show_releases(self):
#     def show_settings(self):
#     def show_about(self):
#     def show_update(self):
#     def error_dialog(self, message):
#     def random_order_selected(self):
#     def select_all(self):
#     def deselect_all(self):
#     def move_up(self):
#     def move_down(self):
#     def get_settings(self):
#     def closeEvent(self, event):
#     def start(self):
# 
# Path: interface/project_new_window.py
# class NewProjectWindow(QtWidgets.QDialog, project_new_window_qt.Ui_NewProjectWindow):
#     def __init__(self, base_dir, project_list):
#     def select_file(self):
#     def create_project(self):
# 
# Path: interface/update_dialog.py
# class UpdateDialog(QtWidgets.QDialog, update_dialog_qt.Ui_Dialog):
#     def __init__(self, parent=None):
#     def check_version(self):
#     def show_releases(self):
# 
# Path: utils/values.py
# def get_version():
# def get_links():


import os
import json
from datetime import datetime
from PyQt5 import QtCore, QtGui, QtWidgets
from designer import project_window_qt
from interface import about_dialog, battery_window, project_new_window, update_dialog
from utils import values

class ProjectWindow(QtWidgets.QMainWindow, project_window_qt.Ui_ProjectWindow):
    def __init__(self, base_dir, res_width, res_height):
        super(ProjectWindow, self).__init__()

        # Setup the main window UI
        self.setupUi(self)

        # Set app icon
        self.setWindowIcon(QtGui.QIcon(os.path.join("images", "icon_sml.png")))

        self.github_icon = os.path.join("images", "github_icon.png")
        self.actionDocumentation.setIcon(QtGui.QIcon(self.github_icon))
        self.actionLicense.setIcon(QtGui.QIcon(self.github_icon))
        self.actionContribute.setIcon(QtGui.QIcon(self.github_icon))
        self.actionBrowse_Issues.setIcon(QtGui.QIcon(self.github_icon))
        self.actionReport_Bug.setIcon(QtGui.QIcon(self.github_icon))
        self.actionRequest_Feature.setIcon(QtGui.QIcon(self.github_icon))

        # Keep reference to main battery and new project windows
        self.main_battery = None
        self.new_project_window = None
        self.about = None
        self.update = None

        self.res_width = res_width
        self.res_height = res_height
        self.base_dir = base_dir

        # Define URLs

# Path: designer/project_window_qt.py
# class Ui_ProjectWindow(object):
#     def setupUi(self, ProjectWindow):
#     def retranslateUi(self, ProjectWindow):
# 
# Path: interface/about_dialog.py
# class AboutDialog(QtWidgets.QDialog, about_dialog_qt.Ui_Dialog):
#     def __init__(self, parent=None):
# 
# Path: interface/battery_window.py
# class BatteryWindow(QtWidgets.QMainWindow, battery_window_qt.Ui_CognitiveBattery):
#     def __init__(self, base_dir, project_dir, res_width, res_height):
#     def set_default_settings(self):
#     def show_documentation(self):
#     def show_license(self):
#     def show_contribute(self):
#     def show_browse_issues(self):
#     def show_new_issue(self):
#     def show_releases(self):
#     def show_settings(self):
#     def show_about(self):
#     def show_update(self):
#     def error_dialog(self, message):
#     def random_order_selected(self):
#     def select_all(self):
#     def deselect_all(self):
#     def move_up(self):
#     def move_down(self):
#     def get_settings(self):
#     def closeEvent(self, event):
#     def start(self):
# 
# Path: interface/project_new_window.py
# class NewProjectWindow(QtWidgets.QDialog, project_new_window_qt.Ui_NewProjectWindow):
#     def __init__(self, base_dir, project_list):
#     def select_file(self):
#     def create_project(self):
# 
# Path: interface/update_dialog.py
# class UpdateDialog(QtWidgets.QDialog, update_dialog_qt.Ui_Dialog):
#     def __init__(self, parent=None):
#     def check_version(self):
#     def show_releases(self):
# 
# Path: utils/values.py
# def get_version():
# def get_links():


# Path: interface/project_window.py
import os
import json
from datetime import datetime
from PyQt5 import QtCore, QtGui, QtWidgets
from designer import project_window_qt
from interface import about_dialog, battery_window, project_new_window, update_dialog
from utils import values


class ProjectWindow(QtWidgets.QMainWindow, project_window_qt.Ui_ProjectWindow):
    def __init__(self, base_dir, res_width, res_height):
        super(ProjectWindow, self).__init__()

        # Setup the main window UI
        self.setupUi(self)

        # Set app icon
        self.setWindowIcon(QtGui.QIcon(os.path.join("images", "icon_sml.png")))

        self.github_icon = os.path.join("images", "github_icon.png")
        self.actionDocumentation.setIcon(QtGui.QIcon(self.github_icon))
        self.actionLicense.setIcon(QtGui.QIcon(self.github_icon))
        self.actionContribute.setIcon(QtGui.QIcon(self.github_icon))
        self.actionBrowse_Issues.setIcon(QtGui.QIcon(self.github_icon))
        self.actionReport_Bug.setIcon(QtGui.QIcon(self.github_icon))
        self.actionRequest_Feature.setIcon(QtGui.QIcon(self.github_icon))

        # Keep reference to main battery and new project windows
        self.main_battery = None
        self.new_project_window = None
        self.about = None
        self.update = None

        self.res_width = res_width
        self.res_height = res_height
        self.base_dir = base_dir

        # Define URLs

        self.links = values.get_links()