# 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

            created_unix = self.project_list[researcher][project_name]["created"]
            created_time = datetime.fromtimestamp(created_unix).strftime(
                "%d/%m/%Y @ %H:%M"
            )
            project_path = self.project_list[researcher][project_name]["path"]

            self.projectName.setText(project_name)
            self.researcherValue.setText(researcher)
            self.createdValue.setText(created_time)
            self.dirValue.setText(project_path)

            if os.path.isdir(project_path):
                self.dirValue.setStyleSheet("QLabel {color: black;}")
                self.dirInvalid.setText("")
            else:
                self.dirValue.setStyleSheet("QLabel {color: red;}")
                self.dirInvalid.setText("(Error: invalid path)")

            # Enable buttons and labels
            self.researcherLabel.show()
            self.createdLabel.show()
            self.dirLabel.show()
            self.openButton.setEnabled(True)
            self.deleteButton.setEnabled(True)

    def start(self, event):
        if not os.path.isdir(self.dirValue.text()):
            QtWidgets.QMessageBox.warning(self, "Error", "Invalid project path")
        else:

# 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


            created_unix = self.project_list[researcher][project_name]["created"]
            created_time = datetime.fromtimestamp(created_unix).strftime(
                "%d/%m/%Y @ %H:%M"
            )
            project_path = self.project_list[researcher][project_name]["path"]

            self.projectName.setText(project_name)
            self.researcherValue.setText(researcher)
            self.createdValue.setText(created_time)
            self.dirValue.setText(project_path)

            if os.path.isdir(project_path):
                self.dirValue.setStyleSheet("QLabel {color: black;}")
                self.dirInvalid.setText("")
            else:
                self.dirValue.setStyleSheet("QLabel {color: red;}")
                self.dirInvalid.setText("(Error: invalid path)")

            # Enable buttons and labels
            self.researcherLabel.show()
            self.createdLabel.show()
            self.dirLabel.show()
            self.openButton.setEnabled(True)
            self.deleteButton.setEnabled(True)

    def start(self, event):
        if not os.path.isdir(self.dirValue.text()):
            QtWidgets.QMessageBox.warning(self, "Error", "Invalid project path")
        else:

            self.main_battery = battery_window.BatteryWindow(