Skip to content

Commit

Permalink
#66 get started file
Browse files Browse the repository at this point in the history
  • Loading branch information
rohankishore authored Feb 14, 2024
1 parent 4765ab2 commit df1da85
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions auratext/Core/get_started.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import json
import os

from PyQt6.QtWidgets import QApplication, QMainWindow, QWidget, QDialog, QVBoxLayout, QPushButton, QLabel, \
QStackedWidget
from PyQt6.QtGui import QMovie
import sys


local_app_data = os.path.join(os.getenv("LocalAppData"), "AuraText")
with open(f"{local_app_data}/data/config.json", "r") as config_file:
_config = json.load(config_file)


class SetupWindow(QMainWindow):
def __init__(self):
super().__init__()

self.setWindowTitle("Get Started")
self.setGeometry(100, 100, 600, 400)

self.central_widget = QWidget()
self.setCentralWidget(self.central_widget)

self.setup_wizard()

def setup_wizard(self):
self.stacked_widget = QStackedWidget(self.central_widget)

# Slide 1
slide1 = QLabel("Welcome to Your App!\nThis is the first slide.")
self.stacked_widget.addWidget(slide1)

# Slide 2 with GIF
slide2 = QLabel()
movie = QMovie("hh.gif") # Replace with the path to your GIF file
slide2.setMovie(movie)
movie.start()
self.stacked_widget.addWidget(slide2)

# Slide 3
slide3 = QLabel("Slide 3:\nExplain the third step of the setup.")
self.stacked_widget.addWidget(slide3)

next_button = QPushButton("Next")
next_button.clicked.connect(self.next_slide)

layout = QVBoxLayout(self.central_widget)
layout.addWidget(self.stacked_widget)
layout.addWidget(next_button)

self.current_slide_index = 0

def next_slide(self):
self.current_slide_index += 1

if self.current_slide_index < self.stacked_widget.count():
self.stacked_widget.setCurrentIndex(self.current_slide_index)
else:
self.close()


def show_setup_window():
_config["show_setup_info"] = "False"
app = QApplication(sys.argv)
setup_window = SetupWindow()
setup_window.show()
sys.exit(app.exec())

0 comments on commit df1da85

Please sign in to comment.