GUI first draft

This commit is contained in:
overcuriousity
2025-11-26 23:15:15 +01:00
parent fc23473569
commit c707fb59bd
3 changed files with 98 additions and 8 deletions

View File

@@ -1,8 +1,9 @@
from .ui import GUI
from .ui import MainWindow, SemeionInstance
def main():
mainGui = GUI()
app = SemeionInstance()
window = MainWindow(app)
window.start()
# TODO: Initialize logging here
# TODO: Initialize llm client and qdrant client
# TODO: start main window

View File

@@ -1,3 +1,3 @@
from .main_window import GUI
from .main_window import MainWindow, SemeionInstance
__all__ = ["GUI"]
__all__ = ["MainWindow", "SemeionInstance"]

View File

@@ -1,5 +1,94 @@
from PySide6.QtWidgets import QMainWindow
from PySide6.QtWidgets import QApplication, QWidget, QVBoxLayout, QLabel, QPushButton, QGridLayout, QLineEdit, QToolBar
from PySide6.QtGui import QAction
from PySide6.QtCore import Qt
class GUI(QMainWindow):
class SemeionInstance(QApplication):
def __init__(self):
pass
super().__init__([])
class MainWindow(QWidget):
def __init__(self, app: SemeionInstance):
super().__init__()
self.setWindowTitle("Semeion Interface")
self.setGeometry(100, 100, 800, 600)
self.app = app
self.main_layout = QVBoxLayout()
self.setLayout(self.main_layout)
# Toolbar
self.toolbar = QToolBar()
self.main_layout.addWidget(self.toolbar)
action_CaseManager = QAction("Case", self)
action_IngestionManager = QAction("Ingest Artifacts", self)
action_ConnManager = QAction("Server Connections", self)
action_SettingsMenu = QAction("Settings", self)
action_AboutMenu = QAction("About", self)
self.toolbar.addAction(action_CaseManager)
self.toolbar.addAction(action_IngestionManager)
self.toolbar.addAction(action_ConnManager)
self.toolbar.addAction(action_SettingsMenu)
self.toolbar.addAction(action_AboutMenu)
# spacing
self.main_layout.addStretch(1)
# branding
self.brandingLabel = QLabel("S E M E I O N\n")
self.brandingLabel.setStyleSheet("font-size: 32px; font-weight: bold; font-family: Cantarell;")
self.main_layout.addWidget(self.brandingLabel, alignment=Qt.AlignmentFlag.AlignCenter)
# search Input
self.searchInput = QLineEdit()
self.searchInput.setPlaceholderText("Natural Language Search...")
self.searchInput.setFixedWidth(400)
self.searchInput.setMinimumHeight(30)
self.searchInput.setStyleSheet("""
QLineEdit {
border: 1px solid #ddd;
border-radius: 24px;
padding: 10px 20px;
font-size: 16px;
}
QLineEdit:focus {
border: 1px solid #aaa;
outline: none;
}""")
self.main_layout.addWidget(self.searchInput, alignment=Qt.AlignmentFlag.AlignCenter)
self.main_layout.addSpacing(10)
self.executeButton = QPushButton("Execute")
self.executeButton.setAttribute(Qt.WidgetAttribute.WA_Hover)
self.executeButton.setStyleSheet("""
QPushButton {
padding: 8px 16px;
font-size: 16px;
border-radius: 12px;
background-color: #808080;
color: white;
border: 1px solid #6e6e6e;
}
QPushButton:hover {
background-color: #6e6e6e;
}
QPushButton:pressed {
background-color: #5e5e5e;
}
""")
self.main_layout.addWidget(self.executeButton, alignment=Qt.AlignmentFlag.AlignCenter)
self.executeButton.clicked.connect(self.execute_from_input)
self.main_layout.addStretch(1)
def start(self):
self.show()
self.app.exec()
def execute_from_input(self):
query = self.searchInput.text().strip()
if not query:
return
# TODO: implement logic
print("Execute query:", query)