delete files
This commit is contained in:
@@ -1,753 +0,0 @@
|
|||||||
import datetime
|
|
||||||
import os
|
|
||||||
|
|
||||||
# from src.data import pickles
|
|
||||||
import pickle
|
|
||||||
import re
|
|
||||||
import shutil
|
|
||||||
import sqlite3 as sql3
|
|
||||||
import tempfile
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from omegaconf import OmegaConf
|
|
||||||
|
|
||||||
from src.logic.constants import SEMAP_MEDIA_ACCOUNTS
|
|
||||||
from src.logic.dataclass import ApparatData, BookData
|
|
||||||
from src.logic.log import MyLogger
|
|
||||||
|
|
||||||
# from icecream import ic
|
|
||||||
config = OmegaConf.load("config.yaml")
|
|
||||||
|
|
||||||
logger = MyLogger("Database")
|
|
||||||
|
|
||||||
|
|
||||||
class Database:
|
|
||||||
logger.log_info("Database imported")
|
|
||||||
|
|
||||||
def __init__(self) -> None:
|
|
||||||
# TODO: change path later on to a variable based on the settings
|
|
||||||
self.database_path = f"{config.database.path}{config.database.name}"
|
|
||||||
# ic(self.database_path)
|
|
||||||
self.database_path = "sap.db"
|
|
||||||
logger.log_info("Connecting to database")
|
|
||||||
self.database = sql3.connect(self.database_path)
|
|
||||||
self.cur = self.database.cursor()
|
|
||||||
|
|
||||||
pass
|
|
||||||
|
|
||||||
def create_database(self):
|
|
||||||
# create database from template
|
|
||||||
subjects = config.subjects
|
|
||||||
for subject in subjects:
|
|
||||||
self.cur.execute(f"INSERT INTO subjects (name) VALUES ('{subject}')")
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def create_blob(self, file):
|
|
||||||
with open(file, "rb") as f:
|
|
||||||
blob = f.read()
|
|
||||||
return blob
|
|
||||||
|
|
||||||
def recreate_file(self, filename, app_id: int):
|
|
||||||
blob = self.get_blob(filename, app_id)
|
|
||||||
# write the blob to the file and save it to a preset destination
|
|
||||||
# with open(filename, "wb") as f:
|
|
||||||
# f.write(blob)
|
|
||||||
# use tempfile to create a temporary file
|
|
||||||
if not os.path.exists(config.database.tempdir):
|
|
||||||
os.mkdir(config.database.tempdir)
|
|
||||||
tempfile.NamedTemporaryFile(
|
|
||||||
filename=filename, delete=False, dir=config.database.tempdir, mode="wb"
|
|
||||||
).write(blob)
|
|
||||||
|
|
||||||
# user = os.getlogin()
|
|
||||||
# home = os.path.expanduser("~")
|
|
||||||
|
|
||||||
# # check if the folder exists, if not, create it
|
|
||||||
# if not os.path.exists(f"{home}/Desktop/SemApp/{user}"):
|
|
||||||
# os.mkdir(f"{home}/Desktop/SemApp/{user}")
|
|
||||||
# shutil.move(filename, f"{home}/Desktop/SemApp/{user}")
|
|
||||||
|
|
||||||
def get_blob(self, filename: str, app_id: int):
|
|
||||||
query = f"SELECT fileblob FROM files WHERE filename='{filename}' AND app_id={app_id}"
|
|
||||||
logger.log_info(f"Retrieving blob for {filename}, Appid {app_id} from database")
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
return result[0]
|
|
||||||
|
|
||||||
def get_kto_no(self, app_id: int):
|
|
||||||
query = f"SELECT konto FROM semesterapparat WHERE id={app_id}"
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
return result[0]
|
|
||||||
|
|
||||||
def insert_file(self, file: list[dict], app_id: int, prof_id):
|
|
||||||
for f in file:
|
|
||||||
filename = f["name"]
|
|
||||||
path = f["path"]
|
|
||||||
filetyp = f["type"]
|
|
||||||
print(f"filename: {filename}, path: {path}, filetyp: {filetyp}")
|
|
||||||
if path == "Database":
|
|
||||||
continue
|
|
||||||
blob = self.create_blob(path)
|
|
||||||
|
|
||||||
query = "INSERT OR IGNORE INTO files (filename, fileblob, app_id, filetyp,prof_id) VALUES (?, ?, ?, ?,?)"
|
|
||||||
params = (filename, blob, app_id, filetyp, prof_id)
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
logger.log_info(
|
|
||||||
f"Inserted {len(file)} file(s) of Apparat {app_id} into database"
|
|
||||||
)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def get_files(self, app_id: int, prof_id: int):
|
|
||||||
query = f"SELECT filename, filetyp FROM files WHERE app_id={app_id} AND prof_id={prof_id}"
|
|
||||||
result: list[tuple] = self.cur.execute(query).fetchall()
|
|
||||||
return result
|
|
||||||
|
|
||||||
def get_prof_name_by_id(self, id, add_title: bool = False):
|
|
||||||
if add_title is True:
|
|
||||||
query = f"SELECT titel, fname, lname FROM prof WHERE id={id}"
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
name = " ".join(result[0:3])
|
|
||||||
return name
|
|
||||||
else:
|
|
||||||
query = f"SELECT fullname FROM prof WHERE id={id}"
|
|
||||||
print(query)
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
name = result[0]
|
|
||||||
return name
|
|
||||||
|
|
||||||
def get_prof_id(self, profname: str):
|
|
||||||
query = f"SELECT id FROM prof WHERE fullname='{profname.replace(',', '')}'"
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
if result is None:
|
|
||||||
return None
|
|
||||||
return self.cur.execute(query).fetchone()[0]
|
|
||||||
|
|
||||||
def get_app_id(self, appname: str):
|
|
||||||
query = f"SELECT id FROM semesterapparat WHERE name='{appname}'"
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
if result is None:
|
|
||||||
return None
|
|
||||||
return self.cur.execute(query).fetchone()[0]
|
|
||||||
|
|
||||||
def get_profs(self):
|
|
||||||
query = "select * from prof"
|
|
||||||
return self.cur.execute(query).fetchall()
|
|
||||||
|
|
||||||
def app_exists(self, appnr: str) -> bool:
|
|
||||||
query = f"SELECT appnr FROM semesterapparat WHERE appnr='{appnr}'"
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
if result is None:
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def get_prof_data(self, profname: str = None, id: int = None) -> dict[str, str]:
|
|
||||||
if profname is not None:
|
|
||||||
profname = profname.replace(",", "")
|
|
||||||
profname = re.sub(r"\s+", " ", profname).strip()
|
|
||||||
if id:
|
|
||||||
query = "Select prof_id FROM semesterapparat WHERE appnr=?"
|
|
||||||
params = (id,)
|
|
||||||
result = self.cur.execute(query, params).fetchone()
|
|
||||||
id = result[0]
|
|
||||||
query = (
|
|
||||||
f"SELECT * FROM prof WHERE fullname='{profname}'"
|
|
||||||
if id is None
|
|
||||||
else f"SELECT * FROM prof WHERE id={id}"
|
|
||||||
)
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
return_data = {
|
|
||||||
"prof_title": result[1],
|
|
||||||
"profname": f"{result[3], result[2]}",
|
|
||||||
"prof_mail": result[5],
|
|
||||||
"prof_tel": result[6],
|
|
||||||
"id": result[0],
|
|
||||||
}
|
|
||||||
print(return_data)
|
|
||||||
# select the entry that contains the first name
|
|
||||||
return return_data
|
|
||||||
|
|
||||||
def set_new_sem_date(self, appnr, new_sem_date, dauerapp=False):
|
|
||||||
# Todo: use extend_semester in new release
|
|
||||||
date = datetime.datetime.now().strftime("%Y-%m-%d")
|
|
||||||
|
|
||||||
query = f"UPDATE semesterapparat SET verlängert_am='{date}', verlängerung_bis='{new_sem_date}' WHERE appnr='{appnr}'"
|
|
||||||
if dauerapp is not False:
|
|
||||||
query = f"UPDATE semesterapparat SET verlängert_am='{date}', verlängerung_bis='{new_sem_date}', dauerapp='{dauerapp} WHERE appnr='{appnr}'"
|
|
||||||
self.cur.execute(query)
|
|
||||||
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def create_apparat(self, ApparatData: ApparatData):
|
|
||||||
prof_id = self.get_prof_id(ApparatData.profname)
|
|
||||||
app_id = self.get_app_id(ApparatData.appname)
|
|
||||||
if app_id is None:
|
|
||||||
if prof_id is None:
|
|
||||||
self.create_prof(ApparatData.get_prof_details())
|
|
||||||
prof_id = self.get_prof_id(ApparatData.profname)
|
|
||||||
|
|
||||||
query = f"INSERT OR IGNORE INTO semesterapparat (appnr, name, erstellsemester, dauer, prof_id, fach,deletion_status,konto) VALUES ('{ApparatData.appnr}', '{ApparatData.appname}', '{ApparatData.semester}', '{ApparatData.dauerapp}', {prof_id}, '{ApparatData.app_fach}', '{ApparatData.deleted}', '{SEMAP_MEDIA_ACCOUNTS[ApparatData.appnr]}')"
|
|
||||||
print(query)
|
|
||||||
self.cur.execute(query)
|
|
||||||
self.database.commit()
|
|
||||||
logger.log_info(f"Created new apparat {ApparatData.appname}")
|
|
||||||
app_id = self.get_app_id(ApparatData.appname)
|
|
||||||
# if ApparatData.media_list is not None: #! Deprecated
|
|
||||||
# for media in ApparatData.media_list:
|
|
||||||
# self.insert_file(media, app_id)
|
|
||||||
# self.database.commit()
|
|
||||||
return app_id
|
|
||||||
|
|
||||||
def create_prof(self, prof_details: dict):
|
|
||||||
prof_title = prof_details["prof_title"]
|
|
||||||
prof_fname = prof_details["profname"].split(",")[1]
|
|
||||||
prof_fname = prof_fname.strip()
|
|
||||||
prof_lname = prof_details["profname"].split(",")[0]
|
|
||||||
prof_lname = prof_lname.strip()
|
|
||||||
prof_fullname = prof_details["profname"].replace(",", "")
|
|
||||||
prof_mail = prof_details["prof_mail"]
|
|
||||||
prof_tel = prof_details["prof_tel"]
|
|
||||||
|
|
||||||
query = f'INSERT OR IGNORE INTO prof (titel, fname, lname, fullname, mail, telnr) VALUES ("{prof_title}", "{prof_fname}", "{prof_lname}", "{prof_fullname}", "{prof_mail}", "{prof_tel}")'
|
|
||||||
self.cur.execute(query)
|
|
||||||
self.database.commit()
|
|
||||||
pass
|
|
||||||
|
|
||||||
def get_apparat_nrs(self) -> list:
|
|
||||||
try:
|
|
||||||
self.cur.execute(
|
|
||||||
"SELECT appnr FROM semesterapparat Where deletion_status=0"
|
|
||||||
)
|
|
||||||
except sql3.OperationalError:
|
|
||||||
return []
|
|
||||||
return [i[0] for i in self.cur.fetchall()]
|
|
||||||
|
|
||||||
def get_all_apparts(self, deleted=0):
|
|
||||||
|
|
||||||
self.cur.execute(
|
|
||||||
f"SELECT * FROM semesterapparat WHERE deletion_status={deleted}"
|
|
||||||
)
|
|
||||||
return self.cur.fetchall()
|
|
||||||
|
|
||||||
#
|
|
||||||
def get_app_data(self, appnr, appname) -> ApparatData:
|
|
||||||
result = self.cur.execute(
|
|
||||||
f"SELECT * FROM semesterapparat WHERE appnr='{appnr}' AND name='{appname}'"
|
|
||||||
).fetchone()
|
|
||||||
print(f"result: {result}")
|
|
||||||
# app_id=result[0]
|
|
||||||
data = ApparatData()
|
|
||||||
data.appnr = appnr
|
|
||||||
data.app_fach = result[3]
|
|
||||||
data.appname = result[1]
|
|
||||||
profname = self.get_prof_name_by_id(result[2])
|
|
||||||
# set profname to lastname, firstname
|
|
||||||
profname = f"{profname.split(' ')[0]}, {profname.split(' ')[1]}"
|
|
||||||
data.profname = profname
|
|
||||||
prof_data = self.get_prof_data(data.profname)
|
|
||||||
data.prof_mail = prof_data["prof_mail"]
|
|
||||||
data.prof_tel = prof_data["prof_tel"]
|
|
||||||
data.prof_title = prof_data["prof_title"]
|
|
||||||
data.erstellsemester = result[5]
|
|
||||||
data.semester = result[8]
|
|
||||||
data.deleted = result[9]
|
|
||||||
data.apparat_adis_id = result[12]
|
|
||||||
data.prof_adis_id = None
|
|
||||||
|
|
||||||
print(data)
|
|
||||||
# data.media_list=self.get_media(app_id)
|
|
||||||
|
|
||||||
return data
|
|
||||||
|
|
||||||
def add_medium(self, bookdata: BookData, app_id: str, prof_id: str, *args):
|
|
||||||
# insert the bookdata into the media table
|
|
||||||
# try to retrieve the bookdata from the media table, check if the to be inserted bookdata is already in the table for the corresponding apparat
|
|
||||||
# if yes, do not insert the bookdata
|
|
||||||
# if no, insert the bookdata
|
|
||||||
t_query = (
|
|
||||||
f"SELECT bookdata FROM media WHERE app_id={app_id} AND prof_id={prof_id}"
|
|
||||||
)
|
|
||||||
# print(t_query)
|
|
||||||
result = self.cur.execute(t_query).fetchall()
|
|
||||||
result = [pickle.loads(i[0]) for i in result]
|
|
||||||
if bookdata in result:
|
|
||||||
print("Bookdata already in database")
|
|
||||||
# check if the book was deleted in the apparat
|
|
||||||
query = (
|
|
||||||
"SELECT deleted FROM media WHERE app_id=? AND prof_id=? AND bookdata=?"
|
|
||||||
)
|
|
||||||
params = (app_id, prof_id, pickle.dumps(bookdata))
|
|
||||||
result = self.cur.execute(query, params).fetchone()
|
|
||||||
if result[0] == 1:
|
|
||||||
print("Book was deleted, updating bookdata")
|
|
||||||
query = "UPDATE media SET deleted=0 WHERE app_id=? AND prof_id=? AND bookdata=?"
|
|
||||||
params = (app_id, prof_id, pickle.dumps(bookdata))
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
return
|
|
||||||
|
|
||||||
query = (
|
|
||||||
"INSERT INTO media (bookdata, app_id, prof_id,deleted) VALUES (?, ?, ?,?)"
|
|
||||||
)
|
|
||||||
converted = pickle.dumps(bookdata)
|
|
||||||
params = (converted, app_id, prof_id, 0)
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def request_medium(self, app_id, prof_id, signature) -> int:
|
|
||||||
query = "SELECT bookdata, id FROM media WHERE app_id=? AND prof_id=?"
|
|
||||||
params = (app_id, prof_id)
|
|
||||||
result = self.cur.execute(query, params).fetchall()
|
|
||||||
books = [(i[1], pickle.loads(i[0])) for i in result]
|
|
||||||
print(books)
|
|
||||||
book = [i[0] for i in books if i[1].signature == signature]
|
|
||||||
return book[0]
|
|
||||||
|
|
||||||
def add_message(self, message: dict, user, appnr):
|
|
||||||
def __get_user_id(user):
|
|
||||||
query = "SELECT id FROM user WHERE username=?"
|
|
||||||
params = (user,)
|
|
||||||
result = self.cur.execute(query, params).fetchone()
|
|
||||||
return result[0]
|
|
||||||
|
|
||||||
user_id = __get_user_id(user)
|
|
||||||
query = "INSERT INTO messages (message, user_id, remind_at) VALUES (?, ?, ?)"
|
|
||||||
params = (message["message"], user_id, message["remind_at"])
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def get_messages(self, date: str):
|
|
||||||
def __get_user_name(id):
|
|
||||||
query = "SELECT username FROM user WHERE id=?"
|
|
||||||
params = (id,)
|
|
||||||
result = self.cur.execute(query, params).fetchone()
|
|
||||||
return result[0]
|
|
||||||
|
|
||||||
query = f"SELECT * FROM messages WHERE remind_at='{date}'"
|
|
||||||
result = self.cur.execute(query).fetchall()
|
|
||||||
ret = [
|
|
||||||
{
|
|
||||||
"message": i[2],
|
|
||||||
"user": __get_user_name(i[4]),
|
|
||||||
"apparatnr": i[5],
|
|
||||||
"id": i[0],
|
|
||||||
}
|
|
||||||
for i in result
|
|
||||||
]
|
|
||||||
return ret
|
|
||||||
|
|
||||||
def get_apparat_id(self, appname):
|
|
||||||
query = f"SELECT appnr FROM semesterapparat WHERE name='{appname}'"
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
return result[0]
|
|
||||||
|
|
||||||
def get_apparats_by_semester(self, semester: str):
|
|
||||||
query = f"SELECT * FROM semesterapparat WHERE erstellsemester='{semester}'"
|
|
||||||
result = self.cur.execute(query).fetchall()
|
|
||||||
return result
|
|
||||||
|
|
||||||
def get_semester(self) -> list[str]:
|
|
||||||
query = "SELECT DISTINCT erstellsemester FROM semesterapparat"
|
|
||||||
result = self.cur.execute(query).fetchall()
|
|
||||||
return [i for i in result]
|
|
||||||
|
|
||||||
def is_eternal(self, id):
|
|
||||||
query = f"SELECT dauer FROM semesterapparat WHERE id={id}"
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
return result[0]
|
|
||||||
|
|
||||||
def statistic_request(self, **kwargs: Any):
|
|
||||||
def __query(query):
|
|
||||||
result = self.cur.execute(query).fetchall()
|
|
||||||
for result_a in result:
|
|
||||||
orig_value = result_a
|
|
||||||
prof_name = self.get_prof_name_by_id(result_a[2])
|
|
||||||
# replace the prof_id with the prof_name
|
|
||||||
result_a = list(result_a)
|
|
||||||
result_a[2] = prof_name
|
|
||||||
result_a = tuple(result_a)
|
|
||||||
result[result.index(orig_value)] = result_a
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
if "deletable" in kwargs.keys():
|
|
||||||
query = f"SELECT * FROM semesterapparat WHERE deletion_status=0 AND dauer=0 AND (erstellsemester!='{kwargs['deletesemester']}' OR verlängerung_bis!='{kwargs['deletesemester']}')"
|
|
||||||
return __query(query)
|
|
||||||
|
|
||||||
if "dauer" in kwargs.keys():
|
|
||||||
kwargs["dauer"] = kwargs["dauer"].replace("Ja", "1").replace("Nein", "0")
|
|
||||||
query = "SELECT * FROM semesterapparat WHERE "
|
|
||||||
for key, value in kwargs.items() if kwargs.items() is not None else {}:
|
|
||||||
print(key, value)
|
|
||||||
query += f"{key}='{value}' AND "
|
|
||||||
print(query)
|
|
||||||
# remove deletesemester part from normal query, as this will be added to the database upon deleting the apparat
|
|
||||||
if "deletesemester" in kwargs.keys():
|
|
||||||
query = query.replace(
|
|
||||||
f"deletesemester='{kwargs['deletesemester']}' AND ", ""
|
|
||||||
)
|
|
||||||
if "endsemester" in kwargs.keys():
|
|
||||||
if "erstellsemester" in kwargs.keys():
|
|
||||||
query = query.replace(f"endsemester='{kwargs['endsemester']}' AND ", "")
|
|
||||||
query = query.replace(
|
|
||||||
f"erstellsemester='{kwargs['erstellsemester']} AND ", "xyz"
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
query = query.replace(
|
|
||||||
f"endsemester='{kwargs['endsemester']}' AND ", "xyz"
|
|
||||||
)
|
|
||||||
print("replaced")
|
|
||||||
query = query.replace(
|
|
||||||
"xyz",
|
|
||||||
f"(erstellsemester='{kwargs['endsemester']}' OR verlängerung_bis='{kwargs['endsemester']}') AND ",
|
|
||||||
)
|
|
||||||
# remove all x="" parts from the query where x is a key in kwargs
|
|
||||||
|
|
||||||
query = query[:-5]
|
|
||||||
print(query)
|
|
||||||
return __query(query)
|
|
||||||
|
|
||||||
def get_app_count_by_semester(self) -> tuple[list[str], list[int]]:
|
|
||||||
"""get the apparats created and deleted in the distinct semesters"""
|
|
||||||
|
|
||||||
# get unique semesters
|
|
||||||
query = "SELECT DISTINCT erstellsemester FROM semesterapparat"
|
|
||||||
result = self.cur.execute(query).fetchall()
|
|
||||||
semesters = [i[0] for i in result]
|
|
||||||
created = []
|
|
||||||
deleted = []
|
|
||||||
for semester in semesters:
|
|
||||||
query = f"SELECT COUNT(*) FROM semesterapparat WHERE erstellsemester='{semester}'"
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
created.append(result[0])
|
|
||||||
query = f"SELECT COUNT(*) FROM semesterapparat WHERE deletion_status=1 AND deleted_date='{semester}'"
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
deleted.append(result[0])
|
|
||||||
# store data in a tuple
|
|
||||||
ret = []
|
|
||||||
e_tuple = ()
|
|
||||||
for sem in semesters:
|
|
||||||
e_tuple = (
|
|
||||||
sem,
|
|
||||||
created[semesters.index(sem)],
|
|
||||||
deleted[semesters.index(sem)],
|
|
||||||
)
|
|
||||||
ret.append(e_tuple)
|
|
||||||
return ret
|
|
||||||
# get the count of apparats created in the semesters
|
|
||||||
|
|
||||||
def apparats_by_semester(self, semester: str):
|
|
||||||
"""Get a list of all created and deleted apparats in the given semester"""
|
|
||||||
# get a list of apparats created and in the given semester
|
|
||||||
query = f"SELECT name,prof_id FROM semesterapparat WHERE erstellsemester='{semester}'"
|
|
||||||
result = self.cur.execute(query).fetchall()
|
|
||||||
c_tmp = []
|
|
||||||
for i in result:
|
|
||||||
c_tmp.append((i[0], self.get_prof_name_by_id(i[1])))
|
|
||||||
query = (
|
|
||||||
f"SELECT name,prof_id FROM semesterapparat WHERE deleted_date='{semester}'"
|
|
||||||
)
|
|
||||||
result = self.cur.execute(query).fetchall()
|
|
||||||
d_tmp = []
|
|
||||||
for i in result:
|
|
||||||
d_tmp.append((i[0], self.get_prof_name_by_id(i[1])))
|
|
||||||
# group the apparats by prof
|
|
||||||
c_ret = {}
|
|
||||||
for i in c_tmp:
|
|
||||||
if i[1] not in c_ret.keys():
|
|
||||||
c_ret[i[1]] = [i[0]]
|
|
||||||
else:
|
|
||||||
c_ret[i[1]].append(i[0])
|
|
||||||
d_ret = {}
|
|
||||||
for i in d_tmp:
|
|
||||||
if i[1] not in d_ret.keys():
|
|
||||||
d_ret[i[1]] = [i[0]]
|
|
||||||
else:
|
|
||||||
d_ret[i[1]].append(i[0])
|
|
||||||
return {"created": c_ret, "deleted": d_ret}
|
|
||||||
|
|
||||||
def delete_message(self, message_id):
|
|
||||||
query = "DELETE FROM messages WHERE id=?"
|
|
||||||
params = (message_id,)
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def delete_medium(self, title_id):
|
|
||||||
# delete the bookdata from the media table
|
|
||||||
query = "UPDATE media SET deleted=1 WHERE id=?"
|
|
||||||
params = (title_id,)
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
pass
|
|
||||||
|
|
||||||
def update_bookdata(self, bookdata: BookData, title_id):
|
|
||||||
query = "UPDATE media SET bookdata=? WHERE id=?"
|
|
||||||
converted = pickle.dumps(bookdata)
|
|
||||||
params = (converted, title_id)
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def get_specific_book(self, book_id):
|
|
||||||
query = "SELECT bookdata FROM media WHERE id=?"
|
|
||||||
params = (book_id,)
|
|
||||||
result = self.cur.execute(query, params).fetchone()
|
|
||||||
return pickle.loads(result[0])
|
|
||||||
|
|
||||||
def get_media(self, app_id, prof_id, del_state=0) -> list[dict[int, BookData, int]]:
|
|
||||||
"""request media from database and return result as list.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
----
|
|
||||||
- app_id (int): ID of the apparat
|
|
||||||
- prof_id (int): ID of the prof
|
|
||||||
- del_state (int, optional): If deleted books should be requested as well. 1 = yes 0 = no. Defaults to 0.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
-------
|
|
||||||
- list[dict[int,BookData,int]]: Returns a list of dictionaries containing the bookdata, the id and the availability of the book in the following format:
|
|
||||||
-------
|
|
||||||
{"id": int,
|
|
||||||
"bookdata": BookData,
|
|
||||||
"available": int}
|
|
||||||
"""
|
|
||||||
query = f"SELECT id,bookdata,available FROM media WHERE (app_id={app_id} AND prof_id={prof_id}) AND (deleted={del_state if del_state == 0 else '1 OR deleted=0'})"
|
|
||||||
logger.log_info(f"Requesting media from database with query: {query}")
|
|
||||||
result = self.cur.execute(query).fetchall()
|
|
||||||
ret_result = []
|
|
||||||
for result_a in result:
|
|
||||||
# ic(result_a)
|
|
||||||
data = {"id": int, "bookdata": BookData, "available": int}
|
|
||||||
data["id"] = result_a[0]
|
|
||||||
data["bookdata"] = pickle.loads(result_a[1])
|
|
||||||
data["available"] = result_a[2]
|
|
||||||
ret_result.append(data)
|
|
||||||
return ret_result
|
|
||||||
|
|
||||||
def get_subjects_and_aliases(self):
|
|
||||||
query = "SELECT subjects.name, aliases.name FROM subjects LEFT JOIN aliases ON subjects.id = aliases.subject_id"
|
|
||||||
return self.cur.execute(query).fetchall()
|
|
||||||
|
|
||||||
def get_subjects(self):
|
|
||||||
query = "SELECT id,name FROM subjects"
|
|
||||||
return self.cur.execute(query).fetchall()
|
|
||||||
|
|
||||||
def get_aliases(self, subject_id):
|
|
||||||
query = f"SELECT name FROM aliases WHERE subject_id={subject_id}"
|
|
||||||
return self.cur.execute(query).fetchall()
|
|
||||||
|
|
||||||
def add_subject(self, subject_name):
|
|
||||||
query = f"INSERT INTO subjects (name) VALUES ('{subject_name}')"
|
|
||||||
self.cur.execute(query)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def get_apparats_by_prof(self, prof_id):
|
|
||||||
query = f"SELECT * FROM semesterapparat WHERE prof_id={prof_id}"
|
|
||||||
return self.cur.execute(query).fetchall()
|
|
||||||
|
|
||||||
def add_alias(self, alias_name, subject):
|
|
||||||
query = f"SELECT id FROM subjects WHERE name='{subject}'"
|
|
||||||
subject_id = self.cur.execute(query).fetchone()[0]
|
|
||||||
query = f"INSERT INTO aliases (name,subject_id) VALUES ('{alias_name}',{subject_id})"
|
|
||||||
self.cur.execute(query)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def update_apparat(self, apparat_data: ApparatData):
|
|
||||||
data = apparat_data
|
|
||||||
query = "UPDATE semesterapparat SET name = ?, fach = ?, dauer = ?, prof_id = ? WHERE appnr = ?"
|
|
||||||
params = (
|
|
||||||
data.appname,
|
|
||||||
data.app_fach,
|
|
||||||
data.dauerapp,
|
|
||||||
self.get_prof_id(data.profname),
|
|
||||||
data.appnr,
|
|
||||||
)
|
|
||||||
print(query)
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def delete_apparat(self, appnr: str, semester: str):
|
|
||||||
# update the deletion status to 1 and the deleted_state to semester for the given apparat
|
|
||||||
query = f"UPDATE semesterapparat SET deletion_status=1, deleted_date='{semester}' WHERE appnr='{appnr}'"
|
|
||||||
self.cur.execute(query)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def get_book_id(self, bookdata: BookData, app_id: int, prof_id: int):
|
|
||||||
query = "SELECT id FROM media WHERE bookdata=? AND app_id=? AND prof_id=?"
|
|
||||||
params = (pickle.loads(bookdata), app_id, prof_id)
|
|
||||||
result = self.cur.execute(query, params).fetchone()
|
|
||||||
return result
|
|
||||||
|
|
||||||
def set_availability(self, book_id, available):
|
|
||||||
query = "UPDATE media SET available=? WHERE id=?"
|
|
||||||
params = (available, book_id)
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def get_latest_book_id(self):
|
|
||||||
query = "SELECT id FROM media ORDER BY id DESC LIMIT 1"
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
return result[0]
|
|
||||||
|
|
||||||
def close(self):
|
|
||||||
self.database.close()
|
|
||||||
|
|
||||||
def login(self, username, hashed_password) -> bool:
|
|
||||||
# check if the user and password exist in the database
|
|
||||||
# if yes, return True
|
|
||||||
# if no, return False
|
|
||||||
query = "SELECT salt FROM user WHERE username=?"
|
|
||||||
params = (username,)
|
|
||||||
result = self.cur.execute(query, params).fetchone()
|
|
||||||
|
|
||||||
if result is None:
|
|
||||||
return False
|
|
||||||
salt = result[0]
|
|
||||||
print(salt)
|
|
||||||
query = "SELECT password FROM user WHERE username=?"
|
|
||||||
params = (str(username),)
|
|
||||||
result = self.cur.execute(query, params).fetchone()
|
|
||||||
password = result[0]
|
|
||||||
if password == f"{salt}{hashed_password}":
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
# admin stuff below here
|
|
||||||
def get_users(self):
|
|
||||||
query = "SELECT * FROM user"
|
|
||||||
return self.cur.execute(query).fetchall()
|
|
||||||
|
|
||||||
def get_apparats(self) -> list[tuple]:
|
|
||||||
query = "SELECT * FROM semesterapparat"
|
|
||||||
return self.cur.execute(query).fetchall()
|
|
||||||
|
|
||||||
def change_password(self, user, password):
|
|
||||||
saltq = "SELECT salt FROM user WHERE username=?"
|
|
||||||
params = (user,)
|
|
||||||
salt = self.cur.execute(saltq, params).fetchone()[0]
|
|
||||||
password = f"{salt}{password}"
|
|
||||||
query = "UPDATE user SET password=? WHERE username=?"
|
|
||||||
params = (password, user)
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def get_role(self, username):
|
|
||||||
query = "SELECT role FROM user WHERE username=?"
|
|
||||||
params = (username,)
|
|
||||||
result = self.cur.execute(query, params).fetchone()
|
|
||||||
return result[0]
|
|
||||||
|
|
||||||
def get_roles(self):
|
|
||||||
query = "SELECT role FROM user"
|
|
||||||
return self.cur.execute(query).fetchall()
|
|
||||||
|
|
||||||
def create_user(self, username, password, role, salt):
|
|
||||||
"""Create a user based on passed data.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
----
|
|
||||||
- username (str): Username to be used
|
|
||||||
- password (str): the salted password
|
|
||||||
- role (str): Role of the user
|
|
||||||
- salt (str): a random salt for the user
|
|
||||||
"""
|
|
||||||
query = "INSERT OR IGNORE INTO user (username, password, role, salt) VALUES (?, ?, ?, ?)"
|
|
||||||
params = (username, password, role, salt)
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def delete_user(self, user):
|
|
||||||
query = "DELETE FROM user WHERE username=?"
|
|
||||||
params = (user,)
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def get_faculty_members(self, name: str = None):
|
|
||||||
query = "SELECT titel, fname,lname,mail,telnr,fullname FROM prof"
|
|
||||||
if name:
|
|
||||||
query = query.replace(",fullname", "")
|
|
||||||
query += f" WHERE fullname='{name}'"
|
|
||||||
return self.cur.execute(query).fetchall()
|
|
||||||
|
|
||||||
def update_faculty_member(self, data, oldlname, oldfname):
|
|
||||||
placeholders = ", ".join(f"{k} = :{k}" for k in data.keys())
|
|
||||||
sql = f"UPDATE prof SET {placeholders} WHERE lname = :oldlname AND fname = :oldfname"
|
|
||||||
data["oldlname"] = oldlname
|
|
||||||
data["oldfname"] = oldfname
|
|
||||||
print(sql, data)
|
|
||||||
self.cur.execute(sql, data)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def faculty_data(self, name):
|
|
||||||
query = f"SELECT * FROM prof WHERE fullname='{name}'"
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
return result
|
|
||||||
|
|
||||||
def update_user(self, username, data: dict[str, str]):
|
|
||||||
|
|
||||||
query = "UPDATE user SET "
|
|
||||||
for key, value in data.items():
|
|
||||||
if key == "username":
|
|
||||||
continue
|
|
||||||
query += f"{key}='{value}',"
|
|
||||||
query = query[:-1]
|
|
||||||
query += " WHERE username=?"
|
|
||||||
params = (username,)
|
|
||||||
|
|
||||||
self.cur.execute(query, params)
|
|
||||||
self.database.commit()
|
|
||||||
|
|
||||||
def check_username(self, username):
|
|
||||||
query = "SELECT username FROM user WHERE username=?"
|
|
||||||
params = (username,)
|
|
||||||
result = self.cur.execute(query, params).fetchone()
|
|
||||||
if result is None:
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def get_apparats_name(self, app_id, prof_id):
|
|
||||||
query = f"SELECT name FROM semesterapparat WHERE appnr={app_id} AND prof_id={prof_id}"
|
|
||||||
# ic(query)
|
|
||||||
result = self.cur.execute(query).fetchone()
|
|
||||||
return result[0]
|
|
||||||
|
|
||||||
def search_book(self, data: dict[str, str]) -> list[tuple[BookData, int]]:
|
|
||||||
query = "SELECT * FROM media "
|
|
||||||
result = self.database.execute(query).fetchall()
|
|
||||||
ret = []
|
|
||||||
# get length of data dict
|
|
||||||
length = len(data)
|
|
||||||
mode = 0
|
|
||||||
if length == 1:
|
|
||||||
if "signature" in data.keys():
|
|
||||||
mode = 1
|
|
||||||
elif "title" in data.keys():
|
|
||||||
mode = 2
|
|
||||||
elif length == 2:
|
|
||||||
mode = 3
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
print(len(result))
|
|
||||||
for res in result:
|
|
||||||
bookdata = pickle.loads(res[1])
|
|
||||||
app_id = res[2]
|
|
||||||
prof_id = res[3]
|
|
||||||
# if signature and title present in dict:
|
|
||||||
# if signature present in dict:
|
|
||||||
if mode == 1:
|
|
||||||
if data["signature"] in bookdata.signature:
|
|
||||||
ret.append((bookdata, app_id, prof_id))
|
|
||||||
# if title present in dict:
|
|
||||||
elif mode == 2:
|
|
||||||
if data["title"] in bookdata.title:
|
|
||||||
ret.append((bookdata, app_id, prof_id))
|
|
||||||
elif mode == 3:
|
|
||||||
if (
|
|
||||||
data["signature"] in bookdata.signature
|
|
||||||
and data["title"] in bookdata.title
|
|
||||||
):
|
|
||||||
ret.append((bookdata, app_id, prof_id))
|
|
||||||
return ret
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
db = Database()
|
|
||||||
print(db.login("kirchner", "loginpass"))
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,47 +0,0 @@
|
|||||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\Semesterapparate\ui\plotdata.ui'
|
|
||||||
#
|
|
||||||
# Created by: PyQt6 UI code generator 6.3.1
|
|
||||||
#
|
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
|
||||||
|
|
||||||
|
|
||||||
from PyQt6 import QtCore, QtWidgets
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_MainWindow(object):
|
|
||||||
def setupUi(self, MainWindow):
|
|
||||||
MainWindow.setObjectName("MainWindow")
|
|
||||||
MainWindow.resize(640, 480)
|
|
||||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
|
||||||
self.centralwidget.setObjectName("centralwidget")
|
|
||||||
self.graphicsView = QtWidgets.QGraphicsView(self.centralwidget)
|
|
||||||
self.graphicsView.setGeometry(QtCore.QRect(330, 10, 256, 192))
|
|
||||||
self.graphicsView.setObjectName("graphicsView")
|
|
||||||
self.widget = QtWidgets.QWidget(self.centralwidget)
|
|
||||||
self.widget.setGeometry(QtCore.QRect(10, 0, 251, 271))
|
|
||||||
self.widget.setObjectName("widget")
|
|
||||||
self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget)
|
|
||||||
self.stackedWidget.setGeometry(QtCore.QRect(300, 220, 291, 201))
|
|
||||||
self.stackedWidget.setObjectName("stackedWidget")
|
|
||||||
self.page = QtWidgets.QWidget()
|
|
||||||
self.page.setObjectName("page")
|
|
||||||
self.stackedWidget.addWidget(self.page)
|
|
||||||
self.page_2 = QtWidgets.QWidget()
|
|
||||||
self.page_2.setObjectName("page_2")
|
|
||||||
self.stackedWidget.addWidget(self.page_2)
|
|
||||||
MainWindow.setCentralWidget(self.centralwidget)
|
|
||||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 640, 21))
|
|
||||||
self.menubar.setObjectName("menubar")
|
|
||||||
MainWindow.setMenuBar(self.menubar)
|
|
||||||
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
|
||||||
self.statusbar.setObjectName("statusbar")
|
|
||||||
MainWindow.setStatusBar(self.statusbar)
|
|
||||||
|
|
||||||
self.retranslateUi(MainWindow)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
|
||||||
|
|
||||||
def retranslateUi(self, MainWindow):
|
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
|
|
||||||
@@ -1,232 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1" language="de_DE" sourcelanguage="de_DE">
|
|
||||||
<context>
|
|
||||||
<name>MainWindow</name>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="543"/>
|
|
||||||
<source>MainWindow</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="544"/>
|
|
||||||
<source>Load the Semesterapparate from the database</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="545"/>
|
|
||||||
<source>App. aufrufen</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="546"/>
|
|
||||||
<source>neu. App anlegen</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="547"/>
|
|
||||||
<source>Auswahl abbrechen</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="550"/>
|
|
||||||
<source>AppNr</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="552"/>
|
|
||||||
<source>App Name</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="554"/>
|
|
||||||
<source>Professor</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="556"/>
|
|
||||||
<source>gültig bis</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="580"/>
|
|
||||||
<source>Dauerapparat</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="560"/>
|
|
||||||
<source>KontoNr</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="561"/>
|
|
||||||
<source>Apparatsdetails</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="563"/>
|
|
||||||
<source>Dokumentname</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="565"/>
|
|
||||||
<source>Dateityp</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="567"/>
|
|
||||||
<source>Neu?</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="569"/>
|
|
||||||
<source>path</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="570"/>
|
|
||||||
<source>Apparatsname</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="571"/>
|
|
||||||
<source>Winter</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="572"/>
|
|
||||||
<source>Prof. Name</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="573"/>
|
|
||||||
<source>Sommer</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="574"/>
|
|
||||||
<source>Prof. Titel</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="575"/>
|
|
||||||
<source>Semester</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="576"/>
|
|
||||||
<source>2023</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="577"/>
|
|
||||||
<source>Apparatsnummer</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="578"/>
|
|
||||||
<source>Speichern</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="579"/>
|
|
||||||
<source>Aktualisieren</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="581"/>
|
|
||||||
<source>Mail</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="582"/>
|
|
||||||
<source>Tel</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="583"/>
|
|
||||||
<source>Fach</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="589"/>
|
|
||||||
<source>*</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="590"/>
|
|
||||||
<source>Dokument hinzufügen</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="591"/>
|
|
||||||
<source>Dokument öffnen</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="594"/>
|
|
||||||
<source>Buchtitel</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="596"/>
|
|
||||||
<source>Signatur</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="598"/>
|
|
||||||
<source>Auflage</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="600"/>
|
|
||||||
<source>Autor</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="602"/>
|
|
||||||
<source>Link</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="603"/>
|
|
||||||
<source> Medienliste</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="604"/>
|
|
||||||
<source>gel. Medien anzeigen</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="605"/>
|
|
||||||
<source>Medien hinzufügen</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="606"/>
|
|
||||||
<source>Tab 1</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="607"/>
|
|
||||||
<source>Tab 2</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="608"/>
|
|
||||||
<source>Datei</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="609"/>
|
|
||||||
<source>Einstellungen</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="Ui_semesterapparat_ui.py" line="610"/>
|
|
||||||
<source>Beenden</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\Semesterapparate\ui\setupwizard.ui'
|
|
||||||
#
|
|
||||||
# Created by: PyQt6 UI code generator 6.3.1
|
|
||||||
#
|
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
|
||||||
|
|
||||||
|
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_Wizard(object):
|
|
||||||
def setupUi(self, Wizard):
|
|
||||||
Wizard.setObjectName("Wizard")
|
|
||||||
Wizard.resize(640, 480)
|
|
||||||
Wizard.setMaximumSize(QtCore.QSize(640, 480))
|
|
||||||
self.wizardPage1 = QtWidgets.QWizardPage()
|
|
||||||
self.wizardPage1.setObjectName("wizardPage1")
|
|
||||||
self.textBrowser = QtWidgets.QTextBrowser(self.wizardPage1)
|
|
||||||
self.textBrowser.setGeometry(QtCore.QRect(200, 10, 256, 192))
|
|
||||||
self.textBrowser.setObjectName("textBrowser")
|
|
||||||
Wizard.addPage(self.wizardPage1)
|
|
||||||
self.wizardPage2 = QtWidgets.QWizardPage()
|
|
||||||
self.wizardPage2.setObjectName("wizardPage2")
|
|
||||||
self.label = QtWidgets.QLabel(self.wizardPage2)
|
|
||||||
self.label.setGeometry(QtCore.QRect(10, 0, 131, 16))
|
|
||||||
self.label.setObjectName("label")
|
|
||||||
self.label_2 = QtWidgets.QLabel(self.wizardPage2)
|
|
||||||
self.label_2.setGeometry(QtCore.QRect(10, 40, 71, 16))
|
|
||||||
self.label_2.setObjectName("label_2")
|
|
||||||
self.default_apps = QtWidgets.QCheckBox(self.wizardPage2)
|
|
||||||
self.default_apps.setGeometry(QtCore.QRect(100, 40, 70, 17))
|
|
||||||
self.default_apps.setText("")
|
|
||||||
self.default_apps.setObjectName("default_apps")
|
|
||||||
self.label_3 = QtWidgets.QLabel(self.wizardPage2)
|
|
||||||
self.label_3.setGeometry(QtCore.QRect(10, 70, 61, 16))
|
|
||||||
self.label_3.setObjectName("label_3")
|
|
||||||
self.custom_applications = QtWidgets.QFrame(self.wizardPage2)
|
|
||||||
self.custom_applications.setGeometry(QtCore.QRect(280, 10, 331, 361))
|
|
||||||
self.custom_applications.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
|
||||||
self.custom_applications.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
|
||||||
self.custom_applications.setObjectName("custom_applications")
|
|
||||||
self.save_path = QtWidgets.QLineEdit(self.wizardPage2)
|
|
||||||
self.save_path.setGeometry(QtCore.QRect(80, 70, 113, 20))
|
|
||||||
self.save_path.setObjectName("save_path")
|
|
||||||
self.btn_save_path_select = QtWidgets.QToolButton(self.wizardPage2)
|
|
||||||
self.btn_save_path_select.setGeometry(QtCore.QRect(200, 70, 25, 19))
|
|
||||||
self.btn_save_path_select.setObjectName("btn_save_path_select")
|
|
||||||
Wizard.addPage(self.wizardPage2)
|
|
||||||
|
|
||||||
self.retranslateUi(Wizard)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(Wizard)
|
|
||||||
|
|
||||||
def retranslateUi(self, Wizard):
|
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
Wizard.setWindowTitle(_translate("Wizard", "Wizard"))
|
|
||||||
self.textBrowser.setHtml(
|
|
||||||
_translate(
|
|
||||||
"Wizard",
|
|
||||||
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">\n'
|
|
||||||
'<html><head><meta name="qrichtext" content="1" /><style type="text/css">\n'
|
|
||||||
"p, li { white-space: pre-wrap; }\n"
|
|
||||||
"</style></head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
|
|
||||||
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Setup für das Semesterapparatsprogram.</p>\n'
|
|
||||||
'<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>\n'
|
|
||||||
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Im Anschluss werden wichtige Einstellungen gesetzt, welche auch im späteren Verlauf verändert werden können.</p>\n'
|
|
||||||
'<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html>',
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.label.setText(_translate("Wizard", "Grundeinstellungen"))
|
|
||||||
self.label_2.setToolTip(
|
|
||||||
_translate(
|
|
||||||
"Wizard",
|
|
||||||
"Opens the downloaded files with the default applications set in the OS",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.label_2.setText(_translate("Wizard", "Default Apps"))
|
|
||||||
self.label_3.setToolTip(
|
|
||||||
_translate(
|
|
||||||
"Wizard",
|
|
||||||
"Path where the downloaded files are stored. Defaults to ~/Desktop/SemapFiles",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.label_3.setText(_translate("Wizard", "Save Path"))
|
|
||||||
self.save_path.setPlaceholderText(_translate("Wizard", "~/Desktop/SemapFiles"))
|
|
||||||
self.btn_save_path_select.setText(_translate("Wizard", "..."))
|
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
## Form generated from reading UI file 'apparat_extend.ui'
|
|
||||||
##
|
|
||||||
## Created by: Qt User Interface Compiler version 6.4.0
|
|
||||||
##
|
|
||||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
from PyQt6.QtCore import (
|
|
||||||
QCoreApplication,
|
|
||||||
QDate,
|
|
||||||
QDateTime,
|
|
||||||
QLocale,
|
|
||||||
QMetaObject,
|
|
||||||
QObject,
|
|
||||||
QPoint,
|
|
||||||
QRect,
|
|
||||||
QSize,
|
|
||||||
Qt,
|
|
||||||
QTime,
|
|
||||||
QUrl,
|
|
||||||
)
|
|
||||||
from PyQt6.QtGui import (
|
|
||||||
QBrush,
|
|
||||||
QColor,
|
|
||||||
QConicalGradient,
|
|
||||||
QCursor,
|
|
||||||
QFont,
|
|
||||||
QFontDatabase,
|
|
||||||
QGradient,
|
|
||||||
QIcon,
|
|
||||||
QImage,
|
|
||||||
QKeySequence,
|
|
||||||
QLinearGradient,
|
|
||||||
QPainter,
|
|
||||||
QPalette,
|
|
||||||
QPixmap,
|
|
||||||
QRadialGradient,
|
|
||||||
QTransform,
|
|
||||||
)
|
|
||||||
from PyQt6.QtWidgets import (
|
|
||||||
QAbstractButton,
|
|
||||||
QApplication,
|
|
||||||
QCheckBox,
|
|
||||||
QDialog,
|
|
||||||
QDialogButtonBox,
|
|
||||||
QFrame,
|
|
||||||
QLabel,
|
|
||||||
QLineEdit,
|
|
||||||
QRadioButton,
|
|
||||||
QSizePolicy,
|
|
||||||
QWidget,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_Dialog(object):
|
|
||||||
def setupUi(self, Dialog):
|
|
||||||
if not Dialog.objectName():
|
|
||||||
Dialog.setObjectName("Dialog")
|
|
||||||
Dialog.resize(388, 103)
|
|
||||||
sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
|
|
||||||
Dialog.setSizePolicy(sizePolicy)
|
|
||||||
Dialog.setMinimumSize(QSize(388, 103))
|
|
||||||
Dialog.setMaximumSize(QSize(388, 103))
|
|
||||||
self.buttonBox = QDialogButtonBox(Dialog)
|
|
||||||
self.buttonBox.setObjectName("buttonBox")
|
|
||||||
self.buttonBox.setGeometry(QRect(290, 30, 81, 241))
|
|
||||||
self.buttonBox.setOrientation(Qt.Vertical)
|
|
||||||
self.buttonBox.setStandardButtons(
|
|
||||||
QDialogButtonBox.Abort | QDialogButtonBox.Save
|
|
||||||
)
|
|
||||||
self.label = QLabel(Dialog)
|
|
||||||
self.label.setObjectName("label")
|
|
||||||
self.label.setGeometry(QRect(10, 0, 281, 31))
|
|
||||||
font = QFont()
|
|
||||||
font.setPointSize(10)
|
|
||||||
self.label.setFont(font)
|
|
||||||
self.frame = QFrame(Dialog)
|
|
||||||
self.frame.setObjectName("frame")
|
|
||||||
self.frame.setGeometry(QRect(10, 30, 241, 41))
|
|
||||||
self.frame.setFrameShape(QFrame.StyledPanel)
|
|
||||||
self.frame.setFrameShadow(QFrame.Raised)
|
|
||||||
self.line = QFrame(self.frame)
|
|
||||||
self.line.setObjectName("line")
|
|
||||||
self.line.setGeometry(QRect(120, 0, 3, 61))
|
|
||||||
self.line.setFrameShape(QFrame.VLine)
|
|
||||||
self.line.setFrameShadow(QFrame.Sunken)
|
|
||||||
self.rad_sommer = QRadioButton(self.frame)
|
|
||||||
self.rad_sommer.setObjectName("rad_sommer")
|
|
||||||
self.rad_sommer.setGeometry(QRect(10, 10, 82, 21))
|
|
||||||
self.rad_winter = QRadioButton(self.frame)
|
|
||||||
self.rad_winter.setObjectName("rad_winter")
|
|
||||||
self.rad_winter.setGeometry(QRect(140, 10, 82, 21))
|
|
||||||
self.sem_year = QLineEdit(Dialog)
|
|
||||||
self.sem_year.setObjectName("sem_year")
|
|
||||||
self.sem_year.setGeometry(QRect(10, 70, 121, 20))
|
|
||||||
self.checkBox = QCheckBox(Dialog)
|
|
||||||
self.checkBox.setObjectName("checkBox")
|
|
||||||
self.checkBox.setGeometry(QRect(150, 70, 91, 21))
|
|
||||||
|
|
||||||
self.retranslateUi(Dialog)
|
|
||||||
self.buttonBox.accepted.connect(Dialog.accept)
|
|
||||||
self.buttonBox.rejected.connect(Dialog.reject)
|
|
||||||
|
|
||||||
QMetaObject.connectSlotsByName(Dialog)
|
|
||||||
|
|
||||||
# setupUi
|
|
||||||
|
|
||||||
def retranslateUi(self, Dialog):
|
|
||||||
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", "Dialog", None))
|
|
||||||
self.label.setText(
|
|
||||||
QCoreApplication.translate(
|
|
||||||
"Dialog", "Bis wann soll der Apparat verl\u00e4ngert werden?", None
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.rad_sommer.setText(QCoreApplication.translate("Dialog", "Sommer", None))
|
|
||||||
self.rad_winter.setText(QCoreApplication.translate("Dialog", "Winter", None))
|
|
||||||
self.sem_year.setPlaceholderText(
|
|
||||||
QCoreApplication.translate("Dialog", "2023", None)
|
|
||||||
)
|
|
||||||
self.checkBox.setText(
|
|
||||||
QCoreApplication.translate("Dialog", "Dauerapparat", None)
|
|
||||||
)
|
|
||||||
|
|
||||||
# retranslateUi
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
## Form generated from reading UI file 'confirm_extend.ui'
|
|
||||||
##
|
|
||||||
## Created by: Qt User Interface Compiler version 6.4.0
|
|
||||||
##
|
|
||||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
from PyQt6.QtCore import (
|
|
||||||
QCoreApplication,
|
|
||||||
QDate,
|
|
||||||
QDateTime,
|
|
||||||
QLocale,
|
|
||||||
QMetaObject,
|
|
||||||
QObject,
|
|
||||||
QPoint,
|
|
||||||
QRect,
|
|
||||||
QSize,
|
|
||||||
Qt,
|
|
||||||
QTime,
|
|
||||||
QUrl,
|
|
||||||
)
|
|
||||||
from PyQt6.QtGui import (
|
|
||||||
QBrush,
|
|
||||||
QColor,
|
|
||||||
QConicalGradient,
|
|
||||||
QCursor,
|
|
||||||
QFont,
|
|
||||||
QFontDatabase,
|
|
||||||
QGradient,
|
|
||||||
QIcon,
|
|
||||||
QImage,
|
|
||||||
QKeySequence,
|
|
||||||
QLinearGradient,
|
|
||||||
QPainter,
|
|
||||||
QPalette,
|
|
||||||
QPixmap,
|
|
||||||
QRadialGradient,
|
|
||||||
QTransform,
|
|
||||||
)
|
|
||||||
from PyQt6.QtWidgets import (
|
|
||||||
QAbstractButton,
|
|
||||||
QApplication,
|
|
||||||
QDialog,
|
|
||||||
QDialogButtonBox,
|
|
||||||
QSizePolicy,
|
|
||||||
QTextEdit,
|
|
||||||
QWidget,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_extend_confirm(object):
|
|
||||||
def setupUi(self, extend_confirm):
|
|
||||||
if not extend_confirm.objectName():
|
|
||||||
extend_confirm.setObjectName("extend_confirm")
|
|
||||||
extend_confirm.resize(380, 97)
|
|
||||||
self.buttonBox = QDialogButtonBox(extend_confirm)
|
|
||||||
self.buttonBox.setObjectName("buttonBox")
|
|
||||||
self.buttonBox.setGeometry(QRect(290, 20, 81, 241))
|
|
||||||
self.buttonBox.setOrientation(Qt.Vertical)
|
|
||||||
self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel | QDialogButtonBox.Ok)
|
|
||||||
self.textEdit = QTextEdit(extend_confirm)
|
|
||||||
self.textEdit.setObjectName("textEdit")
|
|
||||||
self.textEdit.setGeometry(QRect(10, 10, 271, 81))
|
|
||||||
|
|
||||||
self.retranslateUi(extend_confirm)
|
|
||||||
self.buttonBox.accepted.connect(extend_confirm.accept)
|
|
||||||
self.buttonBox.rejected.connect(extend_confirm.reject)
|
|
||||||
|
|
||||||
QMetaObject.connectSlotsByName(extend_confirm)
|
|
||||||
|
|
||||||
# setupUi
|
|
||||||
|
|
||||||
def retranslateUi(self, extend_confirm):
|
|
||||||
extend_confirm.setWindowTitle(
|
|
||||||
QCoreApplication.translate("extend_confirm", "Dialog", None)
|
|
||||||
)
|
|
||||||
|
|
||||||
# retranslateUi
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# Form implementation generated from reading ui file 'ui/dialogs/extend_apparat.ui'
|
|
||||||
#
|
|
||||||
# Created by: PyQt6 UI code generator 6.3.1
|
|
||||||
#
|
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
|
||||||
|
|
||||||
|
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_Frame(object):
|
|
||||||
def setupUi(self, Frame):
|
|
||||||
Frame.setObjectName("Frame")
|
|
||||||
Frame.resize(317, 126)
|
|
||||||
self.label = QtWidgets.QLabel(Frame)
|
|
||||||
self.label.setGeometry(QtCore.QRect(60, 20, 231, 16))
|
|
||||||
self.label.setObjectName("label")
|
|
||||||
self.buttonBox = QtWidgets.QDialogButtonBox(Frame)
|
|
||||||
self.buttonBox.setGeometry(QtCore.QRect(90, 90, 156, 23))
|
|
||||||
self.buttonBox.setStandardButtons(
|
|
||||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
|
||||||
| QtWidgets.QDialogButtonBox.StandardButton.Ok
|
|
||||||
)
|
|
||||||
self.buttonBox.setObjectName("buttonBox")
|
|
||||||
self.sem_winter = QtWidgets.QRadioButton(Frame)
|
|
||||||
self.sem_winter.setGeometry(QtCore.QRect(60, 40, 82, 17))
|
|
||||||
self.sem_winter.setObjectName("sem_winter")
|
|
||||||
self.sem_sommer = QtWidgets.QRadioButton(Frame)
|
|
||||||
self.sem_sommer.setGeometry(QtCore.QRect(60, 60, 82, 17))
|
|
||||||
self.sem_sommer.setObjectName("sem_sommer")
|
|
||||||
self.sem_year = QtWidgets.QLineEdit(Frame)
|
|
||||||
self.sem_year.setGeometry(QtCore.QRect(160, 50, 113, 20))
|
|
||||||
self.sem_year.setObjectName("sem_year")
|
|
||||||
|
|
||||||
self.retranslateUi(Frame)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(Frame)
|
|
||||||
|
|
||||||
def retranslateUi(self, Frame):
|
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
Frame.setWindowTitle(_translate("Frame", "Frame"))
|
|
||||||
self.label.setText(
|
|
||||||
_translate("Frame", "Bis wann soll der Apparat verlängert werden?")
|
|
||||||
)
|
|
||||||
self.sem_winter.setText(_translate("Frame", "Winter"))
|
|
||||||
self.sem_sommer.setText(_translate("Frame", "Sommer"))
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
import sys
|
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
|
||||||
Frame = QtWidgets.QFrame()
|
|
||||||
ui = Ui_Frame()
|
|
||||||
ui.setupUi(Frame)
|
|
||||||
Frame.show()
|
|
||||||
sys.exit(app.exec())
|
|
||||||
@@ -1,408 +0,0 @@
|
|||||||
# Form implementation generated from reading ui file 'untitled.ui'
|
|
||||||
#
|
|
||||||
# Created by: PyQt6 UI code generator 6.3.1
|
|
||||||
#
|
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
|
||||||
|
|
||||||
|
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_MainWindow(object):
|
|
||||||
def setupUi(self, MainWindow):
|
|
||||||
MainWindow.setObjectName("MainWindow")
|
|
||||||
MainWindow.resize(1280, 720)
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
|
|
||||||
MainWindow.setSizePolicy(sizePolicy)
|
|
||||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
|
||||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(
|
|
||||||
self.centralwidget.sizePolicy().hasHeightForWidth()
|
|
||||||
)
|
|
||||||
self.centralwidget.setSizePolicy(sizePolicy)
|
|
||||||
self.centralwidget.setObjectName("centralwidget")
|
|
||||||
self.verticalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
|
|
||||||
self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 1271, 671))
|
|
||||||
self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
|
|
||||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
|
|
||||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
|
||||||
self.verticalLayout.setObjectName("verticalLayout")
|
|
||||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
|
||||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
|
||||||
self.gridLayout = QtWidgets.QGridLayout()
|
|
||||||
self.gridLayout.setObjectName("gridLayout")
|
|
||||||
self.tabWidget = QtWidgets.QTabWidget(self.verticalLayoutWidget)
|
|
||||||
self.tabWidget.setObjectName("tabWidget")
|
|
||||||
self.tab = QtWidgets.QWidget()
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
|
||||||
QtWidgets.QSizePolicy.Policy.Preferred,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Preferred,
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.tab.sizePolicy().hasHeightForWidth())
|
|
||||||
self.tab.setSizePolicy(sizePolicy)
|
|
||||||
self.tab.setObjectName("tab")
|
|
||||||
self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.tab)
|
|
||||||
self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(0, 0, 1261, 161))
|
|
||||||
self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2")
|
|
||||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2)
|
|
||||||
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
|
|
||||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
|
||||||
self.formLayout = QtWidgets.QFormLayout()
|
|
||||||
self.formLayout.setObjectName("formLayout")
|
|
||||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
|
|
||||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
|
||||||
spacerItem = QtWidgets.QSpacerItem(
|
|
||||||
20,
|
|
||||||
40,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
self.verticalLayout_2.addItem(spacerItem)
|
|
||||||
self.load_app = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
|
|
||||||
self.load_app.setObjectName("load_app")
|
|
||||||
self.verticalLayout_2.addWidget(self.load_app)
|
|
||||||
self.create_new_app = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
|
|
||||||
self.create_new_app.setObjectName("create_new_app")
|
|
||||||
self.verticalLayout_2.addWidget(self.create_new_app)
|
|
||||||
spacerItem1 = QtWidgets.QSpacerItem(
|
|
||||||
20,
|
|
||||||
40,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
self.verticalLayout_2.addItem(spacerItem1)
|
|
||||||
self.formLayout.setLayout(
|
|
||||||
0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.verticalLayout_2
|
|
||||||
)
|
|
||||||
self.tableWidget_apparate = QtWidgets.QTableWidget(
|
|
||||||
self.horizontalLayoutWidget_2
|
|
||||||
)
|
|
||||||
self.tableWidget_apparate.setObjectName("tableWidget_apparate")
|
|
||||||
self.tableWidget_apparate.setColumnCount(4)
|
|
||||||
self.tableWidget_apparate.setRowCount(0)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparate.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparate.setHorizontalHeaderItem(1, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparate.setHorizontalHeaderItem(2, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparate.setHorizontalHeaderItem(3, item)
|
|
||||||
self.formLayout.setWidget(
|
|
||||||
0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.tableWidget_apparate
|
|
||||||
)
|
|
||||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
|
||||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
|
||||||
self.formLayout.setLayout(
|
|
||||||
2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.horizontalLayout_3
|
|
||||||
)
|
|
||||||
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
|
|
||||||
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
|
||||||
self.formLayout.setLayout(
|
|
||||||
1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_4
|
|
||||||
)
|
|
||||||
self.horizontalLayout_2.addLayout(self.formLayout)
|
|
||||||
self.line = QtWidgets.QFrame(self.tab)
|
|
||||||
self.line.setGeometry(QtCore.QRect(0, 160, 1261, 21))
|
|
||||||
self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
|
||||||
self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
|
||||||
self.line.setObjectName("line")
|
|
||||||
self.gridLayoutWidget_2 = QtWidgets.QWidget(self.tab)
|
|
||||||
self.gridLayoutWidget_2.setGeometry(QtCore.QRect(0, 180, 1261, 461))
|
|
||||||
self.gridLayoutWidget_2.setObjectName("gridLayoutWidget_2")
|
|
||||||
self.gridLayout_2 = QtWidgets.QGridLayout(self.gridLayoutWidget_2)
|
|
||||||
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
|
|
||||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
|
||||||
self.tableWidget_apparat_media = QtWidgets.QTableWidget(self.gridLayoutWidget_2)
|
|
||||||
self.tableWidget_apparat_media.setObjectName("tableWidget_apparat_media")
|
|
||||||
self.tableWidget_apparat_media.setColumnCount(4)
|
|
||||||
self.tableWidget_apparat_media.setRowCount(0)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(1, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(2, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(3, item)
|
|
||||||
self.gridLayout_2.addWidget(self.tableWidget_apparat_media, 3, 0, 1, 1)
|
|
||||||
self.label = QtWidgets.QLabel(self.gridLayoutWidget_2)
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(11)
|
|
||||||
font.setBold(True)
|
|
||||||
font.setWeight(75)
|
|
||||||
self.label.setFont(font)
|
|
||||||
self.label.setObjectName("label")
|
|
||||||
self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1)
|
|
||||||
self.app_group_box = QtWidgets.QGroupBox(self.gridLayoutWidget_2)
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
|
||||||
QtWidgets.QSizePolicy.Policy.Preferred,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(
|
|
||||||
self.app_group_box.sizePolicy().hasHeightForWidth()
|
|
||||||
)
|
|
||||||
self.app_group_box.setSizePolicy(sizePolicy)
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(12)
|
|
||||||
font.setBold(True)
|
|
||||||
font.setWeight(75)
|
|
||||||
self.app_group_box.setFont(font)
|
|
||||||
self.app_group_box.setAlignment(
|
|
||||||
QtCore.Qt.AlignmentFlag.AlignLeading
|
|
||||||
| QtCore.Qt.AlignmentFlag.AlignLeft
|
|
||||||
| QtCore.Qt.AlignmentFlag.AlignVCenter
|
|
||||||
)
|
|
||||||
self.app_group_box.setCheckable(False)
|
|
||||||
self.app_group_box.setObjectName("app_group_box")
|
|
||||||
self.tableWidget = QtWidgets.QTableWidget(self.app_group_box)
|
|
||||||
self.tableWidget.setGeometry(QtCore.QRect(820, 20, 256, 192))
|
|
||||||
self.tableWidget.setObjectName("tableWidget")
|
|
||||||
self.tableWidget.setColumnCount(2)
|
|
||||||
self.tableWidget.setRowCount(0)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget.setHorizontalHeaderItem(1, item)
|
|
||||||
self.frame = QtWidgets.QFrame(self.app_group_box)
|
|
||||||
self.frame.setGeometry(QtCore.QRect(10, 30, 731, 151))
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
|
||||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
|
|
||||||
self.frame.setSizePolicy(sizePolicy)
|
|
||||||
self.frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
|
||||||
self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
|
||||||
self.frame.setObjectName("frame")
|
|
||||||
self.drpdwn_prof_title = QtWidgets.QComboBox(self.frame)
|
|
||||||
self.drpdwn_prof_title.setGeometry(QtCore.QRect(110, 50, 69, 22))
|
|
||||||
self.drpdwn_prof_title.setObjectName("drpdwn_prof_title")
|
|
||||||
self.label_5 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_5.setGeometry(QtCore.QRect(250, 20, 91, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_5.setFont(font)
|
|
||||||
self.label_5.setObjectName("label_5")
|
|
||||||
self.lineEdit = QtWidgets.QLineEdit(self.frame)
|
|
||||||
self.lineEdit.setGeometry(QtCore.QRect(110, 80, 121, 20))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.lineEdit.setFont(font)
|
|
||||||
self.lineEdit.setObjectName("lineEdit")
|
|
||||||
self.sem_winter = QtWidgets.QRadioButton(self.frame)
|
|
||||||
self.sem_winter.setGeometry(QtCore.QRect(340, 50, 82, 17))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.sem_winter.setFont(font)
|
|
||||||
self.sem_winter.setObjectName("sem_winter")
|
|
||||||
self.label_4 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_4.setGeometry(QtCore.QRect(10, 80, 71, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_4.setFont(font)
|
|
||||||
self.label_4.setObjectName("label_4")
|
|
||||||
self.drpdwn_app_nr = QtWidgets.QComboBox(self.frame)
|
|
||||||
self.drpdwn_app_nr.setGeometry(QtCore.QRect(110, 20, 69, 22))
|
|
||||||
self.drpdwn_app_nr.setObjectName("drpdwn_app_nr")
|
|
||||||
self.app_name = QtWidgets.QLineEdit(self.frame)
|
|
||||||
self.app_name.setGeometry(QtCore.QRect(340, 20, 113, 20))
|
|
||||||
self.app_name.setObjectName("app_name")
|
|
||||||
self.sem_sommer = QtWidgets.QRadioButton(self.frame)
|
|
||||||
self.sem_sommer.setGeometry(QtCore.QRect(340, 70, 82, 17))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.sem_sommer.setFont(font)
|
|
||||||
self.sem_sommer.setObjectName("sem_sommer")
|
|
||||||
self.label_3 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_3.setGeometry(QtCore.QRect(10, 50, 61, 20))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_3.setFont(font)
|
|
||||||
self.label_3.setObjectName("label_3")
|
|
||||||
self.label_6 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_6.setGeometry(QtCore.QRect(270, 60, 51, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_6.setFont(font)
|
|
||||||
self.label_6.setObjectName("label_6")
|
|
||||||
self.sem_year = QtWidgets.QLineEdit(self.frame)
|
|
||||||
self.sem_year.setGeometry(QtCore.QRect(410, 60, 113, 20))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.sem_year.setFont(font)
|
|
||||||
self.sem_year.setObjectName("sem_year")
|
|
||||||
self.label_2 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_2.setGeometry(QtCore.QRect(10, 20, 101, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_2.setFont(font)
|
|
||||||
self.label_2.setObjectName("label_2")
|
|
||||||
self.btn_apparat_save = QtWidgets.QPushButton(self.frame)
|
|
||||||
self.btn_apparat_save.setGeometry(QtCore.QRect(260, 120, 75, 23))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.btn_apparat_save.setFont(font)
|
|
||||||
self.btn_apparat_save.setObjectName("btn_apparat_save")
|
|
||||||
self.btn_apparat_apply = QtWidgets.QPushButton(self.frame)
|
|
||||||
self.btn_apparat_apply.setGeometry(QtCore.QRect(350, 120, 75, 23))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.btn_apparat_apply.setFont(font)
|
|
||||||
self.btn_apparat_apply.setObjectName("btn_apparat_apply")
|
|
||||||
self.checkBox = QtWidgets.QCheckBox(self.frame)
|
|
||||||
self.checkBox.setGeometry(QtCore.QRect(340, 90, 101, 17))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.checkBox.setFont(font)
|
|
||||||
self.checkBox.setObjectName("checkBox")
|
|
||||||
self.btn_add_document = QtWidgets.QPushButton(self.app_group_box)
|
|
||||||
self.btn_add_document.setGeometry(QtCore.QRect(1100, 40, 131, 25))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.btn_add_document.setFont(font)
|
|
||||||
self.btn_add_document.setObjectName("btn_add_document")
|
|
||||||
self.btn_open_document = QtWidgets.QPushButton(self.app_group_box)
|
|
||||||
self.btn_open_document.setGeometry(QtCore.QRect(1100, 80, 131, 25))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.btn_open_document.setFont(font)
|
|
||||||
self.btn_open_document.setObjectName("btn_open_document")
|
|
||||||
self.toolButton = QtWidgets.QToolButton(self.app_group_box)
|
|
||||||
self.toolButton.setGeometry(QtCore.QRect(1110, 110, 25, 19))
|
|
||||||
self.toolButton.setObjectName("toolButton")
|
|
||||||
self.gridLayout_2.addWidget(self.app_group_box, 2, 0, 1, 1)
|
|
||||||
self.tabWidget.addTab(self.tab, "")
|
|
||||||
self.tab_2 = QtWidgets.QWidget()
|
|
||||||
self.tab_2.setObjectName("tab_2")
|
|
||||||
self.tabWidget.addTab(self.tab_2, "")
|
|
||||||
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1)
|
|
||||||
self.horizontalLayout.addLayout(self.gridLayout)
|
|
||||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
|
||||||
MainWindow.setCentralWidget(self.centralwidget)
|
|
||||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1280, 21))
|
|
||||||
self.menubar.setObjectName("menubar")
|
|
||||||
self.menuDatei = QtWidgets.QMenu(self.menubar)
|
|
||||||
self.menuDatei.setObjectName("menuDatei")
|
|
||||||
self.menuEinstellungen = QtWidgets.QMenu(self.menubar)
|
|
||||||
self.menuEinstellungen.setObjectName("menuEinstellungen")
|
|
||||||
MainWindow.setMenuBar(self.menubar)
|
|
||||||
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
|
||||||
self.statusbar.setObjectName("statusbar")
|
|
||||||
MainWindow.setStatusBar(self.statusbar)
|
|
||||||
self.menubar.addAction(self.menuDatei.menuAction())
|
|
||||||
self.menubar.addAction(self.menuEinstellungen.menuAction())
|
|
||||||
|
|
||||||
self.retranslateUi(MainWindow)
|
|
||||||
self.tabWidget.setCurrentIndex(0)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
|
||||||
|
|
||||||
def retranslateUi(self, MainWindow):
|
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
|
|
||||||
self.load_app.setToolTip(
|
|
||||||
_translate("MainWindow", "Load the Semesterapparate from the database")
|
|
||||||
)
|
|
||||||
self.load_app.setText(_translate("MainWindow", "App. Laden"))
|
|
||||||
self.create_new_app.setText(_translate("MainWindow", "neu. App anlegen"))
|
|
||||||
item = self.tableWidget_apparate.horizontalHeaderItem(0)
|
|
||||||
item.setText(_translate("MainWindow", "AppNr"))
|
|
||||||
item = self.tableWidget_apparate.horizontalHeaderItem(1)
|
|
||||||
item.setText(_translate("MainWindow", "App Name"))
|
|
||||||
item = self.tableWidget_apparate.horizontalHeaderItem(2)
|
|
||||||
item.setText(_translate("MainWindow", "Professor"))
|
|
||||||
item = self.tableWidget_apparate.horizontalHeaderItem(3)
|
|
||||||
item.setText(_translate("MainWindow", "Dauerapparat"))
|
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(0)
|
|
||||||
item.setText(_translate("MainWindow", "Buchtitel"))
|
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(1)
|
|
||||||
item.setText(_translate("MainWindow", "Autor"))
|
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(2)
|
|
||||||
item.setText(_translate("MainWindow", "Auflage"))
|
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(3)
|
|
||||||
item.setText(_translate("MainWindow", "Signatur"))
|
|
||||||
self.label.setText(_translate("MainWindow", "Medienliste"))
|
|
||||||
self.app_group_box.setTitle(_translate("MainWindow", "Apparatsdetails"))
|
|
||||||
item = self.tableWidget.horizontalHeaderItem(0)
|
|
||||||
item.setText(_translate("MainWindow", "Dokumentname"))
|
|
||||||
item = self.tableWidget.horizontalHeaderItem(1)
|
|
||||||
item.setText(_translate("MainWindow", "Typ"))
|
|
||||||
self.label_5.setText(_translate("MainWindow", "Apparatsname"))
|
|
||||||
self.lineEdit.setPlaceholderText(_translate("MainWindow", "Nachname, Vorname"))
|
|
||||||
self.sem_winter.setText(_translate("MainWindow", "Winter"))
|
|
||||||
self.label_4.setText(_translate("MainWindow", "Prof. Name"))
|
|
||||||
self.sem_sommer.setText(_translate("MainWindow", "Sommer"))
|
|
||||||
self.label_3.setText(_translate("MainWindow", "Prof. Titel"))
|
|
||||||
self.label_6.setText(_translate("MainWindow", "Semester"))
|
|
||||||
self.sem_year.setPlaceholderText(_translate("MainWindow", "2023"))
|
|
||||||
self.label_2.setText(_translate("MainWindow", "Apparatsnummer"))
|
|
||||||
self.btn_apparat_save.setText(_translate("MainWindow", "Speichern"))
|
|
||||||
self.btn_apparat_apply.setText(_translate("MainWindow", "Aktualisieren"))
|
|
||||||
self.checkBox.setText(_translate("MainWindow", "Dauerapparat"))
|
|
||||||
self.btn_add_document.setText(_translate("MainWindow", "Dokument hinzufügen"))
|
|
||||||
self.btn_open_document.setText(_translate("MainWindow", "Dokument öffnen"))
|
|
||||||
self.toolButton.setText(_translate("MainWindow", "..."))
|
|
||||||
self.tabWidget.setTabText(
|
|
||||||
self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Tab 1")
|
|
||||||
)
|
|
||||||
self.tabWidget.setTabText(
|
|
||||||
self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Tab 2")
|
|
||||||
)
|
|
||||||
self.menuDatei.setTitle(_translate("MainWindow", "Datei"))
|
|
||||||
self.menuEinstellungen.setTitle(_translate("MainWindow", "Einstellungen"))
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
import sys
|
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
|
||||||
MainWindow = QtWidgets.QMainWindow()
|
|
||||||
ui = Ui_MainWindow()
|
|
||||||
ui.setupUi(MainWindow)
|
|
||||||
MainWindow.show()
|
|
||||||
sys.exit(app.exec())
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>MainWindow</class>
|
|
||||||
<widget class="QMainWindow" name="MainWindow">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>640</width>
|
|
||||||
<height>480</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>MainWindow</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="centralwidget">
|
|
||||||
<widget class="QGraphicsView" name="graphicsView">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>330</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>256</width>
|
|
||||||
<height>192</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="widget" native="true">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>251</width>
|
|
||||||
<height>271</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QStackedWidget" name="stackedWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>300</x>
|
|
||||||
<y>220</y>
|
|
||||||
<width>291</width>
|
|
||||||
<height>201</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="page"/>
|
|
||||||
<widget class="QWidget" name="page_2"/>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenuBar" name="menubar">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>640</width>
|
|
||||||
<height>21</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QStatusBar" name="statusbar"/>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
# Form implementation generated from reading ui file '/home/alexander/GitHub/Semesterapparate/ui/plotdata.ui'
|
|
||||||
#
|
|
||||||
# Created by: PyQt6 UI code generator 6.5.3
|
|
||||||
#
|
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
|
||||||
|
|
||||||
|
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_MainWindow(object):
|
|
||||||
def setupUi(self, MainWindow):
|
|
||||||
MainWindow.setObjectName("MainWindow")
|
|
||||||
MainWindow.resize(640, 480)
|
|
||||||
self.centralwidget = QtWidgets.QWidget(parent=MainWindow)
|
|
||||||
self.centralwidget.setObjectName("centralwidget")
|
|
||||||
self.graphicsView = QtWidgets.QGraphicsView(parent=self.centralwidget)
|
|
||||||
self.graphicsView.setGeometry(QtCore.QRect(330, 10, 256, 192))
|
|
||||||
self.graphicsView.setObjectName("graphicsView")
|
|
||||||
self.widget = QtWidgets.QWidget(parent=self.centralwidget)
|
|
||||||
self.widget.setGeometry(QtCore.QRect(10, 0, 251, 271))
|
|
||||||
self.widget.setObjectName("widget")
|
|
||||||
self.stackedWidget = QtWidgets.QStackedWidget(parent=self.centralwidget)
|
|
||||||
self.stackedWidget.setGeometry(QtCore.QRect(300, 220, 291, 201))
|
|
||||||
self.stackedWidget.setObjectName("stackedWidget")
|
|
||||||
self.page = QtWidgets.QWidget()
|
|
||||||
self.page.setObjectName("page")
|
|
||||||
self.stackedWidget.addWidget(self.page)
|
|
||||||
self.page_2 = QtWidgets.QWidget()
|
|
||||||
self.page_2.setObjectName("page_2")
|
|
||||||
self.stackedWidget.addWidget(self.page_2)
|
|
||||||
MainWindow.setCentralWidget(self.centralwidget)
|
|
||||||
self.menubar = QtWidgets.QMenuBar(parent=MainWindow)
|
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 640, 21))
|
|
||||||
self.menubar.setObjectName("menubar")
|
|
||||||
MainWindow.setMenuBar(self.menubar)
|
|
||||||
self.statusbar = QtWidgets.QStatusBar(parent=MainWindow)
|
|
||||||
self.statusbar.setObjectName("statusbar")
|
|
||||||
MainWindow.setStatusBar(self.statusbar)
|
|
||||||
|
|
||||||
self.retranslateUi(MainWindow)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
|
||||||
|
|
||||||
def retranslateUi(self, MainWindow):
|
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
<RCC>
|
|
||||||
<qresource prefix="warn_image">
|
|
||||||
<file>icons/warning.png</file>
|
|
||||||
</qresource>
|
|
||||||
<qresource prefix="critical">
|
|
||||||
<file>icons/critical.png</file>
|
|
||||||
</qresource>
|
|
||||||
<qresource prefix="information">
|
|
||||||
<file>icons/information.png</file>
|
|
||||||
</qresource>
|
|
||||||
<qresource prefix="question">
|
|
||||||
<file>icons/question.png</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
||||||
@@ -1,162 +0,0 @@
|
|||||||
# Resource object code (Python 3)
|
|
||||||
# Created by: object code
|
|
||||||
# Created by: The Resource Compiler for Qt version 6.6.2
|
|
||||||
# WARNING! All changes made in this file will be lost!
|
|
||||||
|
|
||||||
from PyQt6 import QtCore
|
|
||||||
|
|
||||||
qt_resource_data = b"\
|
|
||||||
\x00\x00\x00\xde\
|
|
||||||
\x89\
|
|
||||||
PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
|
|
||||||
\x00\x00 \x00\x00\x00 \x02\x03\x00\x00\x00\x0e\x14\x92g\
|
|
||||||
\x00\x00\x00\x0cPLTEe-g\xff\xff\x00\x99\x99\
|
|
||||||
\x99\x00\x00\x00\xb2\x18W>\x00\x00\x00\x01tRNS\
|
|
||||||
\x00@\xe6\xd8f\x00\x00\x00\x80IDATx\xdaU\
|
|
||||||
\xcc\xb1\x0d\xc3 \x10\x85\xe1\x93\xa8Q\xf6HO\x9d)\
|
|
||||||
\x9e\xa8\x82\xd7\x88h`\x14\xca\x88)\xb2\xc4\xed`e\
|
|
||||||
\x888\xdc\x9d-\x9b\xbfy_\xf5h\xf4\xa0=\xfe\xd8\
|
|
||||||
:\xbc\x0ed\x83G\xaa3\x02b\x9b\xc1\xc0j(\x06\
|
|
||||||
\x87\x8d\xf3\x04?\x90\xea\x15a \xb6+\x18E\x8eN\
|
|
||||||
8\x08\xb2\xe2\xa9\xf0\x8aT\x05P\x04`\x01b\x13\x14\
|
|
||||||
\x16\xb0\x02\xab`\x81A\xfb\x9e\x08\xba\xb1\xd3m\x93~\
|
|
||||||
\x9d\xa8ko\xa2\xbb\xa2\xfd\x01\xa6\xe9X\x86\xbd\xa6E\
|
|
||||||
\x00\x00\x00\x00IEND\xaeB`\x82\
|
|
||||||
\x00\x00\x00\xf5\
|
|
||||||
\x89\
|
|
||||||
PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
|
|
||||||
\x00\x00 \x00\x00\x00 \x04\x03\x00\x00\x00\x81Tg\xc7\
|
|
||||||
\x00\x00\x00\x0fPLTEet-\xff\xff\xff\x99\x99\
|
|
||||||
\x99\x00\x00\xff\x00\x00\x00\x06\xefPJ\x00\x00\x00\x01t\
|
|
||||||
RNS\x00@\xe6\xd8f\x00\x00\x00\x94IDAT\
|
|
||||||
x\xda\xad\x91\xd1\x09\x03!\x10D\x17\xb9\x066g\x01\
|
|
||||||
fH\x03\xc1\x06\xa2\xd8\x7fM\xc9:\x1eC$\x9fy\
|
|
||||||
?\xe2\xe3\xad\x88\xda$\x01(&pw\xf7\x1b\xb4w\
|
|
||||||
r\x99\xe4\x17\x85\x22\xfa\xb3>\xdd=+\xa8\xb5\xc6\xf2\
|
|
||||||
b \x91\x19\xac\x91\x99P\x88\xce\x09\x91\x0b\xc5\x19g\
|
|
||||||
H\xd0P\xe0/\x22}\x89\xfeCpf\x89\x1c\xefv\
|
|
||||||
p?M\x0faM\x17\x07\xcc\x22!\x0c\x82\xe1d\x00\
|
|
||||||
\xebQG\x8b~\xe8+\xf0\x18\xd13\xa0A\x0ba\x22\
|
|
||||||
}D\xf4\xe2\xd8\x85\xb5]\x1c\xbb0\xec\x22Q\xbc\x01\
|
|
||||||
\x01\xb7#\x93\xf0\xcb\xa6\x83\x00\x00\x00\x00IEND\
|
|
||||||
\xaeB`\x82\
|
|
||||||
\x00\x00\x00\xfc\
|
|
||||||
\x89\
|
|
||||||
PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
|
|
||||||
\x00\x00 \x00\x00\x00 \x02\x03\x00\x00\x00\x0e\x14\x92g\
|
|
||||||
\x00\x00\x00\x0cPLTEe-g\xff\xff\xff\x99\x99\
|
|
||||||
\x99\xff\x00\x00\x9e\xb6)\xe3\x00\x00\x00\x01tRNS\
|
|
||||||
\x00@\xe6\xd8f\x00\x00\x00\x9eIDATx\xdaM\
|
|
||||||
\x8e\xb1\x0d\xc20\x10E\xbfBI\xc1\x1eP0B\xa6\
|
|
||||||
8\xa5\xf4(\xf6()#/\x11\x96H\x0deD\x1f\
|
|
||||||
)\xb2p>w!'\xf1\xaa\xa7\xfb\xdf\xbe\x03p\xe2\
|
|
||||||
\x07;-\xf9\x00l\xc0\xdf\xe8B\xe5H\xc8\x97\x0a\x8d\
|
|
||||||
\xd5*\xc6f\x95'\x19\x99T:\xd6\xa0\xd2V\xe1\xd2\
|
|
||||||
i\xbb\xa5\xc4)\xa8\x90S\x90\xc8Ue\x11\xe1.U\
|
|
||||||
:\xb2\xa8P\x02\xff\xc5#/\x17\x7f^\xfc\xc3\xd9W\
|
|
||||||
\xcc\xbet\xf03z?\xac\x07h\x94\x04\x8c&o\x00\
|
|
||||||
w\x93A\xe5|T\xd0\x8c\x9a$(7n\x19F\x93\
|
|
||||||
\xb3&\xc65\x03\xf8\x02;d\xa4\x1d\xa53i\xfd\x00\
|
|
||||||
\x00\x00\x00IEND\xaeB`\x82\
|
|
||||||
\x00\x00\x00\xfc\
|
|
||||||
\x89\
|
|
||||||
PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
|
|
||||||
\x00\x00 \x00\x00\x00 \x04\x03\x00\x00\x00\x81Tg\xc7\
|
|
||||||
\x00\x00\x00\x0fPLTEet-\xff\xff\xff\x99\x99\
|
|
||||||
\x99\x00\x00\xff\x00\x00\x00\x06\xefPJ\x00\x00\x00\x01t\
|
|
||||||
RNS\x00@\xe6\xd8f\x00\x00\x00\x9bIDAT\
|
|
||||||
x\xda\x85\xd1\xc1\x0d\x03!\x0cD\xd1\x11\xda\x06\x1c(\
|
|
||||||
\x00\xac4\x80h \xfa\xaf)\xf1:\xc6\x84K\xe6\
|
|
||||||
\xb2\xda\xa7\x0f\x17p/0s\x86\x8f\x0b\x11=\xd8\xff\
|
|
||||||
Ig\x12\xc8\x96\x15\xca\x82\xe4AkM>/\x0b\x22\
|
|
||||||
\xc5V%Y\x01\x91%v\xe2\x0bCO8\xa4\xac\x10\
|
|
||||||
\xab\xdc\xe1\xa0\xcd\x0d\xbc\xa0\x9e@\xff\x80\x16\x84\x9fb\
|
|
||||||
\x18\xc4V\x0dP6H\x9c\x81k;2\x04\xd0\xb7+\
|
|
||||||
\x19\xb0\xc4\x03`\x92nJ \x0b\xb3K?\xfd)\xf8\
|
|
||||||
9\xa5\x97\xc0\x84\xbb\x00|\xe1\x03\x19\xfb\xae\x13\xd0O\
|
|
||||||
\xb8N\x00\x9f\x10\x14\xde\xf9|#;u\x5c\xf4%\x00\
|
|
||||||
\x00\x00\x00IEND\xaeB`\x82\
|
|
||||||
"
|
|
||||||
|
|
||||||
qt_resource_name = b"\
|
|
||||||
\x00\x08\
|
|
||||||
\x0b\xca\xa3^\
|
|
||||||
\x00q\
|
|
||||||
\x00u\x00e\x00s\x00t\x00i\x00o\x00n\
|
|
||||||
\x00\x08\
|
|
||||||
\x09\x0a\xf4<\
|
|
||||||
\x00c\
|
|
||||||
\x00r\x00i\x00t\x00i\x00c\x00a\x00l\
|
|
||||||
\x00\x0b\
|
|
||||||
\x09\xd86\x9e\
|
|
||||||
\x00i\
|
|
||||||
\x00n\x00f\x00o\x00r\x00m\x00a\x00t\x00i\x00o\x00n\
|
|
||||||
\x00\x0a\
|
|
||||||
\x04S\x86\xf5\
|
|
||||||
\x00w\
|
|
||||||
\x00a\x00r\x00n\x00_\x00i\x00m\x00a\x00g\x00e\
|
|
||||||
\x00\x05\
|
|
||||||
\x00o\xa6S\
|
|
||||||
\x00i\
|
|
||||||
\x00c\x00o\x00n\x00s\
|
|
||||||
\x00\x0b\
|
|
||||||
\x00\xb5E\xe7\
|
|
||||||
\x00w\
|
|
||||||
\x00a\x00r\x00n\x00i\x00n\x00g\x00.\x00p\x00n\x00g\
|
|
||||||
\x00\x0f\
|
|
||||||
\x06\xb2\xe7'\
|
|
||||||
\x00i\
|
|
||||||
\x00n\x00f\x00o\x00r\x00m\x00a\x00t\x00i\x00o\x00n\x00.\x00p\x00n\x00g\
|
|
||||||
\x00\x0c\
|
|
||||||
\x04-B\xa7\
|
|
||||||
\x00c\
|
|
||||||
\x00r\x00i\x00t\x00i\x00c\x00a\x00l\x00.\x00p\x00n\x00g\
|
|
||||||
\x00\x0c\
|
|
||||||
\x03v\xc2\x07\
|
|
||||||
\x00q\
|
|
||||||
\x00u\x00e\x00s\x00t\x00i\x00o\x00n\x00.\x00p\x00n\x00g\
|
|
||||||
"
|
|
||||||
|
|
||||||
qt_resource_struct = b"\
|
|
||||||
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x04\x00\x00\x00\x01\
|
|
||||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x00H\x00\x02\x00\x00\x00\x01\x00\x00\x00\x0b\
|
|
||||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x00\x16\x00\x02\x00\x00\x00\x01\x00\x00\x00\x09\
|
|
||||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x00,\x00\x02\x00\x00\x00\x01\x00\x00\x00\x07\
|
|
||||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x05\
|
|
||||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x00b\x00\x02\x00\x00\x00\x01\x00\x00\x00\x06\
|
|
||||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x00\xd0\x00\x00\x00\x00\x00\x01\x00\x00\x02\xdb\
|
|
||||||
\x00\x00\x01\x8e,\x5c5%\
|
|
||||||
\x00\x00\x00b\x00\x02\x00\x00\x00\x01\x00\x00\x00\x08\
|
|
||||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x00\x8e\x00\x00\x00\x00\x00\x01\x00\x00\x00\xe2\
|
|
||||||
\x00\x00\x01\x8e,\x5c5\x22\
|
|
||||||
\x00\x00\x00b\x00\x02\x00\x00\x00\x01\x00\x00\x00\x0a\
|
|
||||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x01\x00\x00\x01\xdb\
|
|
||||||
\x00\x00\x01\x8e,\x5c5!\
|
|
||||||
\x00\x00\x00b\x00\x02\x00\x00\x00\x01\x00\x00\x00\x0c\
|
|
||||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x00r\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x01\x8e,\x5c5'\
|
|
||||||
"
|
|
||||||
|
|
||||||
|
|
||||||
def qInitResources():
|
|
||||||
QtCore.qRegisterResourceData(
|
|
||||||
0x03, qt_resource_struct, qt_resource_name, qt_resource_data
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def qCleanupResources():
|
|
||||||
QtCore.qUnregisterResourceData(
|
|
||||||
0x03, qt_resource_struct, qt_resource_name, qt_resource_data
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
qInitResources()
|
|
||||||
573
src/ui/sap.py
573
src/ui/sap.py
@@ -1,573 +0,0 @@
|
|||||||
# Form implementation generated from reading ui file 'ui/semesterapparat_ui.ui'
|
|
||||||
#
|
|
||||||
# Created by: PyQt6 UI code generator 6.3.1
|
|
||||||
#
|
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
|
||||||
|
|
||||||
|
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_MainWindow(object):
|
|
||||||
def setupUi(self, MainWindow):
|
|
||||||
MainWindow.setObjectName("MainWindow")
|
|
||||||
MainWindow.resize(1280, 747)
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
|
|
||||||
MainWindow.setSizePolicy(sizePolicy)
|
|
||||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
|
||||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(
|
|
||||||
self.centralwidget.sizePolicy().hasHeightForWidth()
|
|
||||||
)
|
|
||||||
self.centralwidget.setSizePolicy(sizePolicy)
|
|
||||||
self.centralwidget.setObjectName("centralwidget")
|
|
||||||
self.verticalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
|
|
||||||
self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 1271, 691))
|
|
||||||
self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
|
|
||||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
|
|
||||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
|
||||||
self.verticalLayout.setObjectName("verticalLayout")
|
|
||||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
|
||||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
|
||||||
self.gridLayout = QtWidgets.QGridLayout()
|
|
||||||
self.gridLayout.setObjectName("gridLayout")
|
|
||||||
self.tabWidget = QtWidgets.QTabWidget(self.verticalLayoutWidget)
|
|
||||||
self.tabWidget.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
|
||||||
self.tabWidget.setObjectName("tabWidget")
|
|
||||||
self.tab = QtWidgets.QWidget()
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
|
||||||
QtWidgets.QSizePolicy.Policy.Preferred,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Preferred,
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.tab.sizePolicy().hasHeightForWidth())
|
|
||||||
self.tab.setSizePolicy(sizePolicy)
|
|
||||||
self.tab.setObjectName("tab")
|
|
||||||
self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.tab)
|
|
||||||
self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(0, 0, 1261, 161))
|
|
||||||
self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2")
|
|
||||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2)
|
|
||||||
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
|
|
||||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
|
||||||
self.formLayout = QtWidgets.QFormLayout()
|
|
||||||
self.formLayout.setObjectName("formLayout")
|
|
||||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
|
|
||||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
|
||||||
spacerItem = QtWidgets.QSpacerItem(
|
|
||||||
20,
|
|
||||||
40,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
self.verticalLayout_2.addItem(spacerItem)
|
|
||||||
self.load_app = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
|
|
||||||
self.load_app.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
|
||||||
self.load_app.setObjectName("load_app")
|
|
||||||
self.verticalLayout_2.addWidget(self.load_app)
|
|
||||||
self.create_new_app = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
|
|
||||||
self.create_new_app.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
|
||||||
self.create_new_app.setObjectName("create_new_app")
|
|
||||||
self.verticalLayout_2.addWidget(self.create_new_app)
|
|
||||||
spacerItem1 = QtWidgets.QSpacerItem(
|
|
||||||
20,
|
|
||||||
40,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
self.verticalLayout_2.addItem(spacerItem1)
|
|
||||||
self.formLayout.setLayout(
|
|
||||||
0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.verticalLayout_2
|
|
||||||
)
|
|
||||||
self.tableWidget_apparate = QtWidgets.QTableWidget(
|
|
||||||
self.horizontalLayoutWidget_2
|
|
||||||
)
|
|
||||||
self.tableWidget_apparate.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
|
||||||
self.tableWidget_apparate.setEditTriggers(
|
|
||||||
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
|
|
||||||
)
|
|
||||||
self.tableWidget_apparate.setObjectName("tableWidget_apparate")
|
|
||||||
self.tableWidget_apparate.setColumnCount(4)
|
|
||||||
self.tableWidget_apparate.setRowCount(0)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparate.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparate.setHorizontalHeaderItem(1, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparate.setHorizontalHeaderItem(2, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparate.setHorizontalHeaderItem(3, item)
|
|
||||||
self.formLayout.setWidget(
|
|
||||||
0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.tableWidget_apparate
|
|
||||||
)
|
|
||||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
|
||||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
|
||||||
self.formLayout.setLayout(
|
|
||||||
2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.horizontalLayout_3
|
|
||||||
)
|
|
||||||
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
|
|
||||||
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
|
||||||
self.formLayout.setLayout(
|
|
||||||
1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_4
|
|
||||||
)
|
|
||||||
self.horizontalLayout_2.addLayout(self.formLayout)
|
|
||||||
self.line = QtWidgets.QFrame(self.tab)
|
|
||||||
self.line.setGeometry(QtCore.QRect(0, 160, 1261, 21))
|
|
||||||
self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
|
||||||
self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
|
||||||
self.line.setObjectName("line")
|
|
||||||
self.gridLayoutWidget_2 = QtWidgets.QWidget(self.tab)
|
|
||||||
self.gridLayoutWidget_2.setGeometry(QtCore.QRect(0, 180, 1261, 461))
|
|
||||||
self.gridLayoutWidget_2.setObjectName("gridLayoutWidget_2")
|
|
||||||
self.gridLayout_2 = QtWidgets.QGridLayout(self.gridLayoutWidget_2)
|
|
||||||
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
|
|
||||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
|
||||||
self.app_group_box = QtWidgets.QGroupBox(self.gridLayoutWidget_2)
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
|
||||||
QtWidgets.QSizePolicy.Policy.Preferred,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(
|
|
||||||
self.app_group_box.sizePolicy().hasHeightForWidth()
|
|
||||||
)
|
|
||||||
self.app_group_box.setSizePolicy(sizePolicy)
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(12)
|
|
||||||
font.setBold(True)
|
|
||||||
font.setWeight(75)
|
|
||||||
self.app_group_box.setFont(font)
|
|
||||||
self.app_group_box.setAlignment(
|
|
||||||
QtCore.Qt.AlignmentFlag.AlignLeading
|
|
||||||
| QtCore.Qt.AlignmentFlag.AlignLeft
|
|
||||||
| QtCore.Qt.AlignmentFlag.AlignVCenter
|
|
||||||
)
|
|
||||||
self.app_group_box.setCheckable(False)
|
|
||||||
self.app_group_box.setObjectName("app_group_box")
|
|
||||||
self.dokument_list = QtWidgets.QTableWidget(self.app_group_box)
|
|
||||||
self.dokument_list.setGeometry(QtCore.QRect(830, 20, 256, 192))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setKerning(False)
|
|
||||||
self.dokument_list.setFont(font)
|
|
||||||
self.dokument_list.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
|
||||||
self.dokument_list.setSelectionMode(
|
|
||||||
QtWidgets.QAbstractItemView.SelectionMode.SingleSelection
|
|
||||||
)
|
|
||||||
self.dokument_list.setObjectName("dokument_list")
|
|
||||||
self.dokument_list.setColumnCount(4)
|
|
||||||
self.dokument_list.setRowCount(0)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Arial")
|
|
||||||
font.setPointSize(8)
|
|
||||||
item.setFont(font)
|
|
||||||
self.dokument_list.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Arial")
|
|
||||||
font.setPointSize(8)
|
|
||||||
item.setFont(font)
|
|
||||||
self.dokument_list.setHorizontalHeaderItem(1, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Arial")
|
|
||||||
font.setPointSize(8)
|
|
||||||
item.setFont(font)
|
|
||||||
self.dokument_list.setHorizontalHeaderItem(2, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.dokument_list.setHorizontalHeaderItem(3, item)
|
|
||||||
self.frame = QtWidgets.QFrame(self.app_group_box)
|
|
||||||
self.frame.setEnabled(True)
|
|
||||||
self.frame.setGeometry(QtCore.QRect(10, 30, 731, 151))
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
|
||||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
|
|
||||||
self.frame.setSizePolicy(sizePolicy)
|
|
||||||
self.frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
|
||||||
self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
|
||||||
self.frame.setObjectName("frame")
|
|
||||||
self.drpdwn_prof_title = QtWidgets.QComboBox(self.frame)
|
|
||||||
self.drpdwn_prof_title.setGeometry(QtCore.QRect(110, 50, 69, 22))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.drpdwn_prof_title.setFont(font)
|
|
||||||
self.drpdwn_prof_title.setEditable(True)
|
|
||||||
self.drpdwn_prof_title.setObjectName("drpdwn_prof_title")
|
|
||||||
self.label_5 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_5.setGeometry(QtCore.QRect(250, 20, 91, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_5.setFont(font)
|
|
||||||
self.label_5.setObjectName("label_5")
|
|
||||||
self.sem_winter = QtWidgets.QRadioButton(self.frame)
|
|
||||||
self.sem_winter.setGeometry(QtCore.QRect(340, 50, 82, 17))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.sem_winter.setFont(font)
|
|
||||||
self.sem_winter.setObjectName("sem_winter")
|
|
||||||
self.label_4 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_4.setGeometry(QtCore.QRect(10, 80, 71, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_4.setFont(font)
|
|
||||||
self.label_4.setObjectName("label_4")
|
|
||||||
self.drpdwn_app_nr = QtWidgets.QComboBox(self.frame)
|
|
||||||
self.drpdwn_app_nr.setGeometry(QtCore.QRect(110, 20, 69, 22))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.drpdwn_app_nr.setFont(font)
|
|
||||||
self.drpdwn_app_nr.setEditable(True)
|
|
||||||
self.drpdwn_app_nr.setObjectName("drpdwn_app_nr")
|
|
||||||
self.app_name = QtWidgets.QLineEdit(self.frame)
|
|
||||||
self.app_name.setGeometry(QtCore.QRect(340, 20, 113, 20))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.app_name.setFont(font)
|
|
||||||
self.app_name.setObjectName("app_name")
|
|
||||||
self.sem_sommer = QtWidgets.QRadioButton(self.frame)
|
|
||||||
self.sem_sommer.setGeometry(QtCore.QRect(340, 70, 82, 17))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.sem_sommer.setFont(font)
|
|
||||||
self.sem_sommer.setObjectName("sem_sommer")
|
|
||||||
self.label_3 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_3.setGeometry(QtCore.QRect(10, 50, 61, 20))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_3.setFont(font)
|
|
||||||
self.label_3.setObjectName("label_3")
|
|
||||||
self.label_6 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_6.setGeometry(QtCore.QRect(270, 60, 51, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_6.setFont(font)
|
|
||||||
self.label_6.setObjectName("label_6")
|
|
||||||
self.sem_year = QtWidgets.QLineEdit(self.frame)
|
|
||||||
self.sem_year.setGeometry(QtCore.QRect(410, 60, 113, 20))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.sem_year.setFont(font)
|
|
||||||
self.sem_year.setMaxLength(4)
|
|
||||||
self.sem_year.setObjectName("sem_year")
|
|
||||||
self.label_2 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_2.setGeometry(QtCore.QRect(10, 20, 101, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_2.setFont(font)
|
|
||||||
self.label_2.setObjectName("label_2")
|
|
||||||
self.btn_apparat_save = QtWidgets.QPushButton(self.frame)
|
|
||||||
self.btn_apparat_save.setGeometry(QtCore.QRect(260, 120, 75, 23))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.btn_apparat_save.setFont(font)
|
|
||||||
self.btn_apparat_save.setObjectName("btn_apparat_save")
|
|
||||||
self.btn_apparat_apply = QtWidgets.QPushButton(self.frame)
|
|
||||||
self.btn_apparat_apply.setGeometry(QtCore.QRect(350, 120, 75, 23))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.btn_apparat_apply.setFont(font)
|
|
||||||
self.btn_apparat_apply.setObjectName("btn_apparat_apply")
|
|
||||||
self.check_eternal_app = QtWidgets.QCheckBox(self.frame)
|
|
||||||
self.check_eternal_app.setGeometry(QtCore.QRect(340, 90, 101, 17))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.check_eternal_app.setFont(font)
|
|
||||||
self.check_eternal_app.setObjectName("check_eternal_app")
|
|
||||||
self.label_8 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_8.setGeometry(QtCore.QRect(10, 110, 71, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_8.setFont(font)
|
|
||||||
self.label_8.setObjectName("label_8")
|
|
||||||
self.prof_mail = QtWidgets.QLineEdit(self.frame)
|
|
||||||
self.prof_mail.setGeometry(QtCore.QRect(110, 110, 121, 20))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.prof_mail.setFont(font)
|
|
||||||
self.prof_mail.setPlaceholderText("")
|
|
||||||
self.prof_mail.setObjectName("prof_mail")
|
|
||||||
self.label_9 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_9.setGeometry(QtCore.QRect(10, 130, 71, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_9.setFont(font)
|
|
||||||
self.label_9.setObjectName("label_9")
|
|
||||||
self.prof_tel_nr = QtWidgets.QLineEdit(self.frame)
|
|
||||||
self.prof_tel_nr.setGeometry(QtCore.QRect(110, 130, 121, 20))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.prof_tel_nr.setFont(font)
|
|
||||||
self.prof_tel_nr.setPlaceholderText("")
|
|
||||||
self.prof_tel_nr.setObjectName("prof_tel_nr")
|
|
||||||
self.label_10 = QtWidgets.QLabel(self.frame)
|
|
||||||
self.label_10.setGeometry(QtCore.QRect(470, 20, 51, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_10.setFont(font)
|
|
||||||
self.label_10.setObjectName("label_10")
|
|
||||||
self.app_fach = QtWidgets.QLineEdit(self.frame)
|
|
||||||
self.app_fach.setGeometry(QtCore.QRect(510, 20, 113, 20))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.app_fach.setFont(font)
|
|
||||||
self.app_fach.setObjectName("app_fach")
|
|
||||||
self.drpdwn_prof_name = QtWidgets.QComboBox(self.frame)
|
|
||||||
self.drpdwn_prof_name.setGeometry(QtCore.QRect(110, 80, 121, 22))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(8)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.drpdwn_prof_name.setFont(font)
|
|
||||||
self.drpdwn_prof_name.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
|
||||||
self.drpdwn_prof_name.setEditable(True)
|
|
||||||
self.drpdwn_prof_name.setCurrentText("")
|
|
||||||
self.drpdwn_prof_name.setInsertPolicy(
|
|
||||||
QtWidgets.QComboBox.InsertPolicy.InsertAlphabetically
|
|
||||||
)
|
|
||||||
self.drpdwn_prof_name.setFrame(True)
|
|
||||||
self.drpdwn_prof_name.setObjectName("drpdwn_prof_name")
|
|
||||||
self.btn_add_document = QtWidgets.QPushButton(self.app_group_box)
|
|
||||||
self.btn_add_document.setGeometry(QtCore.QRect(1100, 40, 131, 25))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.btn_add_document.setFont(font)
|
|
||||||
self.btn_add_document.setObjectName("btn_add_document")
|
|
||||||
self.btn_open_document = QtWidgets.QPushButton(self.app_group_box)
|
|
||||||
self.btn_open_document.setGeometry(QtCore.QRect(1100, 80, 131, 25))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.btn_open_document.setFont(font)
|
|
||||||
self.btn_open_document.setObjectName("btn_open_document")
|
|
||||||
self.toolButton = QtWidgets.QToolButton(self.app_group_box)
|
|
||||||
self.toolButton.setGeometry(QtCore.QRect(1110, 110, 25, 19))
|
|
||||||
self.toolButton.setObjectName("toolButton")
|
|
||||||
self.label_7 = QtWidgets.QLabel(self.app_group_box)
|
|
||||||
self.label_7.setGeometry(QtCore.QRect(20, 200, 47, 21))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.label_7.setFont(font)
|
|
||||||
self.label_7.setObjectName("label_7")
|
|
||||||
self.search_media = QtWidgets.QLineEdit(self.app_group_box)
|
|
||||||
self.search_media.setGeometry(QtCore.QRect(80, 200, 211, 20))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(9)
|
|
||||||
font.setBold(False)
|
|
||||||
font.setWeight(50)
|
|
||||||
self.search_media.setFont(font)
|
|
||||||
self.search_media.setObjectName("search_media")
|
|
||||||
self.label = QtWidgets.QLabel(self.app_group_box)
|
|
||||||
self.label.setGeometry(QtCore.QRect(10, 180, 1259, 18))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setPointSize(11)
|
|
||||||
font.setBold(True)
|
|
||||||
font.setWeight(75)
|
|
||||||
self.label.setFont(font)
|
|
||||||
self.label.setObjectName("label")
|
|
||||||
self.gridLayout_2.addWidget(self.app_group_box, 1, 0, 1, 1)
|
|
||||||
self.tableWidget_apparat_media = QtWidgets.QTableWidget(self.gridLayoutWidget_2)
|
|
||||||
self.tableWidget_apparat_media.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
|
||||||
self.tableWidget_apparat_media.setObjectName("tableWidget_apparat_media")
|
|
||||||
self.tableWidget_apparat_media.setColumnCount(4)
|
|
||||||
self.tableWidget_apparat_media.setRowCount(0)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(1, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(2, item)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
|
||||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(3, item)
|
|
||||||
self.gridLayout_2.addWidget(self.tableWidget_apparat_media, 2, 0, 1, 1)
|
|
||||||
self.search = QtWidgets.QPushButton(self.tab)
|
|
||||||
self.search.setGeometry(QtCore.QRect(130, 640, 75, 20))
|
|
||||||
self.search.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
|
||||||
self.search.setObjectName("search")
|
|
||||||
self.add_medium = QtWidgets.QPushButton(self.tab)
|
|
||||||
self.add_medium.setGeometry(QtCore.QRect(10, 640, 111, 20))
|
|
||||||
self.add_medium.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
|
||||||
self.add_medium.setObjectName("add_medium")
|
|
||||||
self.tabWidget.addTab(self.tab, "")
|
|
||||||
self.tab_2 = QtWidgets.QWidget()
|
|
||||||
self.tab_2.setObjectName("tab_2")
|
|
||||||
self.tabWidget.addTab(self.tab_2, "")
|
|
||||||
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1)
|
|
||||||
self.horizontalLayout.addLayout(self.gridLayout)
|
|
||||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
|
||||||
MainWindow.setCentralWidget(self.centralwidget)
|
|
||||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1280, 21))
|
|
||||||
self.menubar.setObjectName("menubar")
|
|
||||||
self.menuDatei = QtWidgets.QMenu(self.menubar)
|
|
||||||
self.menuDatei.setObjectName("menuDatei")
|
|
||||||
self.menuEinstellungen = QtWidgets.QMenu(self.menubar)
|
|
||||||
self.menuEinstellungen.setObjectName("menuEinstellungen")
|
|
||||||
MainWindow.setMenuBar(self.menubar)
|
|
||||||
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
|
||||||
self.statusbar.setObjectName("statusbar")
|
|
||||||
MainWindow.setStatusBar(self.statusbar)
|
|
||||||
self.menubar.addAction(self.menuDatei.menuAction())
|
|
||||||
self.menubar.addAction(self.menuEinstellungen.menuAction())
|
|
||||||
|
|
||||||
self.retranslateUi(MainWindow)
|
|
||||||
self.tabWidget.setCurrentIndex(0)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
|
||||||
MainWindow.setTabOrder(self.drpdwn_app_nr, self.drpdwn_prof_title)
|
|
||||||
MainWindow.setTabOrder(self.drpdwn_prof_title, self.drpdwn_prof_name)
|
|
||||||
MainWindow.setTabOrder(self.drpdwn_prof_name, self.prof_mail)
|
|
||||||
MainWindow.setTabOrder(self.prof_mail, self.prof_tel_nr)
|
|
||||||
MainWindow.setTabOrder(self.prof_tel_nr, self.app_name)
|
|
||||||
MainWindow.setTabOrder(self.app_name, self.app_fach)
|
|
||||||
MainWindow.setTabOrder(self.app_fach, self.sem_winter)
|
|
||||||
MainWindow.setTabOrder(self.sem_winter, self.sem_sommer)
|
|
||||||
MainWindow.setTabOrder(self.sem_sommer, self.sem_year)
|
|
||||||
MainWindow.setTabOrder(self.sem_year, self.check_eternal_app)
|
|
||||||
MainWindow.setTabOrder(self.check_eternal_app, self.btn_add_document)
|
|
||||||
MainWindow.setTabOrder(self.btn_add_document, self.btn_open_document)
|
|
||||||
MainWindow.setTabOrder(self.btn_open_document, self.toolButton)
|
|
||||||
MainWindow.setTabOrder(self.toolButton, self.btn_apparat_save)
|
|
||||||
MainWindow.setTabOrder(self.btn_apparat_save, self.btn_apparat_apply)
|
|
||||||
MainWindow.setTabOrder(self.btn_apparat_apply, self.search_media)
|
|
||||||
|
|
||||||
def retranslateUi(self, MainWindow):
|
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
|
|
||||||
self.load_app.setToolTip(
|
|
||||||
_translate("MainWindow", "Load the Semesterapparate from the database")
|
|
||||||
)
|
|
||||||
self.load_app.setText(_translate("MainWindow", "App. aufrufen"))
|
|
||||||
self.create_new_app.setText(_translate("MainWindow", "neu. App anlegen"))
|
|
||||||
item = self.tableWidget_apparate.horizontalHeaderItem(0)
|
|
||||||
item.setText(_translate("MainWindow", "AppNr"))
|
|
||||||
item = self.tableWidget_apparate.horizontalHeaderItem(1)
|
|
||||||
item.setText(_translate("MainWindow", "App Name"))
|
|
||||||
item = self.tableWidget_apparate.horizontalHeaderItem(2)
|
|
||||||
item.setText(_translate("MainWindow", "Professor"))
|
|
||||||
item = self.tableWidget_apparate.horizontalHeaderItem(3)
|
|
||||||
item.setText(_translate("MainWindow", "Dauerapparat"))
|
|
||||||
self.app_group_box.setTitle(_translate("MainWindow", "Apparatsdetails"))
|
|
||||||
item = self.dokument_list.horizontalHeaderItem(0)
|
|
||||||
item.setText(_translate("MainWindow", "Dokumentname"))
|
|
||||||
item = self.dokument_list.horizontalHeaderItem(1)
|
|
||||||
item.setText(_translate("MainWindow", "Dateityp"))
|
|
||||||
item = self.dokument_list.horizontalHeaderItem(2)
|
|
||||||
item.setText(_translate("MainWindow", "Neu?"))
|
|
||||||
item = self.dokument_list.horizontalHeaderItem(3)
|
|
||||||
item.setText(_translate("MainWindow", "path"))
|
|
||||||
self.label_5.setText(_translate("MainWindow", "Apparatsname"))
|
|
||||||
self.sem_winter.setText(_translate("MainWindow", "Winter"))
|
|
||||||
self.label_4.setText(_translate("MainWindow", "Prof. Name"))
|
|
||||||
self.sem_sommer.setText(_translate("MainWindow", "Sommer"))
|
|
||||||
self.label_3.setText(_translate("MainWindow", "Prof. Titel"))
|
|
||||||
self.label_6.setText(_translate("MainWindow", "Semester"))
|
|
||||||
self.sem_year.setPlaceholderText(_translate("MainWindow", "2023"))
|
|
||||||
self.label_2.setText(_translate("MainWindow", "Apparatsnummer"))
|
|
||||||
self.btn_apparat_save.setText(_translate("MainWindow", "Speichern"))
|
|
||||||
self.btn_apparat_apply.setText(_translate("MainWindow", "Aktualisieren"))
|
|
||||||
self.check_eternal_app.setText(_translate("MainWindow", "Dauerapparat"))
|
|
||||||
self.label_8.setText(_translate("MainWindow", "Mail"))
|
|
||||||
self.label_9.setText(_translate("MainWindow", "Tel"))
|
|
||||||
self.label_10.setText(_translate("MainWindow", "Fach"))
|
|
||||||
self.btn_add_document.setText(_translate("MainWindow", "Dokument hinzufügen"))
|
|
||||||
self.btn_open_document.setText(_translate("MainWindow", "Dokument öffnen"))
|
|
||||||
self.toolButton.setText(_translate("MainWindow", "..."))
|
|
||||||
self.label_7.setText(_translate("MainWindow", "Suche"))
|
|
||||||
self.search_media.setPlaceholderText(
|
|
||||||
_translate("MainWindow", "Buch oder Signatur")
|
|
||||||
)
|
|
||||||
self.label.setText(_translate("MainWindow", "Medienliste"))
|
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(0)
|
|
||||||
item.setText(_translate("MainWindow", "Buchtitel"))
|
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(1)
|
|
||||||
item.setText(_translate("MainWindow", "Autor"))
|
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(2)
|
|
||||||
item.setText(_translate("MainWindow", "Auflage"))
|
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(3)
|
|
||||||
item.setText(_translate("MainWindow", "Signatur"))
|
|
||||||
self.search.setToolTip(
|
|
||||||
_translate(
|
|
||||||
"MainWindow",
|
|
||||||
"Sucht im Katalog nach allen Medien, die die Apparatsnummer enthalten",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.search.setText(_translate("MainWindow", "Suche"))
|
|
||||||
self.add_medium.setText(_translate("MainWindow", "Medium hinzufügen"))
|
|
||||||
self.tabWidget.setTabText(
|
|
||||||
self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Tab 1")
|
|
||||||
)
|
|
||||||
self.tabWidget.setTabText(
|
|
||||||
self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Tab 2")
|
|
||||||
)
|
|
||||||
self.menuDatei.setTitle(_translate("MainWindow", "Datei"))
|
|
||||||
self.menuEinstellungen.setTitle(_translate("MainWindow", "Einstellungen"))
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
import sys
|
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
|
||||||
MainWindow = QtWidgets.QMainWindow()
|
|
||||||
ui = Ui_MainWindow()
|
|
||||||
ui.setupUi(MainWindow)
|
|
||||||
MainWindow.show()
|
|
||||||
sys.exit(app.exec())
|
|
||||||
@@ -1,234 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1">
|
|
||||||
<context>
|
|
||||||
<name>MainWindow</name>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="23"/>
|
|
||||||
<source>MainWindow</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="62"/>
|
|
||||||
<source>Tab 1</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="97"/>
|
|
||||||
<source>Load the Semesterapparate from the database</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="100"/>
|
|
||||||
<source>App. aufrufen</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="110"/>
|
|
||||||
<source>neu. App anlegen</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="139"/>
|
|
||||||
<source>AppNr</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="144"/>
|
|
||||||
<source>App Name</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="149"/>
|
|
||||||
<source>Professor</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="154"/>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="584"/>
|
|
||||||
<source>Dauerapparat</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="159"/>
|
|
||||||
<source>KontoNr</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="254"/>
|
|
||||||
<source>Dateityp</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="265"/>
|
|
||||||
<source>Neu?</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="276"/>
|
|
||||||
<source>path</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="604"/>
|
|
||||||
<source>Mail</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="650"/>
|
|
||||||
<source>Tel</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="693"/>
|
|
||||||
<source>Fach</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="762"/>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="782"/>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="802"/>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="822"/>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="842"/>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="862"/>
|
|
||||||
<source>*</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="975"/>
|
|
||||||
<source>Buchtitel</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="980"/>
|
|
||||||
<source>Autor</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="985"/>
|
|
||||||
<source>Auflage</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="990"/>
|
|
||||||
<source>Signatur</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="1073"/>
|
|
||||||
<source>Beenden</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="213"/>
|
|
||||||
<source>Apparatsdetails</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="243"/>
|
|
||||||
<source>Dokumentname</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="341"/>
|
|
||||||
<source>Apparatsname</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="361"/>
|
|
||||||
<source>Winter</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="381"/>
|
|
||||||
<source>Prof. Name</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="441"/>
|
|
||||||
<source>Sommer</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="461"/>
|
|
||||||
<source>Prof. Titel</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="481"/>
|
|
||||||
<source>Semester</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="504"/>
|
|
||||||
<source>2023</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="524"/>
|
|
||||||
<source>Apparatsnummer</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="544"/>
|
|
||||||
<source>Speichern</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="564"/>
|
|
||||||
<source>Aktualisieren</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="883"/>
|
|
||||||
<source>Dokument hinzufügen</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="903"/>
|
|
||||||
<source>Dokument öffnen</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="923"/>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="1013"/>
|
|
||||||
<source>Suche</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="943"/>
|
|
||||||
<source>Buch oder Signatur</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="963"/>
|
|
||||||
<source>Medienliste</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="1010"/>
|
|
||||||
<source>Sucht im Katalog nach allen Medien, die die Apparatsnummer enthalten</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="1029"/>
|
|
||||||
<source>Medium hinzufügen</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="1035"/>
|
|
||||||
<source>Tab 2</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="1058"/>
|
|
||||||
<source>Datei</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="semesterapparat_ui.ui" line="1064"/>
|
|
||||||
<source>Einstellungen</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,149 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>Wizard</class>
|
|
||||||
<widget class="QWizard" name="Wizard">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>640</width>
|
|
||||||
<height>480</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>640</width>
|
|
||||||
<height>480</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Wizard</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QWizardPage" name="wizardPage1">
|
|
||||||
<widget class="QTextBrowser" name="textBrowser">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>200</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>256</width>
|
|
||||||
<height>192</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="html">
|
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Setup für das Semesterapparatsprogram.</p>
|
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Im Anschluss werden wichtige Einstellungen gesetzt, welche auch im späteren Verlauf verändert werden können.</p>
|
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWizardPage" name="wizardPage2">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>131</width>
|
|
||||||
<height>16</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Grundeinstellungen</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>40</y>
|
|
||||||
<width>71</width>
|
|
||||||
<height>16</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Opens the downloaded files with the default applications set in the OS</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Default Apps</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QCheckBox" name="default_apps">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>100</x>
|
|
||||||
<y>40</y>
|
|
||||||
<width>70</width>
|
|
||||||
<height>17</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>70</y>
|
|
||||||
<width>61</width>
|
|
||||||
<height>16</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Path where the downloaded files are stored. Defaults to ~/Desktop/SemapFiles</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Save Path</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QFrame" name="custom_applications">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>280</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>331</width>
|
|
||||||
<height>361</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QLineEdit" name="save_path">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>80</x>
|
|
||||||
<y>70</y>
|
|
||||||
<width>113</width>
|
|
||||||
<height>20</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>~/Desktop/SemapFiles</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QToolButton" name="btn_save_path_select">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>200</x>
|
|
||||||
<y>70</y>
|
|
||||||
<width>25</width>
|
|
||||||
<height>19</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
@@ -1,151 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
## Form generated from reading UI file 'setupwizard.ui'
|
|
||||||
##
|
|
||||||
## Created by: Qt User Interface Compiler version 6.5.2
|
|
||||||
##
|
|
||||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
from PyQt6.QtCore import (
|
|
||||||
QCoreApplication,
|
|
||||||
QDate,
|
|
||||||
QDateTime,
|
|
||||||
QLocale,
|
|
||||||
QMetaObject,
|
|
||||||
QObject,
|
|
||||||
QPoint,
|
|
||||||
QRect,
|
|
||||||
QSize,
|
|
||||||
Qt,
|
|
||||||
QTime,
|
|
||||||
QUrl,
|
|
||||||
)
|
|
||||||
from PyQt6.QtGui import (
|
|
||||||
QBrush,
|
|
||||||
QColor,
|
|
||||||
QConicalGradient,
|
|
||||||
QCursor,
|
|
||||||
QFont,
|
|
||||||
QFontDatabase,
|
|
||||||
QGradient,
|
|
||||||
QIcon,
|
|
||||||
QImage,
|
|
||||||
QKeySequence,
|
|
||||||
QLinearGradient,
|
|
||||||
QPainter,
|
|
||||||
QPalette,
|
|
||||||
QPixmap,
|
|
||||||
QRadialGradient,
|
|
||||||
QTransform,
|
|
||||||
)
|
|
||||||
from PyQt6.QtWidgets import (
|
|
||||||
QApplication,
|
|
||||||
QCheckBox,
|
|
||||||
QFrame,
|
|
||||||
QLabel,
|
|
||||||
QLineEdit,
|
|
||||||
QSizePolicy,
|
|
||||||
QTextBrowser,
|
|
||||||
QToolButton,
|
|
||||||
QWidget,
|
|
||||||
QWizard,
|
|
||||||
QWizardPage,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_Wizard(object):
|
|
||||||
def setupUi(self, Wizard):
|
|
||||||
if not Wizard.objectName():
|
|
||||||
Wizard.setObjectName("Wizard")
|
|
||||||
Wizard.resize(640, 480)
|
|
||||||
Wizard.setMaximumSize(QSize(640, 480))
|
|
||||||
self.wizardPage1 = QWizardPage()
|
|
||||||
self.wizardPage1.setObjectName("wizardPage1")
|
|
||||||
self.textBrowser = QTextBrowser(self.wizardPage1)
|
|
||||||
self.textBrowser.setObjectName("textBrowser")
|
|
||||||
self.textBrowser.setGeometry(QRect(200, 10, 256, 192))
|
|
||||||
Wizard.addPage(self.wizardPage1)
|
|
||||||
self.wizardPage2 = QWizardPage()
|
|
||||||
self.wizardPage2.setObjectName("wizardPage2")
|
|
||||||
self.label = QLabel(self.wizardPage2)
|
|
||||||
self.label.setObjectName("label")
|
|
||||||
self.label.setGeometry(QRect(10, 0, 131, 16))
|
|
||||||
self.label_2 = QLabel(self.wizardPage2)
|
|
||||||
self.label_2.setObjectName("label_2")
|
|
||||||
self.label_2.setGeometry(QRect(10, 40, 71, 16))
|
|
||||||
self.default_apps = QCheckBox(self.wizardPage2)
|
|
||||||
self.default_apps.setObjectName("default_apps")
|
|
||||||
self.default_apps.setGeometry(QRect(100, 40, 70, 17))
|
|
||||||
self.label_3 = QLabel(self.wizardPage2)
|
|
||||||
self.label_3.setObjectName("label_3")
|
|
||||||
self.label_3.setGeometry(QRect(10, 70, 61, 16))
|
|
||||||
self.custom_applications = QFrame(self.wizardPage2)
|
|
||||||
self.custom_applications.setObjectName("custom_applications")
|
|
||||||
self.custom_applications.setGeometry(QRect(280, 10, 331, 361))
|
|
||||||
self.custom_applications.setFrameShape(QFrame.StyledPanel)
|
|
||||||
self.custom_applications.setFrameShadow(QFrame.Raised)
|
|
||||||
self.save_path = QLineEdit(self.wizardPage2)
|
|
||||||
self.save_path.setObjectName("save_path")
|
|
||||||
self.save_path.setGeometry(QRect(80, 70, 113, 20))
|
|
||||||
self.btn_save_path_select = QToolButton(self.wizardPage2)
|
|
||||||
self.btn_save_path_select.setObjectName("btn_save_path_select")
|
|
||||||
self.btn_save_path_select.setGeometry(QRect(200, 70, 25, 19))
|
|
||||||
Wizard.addPage(self.wizardPage2)
|
|
||||||
|
|
||||||
self.retranslateUi(Wizard)
|
|
||||||
|
|
||||||
QMetaObject.connectSlotsByName(Wizard)
|
|
||||||
|
|
||||||
# setupUi
|
|
||||||
|
|
||||||
def retranslateUi(self, Wizard):
|
|
||||||
Wizard.setWindowTitle(QCoreApplication.translate("Wizard", "Wizard", None))
|
|
||||||
self.textBrowser.setHtml(
|
|
||||||
QCoreApplication.translate(
|
|
||||||
"Wizard",
|
|
||||||
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">\n'
|
|
||||||
'<html><head><meta name="qrichtext" content="1" /><style type="text/css">\n'
|
|
||||||
"p, li { white-space: pre-wrap; }\n"
|
|
||||||
"</style></head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
|
|
||||||
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Setup f\u00fcr das Semesterapparatsprogram.</p>\n'
|
|
||||||
'<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>\n'
|
|
||||||
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Im Anschluss werden wichtige Einstellungen gesetzt, welche auch im sp\u00e4teren Verlauf ver\u00e4ndert werden k\u00f6nnen.</p>\n'
|
|
||||||
'<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margi'
|
|
||||||
'n-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html>',
|
|
||||||
None,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.label.setText(
|
|
||||||
QCoreApplication.translate("Wizard", "Grundeinstellungen", None)
|
|
||||||
)
|
|
||||||
# if QT_CONFIG(tooltip)
|
|
||||||
self.label_2.setToolTip(
|
|
||||||
QCoreApplication.translate(
|
|
||||||
"Wizard",
|
|
||||||
"Opens the downloaded files with the default applications set in the OS",
|
|
||||||
None,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
# endif // QT_CONFIG(tooltip)
|
|
||||||
self.label_2.setText(QCoreApplication.translate("Wizard", "Default Apps", None))
|
|
||||||
self.default_apps.setText("")
|
|
||||||
# if QT_CONFIG(tooltip)
|
|
||||||
self.label_3.setToolTip(
|
|
||||||
QCoreApplication.translate(
|
|
||||||
"Wizard",
|
|
||||||
"Path where the downloaded files are stored. Defaults to ~/Desktop/SemapFiles",
|
|
||||||
None,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
# endif // QT_CONFIG(tooltip)
|
|
||||||
self.label_3.setText(QCoreApplication.translate("Wizard", "Save Path", None))
|
|
||||||
self.save_path.setPlaceholderText(
|
|
||||||
QCoreApplication.translate("Wizard", "~/Desktop/SemapFiles", None)
|
|
||||||
)
|
|
||||||
self.btn_save_path_select.setText(
|
|
||||||
QCoreApplication.translate("Wizard", "...", None)
|
|
||||||
)
|
|
||||||
|
|
||||||
# retranslateUi
|
|
||||||
Reference in New Issue
Block a user