feat: Erstelle eine moderne PyQt6-App als Grundstein für eine Mini-DAW
Co-authored-by: aider (ollama/qwen2.5-coder:14b) <aider@aider.chat>
This commit is contained in:
commit
7fac7f4ba6
1 file changed
+58
@@ -0,0 +1,58 @@
|
||||
import sys
|
||||
from PyQt6.QtWidgets import QApplication, QMainWindow, QMenuBar, QMenu, QAction, QWidget, QVBoxLayout, QPushButton, QHBoxLayout
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtGui import QIcon
|
||||
|
||||
class MainWindow(QMainWindow):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
self.setWindowTitle("Mini-DAW")
|
||||
self.setGeometry(100, 100, 800, 600)
|
||||
self.setStyleSheet("background-color: #121212; color: white;")
|
||||
|
||||
# Menüleiste
|
||||
menu_bar = QMenuBar(self)
|
||||
self.setMenuBar(menu_bar)
|
||||
|
||||
file_menu = QMenu("Datei", self)
|
||||
menu_bar.addMenu(file_menu)
|
||||
|
||||
new_action = QAction("Neu", self)
|
||||
file_menu.addAction(new_action)
|
||||
|
||||
open_action = QAction("Öffnen", self)
|
||||
file_menu.addAction(open_action)
|
||||
|
||||
save_action = QAction("Speichern", self)
|
||||
file_menu.addAction(save_action)
|
||||
|
||||
# Arbeitsbereich für Audio-Spuren
|
||||
central_widget = QWidget(self)
|
||||
self.setCentralWidget(central_widget)
|
||||
|
||||
layout = QVBoxLayout()
|
||||
central_widget.setLayout(layout)
|
||||
|
||||
# Play/Pause-Buttons
|
||||
button_layout = QHBoxLayout()
|
||||
layout.addLayout(button_layout)
|
||||
|
||||
play_button = QPushButton("Play", self)
|
||||
play_button.setStyleSheet("background-color: #007acc; color: white; padding: 10px 20px; border-radius: 5px;")
|
||||
button_layout.addWidget(play_button)
|
||||
|
||||
pause_button = QPushButton("Pause", self)
|
||||
pause_button.setStyleSheet("background-color: #ff5722; color: white; padding: 10px 20px; border-radius: 5px;")
|
||||
button_layout.addWidget(pause_button)
|
||||
|
||||
# Arbeitsbereich für Audio-Spuren (Platzhalter)
|
||||
track_area = QWidget(self)
|
||||
track_area.setStyleSheet("background-color: #222222; border: 1px solid #333333;")
|
||||
layout.addWidget(track_area)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication(sys.argv)
|
||||
window = MainWindow()
|
||||
window.show()
|
||||
sys.exit(app.exec())
|
||||
Reference in new issue
Block a user