jadio-code 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jadio_code/Backend/main/code_aigent/aigent_bottombox_core.py +0 -0
- jadio_code/Backend/main/code_aigent/aigent_chatwindow_core.py +0 -0
- jadio_code/Backend/main/code_aigent/aigent_core.py +0 -0
- jadio_code/Backend/main/code_aigent/aigent_sidebar_core.py +0 -0
- jadio_code/Backend/main/code_aigent/aigent_terminal_core.py +0 -0
- jadio_code/Backend/main/code_aigent/aigent_topbox_core.py +0 -0
- jadio_code/Backend/main/editor/editor_core.py +0 -0
- jadio_code/Backend/main/explorer/exploer_sidebar_core.py +0 -0
- jadio_code/Backend/main/explorer/explorer_core.py +0 -0
- jadio_code/Backend/main/terminal/terminal_core.py +0 -0
- jadio_code/Backend/sub/code_doctor/code_doctor_core.py +0 -0
- jadio_code/Backend/sub/help/help_core.py +0 -0
- jadio_code/Backend/sub/lan/lan_core.py +0 -0
- jadio_code/Backend/sub/llm/llm_core.py +0 -0
- jadio_code/Backend/sub/plugins/plugins_core.py +0 -0
- jadio_code/Backend/sub/settings/settings_core.py +0 -0
- jadio_code/UI/__init__.py +0 -0
- jadio_code/UI/icons/bell.svg +4 -0
- jadio_code/UI/icons/bolt.svg +3 -0
- jadio_code/UI/icons/check.svg +3 -0
- jadio_code/UI/icons/clipboard.svg +4 -0
- jadio_code/UI/icons/clock.svg +5 -0
- jadio_code/UI/icons/cloud.svg +3 -0
- jadio_code/UI/icons/down.svg +3 -0
- jadio_code/UI/icons/download.svg +5 -0
- jadio_code/UI/icons/explorer.svg +4 -0
- jadio_code/UI/icons/eye.svg +4 -0
- jadio_code/UI/icons/folder.svg +3 -0
- jadio_code/UI/icons/folder2.svg +4 -0
- jadio_code/UI/icons/glass.svg +4 -0
- jadio_code/UI/icons/globe.svg +5 -0
- jadio_code/UI/icons/grid.svg +5 -0
- jadio_code/UI/icons/idk.svg +4 -0
- jadio_code/UI/icons/info.svg +5 -0
- jadio_code/UI/icons/left.svg +3 -0
- jadio_code/UI/icons/lock.svg +5 -0
- jadio_code/UI/icons/lock2.svg +5 -0
- jadio_code/UI/icons/message.svg +4 -0
- jadio_code/UI/icons/net.svg +12 -0
- jadio_code/UI/icons/pencil.svg +4 -0
- jadio_code/UI/icons/play.svg +4 -0
- jadio_code/UI/icons/plus.svg +8 -0
- jadio_code/UI/icons/right.svg +3 -0
- jadio_code/UI/icons/robot.svg +6 -0
- jadio_code/UI/icons/split.svg +4 -0
- jadio_code/UI/icons/star.svg +3 -0
- jadio_code/UI/icons/stop.svg +4 -0
- jadio_code/UI/icons/tabs.svg +5 -0
- jadio_code/UI/icons/terminal.svg +5 -0
- jadio_code/UI/icons/up.svg +3 -0
- jadio_code/UI/icons/upload.svg +5 -0
- jadio_code/UI/icons/user.svg +4 -0
- jadio_code/UI/icons/warning.svg +5 -0
- jadio_code/UI/icons/x.svg +4 -0
- jadio_code/UI/main.py +101 -0
- jadio_code/UI/mainwindows/__init__.py +0 -0
- jadio_code/UI/mainwindows/code_aigent/__init__.py +0 -0
- jadio_code/UI/mainwindows/code_aigent/aigent_controller.py +114 -0
- jadio_code/UI/mainwindows/code_aigent/aigent_menu.py +91 -0
- jadio_code/UI/mainwindows/code_aigent/aigent_sidebar.py +59 -0
- jadio_code/UI/mainwindows/code_aigent/aigentvision.md +315 -0
- jadio_code/UI/mainwindows/code_aigent/bottombox/__init__.py +0 -0
- jadio_code/UI/mainwindows/code_aigent/bottombox/bottombox_chat.py +9 -0
- jadio_code/UI/mainwindows/code_aigent/bottombox/bottombox_context.py +9 -0
- jadio_code/UI/mainwindows/code_aigent/bottombox/bottombox_controller.py +176 -0
- jadio_code/UI/mainwindows/code_aigent/bottombox/bottombox_settings.py +9 -0
- jadio_code/UI/mainwindows/code_aigent/bottombox/bottombox_terminal.py +11 -0
- jadio_code/UI/mainwindows/code_aigent/chatwindow/__init__.py +0 -0
- jadio_code/UI/mainwindows/code_aigent/chatwindow/aigent_chat_controller.py +28 -0
- jadio_code/UI/mainwindows/code_aigent/chatwindow/aigent_summary.py +9 -0
- jadio_code/UI/mainwindows/code_aigent/topbox/__init__.py +0 -0
- jadio_code/UI/mainwindows/code_aigent/topbox/topbox_context.py +9 -0
- jadio_code/UI/mainwindows/code_aigent/topbox/topbox_controller.py +93 -0
- jadio_code/UI/mainwindows/code_aigent/topbox/topbox_lan.py +9 -0
- jadio_code/UI/mainwindows/code_aigent/topbox/topbox_modelsettings.py +9 -0
- jadio_code/UI/mainwindows/code_aigent/topbox/topbox_tools.py +9 -0
- jadio_code/UI/mainwindows/editor/__init__.py +0 -0
- jadio_code/UI/mainwindows/editor/editor_code.py +14 -0
- jadio_code/UI/mainwindows/editor/editor_controller.py +28 -0
- jadio_code/UI/mainwindows/editor/editor_tabs.py +17 -0
- jadio_code/UI/mainwindows/editor/editor_topmenu.py +30 -0
- jadio_code/UI/mainwindows/explorer/__init__.py +0 -0
- jadio_code/UI/mainwindows/explorer/explorer_controller.py +62 -0
- jadio_code/UI/mainwindows/explorer/explorer_menu.py +91 -0
- jadio_code/UI/mainwindows/explorer/explorer_sidebar.py +57 -0
- jadio_code/UI/mainwindows/terminal/__init__.py +0 -0
- jadio_code/UI/mainwindows/terminal/terminal_controller.py +73 -0
- jadio_code/UI/mainwindows/terminal/terminal_menu.py +31 -0
- jadio_code/UI/mainwindows/terminal/terminal_shells.py +18 -0
- jadio_code/UI/mainwindows/terminal/terminal_window.py +15 -0
- jadio_code/UI/menubar.py +100 -0
- jadio_code/UI/styles.py +304 -0
- jadio_code/UI/submodules/__init__.py +0 -0
- jadio_code/UI/submodules/help/__init__.py +0 -0
- jadio_code/UI/submodules/help/help_backend.py +0 -0
- jadio_code/UI/submodules/help/help_window.py +0 -0
- jadio_code/UI/submodules/llm/__init__.py +0 -0
- jadio_code/UI/submodules/llm/llm_backend.py +0 -0
- jadio_code/UI/submodules/llm/llm_window.py +0 -0
- jadio_code/UI/submodules/settings/__init__.py +0 -0
- jadio_code/UI/submodules/settings/settings_backend.py +0 -0
- jadio_code/UI/submodules/settings/settings_window.py +0 -0
- jadio_code/__init__.py +2 -0
- jadio_code-0.0.1.dist-info/METADATA +201 -0
- jadio_code-0.0.1.dist-info/RECORD +108 -0
- jadio_code-0.0.1.dist-info/WHEEL +4 -0
- jadio_code-0.0.1.dist-info/entry_points.txt +2 -0
- jadio_code-0.0.1.dist-info/licenses/license.md +0 -0
@@ -0,0 +1,93 @@
|
|
1
|
+
from PyQt6.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QStackedWidget
|
2
|
+
from .topbox_modelsettings import TopboxModelSettings
|
3
|
+
from .topbox_lan import TopboxLan
|
4
|
+
from .topbox_tools import TopboxTools
|
5
|
+
from .topbox_context import TopboxContext
|
6
|
+
|
7
|
+
|
8
|
+
class TopBox(QWidget):
|
9
|
+
"""
|
10
|
+
The TopBox with emoji buttons and proper width
|
11
|
+
"""
|
12
|
+
|
13
|
+
def __init__(self, parent=None):
|
14
|
+
super().__init__(parent)
|
15
|
+
|
16
|
+
# Overall vertical layout
|
17
|
+
layout = QVBoxLayout()
|
18
|
+
layout.setContentsMargins(0, 0, 0, 0)
|
19
|
+
layout.setSpacing(0)
|
20
|
+
|
21
|
+
# -------------------------------
|
22
|
+
# 1️⃣ Button bar (tab selector) with emojis
|
23
|
+
# -------------------------------
|
24
|
+
button_bar = QHBoxLayout()
|
25
|
+
button_bar.setContentsMargins(4, 4, 4, 4)
|
26
|
+
button_bar.setSpacing(4)
|
27
|
+
|
28
|
+
self.buttons = []
|
29
|
+
|
30
|
+
# Emoji buttons instead of text
|
31
|
+
sections = [
|
32
|
+
("🤖", 0), # AI Model Settings
|
33
|
+
("🌐", 1), # LAN Settings
|
34
|
+
("🔧", 2), # Tools
|
35
|
+
("📄", 3) # Context
|
36
|
+
]
|
37
|
+
|
38
|
+
for emoji, index in sections:
|
39
|
+
btn = QPushButton(emoji)
|
40
|
+
btn.setCheckable(True)
|
41
|
+
btn.setStyleSheet("""
|
42
|
+
QPushButton {
|
43
|
+
background-color: #444;
|
44
|
+
color: white;
|
45
|
+
border: none;
|
46
|
+
padding: 8px 12px;
|
47
|
+
border-radius: 4px;
|
48
|
+
font-size: 16px;
|
49
|
+
min-width: 40px;
|
50
|
+
max-width: 50px;
|
51
|
+
}
|
52
|
+
QPushButton:checked {
|
53
|
+
background-color: #007acc;
|
54
|
+
}
|
55
|
+
QPushButton:hover {
|
56
|
+
background-color: #555;
|
57
|
+
}
|
58
|
+
QPushButton:checked:hover {
|
59
|
+
background-color: #1177bb;
|
60
|
+
}
|
61
|
+
""")
|
62
|
+
btn.clicked.connect(lambda checked, i=index: self.show_panel(i))
|
63
|
+
button_bar.addWidget(btn)
|
64
|
+
self.buttons.append(btn)
|
65
|
+
|
66
|
+
# Don't stretch - keep buttons compact
|
67
|
+
button_bar.addStretch()
|
68
|
+
|
69
|
+
# -------------------------------
|
70
|
+
# 2️⃣ Stacked widget for panels
|
71
|
+
# -------------------------------
|
72
|
+
self.stack = QStackedWidget()
|
73
|
+
self.stack.addWidget(TopboxModelSettings())
|
74
|
+
self.stack.addWidget(TopboxLan())
|
75
|
+
self.stack.addWidget(TopboxTools())
|
76
|
+
self.stack.addWidget(TopboxContext())
|
77
|
+
|
78
|
+
# Default selection
|
79
|
+
self.buttons[0].setChecked(True)
|
80
|
+
self.stack.setCurrentIndex(0)
|
81
|
+
|
82
|
+
# Add to main layout
|
83
|
+
layout.addLayout(button_bar)
|
84
|
+
layout.addWidget(self.stack)
|
85
|
+
|
86
|
+
self.setLayout(layout)
|
87
|
+
|
88
|
+
def show_panel(self, index):
|
89
|
+
# Update stacked widget
|
90
|
+
self.stack.setCurrentIndex(index)
|
91
|
+
# Update button states
|
92
|
+
for i, btn in enumerate(self.buttons):
|
93
|
+
btn.setChecked(i == index)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
from PyQt6.QtWidgets import QWidget, QLabel, QVBoxLayout
|
2
|
+
|
3
|
+
class TopboxModelSettings(QWidget):
|
4
|
+
def __init__(self, parent=None):
|
5
|
+
super().__init__(parent)
|
6
|
+
layout = QVBoxLayout()
|
7
|
+
label = QLabel("AI Model Settings Panel")
|
8
|
+
layout.addWidget(label)
|
9
|
+
self.setLayout(layout)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
from PyQt6.QtWidgets import QWidget, QLabel, QVBoxLayout
|
2
|
+
|
3
|
+
class TopboxTools(QWidget):
|
4
|
+
def __init__(self, parent=None):
|
5
|
+
super().__init__(parent)
|
6
|
+
layout = QVBoxLayout()
|
7
|
+
label = QLabel("AI Tool Set Panel")
|
8
|
+
layout.addWidget(label)
|
9
|
+
self.setLayout(layout)
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from PyQt6.QtWidgets import QPlainTextEdit
|
2
|
+
|
3
|
+
class EditorCode(QPlainTextEdit):
|
4
|
+
def __init__(self, parent=None):
|
5
|
+
super().__init__(parent)
|
6
|
+
|
7
|
+
# Example placeholder text
|
8
|
+
self.setPlainText("# Welcome to JADIO CODE Editor\n\nStart coding here...")
|
9
|
+
|
10
|
+
# Monospaced font can be added later
|
11
|
+
# self.setFont(QFont("Courier New", 10))
|
12
|
+
|
13
|
+
# Enable line wrap / off
|
14
|
+
self.setLineWrapMode(QPlainTextEdit.LineWrapMode.NoWrap)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
from PyQt6.QtWidgets import QWidget, QVBoxLayout
|
2
|
+
from .editor_topmenu import EditorTopMenu
|
3
|
+
from .editor_tabs import EditorTabs
|
4
|
+
from .editor_code import EditorCode
|
5
|
+
|
6
|
+
class EditorController(QWidget):
|
7
|
+
def __init__(self, parent=None):
|
8
|
+
super().__init__(parent)
|
9
|
+
|
10
|
+
# Layout manager for the whole editor
|
11
|
+
layout = QVBoxLayout()
|
12
|
+
layout.setContentsMargins(0, 0, 0, 0)
|
13
|
+
layout.setSpacing(0)
|
14
|
+
|
15
|
+
# 1. Top menu bar FIRST (above tabs)
|
16
|
+
self.topmenu = EditorTopMenu()
|
17
|
+
layout.addWidget(self.topmenu)
|
18
|
+
|
19
|
+
# 2. Tabs SECOND (below menu)
|
20
|
+
self.tabs = EditorTabs()
|
21
|
+
layout.addWidget(self.tabs)
|
22
|
+
|
23
|
+
# 3. Actual code editing area
|
24
|
+
self.code_area = EditorCode()
|
25
|
+
layout.addWidget(self.code_area, stretch=1) # Fills most space
|
26
|
+
|
27
|
+
# Apply layout
|
28
|
+
self.setLayout(layout)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
from PyQt6.QtWidgets import QTabBar
|
2
|
+
|
3
|
+
class EditorTabs(QTabBar):
|
4
|
+
def __init__(self, parent=None):
|
5
|
+
super().__init__(parent)
|
6
|
+
|
7
|
+
# Initial tab for demonstration
|
8
|
+
self.addTab("Welcome")
|
9
|
+
self.addTab("Untitled 1")
|
10
|
+
|
11
|
+
# Set movable tabs
|
12
|
+
self.setMovable(True)
|
13
|
+
|
14
|
+
# Close buttons on tabs
|
15
|
+
self.setTabsClosable(True)
|
16
|
+
|
17
|
+
# Signals can be connected later in controller
|
@@ -0,0 +1,30 @@
|
|
1
|
+
from PyQt6.QtWidgets import QWidget, QHBoxLayout, QPushButton
|
2
|
+
from styles import Styles
|
3
|
+
|
4
|
+
class EditorTopMenu(QWidget):
|
5
|
+
def __init__(self, parent=None):
|
6
|
+
super().__init__(parent)
|
7
|
+
|
8
|
+
# Apply centralized menu bar styles
|
9
|
+
self.setStyleSheet(Styles.get_menu_bar_style())
|
10
|
+
|
11
|
+
layout = QHBoxLayout()
|
12
|
+
layout.setContentsMargins(4, 4, 4, 4)
|
13
|
+
layout.setSpacing(4)
|
14
|
+
|
15
|
+
# Emoji buttons instead of text
|
16
|
+
buttons_config = [
|
17
|
+
("❌", "Close Tab"),
|
18
|
+
("⚡", "Split View"),
|
19
|
+
("▶️", "Run"),
|
20
|
+
("✨", "Format")
|
21
|
+
]
|
22
|
+
|
23
|
+
for emoji, tooltip in buttons_config:
|
24
|
+
btn = QPushButton(emoji)
|
25
|
+
btn.setToolTip(tooltip)
|
26
|
+
layout.addWidget(btn)
|
27
|
+
|
28
|
+
# Stretch to fill right side
|
29
|
+
layout.addStretch()
|
30
|
+
self.setLayout(layout)
|
File without changes
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import os
|
2
|
+
from PyQt6.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QTreeView
|
3
|
+
from PyQt6.QtGui import QFileSystemModel
|
4
|
+
from PyQt6.QtCore import QModelIndex, Qt
|
5
|
+
from .explorer_sidebar import ExplorerSidebar
|
6
|
+
from .explorer_menu import ExplorerMenu
|
7
|
+
from styles import Styles
|
8
|
+
|
9
|
+
class ExplorerController(QWidget):
|
10
|
+
def __init__(self, parent=None):
|
11
|
+
super().__init__(parent)
|
12
|
+
|
13
|
+
# Main horizontal layout: sidebar + content
|
14
|
+
main_layout = QHBoxLayout()
|
15
|
+
main_layout.setContentsMargins(0, 0, 0, 0)
|
16
|
+
main_layout.setSpacing(0)
|
17
|
+
|
18
|
+
# LEFT: Vertical button sidebar
|
19
|
+
self.sidebar = ExplorerSidebar()
|
20
|
+
main_layout.addWidget(self.sidebar)
|
21
|
+
|
22
|
+
# RIGHT: Menu + Explorer
|
23
|
+
content = QWidget()
|
24
|
+
content_layout = QVBoxLayout()
|
25
|
+
content_layout.setContentsMargins(0, 0, 0, 0)
|
26
|
+
content_layout.setSpacing(0)
|
27
|
+
|
28
|
+
# TOP: Horizontal menu
|
29
|
+
self.menu = ExplorerMenu()
|
30
|
+
content_layout.addWidget(self.menu)
|
31
|
+
|
32
|
+
# BOTTOM: File tree with centralized styles
|
33
|
+
self.file_tree = QTreeView()
|
34
|
+
# Apply centralized tree and scrollbar styles
|
35
|
+
self.file_tree.setStyleSheet(f"""
|
36
|
+
{Styles.TREE_STYLE}
|
37
|
+
{Styles.SCROLLBAR_STYLE}
|
38
|
+
""")
|
39
|
+
|
40
|
+
# File system model
|
41
|
+
self.model = QFileSystemModel()
|
42
|
+
self.model.setRootPath(os.path.expanduser("~"))
|
43
|
+
self.file_tree.setModel(self.model)
|
44
|
+
self.file_tree.setRootIndex(self.model.index(os.path.expanduser("~")))
|
45
|
+
self.file_tree.setHeaderHidden(True)
|
46
|
+
self.file_tree.setAnimated(True)
|
47
|
+
self.file_tree.setIndentation(16)
|
48
|
+
self.file_tree.setSortingEnabled(True)
|
49
|
+
|
50
|
+
# DISABLE HORIZONTAL SCROLLBAR - only show filenames
|
51
|
+
self.file_tree.setHorizontalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
|
52
|
+
self.file_tree.setVerticalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAsNeeded)
|
53
|
+
|
54
|
+
# Hide all columns except the first (Name column)
|
55
|
+
for i in range(1, self.model.columnCount()):
|
56
|
+
self.file_tree.hideColumn(i)
|
57
|
+
|
58
|
+
content_layout.addWidget(self.file_tree, stretch=1)
|
59
|
+
content.setLayout(content_layout)
|
60
|
+
main_layout.addWidget(content, stretch=1)
|
61
|
+
|
62
|
+
self.setLayout(main_layout)
|
@@ -0,0 +1,91 @@
|
|
1
|
+
from PyQt6.QtWidgets import QWidget, QHBoxLayout, QPushButton
|
2
|
+
from PyQt6.QtCore import Qt
|
3
|
+
from styles import Styles
|
4
|
+
|
5
|
+
class ExplorerMenu(QWidget):
|
6
|
+
"""
|
7
|
+
Collapsible horizontal menu for Explorer
|
8
|
+
"""
|
9
|
+
|
10
|
+
def __init__(self, parent=None):
|
11
|
+
super().__init__(parent)
|
12
|
+
|
13
|
+
# Set fixed height and apply centralized styles
|
14
|
+
self.setFixedHeight(40)
|
15
|
+
self.setStyleSheet(Styles.get_menu_bar_style())
|
16
|
+
|
17
|
+
# Initially collapsed state
|
18
|
+
self.expanded = False
|
19
|
+
layout = QHBoxLayout()
|
20
|
+
layout.setContentsMargins(4, 4, 4, 4)
|
21
|
+
layout.setSpacing(2)
|
22
|
+
self.create_collapsed_layout(layout)
|
23
|
+
self.setLayout(layout)
|
24
|
+
|
25
|
+
def create_collapsed_layout(self, layout):
|
26
|
+
"""Create the collapsed state with just the main toggle button"""
|
27
|
+
self.clear_layout(layout)
|
28
|
+
|
29
|
+
# Main toggle button
|
30
|
+
self.toggle_button = QPushButton("📁 ▼")
|
31
|
+
self.toggle_button.clicked.connect(self.toggle_menu)
|
32
|
+
layout.addWidget(self.toggle_button)
|
33
|
+
layout.addStretch()
|
34
|
+
|
35
|
+
def create_expanded_layout(self, layout):
|
36
|
+
"""Create the expanded state with all buttons"""
|
37
|
+
self.clear_layout(layout)
|
38
|
+
|
39
|
+
# Toggle button (now shows up arrow)
|
40
|
+
self.toggle_button = QPushButton("📁 ▲")
|
41
|
+
self.toggle_button.clicked.connect(self.toggle_menu)
|
42
|
+
layout.addWidget(self.toggle_button)
|
43
|
+
|
44
|
+
# All the explorer action buttons
|
45
|
+
buttons_config = [
|
46
|
+
("📄", self.new_file),
|
47
|
+
("📁", self.new_folder),
|
48
|
+
("🔄", self.refresh),
|
49
|
+
("📂", self.collapse_all),
|
50
|
+
("⚙️", self.settings)
|
51
|
+
]
|
52
|
+
|
53
|
+
for emoji, handler in buttons_config:
|
54
|
+
btn = QPushButton(emoji)
|
55
|
+
btn.clicked.connect(handler)
|
56
|
+
layout.addWidget(btn)
|
57
|
+
|
58
|
+
layout.addStretch()
|
59
|
+
|
60
|
+
def toggle_menu(self):
|
61
|
+
"""Toggle between collapsed and expanded states"""
|
62
|
+
self.expanded = not self.expanded
|
63
|
+
layout = self.layout()
|
64
|
+
|
65
|
+
if self.expanded:
|
66
|
+
self.create_expanded_layout(layout)
|
67
|
+
else:
|
68
|
+
self.create_collapsed_layout(layout)
|
69
|
+
|
70
|
+
def clear_layout(self, layout):
|
71
|
+
"""Clear all widgets from layout"""
|
72
|
+
while layout.count():
|
73
|
+
child = layout.takeAt(0)
|
74
|
+
if child.widget():
|
75
|
+
child.widget().deleteLater()
|
76
|
+
|
77
|
+
# Button handlers
|
78
|
+
def new_file(self):
|
79
|
+
print("New File clicked")
|
80
|
+
|
81
|
+
def new_folder(self):
|
82
|
+
print("New Folder clicked")
|
83
|
+
|
84
|
+
def refresh(self):
|
85
|
+
print("Refresh clicked")
|
86
|
+
|
87
|
+
def collapse_all(self):
|
88
|
+
print("Collapse All clicked")
|
89
|
+
|
90
|
+
def settings(self):
|
91
|
+
print("Settings clicked")
|
@@ -0,0 +1,57 @@
|
|
1
|
+
from PyQt6.QtWidgets import QWidget, QVBoxLayout, QPushButton
|
2
|
+
from styles import Styles
|
3
|
+
|
4
|
+
class ExplorerSidebar(QWidget):
|
5
|
+
"""
|
6
|
+
Vertical button sidebar for Explorer - left side
|
7
|
+
"""
|
8
|
+
|
9
|
+
def __init__(self, parent=None):
|
10
|
+
super().__init__(parent)
|
11
|
+
|
12
|
+
# Apply centralized sidebar styles
|
13
|
+
self.setStyleSheet(Styles.get_sidebar_style())
|
14
|
+
|
15
|
+
# Fixed width like AIGent sidebar
|
16
|
+
self.setFixedWidth(48)
|
17
|
+
|
18
|
+
# Vertical layout for buttons
|
19
|
+
layout = QVBoxLayout()
|
20
|
+
layout.setContentsMargins(0, 8, 0, 8)
|
21
|
+
layout.setSpacing(8)
|
22
|
+
|
23
|
+
# Vertical buttons
|
24
|
+
buttons_config = [
|
25
|
+
("📁", "Files"),
|
26
|
+
("🔍", "Search"),
|
27
|
+
("🌿", "Git"),
|
28
|
+
("🐛", "Debug"),
|
29
|
+
("📦", "Extensions")
|
30
|
+
]
|
31
|
+
|
32
|
+
self.buttons = []
|
33
|
+
for icon, tooltip in buttons_config:
|
34
|
+
btn = QPushButton(icon)
|
35
|
+
btn.setCheckable(True)
|
36
|
+
btn.setToolTip(tooltip)
|
37
|
+
btn.clicked.connect(lambda checked, t=tooltip: self.handle_button_click(t))
|
38
|
+
layout.addWidget(btn)
|
39
|
+
self.buttons.append(btn)
|
40
|
+
|
41
|
+
# Stretch to keep them top-aligned
|
42
|
+
layout.addStretch()
|
43
|
+
|
44
|
+
self.setLayout(layout)
|
45
|
+
|
46
|
+
# Default: first button selected
|
47
|
+
if self.buttons:
|
48
|
+
self.buttons[0].setChecked(True)
|
49
|
+
|
50
|
+
def handle_button_click(self, button_name):
|
51
|
+
"""Handle button clicks"""
|
52
|
+
print(f"Explorer sidebar: {button_name} clicked")
|
53
|
+
|
54
|
+
# Update button states (only one can be checked)
|
55
|
+
sender = self.sender()
|
56
|
+
for btn in self.buttons:
|
57
|
+
btn.setChecked(btn == sender)
|
File without changes
|
@@ -0,0 +1,73 @@
|
|
1
|
+
from PyQt6.QtWidgets import QWidget, QVBoxLayout, QSplitter
|
2
|
+
from PyQt6.QtCore import Qt
|
3
|
+
from .terminal_menu import TerminalMenu
|
4
|
+
from .terminal_window import TerminalWindow
|
5
|
+
from .terminal_shells import TerminalShells
|
6
|
+
|
7
|
+
class TerminalController(QWidget):
|
8
|
+
def __init__(self, parent=None):
|
9
|
+
super().__init__(parent)
|
10
|
+
|
11
|
+
# FUTURISTIC BLACK & RED TERMINAL STYLING
|
12
|
+
self.setStyleSheet("""
|
13
|
+
QWidget {
|
14
|
+
background-color: #050505;
|
15
|
+
color: #e0e0e0;
|
16
|
+
}
|
17
|
+
QSplitter::handle {
|
18
|
+
background-color: #ff0040;
|
19
|
+
width: 2px;
|
20
|
+
}
|
21
|
+
QSplitter::handle:hover {
|
22
|
+
background-color: #ff3366;
|
23
|
+
box-shadow: 0 0 6px rgba(255, 0, 64, 0.5);
|
24
|
+
}
|
25
|
+
""")
|
26
|
+
|
27
|
+
# Overall vertical layout
|
28
|
+
layout = QVBoxLayout()
|
29
|
+
layout.setContentsMargins(0, 0, 0, 0)
|
30
|
+
layout.setSpacing(0)
|
31
|
+
|
32
|
+
# Top bar - FIXED 40px HEIGHT
|
33
|
+
self.menu = TerminalMenu()
|
34
|
+
self.menu.setFixedHeight(40)
|
35
|
+
layout.addWidget(self.menu)
|
36
|
+
|
37
|
+
# Splitter for CLI and shell list
|
38
|
+
splitter = QSplitter(Qt.Orientation.Horizontal)
|
39
|
+
splitter.setStyleSheet("""
|
40
|
+
QSplitter::handle {
|
41
|
+
background-color: #ff0040;
|
42
|
+
width: 2px;
|
43
|
+
}
|
44
|
+
QSplitter::handle:hover {
|
45
|
+
background-color: #ff3366;
|
46
|
+
box-shadow: 0 0 6px rgba(255, 0, 64, 0.5);
|
47
|
+
}
|
48
|
+
""")
|
49
|
+
|
50
|
+
# Terminal window (main area)
|
51
|
+
self.window = TerminalWindow()
|
52
|
+
self.window.setStyleSheet("""
|
53
|
+
QWidget {
|
54
|
+
background-color: #080808;
|
55
|
+
border: 1px solid #333333;
|
56
|
+
}
|
57
|
+
""")
|
58
|
+
|
59
|
+
# Shell list (right sidebar)
|
60
|
+
self.shells = TerminalShells()
|
61
|
+
self.shells.setStyleSheet("""
|
62
|
+
QWidget {
|
63
|
+
background-color: #0a0a0a;
|
64
|
+
border-left: 1px solid #333333;
|
65
|
+
}
|
66
|
+
""")
|
67
|
+
|
68
|
+
splitter.addWidget(self.window)
|
69
|
+
splitter.addWidget(self.shells)
|
70
|
+
splitter.setSizes([800, 200])
|
71
|
+
|
72
|
+
layout.addWidget(splitter)
|
73
|
+
self.setLayout(layout)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
from PyQt6.QtWidgets import QWidget, QHBoxLayout, QPushButton
|
2
|
+
from styles import Styles
|
3
|
+
|
4
|
+
class TerminalMenu(QWidget):
|
5
|
+
def __init__(self, parent=None):
|
6
|
+
super().__init__(parent)
|
7
|
+
|
8
|
+
# Apply centralized menu bar styles
|
9
|
+
self.setStyleSheet(Styles.get_menu_bar_style())
|
10
|
+
|
11
|
+
layout = QHBoxLayout()
|
12
|
+
layout.setContentsMargins(8, 4, 8, 4)
|
13
|
+
layout.setSpacing(6)
|
14
|
+
|
15
|
+
# Clean emoji buttons - NO BOXES, professional styling
|
16
|
+
buttons_config = [
|
17
|
+
("➕", "New Shell"),
|
18
|
+
("❌", "Kill Shell"),
|
19
|
+
("🧹", "Clear"),
|
20
|
+
("🔒", "Scroll Lock"),
|
21
|
+
("⚡", "Split"),
|
22
|
+
("⚙️", "Settings")
|
23
|
+
]
|
24
|
+
|
25
|
+
for emoji, tooltip in buttons_config:
|
26
|
+
btn = QPushButton(emoji)
|
27
|
+
btn.setToolTip(tooltip)
|
28
|
+
layout.addWidget(btn)
|
29
|
+
|
30
|
+
layout.addStretch()
|
31
|
+
self.setLayout(layout)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
from PyQt6.QtWidgets import QWidget, QVBoxLayout, QPushButton
|
2
|
+
|
3
|
+
class TerminalShells(QWidget):
|
4
|
+
def __init__(self, parent=None):
|
5
|
+
super().__init__(parent)
|
6
|
+
|
7
|
+
layout = QVBoxLayout()
|
8
|
+
layout.setContentsMargins(2, 2, 2, 2)
|
9
|
+
layout.setSpacing(4)
|
10
|
+
|
11
|
+
# Example hard-coded shell list for now
|
12
|
+
layout.addWidget(QPushButton("Shell 1"))
|
13
|
+
layout.addWidget(QPushButton("Shell 2"))
|
14
|
+
layout.addWidget(QPushButton("Shell 3"))
|
15
|
+
|
16
|
+
layout.addStretch()
|
17
|
+
|
18
|
+
self.setLayout(layout)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
from PyQt6.QtWidgets import QPlainTextEdit
|
2
|
+
|
3
|
+
class TerminalWindow(QPlainTextEdit):
|
4
|
+
def __init__(self, parent=None):
|
5
|
+
super().__init__(parent)
|
6
|
+
|
7
|
+
# Placeholder initial text
|
8
|
+
self.setPlainText(
|
9
|
+
"Welcome to JADIO Terminal\n\n> _"
|
10
|
+
)
|
11
|
+
|
12
|
+
# Disable line wrap for real terminal feel
|
13
|
+
self.setLineWrapMode(QPlainTextEdit.LineWrapMode.NoWrap)
|
14
|
+
|
15
|
+
# Later you can hook this up to read/write subprocess output
|
jadio_code/UI/menubar.py
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
from PyQt6.QtWidgets import QMenuBar, QMenu, QLineEdit, QWidgetAction
|
2
|
+
from PyQt6.QtGui import QAction
|
3
|
+
|
4
|
+
class MenuBar(QMenuBar):
|
5
|
+
def __init__(self, parent=None):
|
6
|
+
super().__init__(parent)
|
7
|
+
|
8
|
+
# FUTURISTIC BLACK & RED MENUBAR STYLING
|
9
|
+
self.setStyleSheet("""
|
10
|
+
QMenuBar {
|
11
|
+
background-color: #0a0a0a;
|
12
|
+
color: #e0e0e0;
|
13
|
+
border-bottom: 2px solid #ff0040;
|
14
|
+
padding: 4px;
|
15
|
+
font-size: 14px;
|
16
|
+
font-weight: 500;
|
17
|
+
}
|
18
|
+
QMenuBar::item {
|
19
|
+
background-color: transparent;
|
20
|
+
padding: 8px 12px;
|
21
|
+
margin: 2px;
|
22
|
+
border-radius: 2px;
|
23
|
+
}
|
24
|
+
QMenuBar::item:selected {
|
25
|
+
background-color: rgba(255, 0, 64, 0.15);
|
26
|
+
color: #ff3366;
|
27
|
+
}
|
28
|
+
QMenuBar::item:pressed {
|
29
|
+
background-color: rgba(255, 0, 64, 0.25);
|
30
|
+
color: #ff6680;
|
31
|
+
}
|
32
|
+
|
33
|
+
QMenu {
|
34
|
+
background-color: #111111;
|
35
|
+
color: #e0e0e0;
|
36
|
+
border: 1px solid #ff0040;
|
37
|
+
padding: 6px;
|
38
|
+
font-size: 13px;
|
39
|
+
}
|
40
|
+
QMenu::item {
|
41
|
+
padding: 8px 16px;
|
42
|
+
margin: 1px;
|
43
|
+
border-radius: 2px;
|
44
|
+
min-width: 120px;
|
45
|
+
}
|
46
|
+
QMenu::item:selected {
|
47
|
+
background-color: rgba(255, 0, 64, 0.2);
|
48
|
+
color: #ff3366;
|
49
|
+
}
|
50
|
+
QMenu::separator {
|
51
|
+
height: 1px;
|
52
|
+
background-color: #333333;
|
53
|
+
margin: 4px 8px;
|
54
|
+
}
|
55
|
+
|
56
|
+
QLineEdit {
|
57
|
+
background-color: #121212;
|
58
|
+
border: 1px solid #333333;
|
59
|
+
color: #e0e0e0;
|
60
|
+
padding: 6px 12px;
|
61
|
+
border-radius: 3px;
|
62
|
+
min-width: 200px;
|
63
|
+
font-size: 13px;
|
64
|
+
}
|
65
|
+
QLineEdit:focus {
|
66
|
+
border: 1px solid #ff0040;
|
67
|
+
background-color: #1a1a1a;
|
68
|
+
box-shadow: 0 0 6px rgba(255, 0, 64, 0.3);
|
69
|
+
}
|
70
|
+
QLineEdit::placeholder {
|
71
|
+
color: #777777;
|
72
|
+
}
|
73
|
+
""")
|
74
|
+
|
75
|
+
# Professional menu structure
|
76
|
+
top_menus = [
|
77
|
+
"File", "Edit", "Selection", "LAN", "LLM",
|
78
|
+
"JADIONET", "Code Doctor", "Plugins", "Settings", "Help"
|
79
|
+
]
|
80
|
+
|
81
|
+
for menu_name in top_menus:
|
82
|
+
menu = QMenu(menu_name, self)
|
83
|
+
# Add professional menu items with separators
|
84
|
+
for i in range(1, 11):
|
85
|
+
action = QAction(f"{menu_name} Option {i}", self)
|
86
|
+
action.triggered.connect(lambda checked, name=menu_name, idx=i: print(f"Selected: {name} Option {idx}"))
|
87
|
+
menu.addAction(action)
|
88
|
+
|
89
|
+
# Add separators for better organization
|
90
|
+
if i == 3 or i == 7:
|
91
|
+
menu.addSeparator()
|
92
|
+
|
93
|
+
self.addMenu(menu)
|
94
|
+
|
95
|
+
# Professional search box on the far right
|
96
|
+
search_action = QWidgetAction(self)
|
97
|
+
search_field = QLineEdit()
|
98
|
+
search_field.setPlaceholderText("Search commands...")
|
99
|
+
search_action.setDefaultWidget(search_field)
|
100
|
+
self.addAction(search_action)
|