rebase codebase, delete trunk, move threads to backend
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
|
||||
import sys
|
||||
from config import Config
|
||||
import os
|
||||
from loguru import logger as log
|
||||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
settings = Config("config/config.yaml")
|
||||
from .utils.icon import Icon
|
||||
@@ -17,9 +16,12 @@ if not os.path.exists("logs"):
|
||||
# open and close the file to create it
|
||||
logger = log
|
||||
logger.remove()
|
||||
logger.add("logs/application_info.log", rotation="1 week", level="INFO", enqueue=True)
|
||||
logger.add("logs/application_error.log", rotation="1 week", level="ERROR", enqueue=True)
|
||||
logger.add("logs/application_debug.log", rotation="1 week", level="DEBUG", enqueue=True)
|
||||
logger.add("logs/application.log", rotation="1 week", enqueue=True)
|
||||
log.add(
|
||||
f"logs/{datetime.now().strftime('%Y-%m-%d')}.log",
|
||||
rotation="1 day",
|
||||
compression="zip",
|
||||
)
|
||||
|
||||
# logger.add(sys.stderr, format="{time} {level} {message}", level="INFO")
|
||||
logger.add(sys.stdout)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
from .admin_console import AdminCommands
|
||||
from .create_file import recreateElsaFile, recreateFile
|
||||
from .database import Database
|
||||
from .delete_temp_contents import delete_temp_contents as tempdelete
|
||||
from .semester import Semester
|
||||
from .admin_console import AdminCommands
|
||||
from .thread_bookgrabber import BookGrabber
|
||||
from .threads_availchecker import AvailChecker
|
||||
from .threads_autoadder import AutoAdder
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import hashlib
|
||||
import random
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ from string import ascii_lowercase as lower, digits, punctuation
|
||||
|
||||
|
||||
ascii_lowercase = lower + digits + punctuation
|
||||
|
||||
|
||||
# get the line that called the function
|
||||
class Database:
|
||||
database = settings.database
|
||||
@@ -673,9 +675,6 @@ class Database:
|
||||
)[0]
|
||||
return f"{title} " if title is not None else ""
|
||||
|
||||
|
||||
|
||||
|
||||
def getSpecificProfData(self, prof_id: Union[str, int], fields: List[str]) -> tuple:
|
||||
"""A customisable function to get specific data of a professor based on the id
|
||||
|
||||
@@ -729,8 +728,9 @@ class Database:
|
||||
list[tuple]: a list containing all the professors in individual tuples
|
||||
tuple: (id, titel, fname, lname, fullname, mail, telnr)
|
||||
"""
|
||||
profs = self.query_db("SELECT * FROM prof")
|
||||
profs = self.query_db("SELECT * FROM prof")
|
||||
return [Prof().from_tuple(prof) for prof in profs]
|
||||
|
||||
# Apparat
|
||||
def getAllAparats(self, deleted=0) -> list[tuple]:
|
||||
"""Get all the apparats in the database
|
||||
@@ -865,6 +865,7 @@ class Database:
|
||||
logger.debug(query)
|
||||
self.query_db(query)
|
||||
return None
|
||||
|
||||
def getApparatsByProf(self, prof_id: Union[str, int]) -> list[tuple]:
|
||||
"""Get all apparats based on the professor id
|
||||
|
||||
@@ -1362,6 +1363,7 @@ class Database:
|
||||
entries.append(elsa_id)
|
||||
query = f"INSERT INTO elsa_media ({', '.join(headers)}) VALUES ({', '.join(['?' for i in range(len(headers))])})"
|
||||
self.query_db(query, entries)
|
||||
|
||||
def getElsaMedia(self, elsa_id: int):
|
||||
"""get all the media of an ELSA apparat
|
||||
|
||||
@@ -1468,7 +1470,8 @@ class Database:
|
||||
return self.query_db(
|
||||
"SELECT filename, filetyp FROM elsa_files WHERE elsa_id=?", (elsa_id,)
|
||||
)
|
||||
###
|
||||
|
||||
###
|
||||
|
||||
def createProf(self, profdata: Prof):
|
||||
logger.debug(profdata)
|
||||
@@ -1480,30 +1483,32 @@ class Database:
|
||||
mail = profdata.mail
|
||||
telnr = profdata.telnr
|
||||
title = profdata.title
|
||||
|
||||
|
||||
query = f"INSERT INTO prof (fname, lname, fullname, mail, telnr,titel) VALUES ('{fname}','{lname}','{fullname}','{mail}','{telnr}','{title}')"
|
||||
logger.debug(query)
|
||||
cursor.execute(query)
|
||||
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
return self.getProfId(profdata)
|
||||
|
||||
|
||||
def getElsaProfId(self, profname):
|
||||
query = f"SELECT id FROM elsa_prof WHERE fullname = '{profname}'"
|
||||
data = self.query_db(query)
|
||||
if data:
|
||||
return data[0][0]
|
||||
else: return None
|
||||
else:
|
||||
return None
|
||||
|
||||
def getElsaProfs(self)->list[str]:
|
||||
def getElsaProfs(self) -> list[str]:
|
||||
query = "SELECT fullname FROM elsa_prof"
|
||||
data = self.query_db(query)
|
||||
if data:
|
||||
return [i[0] for i in data]
|
||||
else: return []
|
||||
|
||||
def getProfId(self, profdata: dict|Prof):
|
||||
else:
|
||||
return []
|
||||
|
||||
def getProfId(self, profdata: dict | Prof):
|
||||
"""Get the prof ID based on the profdata
|
||||
|
||||
Args:
|
||||
@@ -1518,7 +1523,7 @@ class Database:
|
||||
fullname = profdata.name()
|
||||
else:
|
||||
name = profdata["profname"]
|
||||
if ","in name:
|
||||
if "," in name:
|
||||
fname = name.split(", ")[1].strip()
|
||||
lname = name.split(", ")[0].strip()
|
||||
fullname = f"{lname} {fname}"
|
||||
@@ -1526,28 +1531,30 @@ class Database:
|
||||
fullname = profdata["profname"]
|
||||
query = f"SELECT id FROM prof WHERE fullname = '{fullname}'"
|
||||
logger.debug(query)
|
||||
|
||||
|
||||
cursor.execute(query)
|
||||
result = cursor.fetchone()
|
||||
if result:
|
||||
result = cursor.fetchone()
|
||||
if result:
|
||||
return result[0]
|
||||
else: return None
|
||||
|
||||
else:
|
||||
return None
|
||||
|
||||
def getProfByName(self, fullname):
|
||||
'''Get all Data of the prof based on fullname
|
||||
"""Get all Data of the prof based on fullname
|
||||
|
||||
Args:
|
||||
fullname (str): The full name of the prof
|
||||
'''
|
||||
"""
|
||||
conn = self.connect()
|
||||
cursor = conn.cursor()
|
||||
query = f"SELECT * FROM prof WHERE fullname = '{fullname}'"
|
||||
logger.debug(query)
|
||||
|
||||
|
||||
result = cursor.execute(query).fetchone()
|
||||
if result:
|
||||
return Prof().from_tuple(result)
|
||||
else: return Prof()
|
||||
else:
|
||||
return Prof()
|
||||
|
||||
def getProfIDByApparat(self, apprarat_id):
|
||||
"""Get the prof id based on the semesterapparat id from the database
|
||||
@@ -1606,4 +1613,5 @@ class Database:
|
||||
data = self.query_db(query)
|
||||
if data:
|
||||
return data[0][0]
|
||||
else: return None
|
||||
else:
|
||||
return None
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
CREATE_TABLE_APPARAT = """CREATE TABLE semesterapparat (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
name TEXT,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
from src import settings
|
||||
|
||||
database = settings.database
|
||||
|
||||
|
||||
def delete_temp_contents():
|
||||
"""
|
||||
delete_temp_contents deletes the contents of the temp directory.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import pickle
|
||||
from typing import Any, ByteString
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import datetime
|
||||
from src import logger
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass
|
||||
class Semester:
|
||||
logger.debug("Semester class loaded")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
import yaml
|
||||
|
||||
@@ -2,13 +2,11 @@ import sqlite3
|
||||
|
||||
from PyQt6.QtCore import QThread
|
||||
from PyQt6.QtCore import pyqtSignal as Signal
|
||||
from src.backend.database import Database
|
||||
from src.backend import Database
|
||||
|
||||
from src.logic.webrequest import BibTextTransformer, WebRequest
|
||||
|
||||
|
||||
|
||||
|
||||
class BookGrabber(QThread):
|
||||
updateSignal = Signal(int, int)
|
||||
done = Signal()
|
||||
@@ -73,7 +71,7 @@ class BookGrabber(QThread):
|
||||
transformer = (
|
||||
BibTextTransformer("RDS").get_data(webdata).return_data("rds_data")
|
||||
)
|
||||
|
||||
|
||||
# confirm lock is acquired
|
||||
self.db.addBookToDatabase(bd, self.app_id, self.prof_id)
|
||||
# get latest book id
|
||||
@@ -103,6 +101,7 @@ class BookGrabber(QThread):
|
||||
def stop(self):
|
||||
self.is_Running = False
|
||||
|
||||
|
||||
# class BookGrabber(object):
|
||||
# updateSignal = Signal(int, int)
|
||||
# done = Signal()
|
||||
@@ -186,4 +185,4 @@ class BookGrabber(QThread):
|
||||
# break
|
||||
|
||||
# def stop(self):
|
||||
# self.is_Running = False
|
||||
# self.is_Running = False
|
||||
@@ -4,7 +4,7 @@ import time
|
||||
from PyQt6.QtCore import QThread
|
||||
from PyQt6.QtCore import pyqtSignal as Signal
|
||||
|
||||
from src.backend.database import Database
|
||||
from src.backend import Database
|
||||
|
||||
|
||||
# from src.transformers import RDS_AVAIL_DATA
|
||||
@@ -32,7 +32,6 @@ class AutoAdder(QThread):
|
||||
item = 0
|
||||
for entry in self.data:
|
||||
try:
|
||||
|
||||
self.updateSignal.emit(item)
|
||||
self.setTextSignal.emit(entry)
|
||||
item += 1
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
class NoResultError(Exception):
|
||||
def __init__(self, message):
|
||||
self.message = f"The query: {message} returned no results"
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
|
||||
# import basic error classes
|
||||
from .DatabaseErrors import *
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
|
||||
from .dataclass import ApparatData, BookData, Prof, Apparat, ELSA
|
||||
from .thread_bookgrabber import BookGrabber
|
||||
from .threads_autoadder import AutoAdder
|
||||
from .threads_availchecker import AvailChecker
|
||||
from .c_sort import custom_sort, sort_semesters_list
|
||||
from .constants import APP_NRS, PROF_TITLES, SEMAP_MEDIA_ACCOUNTS
|
||||
from .csvparser import csv_to_list
|
||||
from .wordparser import elsa_word_to_csv, word_docx_to_csv
|
||||
from .zotero import ZoteroController
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
APP_NRS = [i for i in range(1, 181)]
|
||||
|
||||
PROF_TITLES = [
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
import csv
|
||||
|
||||
import chardet
|
||||
|
||||
|
||||
def csv_to_list(path: str) -> list[str]:
|
||||
"""
|
||||
Extracts the data from a csv file and returns it as a pandas dataframe
|
||||
|
||||
@@ -144,6 +144,7 @@ class Subjects(Enum):
|
||||
if i.name == name:
|
||||
return i.id - 1
|
||||
|
||||
|
||||
@dataclass
|
||||
class Apparat:
|
||||
id: int | None = None
|
||||
@@ -162,20 +163,20 @@ class Apparat:
|
||||
konto: int | None = None
|
||||
|
||||
def from_tuple(self, data: tuple):
|
||||
setattr(self, "id", data[0])
|
||||
setattr(self, "name", data[1])
|
||||
setattr(self, "prof_id", data[2])
|
||||
setattr(self, "subject", data[3])
|
||||
setattr(self, "appnr", data[4])
|
||||
setattr(self, "created_semester", data[5])
|
||||
setattr(self, "extended_at", data[6])
|
||||
setattr(self, "eternal", data[7])
|
||||
setattr(self, "extend_until", data[8])
|
||||
setattr(self, "deleted", data[9])
|
||||
setattr(self, "deleted_date", data[10])
|
||||
setattr(self, "apparat_id_adis", data[11])
|
||||
setattr(self, "prof_id_adis", data[12])
|
||||
setattr(self, "konto", data[13])
|
||||
self.id = data[0]
|
||||
self.name = data[1]
|
||||
self.prof_id = data[2]
|
||||
self.subject = data[3]
|
||||
self.appnr = data[4]
|
||||
self.created_semester = data[5]
|
||||
self.extended_at = data[6]
|
||||
self.eternal = data[7]
|
||||
self.extend_until = data[8]
|
||||
self.deleted = data[9]
|
||||
self.deleted_date = data[10]
|
||||
self.apparat_id_adis = data[11]
|
||||
self.prof_id_adis = data[12]
|
||||
self.konto = data[13]
|
||||
return self
|
||||
|
||||
@property
|
||||
@@ -194,11 +195,13 @@ class ELSA:
|
||||
prof_id: int | None = None
|
||||
|
||||
def from_tuple(self, data):
|
||||
setattr(self, "id", data[0])
|
||||
setattr(self, "date", data[1])
|
||||
setattr(self, "semester", data[2])
|
||||
setattr(self, "prof_id", data[3])
|
||||
self.id = data[0]
|
||||
self.date = data[1]
|
||||
self.semester = data[2]
|
||||
self.prof_id = data[3]
|
||||
return self
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApparatData:
|
||||
prof: Prof = field(default_factory=Prof)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import csv
|
||||
|
||||
import pandas as pd
|
||||
|
||||
@@ -6,7 +6,7 @@ paragraphs = wordDoc.tables
|
||||
for table in paragraphs:
|
||||
for column in table.columns:
|
||||
cellcount = 0
|
||||
for cell in column.cells:
|
||||
for _cell in column.cells:
|
||||
if cellcount < 12:
|
||||
cellcount += 1
|
||||
# print(f"cell:{cell.text}")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
import yaml
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
from src import logger
|
||||
|
||||
# import sleep_and_retry decorator to retry requests
|
||||
from ratelimit import limits, sleep_and_retry
|
||||
|
||||
@@ -27,11 +28,12 @@ HEADERS = {
|
||||
RATE_LIMIT = 20
|
||||
RATE_PERIOD = 30
|
||||
|
||||
|
||||
class WebRequest:
|
||||
def __init__(self) -> None:
|
||||
"""Request data from the web, and format it depending on the mode."""
|
||||
self.apparat = None
|
||||
self.use_any = False # use any book that matches the search term
|
||||
self.use_any = False # use any book that matches the search term
|
||||
self.signature = None
|
||||
self.ppn = None
|
||||
self.data = None
|
||||
@@ -44,6 +46,7 @@ class WebRequest:
|
||||
self.use_any = True
|
||||
logger.info("Using any book")
|
||||
return self
|
||||
|
||||
def set_apparat(self, apparat):
|
||||
self.apparat = apparat
|
||||
if int(self.apparat) < 10:
|
||||
@@ -59,6 +62,7 @@ class WebRequest:
|
||||
signature = signature.split("/")[-1]
|
||||
self.ppn = signature
|
||||
return self
|
||||
|
||||
@sleep_and_retry
|
||||
@limits(calls=RATE_LIMIT, period=RATE_PERIOD)
|
||||
def search_book(self, searchterm: str):
|
||||
@@ -73,6 +77,7 @@ class WebRequest:
|
||||
for link in links:
|
||||
res.append(BASE + link["href"])
|
||||
return res
|
||||
|
||||
@sleep_and_retry
|
||||
@limits(calls=RATE_LIMIT, period=RATE_PERIOD)
|
||||
def search(self, link: str):
|
||||
@@ -82,6 +87,7 @@ class WebRequest:
|
||||
except requests.exceptions.RequestException as e:
|
||||
logger.error(f"Request failed: {e}")
|
||||
return None
|
||||
|
||||
def get_data(self):
|
||||
links = self.get_book_links(self.ppn)
|
||||
for link in links:
|
||||
@@ -170,11 +176,11 @@ class BibTextTransformer:
|
||||
COinS_IDENT = "ctx_ver"
|
||||
BIBTEX_IDENT = "@book"
|
||||
RDS_IDENT = "RDS ---------------------------------- "
|
||||
|
||||
|
||||
if data is None:
|
||||
self.data = None
|
||||
return self
|
||||
|
||||
|
||||
if self.mode == "RIS":
|
||||
for line in data:
|
||||
if RIS_IDENT in line:
|
||||
@@ -207,7 +213,7 @@ class BibTextTransformer:
|
||||
BookData: a dataclass containing data about the book
|
||||
"""
|
||||
if self.data is None:
|
||||
return None
|
||||
return None
|
||||
match self.mode:
|
||||
case "ARRAY":
|
||||
return ARRAYData(self.signature).transform(self.data)
|
||||
@@ -218,11 +224,10 @@ class BibTextTransformer:
|
||||
case "RIS":
|
||||
return RISData().transform(self.data)
|
||||
case "RDS":
|
||||
return RDSData().transform(self.data).return_data(option)
|
||||
return RDSData().transform(self.data).return_data(option)
|
||||
case None:
|
||||
return None
|
||||
|
||||
|
||||
|
||||
# if self.mode == "ARRAY":
|
||||
# return ARRAYData().transform(self.data)
|
||||
# elif self.mode == "COinS":
|
||||
@@ -252,4 +257,3 @@ if __name__ == "__main__":
|
||||
data = WebRequest(71).get_ppn(link).get_data()
|
||||
bib = BibTextTransformer("ARRAY").get_data().return_data()
|
||||
print(bib)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
|
||||
import pandas as pd
|
||||
from docx import Document
|
||||
|
||||
letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
|
||||
|
||||
|
||||
def word_docx_to_csv(path) -> pd.DataFrame:
|
||||
doc = Document(path)
|
||||
tables = doc.tables
|
||||
@@ -25,6 +26,8 @@ def word_docx_to_csv(path) -> pd.DataFrame:
|
||||
|
||||
df = m_data[2]
|
||||
return df
|
||||
|
||||
|
||||
def makeDict():
|
||||
return {
|
||||
"work_author": None,
|
||||
@@ -42,6 +45,7 @@ def makeDict():
|
||||
"type": None,
|
||||
}
|
||||
|
||||
|
||||
def tuple_to_dict(tlist: tuple, type: str) -> dict:
|
||||
ret = []
|
||||
for line in tlist:
|
||||
@@ -82,6 +86,7 @@ def tuple_to_dict(tlist: tuple, type: str) -> dict:
|
||||
ret.append(data)
|
||||
return ret
|
||||
|
||||
|
||||
def elsa_word_to_csv(path):
|
||||
doc = Document(path)
|
||||
# # print all lines in doc
|
||||
@@ -119,4 +124,4 @@ def elsa_word_to_csv(path):
|
||||
|
||||
if __name__ == "__main__":
|
||||
else_df = elsa_word_to_csv("C:/Users/aky547/Desktop/Antrag ELSA Schweitzer.docx")
|
||||
# print(else_df)
|
||||
# print(else_df)
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
|
||||
from pyzotero import zotero
|
||||
from dataclasses import dataclass
|
||||
from src.logic.webrequest import WebRequest, BibTextTransformer
|
||||
from src import settings
|
||||
|
||||
|
||||
|
||||
@dataclass
|
||||
class Creator:
|
||||
firstName: str = None
|
||||
@@ -160,6 +158,7 @@ class JournalArticle:
|
||||
|
||||
class ZoteroController:
|
||||
zoterocfg = settings.zotero
|
||||
|
||||
def __init__(self):
|
||||
self.zot = zotero.Zotero(
|
||||
self.zoterocfg.library_id,
|
||||
|
||||
@@ -174,8 +174,6 @@ class ARRAYData:
|
||||
except Exception as e:
|
||||
return None
|
||||
|
||||
|
||||
|
||||
def _get_author(data):
|
||||
try:
|
||||
array = data.split("[au_display_short]")[1].split(")\n")[0].strip()
|
||||
@@ -252,7 +250,7 @@ class ARRAYData:
|
||||
title = _get_title(data).strip()
|
||||
author = _get_author(data)
|
||||
edition = _get_list_entry(data, "[ausgabe]", "[0]").replace(",", "")
|
||||
link = f"https://rds.ibs-bw.de/phfreiburg/link?kid={_get_line(data,'[kid]')}"
|
||||
link = f"https://rds.ibs-bw.de/phfreiburg/link?kid={_get_line(data, '[kid]')}"
|
||||
isbn = _get_isbn(data)
|
||||
# [self._get_list_entry(data,"[isbn]","[0]"),self._get_list_entry(data,"[is]","[1]")],
|
||||
language = _get_list_entry(data, "[la_facet]", "[0]")
|
||||
@@ -299,7 +297,7 @@ class COinSData:
|
||||
return BookData(
|
||||
ppn=_get_line(data, "rft_id").split("=")[1],
|
||||
title=_get_line(data, "rft.btitle"),
|
||||
author=f"{_get_line(data,'rft.aulast')}, {_get_line(data,'rft.aufirst')}",
|
||||
author=f"{_get_line(data, 'rft.aulast')}, {_get_line(data, 'rft.aufirst')}",
|
||||
edition=_get_line(data, "rft.edition"),
|
||||
link=_get_line(data, "rft_id"),
|
||||
isbn=_get_line(data, "rft.isbn"),
|
||||
|
||||
@@ -15,7 +15,9 @@ class Ui_MainWindow(object):
|
||||
MainWindow.setWindowModality(QtCore.Qt.WindowModality.WindowModal)
|
||||
MainWindow.setEnabled(True)
|
||||
MainWindow.resize(1590, 800)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
|
||||
@@ -24,14 +26,24 @@ class Ui_MainWindow(object):
|
||||
MainWindow.setMaximumSize(QtCore.QSize(1590, 800))
|
||||
MainWindow.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.NoContextMenu)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap("c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\../../../../../../icons/logo.ico"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
icon.addPixmap(
|
||||
QtGui.QPixmap(
|
||||
"c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\../../../../../../icons/logo.ico"
|
||||
),
|
||||
QtGui.QIcon.Mode.Normal,
|
||||
QtGui.QIcon.State.Off,
|
||||
)
|
||||
MainWindow.setWindowIcon(icon)
|
||||
MainWindow.setStatusTip("")
|
||||
self.centralwidget = QtWidgets.QWidget(parent=MainWindow)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.centralwidget.sizePolicy().hasHeightForWidth()
|
||||
)
|
||||
self.centralwidget.setSizePolicy(sizePolicy)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.verticalLayoutWidget = QtWidgets.QWidget(parent=self.centralwidget)
|
||||
@@ -48,10 +60,15 @@ class Ui_MainWindow(object):
|
||||
self.tabWidget.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.tabWidget.setObjectName("tabWidget")
|
||||
self.createApparat = QtWidgets.QWidget()
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Preferred,
|
||||
QtWidgets.QSizePolicy.Policy.Preferred,
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.createApparat.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.createApparat.sizePolicy().hasHeightForWidth()
|
||||
)
|
||||
self.createApparat.setSizePolicy(sizePolicy)
|
||||
self.createApparat.setObjectName("createApparat")
|
||||
self.horizontalLayoutWidget_2 = QtWidgets.QWidget(parent=self.createApparat)
|
||||
@@ -64,28 +81,52 @@ class Ui_MainWindow(object):
|
||||
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)
|
||||
spacerItem = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.verticalLayout_2.addItem(spacerItem)
|
||||
self.create_document = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_2)
|
||||
self.create_document = QtWidgets.QPushButton(
|
||||
parent=self.horizontalLayoutWidget_2
|
||||
)
|
||||
self.create_document.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.create_document.setObjectName("create_document")
|
||||
self.verticalLayout_2.addWidget(self.create_document)
|
||||
self.create_new_app = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_2)
|
||||
self.create_new_app = QtWidgets.QPushButton(
|
||||
parent=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)
|
||||
self.cancel_active_selection = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_2)
|
||||
self.cancel_active_selection = QtWidgets.QPushButton(
|
||||
parent=self.horizontalLayoutWidget_2
|
||||
)
|
||||
self.cancel_active_selection.setEnabled(False)
|
||||
self.cancel_active_selection.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.cancel_active_selection.setObjectName("cancel_active_selection")
|
||||
self.verticalLayout_2.addWidget(self.cancel_active_selection)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.verticalLayout_2.addItem(spacerItem1)
|
||||
self.formLayout.setLayout(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.verticalLayout_2)
|
||||
self.tableWidget_apparate = QtWidgets.QTableWidget(parent=self.horizontalLayoutWidget_2)
|
||||
self.formLayout.setLayout(
|
||||
1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.verticalLayout_2
|
||||
)
|
||||
self.tableWidget_apparate = QtWidgets.QTableWidget(
|
||||
parent=self.horizontalLayoutWidget_2
|
||||
)
|
||||
self.tableWidget_apparate.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.tableWidget_apparate.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
|
||||
self.tableWidget_apparate.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||
self.tableWidget_apparate.setSizeAdjustPolicy(
|
||||
QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents
|
||||
)
|
||||
self.tableWidget_apparate.setEditTriggers(
|
||||
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
|
||||
)
|
||||
self.tableWidget_apparate.setAlternatingRowColors(True)
|
||||
self.tableWidget_apparate.setTextElideMode(QtCore.Qt.TextElideMode.ElideMiddle)
|
||||
self.tableWidget_apparate.setObjectName("tableWidget_apparate")
|
||||
@@ -104,7 +145,9 @@ class Ui_MainWindow(object):
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget_apparate.setHorizontalHeaderItem(5, item)
|
||||
self.tableWidget_apparate.horizontalHeader().setCascadingSectionResizes(True)
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.tableWidget_apparate)
|
||||
self.formLayout.setWidget(
|
||||
1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.tableWidget_apparate
|
||||
)
|
||||
self.horizontalLayout_2.addLayout(self.formLayout)
|
||||
self.line = QtWidgets.QFrame(parent=self.createApparat)
|
||||
self.line.setGeometry(QtCore.QRect(0, 160, 1261, 21))
|
||||
@@ -120,12 +163,22 @@ class Ui_MainWindow(object):
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
||||
spacerItem2 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Fixed,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout_5.addItem(spacerItem2)
|
||||
self.chkbx_show_del_media = QtWidgets.QCheckBox(parent=self.gridLayoutWidget_2)
|
||||
self.chkbx_show_del_media.setObjectName("chkbx_show_del_media")
|
||||
self.horizontalLayout_5.addWidget(self.chkbx_show_del_media)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Fixed,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout_5.addItem(spacerItem3)
|
||||
self.btn_reserve = QtWidgets.QPushButton(parent=self.gridLayoutWidget_2)
|
||||
self.btn_reserve.setObjectName("btn_reserve")
|
||||
@@ -144,7 +197,12 @@ class Ui_MainWindow(object):
|
||||
self.progress_label.setObjectName("progress_label")
|
||||
self.add_layout.addWidget(self.progress_label)
|
||||
self.horizontalLayout_5.addLayout(self.add_layout)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Fixed,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout_5.addItem(spacerItem4)
|
||||
self.avail_layout = QtWidgets.QHBoxLayout()
|
||||
self.avail_layout.setObjectName("avail_layout")
|
||||
@@ -160,25 +218,48 @@ class Ui_MainWindow(object):
|
||||
self.avail_status = QtWidgets.QLabel(parent=self.gridLayoutWidget_2)
|
||||
self.avail_status.setObjectName("avail_status")
|
||||
self.horizontalLayout_5.addWidget(self.avail_status)
|
||||
self.automation_add_selected_books = QtWidgets.QPushButton(parent=self.gridLayoutWidget_2)
|
||||
self.automation_add_selected_books.setObjectName("automation_add_selected_books")
|
||||
self.automation_add_selected_books = QtWidgets.QPushButton(
|
||||
parent=self.gridLayoutWidget_2
|
||||
)
|
||||
self.automation_add_selected_books.setObjectName(
|
||||
"automation_add_selected_books"
|
||||
)
|
||||
self.horizontalLayout_5.addWidget(self.automation_add_selected_books)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout_5.addItem(spacerItem5)
|
||||
self.gridLayout_2.addLayout(self.horizontalLayout_5, 4, 0, 1, 1)
|
||||
self.tableWidget_apparat_media = QtWidgets.QTableWidget(parent=self.gridLayoutWidget_2)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.tableWidget_apparat_media = QtWidgets.QTableWidget(
|
||||
parent=self.gridLayoutWidget_2
|
||||
)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Expanding
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.tableWidget_apparat_media.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.tableWidget_apparat_media.sizePolicy().hasHeightForWidth()
|
||||
)
|
||||
self.tableWidget_apparat_media.setSizePolicy(sizePolicy)
|
||||
self.tableWidget_apparat_media.setMinimumSize(QtCore.QSize(1259, 0))
|
||||
self.tableWidget_apparat_media.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.tableWidget_apparat_media.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
||||
self.tableWidget_apparat_media.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
|
||||
self.tableWidget_apparat_media.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||
self.tableWidget_apparat_media.setContextMenuPolicy(
|
||||
QtCore.Qt.ContextMenuPolicy.CustomContextMenu
|
||||
)
|
||||
self.tableWidget_apparat_media.setSizeAdjustPolicy(
|
||||
QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents
|
||||
)
|
||||
self.tableWidget_apparat_media.setEditTriggers(
|
||||
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
|
||||
)
|
||||
self.tableWidget_apparat_media.setAlternatingRowColors(True)
|
||||
self.tableWidget_apparat_media.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
|
||||
self.tableWidget_apparat_media.setSelectionBehavior(
|
||||
QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows
|
||||
)
|
||||
self.tableWidget_apparat_media.setObjectName("tableWidget_apparat_media")
|
||||
self.tableWidget_apparat_media.setColumnCount(7)
|
||||
self.tableWidget_apparat_media.setRowCount(0)
|
||||
@@ -196,7 +277,9 @@ class Ui_MainWindow(object):
|
||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(5, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(6, item)
|
||||
self.tableWidget_apparat_media.horizontalHeader().setCascadingSectionResizes(True)
|
||||
self.tableWidget_apparat_media.horizontalHeader().setCascadingSectionResizes(
|
||||
True
|
||||
)
|
||||
self.gridLayout_2.addWidget(self.tableWidget_apparat_media, 9, 0, 1, 1)
|
||||
self.label = QtWidgets.QLabel(parent=self.gridLayoutWidget_2)
|
||||
font = QtGui.QFont()
|
||||
@@ -207,10 +290,14 @@ class Ui_MainWindow(object):
|
||||
self.gridLayout_2.addWidget(self.label, 2, 0, 1, 1)
|
||||
self.app_group_box = QtWidgets.QGroupBox(parent=self.gridLayoutWidget_2)
|
||||
self.app_group_box.setEnabled(True)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.app_group_box.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.app_group_box.sizePolicy().hasHeightForWidth()
|
||||
)
|
||||
self.app_group_box.setSizePolicy(sizePolicy)
|
||||
self.app_group_box.setMinimumSize(QtCore.QSize(0, 210))
|
||||
font = QtGui.QFont()
|
||||
@@ -218,7 +305,11 @@ class Ui_MainWindow(object):
|
||||
font.setBold(True)
|
||||
self.app_group_box.setFont(font)
|
||||
self.app_group_box.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.app_group_box.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter)
|
||||
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(parent=self.app_group_box)
|
||||
@@ -230,12 +321,20 @@ class Ui_MainWindow(object):
|
||||
self.dokument_list.setFont(font)
|
||||
self.dokument_list.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.dokument_list.setAcceptDrops(True)
|
||||
self.dokument_list.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
|
||||
self.dokument_list.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
|
||||
self.dokument_list.setHorizontalScrollBarPolicy(
|
||||
QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
|
||||
)
|
||||
self.dokument_list.setSizeAdjustPolicy(
|
||||
QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents
|
||||
)
|
||||
self.dokument_list.setDragEnabled(True)
|
||||
self.dokument_list.setDragDropMode(QtWidgets.QAbstractItemView.DragDropMode.DragOnly)
|
||||
self.dokument_list.setDragDropMode(
|
||||
QtWidgets.QAbstractItemView.DragDropMode.DragOnly
|
||||
)
|
||||
self.dokument_list.setDefaultDropAction(QtCore.Qt.DropAction.LinkAction)
|
||||
self.dokument_list.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
|
||||
self.dokument_list.setSelectionMode(
|
||||
QtWidgets.QAbstractItemView.SelectionMode.SingleSelection
|
||||
)
|
||||
self.dokument_list.setObjectName("dokument_list")
|
||||
self.dokument_list.setColumnCount(4)
|
||||
self.dokument_list.setRowCount(0)
|
||||
@@ -340,9 +439,16 @@ class Ui_MainWindow(object):
|
||||
self.app_fach.setEditable(True)
|
||||
self.app_fach.setObjectName("app_fach")
|
||||
self.gridLayout_6.addWidget(self.app_fach, 0, 1, 1, 1)
|
||||
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem6 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.gridLayout_6.addItem(spacerItem6, 0, 3, 1, 1)
|
||||
self.valid_check_app_fach = QtWidgets.QToolButton(parent=self.gridLayoutWidget_5)
|
||||
self.valid_check_app_fach = QtWidgets.QToolButton(
|
||||
parent=self.gridLayoutWidget_5
|
||||
)
|
||||
self.valid_check_app_fach.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.valid_check_app_fach.setText("")
|
||||
self.valid_check_app_fach.setAutoRaise(True)
|
||||
@@ -390,7 +496,9 @@ class Ui_MainWindow(object):
|
||||
self.drpdwn_prof_name.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||
self.drpdwn_prof_name.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhNone)
|
||||
self.drpdwn_prof_name.setEditable(True)
|
||||
self.drpdwn_prof_name.setInsertPolicy(QtWidgets.QComboBox.InsertPolicy.InsertAlphabetically)
|
||||
self.drpdwn_prof_name.setInsertPolicy(
|
||||
QtWidgets.QComboBox.InsertPolicy.InsertAlphabetically
|
||||
)
|
||||
self.drpdwn_prof_name.setPlaceholderText("")
|
||||
self.drpdwn_prof_name.setFrame(True)
|
||||
self.drpdwn_prof_name.setObjectName("drpdwn_prof_name")
|
||||
@@ -435,7 +543,9 @@ class Ui_MainWindow(object):
|
||||
font.setPointSize(9)
|
||||
font.setBold(False)
|
||||
self.prof_mail.setFont(font)
|
||||
self.prof_mail.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhEmailCharactersOnly)
|
||||
self.prof_mail.setInputMethodHints(
|
||||
QtCore.Qt.InputMethodHint.ImhEmailCharactersOnly
|
||||
)
|
||||
self.prof_mail.setMaxLength(200)
|
||||
self.prof_mail.setPlaceholderText("")
|
||||
self.prof_mail.setObjectName("prof_mail")
|
||||
@@ -451,31 +561,43 @@ class Ui_MainWindow(object):
|
||||
font.setBold(False)
|
||||
self.label_12.setFont(font)
|
||||
self.label_12.setObjectName("label_12")
|
||||
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_12)
|
||||
self.formLayout_3.setWidget(
|
||||
0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_12
|
||||
)
|
||||
self.prof_id_adis = QtWidgets.QLineEdit(parent=self.formLayoutWidget_2)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
font.setBold(False)
|
||||
self.prof_id_adis.setFont(font)
|
||||
self.prof_id_adis.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhPreferNumbers)
|
||||
self.prof_id_adis.setInputMethodHints(
|
||||
QtCore.Qt.InputMethodHint.ImhPreferNumbers
|
||||
)
|
||||
self.prof_id_adis.setText("")
|
||||
self.prof_id_adis.setObjectName("prof_id_adis")
|
||||
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.prof_id_adis)
|
||||
self.formLayout_3.setWidget(
|
||||
0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.prof_id_adis
|
||||
)
|
||||
self.label_13 = QtWidgets.QLabel(parent=self.formLayoutWidget_2)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
font.setBold(False)
|
||||
self.label_13.setFont(font)
|
||||
self.label_13.setObjectName("label_13")
|
||||
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_13)
|
||||
self.formLayout_3.setWidget(
|
||||
1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_13
|
||||
)
|
||||
self.apparat_id_adis = QtWidgets.QLineEdit(parent=self.formLayoutWidget_2)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
font.setBold(False)
|
||||
self.apparat_id_adis.setFont(font)
|
||||
self.apparat_id_adis.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhPreferNumbers)
|
||||
self.apparat_id_adis.setInputMethodHints(
|
||||
QtCore.Qt.InputMethodHint.ImhPreferNumbers
|
||||
)
|
||||
self.apparat_id_adis.setObjectName("apparat_id_adis")
|
||||
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.apparat_id_adis)
|
||||
self.formLayout_3.setWidget(
|
||||
1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.apparat_id_adis
|
||||
)
|
||||
self.sem_year = QtWidgets.QLineEdit(parent=self.app_group_box)
|
||||
self.sem_year.setGeometry(QtCore.QRect(410, 90, 113, 20))
|
||||
font = QtGui.QFont()
|
||||
@@ -643,7 +765,10 @@ class Ui_MainWindow(object):
|
||||
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
||||
self.groupBox_2 = QtWidgets.QGroupBox(parent=self.steps)
|
||||
self.groupBox_2.setEnabled(True)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
|
||||
@@ -681,7 +806,10 @@ class Ui_MainWindow(object):
|
||||
self.verticalLayout_6.addWidget(self.ids_check)
|
||||
self.verticalLayout_3.addWidget(self.groupBox_2)
|
||||
self.groupBox = QtWidgets.QGroupBox(parent=self.steps)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
|
||||
@@ -743,7 +871,13 @@ class Ui_MainWindow(object):
|
||||
self.btn_copy_adis_command.setAccessibleDescription("")
|
||||
self.btn_copy_adis_command.setAutoFillBackground(False)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap("c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\../../../../../../.designer/backup/icons/information.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
icon1.addPixmap(
|
||||
QtGui.QPixmap(
|
||||
"c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\../../../../../../.designer/backup/icons/information.png"
|
||||
),
|
||||
QtGui.QIcon.Mode.Normal,
|
||||
QtGui.QIcon.State.Off,
|
||||
)
|
||||
self.btn_copy_adis_command.setIcon(icon1)
|
||||
self.btn_copy_adis_command.setCheckable(False)
|
||||
self.btn_copy_adis_command.setChecked(False)
|
||||
@@ -790,7 +924,9 @@ class Ui_MainWindow(object):
|
||||
self.actionEinstellungen.setShortcutVisibleInContextMenu(True)
|
||||
self.actionEinstellungen.setObjectName("actionEinstellungen")
|
||||
self.actionDokumentation = QtGui.QAction(parent=MainWindow)
|
||||
self.actionDokumentation.setShortcutContext(QtCore.Qt.ShortcutContext.ApplicationShortcut)
|
||||
self.actionDokumentation.setShortcutContext(
|
||||
QtCore.Qt.ShortcutContext.ApplicationShortcut
|
||||
)
|
||||
self.actionDokumentation.setObjectName("actionDokumentation")
|
||||
self.actionAbout = QtGui.QAction(parent=MainWindow)
|
||||
self.actionAbout.setMenuRole(QtGui.QAction.MenuRole.AboutRole)
|
||||
@@ -844,11 +980,20 @@ class Ui_MainWindow(object):
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "Semesterapparatsmanagement"))
|
||||
self.create_document.setToolTip(_translate("MainWindow", "Erstellt die Übersicht, welche am Regal ausgehängt werden kann"))
|
||||
MainWindow.setWindowTitle(
|
||||
_translate("MainWindow", "Semesterapparatsmanagement")
|
||||
)
|
||||
self.create_document.setToolTip(
|
||||
_translate(
|
||||
"MainWindow",
|
||||
"Erstellt die Übersicht, welche am Regal ausgehängt werden kann",
|
||||
)
|
||||
)
|
||||
self.create_document.setText(_translate("MainWindow", "Übersicht erstellen"))
|
||||
self.create_new_app.setText(_translate("MainWindow", "neu. App anlegen"))
|
||||
self.cancel_active_selection.setText(_translate("MainWindow", "Auswahl abbrechen"))
|
||||
self.cancel_active_selection.setText(
|
||||
_translate("MainWindow", "Auswahl abbrechen")
|
||||
)
|
||||
self.tableWidget_apparate.setSortingEnabled(False)
|
||||
item = self.tableWidget_apparate.horizontalHeaderItem(0)
|
||||
item.setText(_translate("MainWindow", "AppNr"))
|
||||
@@ -862,17 +1007,26 @@ class Ui_MainWindow(object):
|
||||
item.setText(_translate("MainWindow", "Dauerapparat"))
|
||||
item = self.tableWidget_apparate.horizontalHeaderItem(5)
|
||||
item.setText(_translate("MainWindow", "KontoNr"))
|
||||
self.chkbx_show_del_media.setText(_translate("MainWindow", "gel. Medien anzeigen"))
|
||||
self.chkbx_show_del_media.setText(
|
||||
_translate("MainWindow", "gel. Medien anzeigen")
|
||||
)
|
||||
self.btn_reserve.setText(_translate("MainWindow", "im Apparat?"))
|
||||
self.label_info.setText(_translate("MainWindow", "Medien werden hinzugefügt"))
|
||||
self.progress_label.setText(_translate("MainWindow", "Medium x/y"))
|
||||
self.label_20.setText(_translate("MainWindow", "Medien werden geprüft"))
|
||||
self.avail_status.setText(_translate("MainWindow", "TextLabel"))
|
||||
self.automation_add_selected_books.setText(_translate("MainWindow", "Ausgewählte als verfügbar markieren"))
|
||||
self.automation_add_selected_books.setText(
|
||||
_translate("MainWindow", "Ausgewählte als verfügbar markieren")
|
||||
)
|
||||
self.tableWidget_apparat_media.setSortingEnabled(True)
|
||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(0)
|
||||
item.setText(_translate("MainWindow", "Buchtitel"))
|
||||
item.setToolTip(_translate("MainWindow", "Es kann sein, dass der Buchtitel leer ist, dies kommt vor, wenn der Titel nicht passend formatiert ist"))
|
||||
item.setToolTip(
|
||||
_translate(
|
||||
"MainWindow",
|
||||
"Es kann sein, dass der Buchtitel leer ist, dies kommt vor, wenn der Titel nicht passend formatiert ist",
|
||||
)
|
||||
)
|
||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(1)
|
||||
item.setText(_translate("MainWindow", "Signatur"))
|
||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(2)
|
||||
@@ -881,7 +1035,12 @@ class Ui_MainWindow(object):
|
||||
item.setText(_translate("MainWindow", "Autor"))
|
||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(4)
|
||||
item.setText(_translate("MainWindow", "im Apparat?"))
|
||||
item.setToolTip(_translate("MainWindow", "Diese Angabe ist nicht zuverlässig. Ist das ❌ vorhanden, kann das Medium im Apparat sein, aber aufgrund eines Bugs nicht gefunden worden"))
|
||||
item.setToolTip(
|
||||
_translate(
|
||||
"MainWindow",
|
||||
"Diese Angabe ist nicht zuverlässig. Ist das ❌ vorhanden, kann das Medium im Apparat sein, aber aufgrund eines Bugs nicht gefunden worden",
|
||||
)
|
||||
)
|
||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(5)
|
||||
item.setText(_translate("MainWindow", "Vorgemerkt"))
|
||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(6)
|
||||
@@ -896,9 +1055,15 @@ class Ui_MainWindow(object):
|
||||
item.setText(_translate("MainWindow", "Neu?"))
|
||||
item = self.dokument_list.horizontalHeaderItem(3)
|
||||
item.setText(_translate("MainWindow", "path"))
|
||||
self.check_file.setToolTip(_translate("MainWindow", "Abhängig von der Anzahl der Medien kann die Suche sehr lange dauern"))
|
||||
self.check_file.setText(_translate("MainWindow", "Medien aus Dokument\n"
|
||||
" hinzufügen"))
|
||||
self.check_file.setToolTip(
|
||||
_translate(
|
||||
"MainWindow",
|
||||
"Abhängig von der Anzahl der Medien kann die Suche sehr lange dauern",
|
||||
)
|
||||
)
|
||||
self.check_file.setText(
|
||||
_translate("MainWindow", "Medien aus Dokument\n hinzufügen")
|
||||
)
|
||||
self.btn_open_document.setText(_translate("MainWindow", "Dokument öffnen"))
|
||||
self.btn_add_document.setText(_translate("MainWindow", "Dokument hinzufügen"))
|
||||
self.appname_mand.setText(_translate("MainWindow", "*"))
|
||||
@@ -926,29 +1091,60 @@ class Ui_MainWindow(object):
|
||||
self.btn_apparat_save.setText(_translate("MainWindow", "Speichern"))
|
||||
self.label_5.setText(_translate("MainWindow", "Apparatsname"))
|
||||
self.label_6.setText(_translate("MainWindow", "Semester"))
|
||||
self.valid_check_profname.setStatusTip(_translate("MainWindow", "Format: Nachname, Vorname"))
|
||||
self.valid_check_mail.setStatusTip(_translate("MainWindow", "mail@irgendwas.wasanderes"))
|
||||
self.valid_check_profname.setStatusTip(
|
||||
_translate("MainWindow", "Format: Nachname, Vorname")
|
||||
)
|
||||
self.valid_check_mail.setStatusTip(
|
||||
_translate("MainWindow", "mail@irgendwas.wasanderes")
|
||||
)
|
||||
self.saveandcreate.setText(_translate("MainWindow", "Speichern und anlegen"))
|
||||
self.add_medium.setText(_translate("MainWindow", "Medien hinzufügen"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.createApparat), _translate("MainWindow", "Anlegen"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.search_statistics), _translate("MainWindow", "Suchen / Statistik"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.elsatab), _translate("MainWindow", "ELSA"))
|
||||
self.tabWidget.setTabText(
|
||||
self.tabWidget.indexOf(self.createApparat),
|
||||
_translate("MainWindow", "Anlegen"),
|
||||
)
|
||||
self.tabWidget.setTabText(
|
||||
self.tabWidget.indexOf(self.search_statistics),
|
||||
_translate("MainWindow", "Suchen / Statistik"),
|
||||
)
|
||||
self.tabWidget.setTabText(
|
||||
self.tabWidget.indexOf(self.elsatab), _translate("MainWindow", "ELSA")
|
||||
)
|
||||
self.label_21.setText(_translate("MainWindow", "Aktion:"))
|
||||
self.select_action_box.setItemText(0, _translate("MainWindow", "Nutzer anlegen"))
|
||||
self.select_action_box.setItemText(1, _translate("MainWindow", "Nutzer bearbeiten"))
|
||||
self.select_action_box.setItemText(2, _translate("MainWindow", "Lehrperson bearbeiten"))
|
||||
self.select_action_box.setItemText(
|
||||
0, _translate("MainWindow", "Nutzer anlegen")
|
||||
)
|
||||
self.select_action_box.setItemText(
|
||||
1, _translate("MainWindow", "Nutzer bearbeiten")
|
||||
)
|
||||
self.select_action_box.setItemText(
|
||||
2, _translate("MainWindow", "Lehrperson bearbeiten")
|
||||
)
|
||||
self.admin_action.setTitle(_translate("MainWindow", "GroupBox"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.admin), _translate("MainWindow", "Admin"))
|
||||
self.tabWidget.setTabText(
|
||||
self.tabWidget.indexOf(self.admin), _translate("MainWindow", "Admin")
|
||||
)
|
||||
self.groupBox_2.setTitle(_translate("MainWindow", "Software"))
|
||||
self.appdata_check.setText(_translate("MainWindow", "Apparatsdaten eingegeben"))
|
||||
self.media_check.setText(_translate("MainWindow", "Medien hinzugefügt / importiert"))
|
||||
self.ids_check.setText(_translate("MainWindow", "Prof-ID und Apparat-ID eingetragen"))
|
||||
self.media_check.setText(
|
||||
_translate("MainWindow", "Medien hinzugefügt / importiert")
|
||||
)
|
||||
self.ids_check.setText(
|
||||
_translate("MainWindow", "Prof-ID und Apparat-ID eingetragen")
|
||||
)
|
||||
self.groupBox.setTitle(_translate("MainWindow", "aDIS"))
|
||||
self.media_checked.setText(_translate("MainWindow", "Medien geprüft"))
|
||||
self.media_edited_check.setText(_translate("MainWindow", "Medien bearbeitet"))
|
||||
self.app_created.setText(_translate("MainWindow", "Apparat angelegt"))
|
||||
self.btn_copy_adis_command.setToolTip(_translate("MainWindow", "Hier klicken, um die aDIS Abfrage in die Zwischenablage zu kopieren"))
|
||||
self.btn_copy_adis_command.setText(_translate("MainWindow", " aDIS Abfrage in Zwischenablage kopieren"))
|
||||
self.btn_copy_adis_command.setToolTip(
|
||||
_translate(
|
||||
"MainWindow",
|
||||
"Hier klicken, um die aDIS Abfrage in die Zwischenablage zu kopieren",
|
||||
)
|
||||
)
|
||||
self.btn_copy_adis_command.setText(
|
||||
_translate("MainWindow", " aDIS Abfrage in Zwischenablage kopieren")
|
||||
)
|
||||
self.menuDatei.setTitle(_translate("MainWindow", "Datei"))
|
||||
self.menuEinstellungen.setTitle(_translate("MainWindow", "Bearbeiten"))
|
||||
self.menuHelp.setTitle(_translate("MainWindow", "Help"))
|
||||
@@ -956,7 +1152,11 @@ class Ui_MainWindow(object):
|
||||
self.actionBeenden.setShortcut(_translate("MainWindow", "Ctrl+Q"))
|
||||
self.actionEinstellungen.setText(_translate("MainWindow", "Einstellungen"))
|
||||
self.actionEinstellungen.setShortcut(_translate("MainWindow", "Alt+S"))
|
||||
self.actionDokumentation.setText(_translate("MainWindow", "Dokumentation (online)"))
|
||||
self.actionDokumentation.setText(
|
||||
_translate("MainWindow", "Dokumentation (online)")
|
||||
)
|
||||
self.actionDokumentation.setShortcut(_translate("MainWindow", "F1"))
|
||||
self.actionAbout.setText(_translate("MainWindow", "About"))
|
||||
self.actionDokumentation_lokal.setText(_translate("MainWindow", "Dokumentation (lokal)"))
|
||||
self.actionDokumentation_lokal.setText(
|
||||
_translate("MainWindow", "Dokumentation (lokal)")
|
||||
)
|
||||
|
||||
@@ -1,33 +1,32 @@
|
||||
|
||||
import pathlib
|
||||
|
||||
from .Ui_semesterapparat_ui import Ui_MainWindow as Ui_Semesterapparat
|
||||
|
||||
from .dialogs import (
|
||||
ApparatExtendDialog,
|
||||
Mail_Dialog,
|
||||
Settings,
|
||||
edit_bookdata_ui,
|
||||
login_ui,
|
||||
medienadder_ui,
|
||||
parsed_titles_ui,
|
||||
popus_confirm,
|
||||
reminder_ui,
|
||||
About,
|
||||
ElsaAddEntry,
|
||||
)
|
||||
from .widgets import (
|
||||
FilePicker,
|
||||
StatusWidget,
|
||||
CalendarEntry,
|
||||
MessageCalendar,
|
||||
SearchStatisticPage, #
|
||||
DataGraph,
|
||||
ElsaDialog,
|
||||
UserCreate,
|
||||
EditUser,
|
||||
EditProf,
|
||||
)
|
||||
# from .dialogs import (
|
||||
# ApparatExtendDialog,
|
||||
# Mail_Dialog,
|
||||
# Settings,
|
||||
# edit_bookdata_ui,
|
||||
# login_ui,
|
||||
# medienadder_ui,
|
||||
# parsed_titles_ui,
|
||||
# popus_confirm,
|
||||
# reminder_ui,
|
||||
# About,
|
||||
# ElsaAddEntry,
|
||||
# )
|
||||
# from .widgets import (
|
||||
# FilePicker,
|
||||
# StatusWidget,
|
||||
# CalendarEntry,
|
||||
# MessageCalendar,
|
||||
# SearchStatisticPage, #
|
||||
# DataGraph,
|
||||
# ElsaDialog,
|
||||
# UserCreate,
|
||||
# EditUser,
|
||||
# EditProf,
|
||||
# )
|
||||
path = pathlib.Path(__file__).parent.absolute()
|
||||
# from .mainwindow import Ui_MainWindow as Ui_MainWindow
|
||||
# from .sap import Ui_MainWindow as MainWindow_SAP
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
|
||||
__all__ = [
|
||||
"add_bookdata_ui",
|
||||
"edit_bookdata_ui",
|
||||
"login_ui",
|
||||
"Mail_Dialog",
|
||||
"MailTemplateDialog",
|
||||
"medienadder_ui",
|
||||
"parsed_titles_ui",
|
||||
"popus_confirm",
|
||||
"reminder_ui",
|
||||
"Settings",
|
||||
"About",
|
||||
"ElsaGenConfirm",
|
||||
"ElsaAddEntry",
|
||||
"ApparatExtendDialog",
|
||||
]
|
||||
from .bookdata import BookDataUI as edit_bookdata_ui
|
||||
from .login import LoginDialog as login_ui
|
||||
from .mail import Mail_Dialog
|
||||
@@ -7,19 +22,9 @@ from .medienadder import MedienAdder as medienadder_ui
|
||||
from .parsed_titles import ParsedTitles as parsed_titles_ui
|
||||
from .popup_confirm import ConfirmDialog as popus_confirm
|
||||
from .reminder import ReminderDialog as reminder_ui
|
||||
from .settings import Settings
|
||||
from .about import About
|
||||
from .elsa_gen_confirm import ElsaGenConfirm
|
||||
from .elsa_add_entry import ElsaAddEntry
|
||||
from .app_ext import ApparatExtendDialog
|
||||
|
||||
__all__ = [
|
||||
"ext_app",
|
||||
"app_ext",
|
||||
"Mail_Dialog",
|
||||
"medianadder_ui",
|
||||
"popup_confirm",
|
||||
"edit_bookdata_ui",
|
||||
"settings_ui",
|
||||
"parsed_titles_ui",
|
||||
]
|
||||
from .settings import Settings
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
|
||||
from .dialog_sources.Ui_about import Ui_about
|
||||
from PyQt6 import QtWidgets
|
||||
from PyQt6.QtCore import PYQT_VERSION_STR
|
||||
from src import (
|
||||
Icon,
|
||||
__version__,
|
||||
__author__
|
||||
)
|
||||
from src import Icon, __version__, __author__
|
||||
from omegaconf import OmegaConf
|
||||
|
||||
|
||||
class About(QtWidgets.QDialog, Ui_about):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
@@ -15,33 +12,35 @@ class About(QtWidgets.QDialog, Ui_about):
|
||||
self.setWindowIcon(Icon("info").icon)
|
||||
self.setWindowTitle("About")
|
||||
self.setInfo()
|
||||
|
||||
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def setInfo(self):
|
||||
#add left most column to columnview
|
||||
# add left most column to columnview
|
||||
data = {
|
||||
"Version": __version__,
|
||||
"Author": __author__,
|
||||
"PyQt6 Version": PYQT_VERSION_STR,
|
||||
"License": "MIT License",
|
||||
"Icons":"""Google Material Design Icons (https://fonts.google.com/icons)
|
||||
"Icons": """Google Material Design Icons (https://fonts.google.com/icons)
|
||||
StableDiffusion (logo)
|
||||
svgrepo (https://www.svgrepo.com)"""
|
||||
svgrepo (https://www.svgrepo.com)""",
|
||||
}
|
||||
description = ""
|
||||
for key, value in data.items():
|
||||
description += f"{key}: {value}\n"
|
||||
self.description.setText(description)
|
||||
|
||||
|
||||
pass
|
||||
|
||||
|
||||
def launch_about():
|
||||
app = QtWidgets.QApplication([])
|
||||
window = About()
|
||||
window.show()
|
||||
app.exec()
|
||||
app.exec()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
pass
|
||||
pass
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
|
||||
from PyQt6 import QtWidgets
|
||||
from .dialog_sources.Ui_apparat_extend import Ui_Dialog
|
||||
from src import Icon
|
||||
from src.backend import Semester
|
||||
|
||||
|
||||
class ApparatExtendDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
def __init__(
|
||||
self,
|
||||
@@ -19,7 +20,7 @@ class ApparatExtendDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
"semester": (
|
||||
f"SoSe {int(self.sem_year.text()[-2:])}"
|
||||
if self.rad_sommer.isChecked()
|
||||
else f"WiSe {int(self.sem_year.text()[-2:])}/{int(self.sem_year.text()[-2:])+1}"
|
||||
else f"WiSe {int(self.sem_year.text()[-2:])}/{int(self.sem_year.text()[-2:]) + 1}"
|
||||
),
|
||||
"dauerapp": (
|
||||
self.dauerapp.isChecked() if self.dauerapp.isChecked() else False
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from src.logic.dataclass import BookData
|
||||
@@ -6,6 +5,7 @@ from src.logic.dataclass import BookData
|
||||
from .dialog_sources.Ui_edit_bookdata import Ui_Dialog
|
||||
from src import Icon
|
||||
|
||||
|
||||
class BookDataUI(QtWidgets.QDialog, Ui_Dialog):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
|
||||
from .dialog_sources.Ui_confirm_extend import Ui_extend_confirm
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
|
||||
class ConfirmExtend(QtWidgets.QDialog, Ui_extend_confirm):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setupUi(self)
|
||||
|
||||
|
||||
|
||||
|
||||
def launch():
|
||||
app = QtWidgets.QApplication([])
|
||||
window = ConfirmExtend()
|
||||
window.show()
|
||||
app.exec()
|
||||
app.exec()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\about.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\app_status.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\apparat_extend.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.7.1
|
||||
@@ -14,7 +13,9 @@ class Ui_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(388, 103)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
|
||||
@@ -24,11 +25,16 @@ class Ui_Dialog(object):
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
|
||||
self.buttonBox.setGeometry(QtCore.QRect(290, 30, 81, 241))
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Vertical)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Abort|QtWidgets.QDialogButtonBox.StandardButton.Save)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Abort
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Save
|
||||
)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.label = QtWidgets.QLabel(parent=Dialog)
|
||||
self.label.setGeometry(QtCore.QRect(10, 0, 281, 31))
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
|
||||
@@ -61,14 +67,16 @@ class Ui_Dialog(object):
|
||||
self.dauerapp.setObjectName("dauerapp")
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
||||
self.label.setText(_translate("Dialog", "Bis wann soll der Apparat verlängert werden?"))
|
||||
self.label.setText(
|
||||
_translate("Dialog", "Bis wann soll der Apparat verlängert werden?")
|
||||
)
|
||||
self.rad_sommer.setText(_translate("Dialog", "Sommer"))
|
||||
self.rad_winter.setText(_translate("Dialog", "Winter"))
|
||||
self.sem_year.setPlaceholderText(_translate("Dialog", "2023"))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\confirm_extend.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.7.1
|
||||
@@ -21,13 +20,16 @@ class Ui_extend_confirm(object):
|
||||
self.horizontalLayout.addWidget(self.textEdit)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=extend_confirm)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Vertical)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Ok
|
||||
)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.horizontalLayout.addWidget(self.buttonBox)
|
||||
|
||||
self.retranslateUi(extend_confirm)
|
||||
self.buttonBox.accepted.connect(extend_confirm.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(extend_confirm.reject) # type: ignore
|
||||
self.buttonBox.accepted.connect(extend_confirm.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(extend_confirm.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(extend_confirm)
|
||||
|
||||
def retranslateUi(self, extend_confirm):
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\edit_bookdata.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
@@ -17,13 +16,18 @@ class Ui_Dialog(object):
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
|
||||
self.buttonBox.setGeometry(QtCore.QRect(260, 530, 161, 32))
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Ok
|
||||
)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.gridLayoutWidget = QtWidgets.QWidget(parent=Dialog)
|
||||
self.gridLayoutWidget.setGeometry(QtCore.QRect(0, 0, 441, 531))
|
||||
self.gridLayoutWidget.setObjectName("gridLayoutWidget")
|
||||
self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
|
||||
self.gridLayout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint)
|
||||
self.gridLayout.setSizeConstraint(
|
||||
QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint
|
||||
)
|
||||
self.gridLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.label_10 = QtWidgets.QLabel(parent=self.gridLayoutWidget)
|
||||
@@ -67,7 +71,12 @@ class Ui_Dialog(object):
|
||||
self.label_2 = QtWidgets.QLabel(parent=self.gridLayoutWidget)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.gridLayout.addWidget(self.label_2, 1, 1, 1, 1)
|
||||
spacerItem = QtWidgets.QSpacerItem(5, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem = QtWidgets.QSpacerItem(
|
||||
5,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Fixed,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.gridLayout.addItem(spacerItem, 8, 0, 1, 1)
|
||||
self.line_title = QtWidgets.QLineEdit(parent=self.gridLayoutWidget)
|
||||
self.line_title.setObjectName("line_title")
|
||||
@@ -98,8 +107,8 @@ class Ui_Dialog(object):
|
||||
self.gridLayout.addWidget(self.line_publisher, 4, 2, 1, 1)
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\elsa_add_table_entry.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.7.1
|
||||
@@ -22,7 +21,12 @@ class Ui_Dialog(object):
|
||||
self.groupBox.setObjectName("groupBox")
|
||||
self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox)
|
||||
self.gridLayout_4.setObjectName("gridLayout_4")
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.gridLayout_4.addItem(spacerItem, 0, 3, 1, 1)
|
||||
self.btn_mono = QtWidgets.QRadioButton(parent=self.groupBox)
|
||||
self.btn_mono.setChecked(False)
|
||||
@@ -46,7 +50,12 @@ class Ui_Dialog(object):
|
||||
self.btn_search = QtWidgets.QPushButton(parent=Dialog)
|
||||
self.btn_search.setObjectName("btn_search")
|
||||
self.horizontalLayout_2.addWidget(self.btn_search)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout_2.addItem(spacerItem1)
|
||||
self.make_quote = QtWidgets.QPushButton(parent=Dialog)
|
||||
self.make_quote.setObjectName("make_quote")
|
||||
@@ -272,7 +281,12 @@ class Ui_Dialog(object):
|
||||
self.label_32 = QtWidgets.QLabel(parent=self.page)
|
||||
self.label_32.setObjectName("label_32")
|
||||
self.gridLayout_5.addWidget(self.label_32, 0, 0, 1, 1)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.gridLayout_5.addItem(spacerItem2, 7, 0, 1, 1)
|
||||
self.file_desc_edit = QtWidgets.QTextEdit(parent=self.page)
|
||||
self.file_desc_edit.setReadOnly(True)
|
||||
@@ -294,7 +308,12 @@ class Ui_Dialog(object):
|
||||
self.gridLayout_5.addWidget(self.ilias_filename, 4, 0, 1, 1)
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.verticalLayout_2.addItem(spacerItem3)
|
||||
self.copy_filename = QtWidgets.QToolButton(parent=self.page)
|
||||
self.copy_filename.setLayoutDirection(QtCore.Qt.LayoutDirection.LeftToRight)
|
||||
@@ -305,12 +324,22 @@ class Ui_Dialog(object):
|
||||
self.filename_edit_label.setText("")
|
||||
self.filename_edit_label.setObjectName("filename_edit_label")
|
||||
self.verticalLayout_2.addWidget(self.filename_edit_label)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.verticalLayout_2.addItem(spacerItem4)
|
||||
self.gridLayout_5.addLayout(self.verticalLayout_2, 1, 1, 1, 1)
|
||||
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
||||
spacerItem5 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.verticalLayout_3.addItem(spacerItem5)
|
||||
self.copy_ilias_filename = QtWidgets.QToolButton(parent=self.page)
|
||||
self.copy_ilias_filename.setObjectName("copy_ilias_filename")
|
||||
@@ -319,12 +348,22 @@ class Ui_Dialog(object):
|
||||
self.ilias_filename_label.setText("")
|
||||
self.ilias_filename_label.setObjectName("ilias_filename_label")
|
||||
self.verticalLayout_3.addWidget(self.ilias_filename_label)
|
||||
spacerItem6 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
spacerItem6 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.verticalLayout_3.addItem(spacerItem6)
|
||||
self.gridLayout_5.addLayout(self.verticalLayout_3, 4, 1, 1, 1)
|
||||
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
||||
spacerItem7 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
spacerItem7 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.verticalLayout_4.addItem(spacerItem7)
|
||||
self.copy_qoute = QtWidgets.QToolButton(parent=self.page)
|
||||
self.copy_qoute.setObjectName("copy_qoute")
|
||||
@@ -333,7 +372,12 @@ class Ui_Dialog(object):
|
||||
self.file_desc_edit_label.setText("")
|
||||
self.file_desc_edit_label.setObjectName("file_desc_edit_label")
|
||||
self.verticalLayout_4.addWidget(self.file_desc_edit_label)
|
||||
spacerItem8 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
spacerItem8 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.verticalLayout_4.addItem(spacerItem8)
|
||||
self.gridLayout_5.addLayout(self.verticalLayout_4, 6, 1, 1, 1)
|
||||
self.stackedWidget.addWidget(self.page)
|
||||
@@ -341,7 +385,11 @@ class Ui_Dialog(object):
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Discard|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Discard
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Ok
|
||||
)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.horizontalLayout.addWidget(self.buttonBox)
|
||||
self.retryButton = QtWidgets.QPushButton(parent=Dialog)
|
||||
@@ -362,11 +410,14 @@ class Ui_Dialog(object):
|
||||
self.btn_hg.setText(_translate("Dialog", "Herausgeberwerk"))
|
||||
self.label_2.setText(_translate("Dialog", "Identifikator"))
|
||||
self.btn_search.setText(_translate("Dialog", "Suchen"))
|
||||
self.make_quote.setToolTip(_translate("Dialog", "Zuerst die Seitenzahl anpassen"))
|
||||
self.make_quote.setToolTip(
|
||||
_translate("Dialog", "Zuerst die Seitenzahl anpassen")
|
||||
)
|
||||
self.make_quote.setText(_translate("Dialog", "Zitat erstellen"))
|
||||
self.label.setText(_translate("Dialog", "Autor(en)\n"
|
||||
" Nachname, Vorname"))
|
||||
self.book_author.setToolTip(_translate("Dialog", "Bei mehreren Autoren mit ; trennen"))
|
||||
self.label.setText(_translate("Dialog", "Autor(en)\n Nachname, Vorname"))
|
||||
self.book_author.setToolTip(
|
||||
_translate("Dialog", "Bei mehreren Autoren mit ; trennen")
|
||||
)
|
||||
self.label_3.setText(_translate("Dialog", "Jahr"))
|
||||
self.label_4.setText(_translate("Dialog", "Auflage"))
|
||||
self.label_5.setText(_translate("Dialog", "Titel"))
|
||||
@@ -374,9 +425,13 @@ class Ui_Dialog(object):
|
||||
self.label_7.setText(_translate("Dialog", "Verlag"))
|
||||
self.label_8.setText(_translate("Dialog", "Signatur"))
|
||||
self.label_9.setText(_translate("Dialog", "Seiten"))
|
||||
self.book_pages.setPlaceholderText(_translate("Dialog", "Seitenanzahl des Mediums, zum zitieren ändern!"))
|
||||
self.book_pages.setPlaceholderText(
|
||||
_translate("Dialog", "Seitenanzahl des Mediums, zum zitieren ändern!")
|
||||
)
|
||||
self.label_29.setText(_translate("Dialog", "ISBN"))
|
||||
self.hg_editor.setToolTip(_translate("Dialog", "Bei mehreren Autoren mit ; trennen"))
|
||||
self.hg_editor.setToolTip(
|
||||
_translate("Dialog", "Bei mehreren Autoren mit ; trennen")
|
||||
)
|
||||
self.label_26.setText(_translate("Dialog", "Verlag"))
|
||||
self.label_20.setText(_translate("Dialog", "Jahr"))
|
||||
self.label_24.setText(_translate("Dialog", "Beitragstitel"))
|
||||
@@ -384,15 +439,16 @@ class Ui_Dialog(object):
|
||||
self.label_28.setText(_translate("Dialog", "Signatur"))
|
||||
self.label_23.setText(_translate("Dialog", "Titel des Werkes"))
|
||||
self.label_21.setText(_translate("Dialog", "Auflage"))
|
||||
self.label_19.setText(_translate("Dialog", "Autor(en)\n"
|
||||
"Nachname, Vorname"))
|
||||
self.label_19.setText(_translate("Dialog", "Autor(en)\nNachname, Vorname"))
|
||||
self.label_30.setText(_translate("Dialog", "ISBN"))
|
||||
self.label_25.setText(_translate("Dialog", "Ort"))
|
||||
self.label_22.setText(_translate("Dialog", "Herausgebername(n)\n"
|
||||
"Nachname, Vorname"))
|
||||
self.hg_author.setToolTip(_translate("Dialog", "Bei mehreren Autoren mit ; trennen"))
|
||||
self.label_10.setText(_translate("Dialog", "Autor(en)\n"
|
||||
"Nachname, Vorname"))
|
||||
self.label_22.setText(
|
||||
_translate("Dialog", "Herausgebername(n)\nNachname, Vorname")
|
||||
)
|
||||
self.hg_author.setToolTip(
|
||||
_translate("Dialog", "Bei mehreren Autoren mit ; trennen")
|
||||
)
|
||||
self.label_10.setText(_translate("Dialog", "Autor(en)\nNachname, Vorname"))
|
||||
self.label_14.setText(_translate("Dialog", "Name der Zeitschrift"))
|
||||
self.label_11.setText(_translate("Dialog", "Jahr"))
|
||||
self.label_17.setText(_translate("Dialog", "Seiten"))
|
||||
@@ -402,7 +458,9 @@ class Ui_Dialog(object):
|
||||
self.label_15.setText(_translate("Dialog", "Ort"))
|
||||
self.label_13.setText(_translate("Dialog", "Artikeltitel"))
|
||||
self.label_18.setText(_translate("Dialog", "Signatur"))
|
||||
self.zs_author.setToolTip(_translate("Dialog", "Bei mehreren Autoren mit ; trennen"))
|
||||
self.zs_author.setToolTip(
|
||||
_translate("Dialog", "Bei mehreren Autoren mit ; trennen")
|
||||
)
|
||||
self.label_32.setText(_translate("Dialog", "Dateiname"))
|
||||
self.label_34.setText(_translate("Dialog", "ILIAS Name"))
|
||||
self.label_33.setText(_translate("Dialog", "ILIAS Dateibeschreibung"))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\elsa_generate_citation.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
@@ -31,7 +30,12 @@ class Ui_Dialog(object):
|
||||
self.radio_hg = QtWidgets.QRadioButton(parent=self.select_type)
|
||||
self.radio_hg.setObjectName("radio_hg")
|
||||
self.verticalLayout.addWidget(self.radio_hg)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
spacerItem = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.verticalLayout.addItem(spacerItem)
|
||||
self.verticalLayout_2.addWidget(self.select_type)
|
||||
self.check = QtWidgets.QGroupBox(parent=Dialog)
|
||||
@@ -58,7 +62,9 @@ class Ui_Dialog(object):
|
||||
self.verticalLayout_3.addWidget(self.citation_style_result)
|
||||
self.pushButton = QtWidgets.QPushButton(parent=self.check)
|
||||
self.pushButton.setObjectName("pushButton")
|
||||
self.verticalLayout_3.addWidget(self.pushButton, 0, QtCore.Qt.AlignmentFlag.AlignRight)
|
||||
self.verticalLayout_3.addWidget(
|
||||
self.pushButton, 0, QtCore.Qt.AlignmentFlag.AlignRight
|
||||
)
|
||||
self.verticalLayout_2.addWidget(self.check)
|
||||
self.verticalLayout_2.setStretch(0, 20)
|
||||
self.verticalLayout_2.setStretch(1, 80)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\elsa_generator_confirm.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
@@ -14,7 +13,9 @@ class Ui_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(530, 210)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
|
||||
@@ -99,14 +100,17 @@ class Ui_Dialog(object):
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
|
||||
self.buttonBox.setLayoutDirection(QtCore.Qt.LayoutDirection.LeftToRight)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Vertical)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Ok
|
||||
)
|
||||
self.buttonBox.setCenterButtons(False)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.horizontalLayout.addWidget(self.buttonBox)
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
@@ -118,4 +122,8 @@ class Ui_Dialog(object):
|
||||
self.label_2.setText(_translate("Dialog", "Autor(en)"))
|
||||
self.label_3.setText(_translate("Dialog", "Buchtitel"))
|
||||
self.label_4.setText(_translate("Dialog", "Seite(n)"))
|
||||
self.label_6.setText(_translate("Dialog", "Hier können fehlerhafte / fehlende Daten geändert werden"))
|
||||
self.label_6.setText(
|
||||
_translate(
|
||||
"Dialog", "Hier können fehlerhafte / fehlende Daten geändert werden"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\login.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
@@ -15,7 +14,11 @@ class Ui_Dialog(object):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(218, 190)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(":/icons/resources/1f510.svg"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
icon.addPixmap(
|
||||
QtGui.QPixmap(":/icons/resources/1f510.svg"),
|
||||
QtGui.QIcon.Mode.Normal,
|
||||
QtGui.QIcon.State.Off,
|
||||
)
|
||||
Dialog.setWindowIcon(icon)
|
||||
self.label = QtWidgets.QLabel(parent=Dialog)
|
||||
self.label.setGeometry(QtCore.QRect(20, 40, 71, 21))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\mail_preview.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.7.1
|
||||
@@ -15,7 +14,13 @@ class Ui_eMailPreview(object):
|
||||
eMailPreview.setObjectName("eMailPreview")
|
||||
eMailPreview.resize(700, 668)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap("c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\dialogs\\dialog_sources\\../../../../../../icons/email.svg"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
icon.addPixmap(
|
||||
QtGui.QPixmap(
|
||||
"c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\dialogs\\dialog_sources\\../../../../../../icons/email.svg"
|
||||
),
|
||||
QtGui.QIcon.Mode.Normal,
|
||||
QtGui.QIcon.State.Off,
|
||||
)
|
||||
eMailPreview.setWindowIcon(icon)
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout(eMailPreview)
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
@@ -68,11 +73,20 @@ class Ui_eMailPreview(object):
|
||||
self.gender_non = QtWidgets.QRadioButton(parent=eMailPreview)
|
||||
self.gender_non.setObjectName("gender_non")
|
||||
self.horizontalLayout_3.addWidget(self.gender_non)
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout_3.addItem(spacerItem)
|
||||
self.gridLayout.addLayout(self.horizontalLayout_3, 4, 2, 1, 1)
|
||||
self.label_3 = QtWidgets.QLabel(parent=eMailPreview)
|
||||
self.label_3.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignTop)
|
||||
self.label_3.setAlignment(
|
||||
QtCore.Qt.AlignmentFlag.AlignLeading
|
||||
| QtCore.Qt.AlignmentFlag.AlignLeft
|
||||
| QtCore.Qt.AlignmentFlag.AlignTop
|
||||
)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.gridLayout.addWidget(self.label_3, 5, 0, 1, 1)
|
||||
self.label = QtWidgets.QLabel(parent=eMailPreview)
|
||||
@@ -80,7 +94,12 @@ class Ui_eMailPreview(object):
|
||||
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout_2.addItem(spacerItem1)
|
||||
self.btn_okay = QtWidgets.QPushButton(parent=eMailPreview)
|
||||
self.btn_okay.setStatusTip("")
|
||||
@@ -88,7 +107,9 @@ class Ui_eMailPreview(object):
|
||||
self.horizontalLayout_2.addWidget(self.btn_okay)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=eMailPreview)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||
)
|
||||
self.buttonBox.setCenterButtons(True)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.horizontalLayout_2.addWidget(self.buttonBox)
|
||||
@@ -96,8 +117,8 @@ class Ui_eMailPreview(object):
|
||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
||||
|
||||
self.retranslateUi(eMailPreview)
|
||||
self.buttonBox.accepted.connect(eMailPreview.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(eMailPreview.reject) # type: ignore
|
||||
self.buttonBox.accepted.connect(eMailPreview.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(eMailPreview.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(eMailPreview)
|
||||
|
||||
def retranslateUi(self, eMailPreview):
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\medianadder.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.7.1
|
||||
@@ -15,7 +14,11 @@ class Ui_Dialog(object):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(620, 481)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(":/icons/resources/2795.svg"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
icon.addPixmap(
|
||||
QtGui.QPixmap(":/icons/resources/2795.svg"),
|
||||
QtGui.QIcon.Mode.Normal,
|
||||
QtGui.QIcon.State.Off,
|
||||
)
|
||||
Dialog.setWindowIcon(icon)
|
||||
self.label = QtWidgets.QLabel(parent=Dialog)
|
||||
self.label.setGeometry(QtCore.QRect(20, 10, 47, 21))
|
||||
@@ -48,12 +51,22 @@ class Ui_Dialog(object):
|
||||
self.tableWidget.setAutoFillBackground(False)
|
||||
self.tableWidget.setLineWidth(0)
|
||||
self.tableWidget.setMidLineWidth(0)
|
||||
self.tableWidget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
|
||||
self.tableWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
|
||||
self.tableWidget.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
|
||||
self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||
self.tableWidget.setVerticalScrollBarPolicy(
|
||||
QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
|
||||
)
|
||||
self.tableWidget.setHorizontalScrollBarPolicy(
|
||||
QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
|
||||
)
|
||||
self.tableWidget.setSizeAdjustPolicy(
|
||||
QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents
|
||||
)
|
||||
self.tableWidget.setEditTriggers(
|
||||
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
|
||||
)
|
||||
self.tableWidget.setAlternatingRowColors(True)
|
||||
self.tableWidget.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.NoSelection)
|
||||
self.tableWidget.setSelectionMode(
|
||||
QtWidgets.QAbstractItemView.SelectionMode.NoSelection
|
||||
)
|
||||
self.tableWidget.setTextElideMode(QtCore.Qt.TextElideMode.ElideMiddle)
|
||||
self.tableWidget.setObjectName("tableWidget")
|
||||
self.tableWidget.setColumnCount(4)
|
||||
@@ -180,7 +193,9 @@ class Ui_Dialog(object):
|
||||
self.horizontalLayout.addWidget(self.tableWidget)
|
||||
self.listWidget = QtWidgets.QListWidget(parent=Dialog)
|
||||
self.listWidget.setGeometry(QtCore.QRect(10, 110, 281, 321))
|
||||
self.listWidget.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
||||
self.listWidget.setContextMenuPolicy(
|
||||
QtCore.Qt.ContextMenuPolicy.CustomContextMenu
|
||||
)
|
||||
self.listWidget.setObjectName("listWidget")
|
||||
self.label_4 = QtWidgets.QLabel(parent=Dialog)
|
||||
self.label_4.setGeometry(QtCore.QRect(330, 50, 181, 21))
|
||||
@@ -355,7 +370,16 @@ class Ui_Dialog(object):
|
||||
self.list_amount.setText(_translate("Dialog", "0"))
|
||||
self.btn_save.setText(_translate("Dialog", "Ok"))
|
||||
self.btn_cancel.setText(_translate("Dialog", "Abbrechen"))
|
||||
self.check_use_any_book.setToolTip(_translate("Dialog", "Verwendet ein zufälliges Buch des Datensatzes, nützlich wenn das Buch noch nicht im Apparat ist"))
|
||||
self.check_use_any_book.setToolTip(
|
||||
_translate(
|
||||
"Dialog",
|
||||
"Verwendet ein zufälliges Buch des Datensatzes, nützlich wenn das Buch noch nicht im Apparat ist",
|
||||
)
|
||||
)
|
||||
self.check_use_any_book.setText(_translate("Dialog", "Jedes Buch verwenden"))
|
||||
self.check_use_exact_signature.setToolTip(_translate("Dialog", "Verwendet die eingegebene Signatur für die Suche von Daten"))
|
||||
self.check_use_exact_signature.setToolTip(
|
||||
_translate(
|
||||
"Dialog", "Verwendet die eingegebene Signatur für die Suche von Daten"
|
||||
)
|
||||
)
|
||||
self.check_use_exact_signature.setText(_translate("Dialog", "Exakte Signatur"))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\newMailTemplateDesigner.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
@@ -58,7 +57,12 @@ class Ui_Dialog(object):
|
||||
self.fontSize.addItem("")
|
||||
self.fontSize.addItem("")
|
||||
self.horizontalLayout_2.addWidget(self.fontSize)
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout_2.addItem(spacerItem)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_2)
|
||||
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
|
||||
@@ -71,7 +75,9 @@ class Ui_Dialog(object):
|
||||
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
|
||||
self.placeholder_list = QtWidgets.QComboBox(parent=Dialog)
|
||||
self.placeholder_list.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.placeholder_list.setSizeAdjustPolicy(QtWidgets.QComboBox.SizeAdjustPolicy.AdjustToContents)
|
||||
self.placeholder_list.setSizeAdjustPolicy(
|
||||
QtWidgets.QComboBox.SizeAdjustPolicy.AdjustToContents
|
||||
)
|
||||
self.placeholder_list.setObjectName("placeholder_list")
|
||||
self.placeholder_list.addItem("")
|
||||
self.placeholder_list.addItem("")
|
||||
@@ -109,13 +115,22 @@ class Ui_Dialog(object):
|
||||
self.testTemplate = QtWidgets.QPushButton(parent=Dialog)
|
||||
self.testTemplate.setObjectName("testTemplate")
|
||||
self.horizontalLayout_3.addWidget(self.testTemplate)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout_3.addItem(spacerItem1)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_3)
|
||||
self.verticalLayout_2.addLayout(self.verticalLayout)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Discard|QtWidgets.QDialogButtonBox.StandardButton.Save)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Discard
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Save
|
||||
)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.verticalLayout_2.addWidget(self.buttonBox)
|
||||
|
||||
@@ -159,6 +174,8 @@ class Ui_Dialog(object):
|
||||
self.placeholder_list.setItemText(4, _translate("Dialog", "«DozentName»"))
|
||||
self.placeholder_list.setItemText(5, _translate("Dialog", "«Signatur»"))
|
||||
self.label_2.setText(_translate("Dialog", "Beschreibung"))
|
||||
self.insertPlaceholder.setText(_translate("Dialog", "An aktiver Position einfügen"))
|
||||
self.insertPlaceholder.setText(
|
||||
_translate("Dialog", "An aktiver Position einfügen")
|
||||
)
|
||||
self.label_3.setText(_translate("Dialog", "Betreff"))
|
||||
self.testTemplate.setText(_translate("Dialog", "Template testen"))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\parsed_titles.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
@@ -39,7 +38,12 @@ class Ui_Form(object):
|
||||
self.label_2 = QtWidgets.QLabel(parent=self.horizontalLayoutWidget)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.horizontalLayout.addWidget(self.label_2)
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout.addItem(spacerItem)
|
||||
self.frame_2 = QtWidgets.QFrame(parent=Form)
|
||||
self.frame_2.setGeometry(QtCore.QRect(10, 80, 381, 201))
|
||||
@@ -55,7 +59,9 @@ class Ui_Form(object):
|
||||
self.listWidget = QtWidgets.QListWidget(parent=self.horizontalLayoutWidget_2)
|
||||
self.listWidget.setObjectName("listWidget")
|
||||
self.horizontalLayout_2.addWidget(self.listWidget)
|
||||
self.listWidget_done = QtWidgets.QListWidget(parent=self.horizontalLayoutWidget_2)
|
||||
self.listWidget_done = QtWidgets.QListWidget(
|
||||
parent=self.horizontalLayoutWidget_2
|
||||
)
|
||||
self.listWidget_done.setObjectName("listWidget_done")
|
||||
self.horizontalLayout_2.addWidget(self.listWidget_done)
|
||||
self.progressBar = QtWidgets.QProgressBar(parent=Form)
|
||||
@@ -64,7 +70,10 @@ class Ui_Form(object):
|
||||
self.progressBar.setObjectName("progressBar")
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Form)
|
||||
self.buttonBox.setGeometry(QtCore.QRect(230, 290, 156, 23))
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Ok
|
||||
)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.toolButton = QtWidgets.QToolButton(parent=Form)
|
||||
self.toolButton.setGeometry(QtCore.QRect(20, 290, 25, 19))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\reminder.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
@@ -17,7 +16,10 @@ class Ui_Erinnerung(object):
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Erinnerung)
|
||||
self.buttonBox.setGeometry(QtCore.QRect(190, 270, 161, 32))
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Ok
|
||||
)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.message_box = QtWidgets.QTextEdit(parent=Erinnerung)
|
||||
self.message_box.setGeometry(QtCore.QRect(10, 60, 341, 201))
|
||||
@@ -33,8 +35,8 @@ class Ui_Erinnerung(object):
|
||||
self.dateEdit.setObjectName("dateEdit")
|
||||
|
||||
self.retranslateUi(Erinnerung)
|
||||
self.buttonBox.accepted.connect(Erinnerung.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Erinnerung.reject) # type: ignore
|
||||
self.buttonBox.accepted.connect(Erinnerung.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Erinnerung.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(Erinnerung)
|
||||
|
||||
def retranslateUi(self, Erinnerung):
|
||||
|
||||
@@ -14,7 +14,10 @@ class Ui_Dialog(object):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.setWindowModality(QtCore.Qt.WindowModality.NonModal)
|
||||
Dialog.resize(651, 679)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
|
||||
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
|
||||
@@ -22,7 +25,10 @@ class Ui_Dialog(object):
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.toolBox = QtWidgets.QToolBox(parent=Dialog)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
|
||||
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.toolBox.sizePolicy().hasHeightForWidth())
|
||||
@@ -31,7 +37,10 @@ class Ui_Dialog(object):
|
||||
self.toolBox.setObjectName("toolBox")
|
||||
self.page_1 = QtWidgets.QWidget()
|
||||
self.page_1.setGeometry(QtCore.QRect(0, 0, 633, 511))
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
|
||||
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.page_1.sizePolicy().hasHeightForWidth())
|
||||
@@ -64,10 +73,16 @@ class Ui_Dialog(object):
|
||||
self.save_path = QtWidgets.QLineEdit(parent=self.page_1)
|
||||
self.save_path.setObjectName("save_path")
|
||||
self.gridLayout_3.addWidget(self.save_path, 2, 1, 1, 1)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
spacerItem = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.gridLayout_3.addItem(spacerItem, 3, 1, 1, 1)
|
||||
self.toolBox.addItem(self.page_1, "")
|
||||
self.page_2 = QtWidgets.QWidget()
|
||||
self.page_2.setGeometry(QtCore.QRect(0, 0, 633, 511))
|
||||
self.page_2.setObjectName("page_2")
|
||||
self.gridLayout = QtWidgets.QGridLayout(self.page_2)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
@@ -84,7 +99,10 @@ class Ui_Dialog(object):
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.gridLayout.addWidget(self.label_3, 1, 0, 1, 1)
|
||||
self.zotero_api_key = QtWidgets.QLineEdit(parent=self.page_2)
|
||||
self.zotero_api_key.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhHiddenText|QtCore.Qt.InputMethodHint.ImhSensitiveData)
|
||||
self.zotero_api_key.setInputMethodHints(
|
||||
QtCore.Qt.InputMethodHint.ImhHiddenText
|
||||
| QtCore.Qt.InputMethodHint.ImhSensitiveData
|
||||
)
|
||||
self.zotero_api_key.setObjectName("zotero_api_key")
|
||||
self.gridLayout.addWidget(self.zotero_api_key, 0, 2, 1, 1)
|
||||
self.label_2 = QtWidgets.QLabel(parent=self.page_2)
|
||||
@@ -94,7 +112,12 @@ class Ui_Dialog(object):
|
||||
self.toggle_api_visibility.setText("")
|
||||
self.toggle_api_visibility.setObjectName("toggle_api_visibility")
|
||||
self.gridLayout.addWidget(self.toggle_api_visibility, 0, 3, 1, 1)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
self.gridLayout.addItem(spacerItem1, 3, 2, 1, 1)
|
||||
self.toolBox.addItem(self.page_2, "")
|
||||
self.page_3 = QtWidgets.QWidget()
|
||||
@@ -117,7 +140,9 @@ class Ui_Dialog(object):
|
||||
self.label_8 = QtWidgets.QLabel(parent=self.email_settingsPage1_2)
|
||||
self.label_8.setObjectName("label_8")
|
||||
self.gridLayout_2.addWidget(self.label_8, 3, 0, 1, 1)
|
||||
self.use_username_smtp_login = QtWidgets.QCheckBox(parent=self.email_settingsPage1_2)
|
||||
self.use_username_smtp_login = QtWidgets.QCheckBox(
|
||||
parent=self.email_settingsPage1_2
|
||||
)
|
||||
self.use_username_smtp_login.setTristate(False)
|
||||
self.use_username_smtp_login.setObjectName("use_username_smtp_login")
|
||||
self.gridLayout_2.addWidget(self.use_username_smtp_login, 4, 1, 1, 1)
|
||||
@@ -126,7 +151,10 @@ class Ui_Dialog(object):
|
||||
self.mail_username.setObjectName("mail_username")
|
||||
self.gridLayout_2.addWidget(self.mail_username, 3, 1, 1, 1)
|
||||
self.smtp_port = QtWidgets.QLineEdit(parent=self.email_settingsPage1_2)
|
||||
self.smtp_port.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhDigitsOnly|QtCore.Qt.InputMethodHint.ImhPreferNumbers)
|
||||
self.smtp_port.setInputMethodHints(
|
||||
QtCore.Qt.InputMethodHint.ImhDigitsOnly
|
||||
| QtCore.Qt.InputMethodHint.ImhPreferNumbers
|
||||
)
|
||||
self.smtp_port.setClearButtonEnabled(True)
|
||||
self.smtp_port.setObjectName("smtp_port")
|
||||
self.gridLayout_2.addWidget(self.smtp_port, 1, 1, 1, 1)
|
||||
@@ -141,7 +169,9 @@ class Ui_Dialog(object):
|
||||
self.label_9.setObjectName("label_9")
|
||||
self.gridLayout_2.addWidget(self.label_9, 6, 0, 1, 1)
|
||||
self.sender_email = QtWidgets.QLineEdit(parent=self.email_settingsPage1_2)
|
||||
self.sender_email.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhEmailCharactersOnly)
|
||||
self.sender_email.setInputMethodHints(
|
||||
QtCore.Qt.InputMethodHint.ImhEmailCharactersOnly
|
||||
)
|
||||
self.sender_email.setClearButtonEnabled(True)
|
||||
self.sender_email.setObjectName("sender_email")
|
||||
self.gridLayout_2.addWidget(self.sender_email, 2, 1, 1, 1)
|
||||
@@ -149,7 +179,10 @@ class Ui_Dialog(object):
|
||||
self.label.setObjectName("label")
|
||||
self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1)
|
||||
self.password = QtWidgets.QLineEdit(parent=self.email_settingsPage1_2)
|
||||
self.password.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhHiddenText|QtCore.Qt.InputMethodHint.ImhSensitiveData)
|
||||
self.password.setInputMethodHints(
|
||||
QtCore.Qt.InputMethodHint.ImhHiddenText
|
||||
| QtCore.Qt.InputMethodHint.ImhSensitiveData
|
||||
)
|
||||
self.password.setClearButtonEnabled(True)
|
||||
self.password.setObjectName("password")
|
||||
self.gridLayout_2.addWidget(self.password, 5, 1, 1, 1)
|
||||
@@ -171,7 +204,12 @@ class Ui_Dialog(object):
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout_3.addItem(spacerItem2)
|
||||
self.bold = QtWidgets.QPushButton(parent=self.email_settingsPage2_2)
|
||||
self.bold.setCheckable(True)
|
||||
@@ -185,7 +223,12 @@ class Ui_Dialog(object):
|
||||
self.underscore.setCheckable(True)
|
||||
self.underscore.setObjectName("underscore")
|
||||
self.horizontalLayout_3.addWidget(self.underscore)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout_3.addItem(spacerItem3)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
@@ -211,7 +254,12 @@ class Ui_Dialog(object):
|
||||
self.font_size.addItem("")
|
||||
self.font_size.addItem("")
|
||||
self.horizontalLayout.addWidget(self.font_size)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout.addItem(spacerItem4)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||
self.verticalLayout_3.addLayout(self.verticalLayout_2)
|
||||
@@ -225,6 +273,7 @@ class Ui_Dialog(object):
|
||||
self.horizontalLayout_2.addWidget(self.email_settings)
|
||||
self.toolBox.addItem(self.page_3, "")
|
||||
self.page_4 = QtWidgets.QWidget()
|
||||
self.page_4.setGeometry(QtCore.QRect(0, 0, 633, 511))
|
||||
self.page_4.setObjectName("page_4")
|
||||
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.page_4)
|
||||
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
||||
@@ -258,16 +307,19 @@ class Ui_Dialog(object):
|
||||
self.scrollAreaWidgetContents_2.setObjectName("scrollAreaWidgetContents_2")
|
||||
self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents_2)
|
||||
self.verticalLayout_6.setObjectName("verticalLayout_6")
|
||||
self.formLayout = QtWidgets.QFormLayout()
|
||||
self.formLayout.setObjectName("formLayout")
|
||||
self.verticalLayout_6.addLayout(self.formLayout)
|
||||
self.vertical_icons = QtWidgets.QVBoxLayout()
|
||||
self.vertical_icons.setObjectName("vertical_icons")
|
||||
self.verticalLayout_6.addLayout(self.vertical_icons)
|
||||
self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_2)
|
||||
self.verticalLayout_4.addWidget(self.scrollArea_2)
|
||||
self.toolBox.addItem(self.page_4, "")
|
||||
self.verticalLayout.addWidget(self.toolBox)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Ok
|
||||
)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.verticalLayout.addWidget(self.buttonBox)
|
||||
self.label_5.setBuddy(self.db_name)
|
||||
@@ -277,36 +329,61 @@ class Ui_Dialog(object):
|
||||
self.retranslateUi(Dialog)
|
||||
self.toolBox.setCurrentIndex(3)
|
||||
self.email_settings.setCurrentIndex(0)
|
||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
||||
self.db_name.setText(_translate("Dialog", "sap.db"))
|
||||
self.label_5.setToolTip(_translate("Dialog", "<html><head/><body><p>Name der Datenbank, welche verwendet werden soll. <span style=\" font-weight:600;\">Muss</span> auf .db enden</p></body></html>"))
|
||||
self.label_5.setToolTip(
|
||||
_translate(
|
||||
"Dialog",
|
||||
'<html><head/><body><p>Name der Datenbank, welche verwendet werden soll. <span style=" font-weight:600;">Muss</span> auf .db enden</p></body></html>',
|
||||
)
|
||||
)
|
||||
self.label_5.setText(_translate("Dialog", "Datenbankname"))
|
||||
self.label_12.setToolTip(_translate("Dialog", "Pfad, an dem heruntergeladene Dateien gespeichert werden sollen"))
|
||||
self.label_12.setToolTip(
|
||||
_translate(
|
||||
"Dialog",
|
||||
"Pfad, an dem heruntergeladene Dateien gespeichert werden sollen",
|
||||
)
|
||||
)
|
||||
self.label_12.setText(_translate("Dialog", "Temporäre Dateien"))
|
||||
self.label_11.setText(_translate("Dialog", "Datenbankpfad"))
|
||||
self.tb_set_save_path.setText(_translate("Dialog", "..."))
|
||||
self.tb_select_db.setText(_translate("Dialog", "..."))
|
||||
self.toolBox.setItemText(self.toolBox.indexOf(self.page_1), _translate("Dialog", "Datenbank"))
|
||||
self.toolBox.setItemText(
|
||||
self.toolBox.indexOf(self.page_1), _translate("Dialog", "Datenbank")
|
||||
)
|
||||
self.label_4.setText(_translate("Dialog", "Bibliothekstyp"))
|
||||
self.label_3.setText(_translate("Dialog", "Bibliotheks-ID"))
|
||||
self.label_2.setText(_translate("Dialog", "API Key"))
|
||||
self.toolBox.setItemText(self.toolBox.indexOf(self.page_2), _translate("Dialog", "Zotero"))
|
||||
self.toolBox.setItemText(
|
||||
self.toolBox.indexOf(self.page_2), _translate("Dialog", "Zotero")
|
||||
)
|
||||
self.label_8.setText(_translate("Dialog", "Nutzername"))
|
||||
self.use_username_smtp_login.setStatusTip(_translate("Dialog", "Anklicken, wenn Nutzername benötigt wird, um sich beim Server anzumelden"))
|
||||
self.use_username_smtp_login.setText(_translate("Dialog", "Nutzername zum\n"
|
||||
" Anmelden verwenden"))
|
||||
self.mail_username.setStatusTip(_translate("Dialog", "Kürzel, von der Hochschule vergeben, bsp: Aky547"))
|
||||
self.use_username_smtp_login.setStatusTip(
|
||||
_translate(
|
||||
"Dialog",
|
||||
"Anklicken, wenn Nutzername benötigt wird, um sich beim Server anzumelden",
|
||||
)
|
||||
)
|
||||
self.use_username_smtp_login.setText(
|
||||
_translate("Dialog", "Nutzername zum\n Anmelden verwenden")
|
||||
)
|
||||
self.mail_username.setStatusTip(
|
||||
_translate("Dialog", "Kürzel, von der Hochschule vergeben, bsp: Aky547")
|
||||
)
|
||||
self.label_10.setText(_translate("Dialog", "Passwort"))
|
||||
self.label_7.setText(_translate("Dialog", "Sender-eMail"))
|
||||
self.label.setText(_translate("Dialog", "SMTP-Server"))
|
||||
self.label_6.setText(_translate("Dialog", "Port"))
|
||||
self.email_settings.setTabText(self.email_settings.indexOf(self.email_settingsPage1_2), _translate("Dialog", "Allgemeines"))
|
||||
self.email_settings.setTabText(
|
||||
self.email_settings.indexOf(self.email_settingsPage1_2),
|
||||
_translate("Dialog", "Allgemeines"),
|
||||
)
|
||||
self.bold.setText(_translate("Dialog", "Fett"))
|
||||
self.italic.setText(_translate("Dialog", "Kursiv"))
|
||||
self.underscore.setText(_translate("Dialog", "Unterstrichen"))
|
||||
@@ -326,7 +403,14 @@ class Ui_Dialog(object):
|
||||
self.font_size.setItemText(13, _translate("Dialog", "48"))
|
||||
self.font_size.setItemText(14, _translate("Dialog", "72"))
|
||||
self.debug.setText(_translate("Dialog", "Debug"))
|
||||
self.email_settings.setTabText(self.email_settings.indexOf(self.email_settingsPage2_2), _translate("Dialog", "Signatur"))
|
||||
self.toolBox.setItemText(self.toolBox.indexOf(self.page_3), _translate("Dialog", "e-Mail"))
|
||||
self.email_settings.setTabText(
|
||||
self.email_settings.indexOf(self.email_settingsPage2_2),
|
||||
_translate("Dialog", "Signatur"),
|
||||
)
|
||||
self.toolBox.setItemText(
|
||||
self.toolBox.indexOf(self.page_3), _translate("Dialog", "e-Mail")
|
||||
)
|
||||
self.groupBox.setTitle(_translate("Dialog", "Farben"))
|
||||
self.toolBox.setItemText(self.toolBox.indexOf(self.page_4), _translate("Dialog", "Icons"))
|
||||
self.toolBox.setItemText(
|
||||
self.toolBox.indexOf(self.page_4), _translate("Dialog", "Icons")
|
||||
)
|
||||
|
||||
@@ -139,6 +139,14 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>633</width>
|
||||
<height>511</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
<string>Zotero</string>
|
||||
</attribute>
|
||||
@@ -526,6 +534,14 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>633</width>
|
||||
<height>511</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
<string>Icons</string>
|
||||
</attribute>
|
||||
@@ -583,7 +599,7 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout"/>
|
||||
<layout class="QVBoxLayout" name="vertical_icons"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
@@ -257,7 +257,7 @@ class Ui_Dialog(object):
|
||||
)
|
||||
)
|
||||
self.use_username_smtp_login.setText(
|
||||
_translate("Dialog", "Nutzername zum\n" " Anmelden verwenden")
|
||||
_translate("Dialog", "Nutzername zum\n Anmelden verwenden")
|
||||
)
|
||||
self.mail_username.setStatusTip(
|
||||
_translate("Dialog", "Kürzel, von der Hochschule vergeben, bsp: Aky547")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
from .dialog_sources.Ui_elsa_add_table_entry import Ui_Dialog
|
||||
from src.logic.webrequest import WebRequest, BibTextTransformer
|
||||
from src import Icon
|
||||
@@ -9,6 +8,7 @@ from src.logic.zotero import ZoteroController
|
||||
zot = ZoteroController()
|
||||
dtt = DictToTable()
|
||||
|
||||
|
||||
class ElsaAddEntry(QtWidgets.QDialog, Ui_Dialog):
|
||||
def __init__(self, parent=None, data=None):
|
||||
super(ElsaAddEntry, self).__init__(parent)
|
||||
@@ -58,16 +58,17 @@ class ElsaAddEntry(QtWidgets.QDialog, Ui_Dialog):
|
||||
|
||||
def check_pages(self):
|
||||
if self.source_pages:
|
||||
if self.book_pages.text() !=self.source_pages:
|
||||
if self.book_pages.text() != self.source_pages:
|
||||
self.make_quote.setEnabled(True)
|
||||
elif self.hg_pages.text() != self.source_pages:
|
||||
self.make_quote.setEnabled(True)
|
||||
elif self.zs_pages.text() != self.source_pages:
|
||||
self.make_quote.setEnabled(True)
|
||||
|
||||
|
||||
def copy_to_clipboard(self, field):
|
||||
clipboard = QtWidgets.QApplication.clipboard()
|
||||
clipboard.setText(field.toPlainText())
|
||||
|
||||
def discard(self):
|
||||
for line in self.findChildren(QtWidgets.QLineEdit):
|
||||
line.clear()
|
||||
@@ -216,6 +217,8 @@ class ElsaAddEntry(QtWidgets.QDialog, Ui_Dialog):
|
||||
if pages:
|
||||
self.source_pages = pages
|
||||
eval(f"self.{self.mode}_pages").setText(pages)
|
||||
|
||||
|
||||
def launch():
|
||||
app = QtWidgets.QApplication([])
|
||||
dialog = ElsaAddEntry()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
from .dialog_sources.Ui_elsa_generate_citation import Ui_Dialog
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
from .dialog_sources.Ui_elsa_generator_confirm import Ui_Dialog
|
||||
from PyQt6 import QtCore, QtWidgets, QtGui
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ empty_signature = """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://ww
|
||||
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html>
|
||||
"""
|
||||
|
||||
|
||||
class Mail_Dialog(QtWidgets.QDialog, MailPreviewDialog):
|
||||
def __init__(
|
||||
self,
|
||||
@@ -115,7 +116,7 @@ Tel.: 0761/682-778 | 07617682-545"""
|
||||
return f"Sehr geehrte Frau {prof},"
|
||||
elif self.gender_non.isChecked():
|
||||
self.btn_okay.setEnabled(True)
|
||||
name = f"{self.profname.split(" ")[1]} {self.profname.split(" ")[0]}"
|
||||
name = f"{self.profname.split(' ')[1]} {self.profname.split(' ')[0]}"
|
||||
return f"Guten Tag {name},"
|
||||
|
||||
def set_mail(self):
|
||||
@@ -174,7 +175,7 @@ Tel.: 0761/682-778 | 07617682-545"""
|
||||
with smtplib.SMTP_SSL(smtp_server, port) as server:
|
||||
server.connect(smtp_server, port)
|
||||
# server.connect(smtp_server, port)
|
||||
# server.auth(mechanism="PLAIN")
|
||||
# server.auth(mechanism="PLAIN")
|
||||
if config.mail.use_user_name is True:
|
||||
# print(config["mail"]["user_name"])
|
||||
|
||||
@@ -183,8 +184,8 @@ Tel.: 0761/682-778 | 07617682-545"""
|
||||
server.login(sender_email, password)
|
||||
server.sendmail(sender_email, tolist, mail)
|
||||
|
||||
# print("Mail sent")
|
||||
# end active process
|
||||
# print("Mail sent")
|
||||
# end active process
|
||||
server.quit()
|
||||
logger.info("Mail sent, closing connection to server and dialog")
|
||||
# close the dialog
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import os
|
||||
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'ui\dialogs\mail_preview.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.3.1
|
||||
|
||||
@@ -2,6 +2,8 @@ from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from .dialog_sources.Ui_medianadder import Ui_Dialog
|
||||
from src import Icon
|
||||
|
||||
|
||||
class MedienAdder(QtWidgets.QDialog, Ui_Dialog):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
@@ -17,7 +19,7 @@ class MedienAdder(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.lineEdit.returnPressed.connect(self.add_signature)
|
||||
self.btn_cancel.clicked.connect(self.close)
|
||||
self.btn_save.clicked.connect(self.send_data)
|
||||
#disable button box button okay
|
||||
# disable button box button okay
|
||||
self.btn_save.setEnabled(False)
|
||||
self.check_use_exact_signature.clicked.connect(self.check_use_exact)
|
||||
self.check_use_any_book.clicked.connect(self.check_use_any)
|
||||
@@ -33,12 +35,14 @@ class MedienAdder(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.btn_save.setEnabled(True)
|
||||
else:
|
||||
self.btn_save.setEnabled(False)
|
||||
|
||||
def add_signature(self):
|
||||
signature = self.lineEdit.text()
|
||||
self.listWidget.addItem(signature.strip())
|
||||
self.lineEdit.clear()
|
||||
self.list_amount.setText(str(self.listWidget.count()))
|
||||
self.enable_button()
|
||||
|
||||
def get_list_data(self) -> list:
|
||||
signatures = self.listWidget.findItems("*", QtCore.Qt.MatchFlag.MatchWildcard)
|
||||
return [signature.text() for signature in signatures]
|
||||
@@ -74,4 +78,4 @@ def launch_gui():
|
||||
dialog = MedienAdder()
|
||||
dialog.show()
|
||||
app.exec()
|
||||
# print(dialog.mode, dialog.data, dialog.result())
|
||||
# print(dialog.mode, dialog.data, dialog.result())
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file '/home/alexander/GitHub/Semesterapparate/ui/dialogs/new_subject.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.5.3
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from src.logic import AutoAdder
|
||||
from src.backend import AutoAdder
|
||||
|
||||
|
||||
from .dialog_sources.Ui_parsed_titles import Ui_Form
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file '/home/alexander/GitHub/Semesterapparate/ui/dialogs/parsed_titles.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.5.3
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'ui\dialogs\confirm_extend.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.3.1
|
||||
@@ -21,6 +20,7 @@ class ConfirmDialog(QtWidgets.QDialog, Ui_extend_confirm):
|
||||
self.setWindowIcon(Icon("info").icon)
|
||||
self.setWindowTitle(title)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from .dialog_sources.Ui_reminder import Ui_Erinnerung as Ui_Dialog
|
||||
from src import Icon
|
||||
import datetime as date
|
||||
|
||||
|
||||
class ReminderDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
@@ -11,6 +12,7 @@ class ReminderDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.setWindowIcon(Icon("notification").icon)
|
||||
self.setWindowTitle("Erinnerung")
|
||||
self.dateEdit.setDate(date.datetime.now())
|
||||
|
||||
def return_message(self) -> dict:
|
||||
return {
|
||||
"message": self.message_box.toPlainText(),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
from src import Icon, settings
|
||||
from src import Icon, settings, logger
|
||||
from .dialog_sources.Ui_settings import Ui_Dialog as _settings
|
||||
from src.ui.widgets.iconLine import IconWidget
|
||||
|
||||
base = """'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
|
||||
@@ -67,10 +67,12 @@ class Settings(QtWidgets.QDialog, _settings):
|
||||
self.toolBox.setItemIcon(2, Icon("mail").icon)
|
||||
self.toolBox.setItemIcon(3, Icon("icons").icon)
|
||||
|
||||
logger.info("Settings dialog opened, data loaded")
|
||||
|
||||
def load_config(self):
|
||||
self.db_name.setText(settings.database.name)
|
||||
self.db_path.setText(settings.database.path)
|
||||
self.save_path.setText(settings.save_path)
|
||||
self.save_path.setText(settings.database.temp)
|
||||
self.smtp_address.setText(settings.mail.smtp_server)
|
||||
self.smtp_port.setText(str(settings.mail.port))
|
||||
self.sender_email.setText(settings.mail.sender)
|
||||
@@ -81,7 +83,7 @@ class Settings(QtWidgets.QDialog, _settings):
|
||||
)
|
||||
self.editSignature.setHtml(settings.mail.signature)
|
||||
self.zotero_api_key.setText(settings.zotero.api_key)
|
||||
self.zotero_library_id.setText(settings.zotero.library_id)
|
||||
self.zotero_library_id.setText(str(settings.zotero.library_id))
|
||||
self.zotero_library_type.setText(settings.zotero.library_type)
|
||||
for row, color in enumerate(settings.icons.colors):
|
||||
# add a label with the color name, a lineedit with the color value and a button to change the color
|
||||
@@ -94,17 +96,13 @@ class Settings(QtWidgets.QDialog, _settings):
|
||||
self.gridLayout_4.addWidget(button, row, 2)
|
||||
for i in range(self.gridLayout_4.count()):
|
||||
self.gridLayout_4.itemAt(i).widget().setFont(QtGui.QFont("Segoe UI", 9))
|
||||
# set scrollarea layout to be a form layout
|
||||
# label = QtWidgets.QLabel("Icon Name")
|
||||
# filename = QtWidgets.QLabel("Dateiname")
|
||||
# self.formLayout.addRow(label, filename)
|
||||
|
||||
for row, icon in enumerate(settings.icons.icons):
|
||||
label = QtWidgets.QLabel(icon)
|
||||
lineedit = QtWidgets.QLineEdit(settings.icons.icons[icon])
|
||||
self.formLayout.addRow(label, lineedit)
|
||||
icon_widget = IconWidget(icon, settings.icons.icons[icon])
|
||||
self.vertical_icons.addWidget(icon_widget)
|
||||
|
||||
def change_color(self, lineedit):
|
||||
logger.debug("Changing color for {}", lineedit.text())
|
||||
colorDialog = QtWidgets.QColorDialog()
|
||||
colorDialog.setSizePolicy()
|
||||
color = colorDialog.getColor()
|
||||
@@ -178,7 +176,7 @@ class Settings(QtWidgets.QDialog, _settings):
|
||||
self.save_path.setText(file_dialog.selectedFiles()[0])
|
||||
|
||||
def debug_mode(self):
|
||||
print(self.editSignature.toHtml())
|
||||
logger.debug(self.editSignature.toHtml())
|
||||
|
||||
def return_data(self):
|
||||
port = self.smtp_port.text()
|
||||
@@ -209,10 +207,10 @@ class Settings(QtWidgets.QDialog, _settings):
|
||||
|
||||
for color in self.get_colors():
|
||||
settings.icons.colors[color] = self.get_colors()[color]
|
||||
print(color)
|
||||
# print(color)
|
||||
for icon in self.get_icons():
|
||||
settings.icons.icons[icon] = self.get_icons()[icon]
|
||||
settings.icons.save()
|
||||
|
||||
return settings
|
||||
|
||||
def get_colors(self) -> dict:
|
||||
@@ -225,15 +223,16 @@ class Settings(QtWidgets.QDialog, _settings):
|
||||
|
||||
def get_icons(self):
|
||||
icons = {}
|
||||
for row in range(self.formLayout.count()):
|
||||
widget = self.formLayout.itemAt(row).widget()
|
||||
if isinstance(widget, QtWidgets.QLineEdit):
|
||||
icons[self.formLayout.itemAt(row - 1).widget().text()] = widget.text()
|
||||
for row in range(self.vertical_icons.count()):
|
||||
widget = self.vertical_icons.itemAt(row).widget()
|
||||
if isinstance(widget, IconWidget):
|
||||
data = widget.return_data()
|
||||
icons[data[0]] = data[1]
|
||||
return icons
|
||||
|
||||
def save(self):
|
||||
config = self.return_data()
|
||||
# print(config)
|
||||
# #print(config)
|
||||
|
||||
config.save()
|
||||
self.accept()
|
||||
|
||||
@@ -12,43 +12,41 @@ from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6.QtCore import QThread
|
||||
from PyQt6.QtGui import QRegularExpressionValidator
|
||||
|
||||
from src import Icon, settings, logger
|
||||
from src.backend import (
|
||||
Database,
|
||||
Semester,
|
||||
recreateFile,
|
||||
tempdelete,
|
||||
)
|
||||
from src import Icon, logger
|
||||
from src.backend import Database, BookGrabber, AvailChecker
|
||||
from src.backend.semester import Semester
|
||||
from src.backend.create_file import recreateFile
|
||||
from src.backend.delete_temp_contents import delete_temp_contents as tempdelete
|
||||
from src.ui import Ui_Semesterapparat
|
||||
from src.logic import (
|
||||
APP_NRS,
|
||||
# PROF_TITLES,
|
||||
ApparatData,
|
||||
AvailChecker,
|
||||
BookData,
|
||||
BookGrabber,
|
||||
csv_to_list,
|
||||
word_docx_to_csv,
|
||||
Prof,
|
||||
Apparat,
|
||||
)
|
||||
from src.ui import (
|
||||
from src.ui.dialogs import (
|
||||
popus_confirm,
|
||||
medienadder_ui,
|
||||
About,
|
||||
ApparatExtendDialog,
|
||||
CalendarEntry,
|
||||
FilePicker,
|
||||
Mail_Dialog,
|
||||
MessageCalendar,
|
||||
Settings,
|
||||
Ui_Semesterapparat,
|
||||
edit_bookdata_ui,
|
||||
login_ui,
|
||||
medienadder_ui,
|
||||
parsed_titles_ui,
|
||||
popus_confirm,
|
||||
reminder_ui,
|
||||
SearchStatisticPage,
|
||||
)
|
||||
from src.ui.widgets import (
|
||||
ElsaDialog,
|
||||
MessageCalendar,
|
||||
FilePicker,
|
||||
CalendarEntry,
|
||||
UserCreate,
|
||||
SearchStatisticPage,
|
||||
EditUser,
|
||||
EditProf,
|
||||
)
|
||||
@@ -122,7 +120,7 @@ class Ui(Ui_Semesterapparat):
|
||||
self.prof_tel_nr.setValidator(
|
||||
QtGui.QRegularExpressionValidator(QtCore.QRegularExpression(r"^\d{3,14}"))
|
||||
)
|
||||
# print(self.prof_tel_nr.maxLength())
|
||||
# #print(self.prof_tel_nr.maxLength())
|
||||
self.app_fach.setValidator( # validator to allow typing in the app_fach field
|
||||
QtGui.QRegularExpressionValidator(
|
||||
QtCore.QRegularExpression(r"[a-zA-Z0-9\s\W]+")
|
||||
@@ -140,7 +138,7 @@ class Ui(Ui_Semesterapparat):
|
||||
)
|
||||
self.tableWidget_apparate.doubleClicked.connect(self.load_app_data)
|
||||
|
||||
# print(f"user:{self.active_user}")
|
||||
# #print(f"user:{self.active_user}")
|
||||
userrole = self.db.getRole(self.active_user)
|
||||
# hide admin interface when non-admin is logged in
|
||||
if userrole == "admin":
|
||||
@@ -236,14 +234,14 @@ class Ui(Ui_Semesterapparat):
|
||||
"Dokument erstellen?",
|
||||
)
|
||||
if result == QtWidgets.QDialog.DialogCode.Accepted:
|
||||
print("Creating document")
|
||||
# print("Creating document")
|
||||
apparats = self.apparats
|
||||
apps = []
|
||||
for apparat in apparats:
|
||||
prof = self.db.getProf(apparat[2])
|
||||
data = (apparat[4], f"{prof.lastname} ({apparat[1]})")
|
||||
apps.append(data)
|
||||
print(apps)
|
||||
# print(apps)
|
||||
doc = SemesterDocument(
|
||||
semester=Semester(),
|
||||
filename="Semesterapparate",
|
||||
@@ -345,7 +343,7 @@ class Ui(Ui_Semesterapparat):
|
||||
|
||||
stats_layout.addWidget(statistics)
|
||||
|
||||
# print("searchpage")
|
||||
# #print("searchpage")
|
||||
if self.tabWidget.currentIndex() == 0: # Apparate
|
||||
# clear all entries from the table
|
||||
self.tableWidget_apparate.setRowCount(0)
|
||||
@@ -363,7 +361,7 @@ class Ui(Ui_Semesterapparat):
|
||||
widget.deleteLater()
|
||||
|
||||
elsa_layout.addWidget(ElsaDialog())
|
||||
print("added")
|
||||
# print("added")
|
||||
pass
|
||||
|
||||
def generateSemester(self, today=False):
|
||||
@@ -406,9 +404,9 @@ class Ui(Ui_Semesterapparat):
|
||||
self.prof_mail.setText(appdata.prof.mail)
|
||||
self.prof_tel_nr.setText(appdata.prof.telnr)
|
||||
self.app_name.setText(appdata.apparat.name)
|
||||
# print("changing dropdown app_fach from '' to ", appdata.app_fach)
|
||||
# #print("changing dropdown app_fach from '' to ", appdata.app_fach)
|
||||
self.app_fach.setCurrentText(appdata.apparat.subject)
|
||||
# print("changed dropdown app_fach to ", self.app_fach.currentText())
|
||||
# #print("changed dropdown app_fach to ", self.app_fach.currentText())
|
||||
self.sem_year.setText(appdata.apparat.get_semester.split(" ")[1])
|
||||
match appdata.apparat.get_semester.split(" ")[0]:
|
||||
case "SoSe":
|
||||
@@ -473,7 +471,7 @@ class Ui(Ui_Semesterapparat):
|
||||
return popup.result()
|
||||
|
||||
def thread_check(self):
|
||||
# print("Thread started")
|
||||
# #print("Thread started")
|
||||
self.prof_mail.textChanged.connect(self.validate_prof_mail)
|
||||
self.drpdwn_prof_name.editTextChanged.connect(self.validate_prof_name)
|
||||
self.prof_tel_nr.textChanged.connect(self.validate_prof_tel)
|
||||
@@ -742,7 +740,7 @@ class Ui(Ui_Semesterapparat):
|
||||
|
||||
bookGrabber.start()
|
||||
while bookGrabber.isRunning():
|
||||
# print("waiting for thread to finish")
|
||||
# #print("waiting for thread to finish")
|
||||
QtWidgets.QApplication.processEvents()
|
||||
|
||||
# self.__clear_fields()
|
||||
@@ -789,7 +787,7 @@ class Ui(Ui_Semesterapparat):
|
||||
|
||||
# thread = QThread()
|
||||
appnumber = self.active_apparat
|
||||
# print(links)
|
||||
# #print(links)
|
||||
self.availChecker = AvailChecker(links, appnumber, books=books)
|
||||
# availcheck.moveToThread(thread)
|
||||
# availcheck.finished.connect(thread.quit)
|
||||
@@ -839,7 +837,7 @@ class Ui(Ui_Semesterapparat):
|
||||
app_id, prof_id, deleted
|
||||
)
|
||||
|
||||
# # print(books)
|
||||
# # #print(books)
|
||||
# take the dataclass from the tuple
|
||||
# booklist:list[BookData]=[book[0] for book in books]
|
||||
self.tableWidget_apparat_media.setRowCount(0)
|
||||
@@ -848,7 +846,7 @@ class Ui(Ui_Semesterapparat):
|
||||
book_data = book["bookdata"]
|
||||
availability = book["available"]
|
||||
# bd = BookData().from_string(book)
|
||||
# # print(bd, type(bd))
|
||||
# # #print(bd, type(bd))
|
||||
# create a new row below the last one
|
||||
self.tableWidget_apparat_media.insertRow(
|
||||
self.tableWidget_apparat_media.rowCount()
|
||||
@@ -940,11 +938,11 @@ class Ui(Ui_Semesterapparat):
|
||||
self.drpdwn_prof_name.addItem(prof)
|
||||
|
||||
def add_document(self):
|
||||
# print("Add document")
|
||||
# #print("Add document")
|
||||
picker = FilePicker()
|
||||
files = picker.pick_files()
|
||||
for file in files:
|
||||
# print(file)
|
||||
# #print(file)
|
||||
filename = file.split("/")[-1]
|
||||
filetype = filename.split(".")[-1]
|
||||
self.dokument_list.insertRow(0)
|
||||
@@ -1016,7 +1014,7 @@ class Ui(Ui_Semesterapparat):
|
||||
else:
|
||||
# if file is selected, check for books in the file
|
||||
if self.dokument_list.currentRow() != -1:
|
||||
# print("File selected")
|
||||
# #print("File selected")
|
||||
file = self.dokument_list.item(
|
||||
self.dokument_list.currentRow(), 3
|
||||
).text()
|
||||
@@ -1074,10 +1072,10 @@ class Ui(Ui_Semesterapparat):
|
||||
bookdata=book, app_id=app_id, prof_id=prof_id
|
||||
)
|
||||
self.update_app_media_list()
|
||||
# print(len(signatures))
|
||||
# #print(len(signatures))
|
||||
|
||||
def btn_check_file_threaded(self):
|
||||
# print("Checking file")
|
||||
# #print("Checking file")
|
||||
# get active app_id and prof_id
|
||||
self.tableWidget_apparate.setEnabled(False)
|
||||
self.tableWidget_apparate.setToolTip(
|
||||
@@ -1094,18 +1092,18 @@ class Ui(Ui_Semesterapparat):
|
||||
created = False
|
||||
if not self.db.checkApparatExistsById(app_id):
|
||||
# create apparat
|
||||
# print("Creating apparat")
|
||||
# #print("Creating apparat")
|
||||
if not self.btn_save_apparat(False):
|
||||
return
|
||||
created = True
|
||||
if self.dokument_list.rowCount() == 0:
|
||||
# print("No file selected")
|
||||
# #print("No file selected")
|
||||
self.tableWidget_apparate.setEnabled(True)
|
||||
self.tableWidget_apparate.setToolTip("")
|
||||
return
|
||||
else:
|
||||
# if file is selected, check for books in the file
|
||||
# print("File selected")
|
||||
# #print("File selected")
|
||||
file = self.dokument_list.item(self.dokument_list.currentRow(), 3).text()
|
||||
|
||||
file_type = self.dokument_list.item(
|
||||
@@ -1141,11 +1139,11 @@ class Ui(Ui_Semesterapparat):
|
||||
|
||||
signatures = [i for i in signatures if i != ""]
|
||||
# logger.debug(signatures)
|
||||
# print("starting thread")
|
||||
# #print("starting thread")
|
||||
if prof_id is None:
|
||||
prof_id = self.db.getProfId(self.profdata)
|
||||
|
||||
print("Prof ID is None", prof_id)
|
||||
# print("Prof ID is None", prof_id)
|
||||
autoGrabber = BookGrabber(self.active_apparat)
|
||||
autoGrabber.add_values(
|
||||
mode="ARRAY", app_id=app_id, prof_id=prof_id, data=signatures
|
||||
@@ -1248,7 +1246,7 @@ class Ui(Ui_Semesterapparat):
|
||||
pid=appd.prof.fullname,
|
||||
)
|
||||
if clear_fields:
|
||||
# print("clearing fields")
|
||||
# #print("clearing fields")
|
||||
self.__clear_fields()
|
||||
return True
|
||||
|
||||
@@ -1367,7 +1365,7 @@ class Ui(Ui_Semesterapparat):
|
||||
appnr = self.tableWidget_apparate.item(tableposition, 0).text()
|
||||
if reminder.result() == QtWidgets.QDialog.DialogCode.Accepted:
|
||||
data = reminder.return_message()
|
||||
# print(data)
|
||||
# #print(data)
|
||||
self.db.addMessage(
|
||||
data,
|
||||
self.active_user,
|
||||
@@ -1387,10 +1385,8 @@ class Ui(Ui_Semesterapparat):
|
||||
self.calendarWidget.updateCells()
|
||||
|
||||
def open_reminder(self):
|
||||
if not settings.mail.use_user_name:
|
||||
print("False")
|
||||
selected_date = self.calendarWidget.selectedDate().toString("yyyy-MM-dd")
|
||||
# # print(selected_date)
|
||||
# # #print(selected_date)
|
||||
messages = self.db.getMessages(selected_date)
|
||||
if messages == []:
|
||||
return
|
||||
@@ -1401,13 +1397,13 @@ class Ui(Ui_Semesterapparat):
|
||||
dialog.repaintSignal.connect(lambda: self.calendarWidget.reload(selected_date))
|
||||
|
||||
def open_settings(self):
|
||||
print(settings.dict())
|
||||
# print(settings.dict())
|
||||
settingsUI = Settings(self.active_user)
|
||||
settingsUI.exec()
|
||||
|
||||
if settingsUI.result() == QtWidgets.QDialog.DialogCode.Accepted:
|
||||
settingsUI.save()
|
||||
print(settings.dict())
|
||||
# print(settings.dict())
|
||||
|
||||
# self.reload()
|
||||
|
||||
@@ -1533,7 +1529,7 @@ class Ui(Ui_Semesterapparat):
|
||||
signature=signature,
|
||||
prof_id=self.db.getProfId(self.profdata),
|
||||
)
|
||||
print(medium.adis_idn, medium.signature)
|
||||
# print(medium.adis_idn, medium.signature)
|
||||
|
||||
def edit_medium(self):
|
||||
book = self.tableWidget_apparat_media.item(
|
||||
@@ -1560,10 +1556,10 @@ class Ui(Ui_Semesterapparat):
|
||||
widget.exec()
|
||||
if widget.result() == QtWidgets.QDialog.DialogCode.Accepted:
|
||||
data = bookedit.get_data()
|
||||
# print(data)
|
||||
# #print(data)
|
||||
self.db.updateBookdata(bookdata=data, book_id=book_id)
|
||||
# self.db.update_bookdata(data)
|
||||
# print("accepted")
|
||||
# #print("accepted")
|
||||
self.update_app_media_list()
|
||||
else:
|
||||
return
|
||||
@@ -1587,7 +1583,7 @@ class Ui(Ui_Semesterapparat):
|
||||
)
|
||||
message = f'Soll das Medium "{self.tableWidget_apparat_media.item(self.tableWidget_apparat_media.currentRow(), 0).text()}" wirklich gelöscht werden?'
|
||||
state = self.confirm_popup(message, title="Löschen?")
|
||||
# print(state)
|
||||
# #print(state)
|
||||
if state == 1:
|
||||
self.db.deleteBook(book_id)
|
||||
self.update_app_media_list()
|
||||
@@ -1599,7 +1595,7 @@ class Ui(Ui_Semesterapparat):
|
||||
for r in ranges:
|
||||
for row in range(r.topRow(), r.bottomRow() + 1):
|
||||
rows.append(row)
|
||||
# print(rows)
|
||||
# #print(rows)
|
||||
message = f"Sollen die {len(rows)} Medien wirklich gelöscht werden?"
|
||||
state = self.confirm_popup(message, title="Löschen?")
|
||||
if state == 1:
|
||||
@@ -1619,12 +1615,12 @@ class Ui(Ui_Semesterapparat):
|
||||
# return data from dialog if ok is pressed
|
||||
if framework.result() == QtWidgets.QDialog.DialogCode.Accepted:
|
||||
data = framework.get_data()
|
||||
# print(data)
|
||||
# #print(data)
|
||||
# return data
|
||||
selected_apparat_id = self.tableWidget_apparate.item(
|
||||
self.tableWidget_apparate.currentRow(), 0
|
||||
).text()
|
||||
# print(selected_apparat_id)
|
||||
# #print(selected_apparat_id)
|
||||
|
||||
self.db.setNewSemesterDate(
|
||||
selected_apparat_id, data["semester"], dauerapp=data["dauerapp"]
|
||||
@@ -1648,7 +1644,7 @@ class Ui(Ui_Semesterapparat):
|
||||
if not active_apparat_id:
|
||||
# get column 0 of the selected row
|
||||
pass
|
||||
# print(active_apparat_id)
|
||||
# #print(active_apparat_id)
|
||||
|
||||
# profname = self.drpdwn_prof_name.currentText().replace(",", "").split(" ")
|
||||
# if profname != [""]:
|
||||
@@ -1669,15 +1665,15 @@ class Ui(Ui_Semesterapparat):
|
||||
app_subject = self.db.getApparatData(active_apparat_id, app_name)
|
||||
app_subject = app_subject.apparat.subject
|
||||
# profname = f"{profname.split(" ")[1]} {profname.split(" ")[0]}"
|
||||
# print(pid)
|
||||
# #print(pid)
|
||||
if prof_id:
|
||||
pmail = self.db.getSpecificProfData(prof_id, ["mail"])
|
||||
prof_name = self.db.getSpecificProfData(prof_id, ["fullname"])
|
||||
else:
|
||||
pmail = self.prof_mail.text()
|
||||
# print(prof_name)
|
||||
# #print(prof_name)
|
||||
# create a new thread to show the mail interface and send the mail
|
||||
# print("showing mail dialog")
|
||||
# #print("showing mail dialog")
|
||||
self.mail_thread = Mail_Dialog(
|
||||
app_id=active_apparat_id,
|
||||
prof_name=prof_name,
|
||||
@@ -1706,7 +1702,7 @@ class Ui(Ui_Semesterapparat):
|
||||
).text()
|
||||
message = f"Soll der Apparat {selected_apparat_id} wirklich gelöscht werden?"
|
||||
state = self.confirm_popup(message, title="Löschen?")
|
||||
# print(state)
|
||||
# #print(state)
|
||||
pid = self.__get_table_data_field(self.tableWidget_apparate, position[0], 2)
|
||||
if state == 1:
|
||||
self.db.deleteApparat(selected_apparat_id)
|
||||
@@ -1716,7 +1712,7 @@ class Ui(Ui_Semesterapparat):
|
||||
self.apparats.remove(apparat)
|
||||
break
|
||||
self.old_apparats = self.apparats
|
||||
# print(self.apparats)
|
||||
# #print(self.apparats)
|
||||
# remove the row from the table
|
||||
self.tableWidget_apparate.removeRow(self.tableWidget_apparate.currentRow())
|
||||
# send mail to prof
|
||||
@@ -1724,8 +1720,8 @@ class Ui(Ui_Semesterapparat):
|
||||
|
||||
|
||||
def launch_gui():
|
||||
# print("trying to login")
|
||||
# print("checking if database available")
|
||||
# #print("trying to login")
|
||||
# #print("checking if database available")
|
||||
|
||||
logger.info("Starting login dialog")
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
@@ -1737,11 +1733,11 @@ def launch_gui():
|
||||
if ui.lresult == 1:
|
||||
# if login is successful, open main window
|
||||
# show login dialog
|
||||
# print(ui.lusername)
|
||||
# #print(ui.lusername)
|
||||
MainWindow = QtWidgets.QMainWindow()
|
||||
aui = Ui(MainWindow, username=ui.lusername)
|
||||
|
||||
# print(aui.active_user)
|
||||
# #print(aui.active_user)
|
||||
MainWindow.show()
|
||||
# atexit.register()
|
||||
atexit.register(tempdelete)
|
||||
@@ -1758,7 +1754,7 @@ def launch_gui():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# print("This is the main window")
|
||||
# #print("This is the main window")
|
||||
# app = QtWidgets.QApplication(sys.argv)
|
||||
# window = MainWindow()
|
||||
# app.exec()
|
||||
|
||||
@@ -22,7 +22,7 @@ class MessageCalendar(QtWidgets.QCalendarWidget):
|
||||
def getMessages(self):
|
||||
# Get the messages from the database
|
||||
messages = Database().getAllMessages()
|
||||
logger.debug(messages)
|
||||
logger.debug("Got {} messages", len(messages))
|
||||
self.setMessages(messages)
|
||||
|
||||
def deleteMessage(self, id):
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
__all__ = [
|
||||
"LoginWidget",
|
||||
"RegisterWidget",
|
||||
"StatusWidget",
|
||||
"FilePicker",
|
||||
"DataGraph",
|
||||
"CalendarEntry",
|
||||
"MessageCalendar",
|
||||
"SearchStatisticPage",
|
||||
"ElsaDialog",
|
||||
"UserCreate",
|
||||
"EditUser",
|
||||
"EditProf",
|
||||
"IconWidget",
|
||||
]
|
||||
|
||||
__all__ = ["filepicker"]
|
||||
from .collapse import StatusWidget
|
||||
from .filepicker import FilePicker
|
||||
from .graph import DataGraph
|
||||
@@ -9,4 +23,5 @@ from .searchPage import SearchStatisticPage
|
||||
from .elsa_main import ElsaDialog
|
||||
from .admin_create_user import UserCreate
|
||||
from .admin_edit_user import EditUser
|
||||
from .admin_edit_prof import EditProf
|
||||
from .admin_edit_prof import EditProf
|
||||
from .iconLine import IconWidget
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
|
||||
from PyQt6 import QtWidgets, QtCore, QtGui
|
||||
from PyQt6.QtCore import pyqtSignal
|
||||
from .widget_sources.Ui_admin_create_user import Ui_Dialog
|
||||
from src.backend import AdminCommands, Database
|
||||
from src.backend import AdminCommands, Database
|
||||
|
||||
|
||||
class UserCreate(QtWidgets.QDialog, Ui_Dialog):
|
||||
admin_action_changed = pyqtSignal()
|
||||
|
||||
def __init__(self):
|
||||
super(UserCreate, self).__init__()
|
||||
self.setupUi(self)
|
||||
@@ -18,7 +20,7 @@ class UserCreate(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.user_frame_userrole.setCurrentText("")
|
||||
|
||||
# Variables
|
||||
|
||||
|
||||
def add_user(self):
|
||||
username = self.user_create_frame_username.text()
|
||||
password = self.user_create_frame_password.text()
|
||||
@@ -38,9 +40,10 @@ class UserCreate(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.user_create_frame_username.clear()
|
||||
self.user_create_frame_password.clear()
|
||||
self.admin_action_changed.emit()
|
||||
|
||||
|
||||
|
||||
def launch():
|
||||
app = QtWidgets.QApplication([])
|
||||
window = UserCreate()
|
||||
window.show()
|
||||
app.exec()
|
||||
app.exec()
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
|
||||
from .widget_sources.Ui_admin_edit_prof import Ui_Dialog#
|
||||
from .widget_sources.Ui_admin_edit_prof import Ui_Dialog #
|
||||
from PyQt6 import QtWidgets, QtCore
|
||||
from PyQt6.QtCore import pyqtSignal
|
||||
from src import logger
|
||||
from src.logic import Prof
|
||||
from src.backend import Database
|
||||
|
||||
|
||||
class EditProf(QtWidgets.QDialog, Ui_Dialog):
|
||||
def __init__(self):
|
||||
super(EditProf, self).__init__()
|
||||
self.setupUi(self)
|
||||
#Variables
|
||||
# Variables
|
||||
self.db = Database()
|
||||
|
||||
|
||||
self.edit_faculty_member_select_member.currentTextChanged.connect(
|
||||
self.edit_faculty_member_set_data
|
||||
)
|
||||
self.update_faculty_member.clicked.connect(self.edit_faculty_member_action)
|
||||
self.gather_data()
|
||||
|
||||
|
||||
def gather_data(self):
|
||||
self.add_faculty_member_data()
|
||||
apparats = self.db.getApparatsByProf(
|
||||
@@ -42,7 +43,7 @@ class EditProf(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.edit_faculty_member_select_member.addItems(names)
|
||||
self.edit_faculty_member_select_member.addItem("")
|
||||
self.edit_faculty_member_select_member.setCurrentText("")
|
||||
|
||||
|
||||
def edit_faculty_member_set_data(self):
|
||||
# get the selected member
|
||||
name = self.edit_faculty_member_select_member.currentText()
|
||||
@@ -66,7 +67,7 @@ class EditProf(QtWidgets.QDialog, Ui_Dialog):
|
||||
if data.title is not None
|
||||
else self.edit_faculty_member_title.setText("")
|
||||
)
|
||||
|
||||
|
||||
def edit_faculty_member_action(self):
|
||||
def __gen_fullname(fname, lname, data):
|
||||
if fname == "" and lname == "":
|
||||
@@ -123,4 +124,4 @@ class EditProf(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.edit_faculty_member_new_surname.clear()
|
||||
self.user_faculty_member_new_name.clear()
|
||||
self.user_faculty_member_new_telnr.clear()
|
||||
self.user_faculty_member_new_mail.clear()
|
||||
self.user_faculty_member_new_mail.clear()
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
|
||||
from .widget_sources.Ui_admin_edit_user import Ui_Dialog
|
||||
from PyQt6 import QtWidgets, QtCore
|
||||
from PyQt6.QtCore import pyqtSignal
|
||||
from src.backend import Database
|
||||
from src.backend import AdminCommands
|
||||
|
||||
admin = AdminCommands()
|
||||
|
||||
|
||||
class EditUser(QtWidgets.QDialog, Ui_Dialog):
|
||||
def __init__(self):
|
||||
super(EditUser, self).__init__()
|
||||
@@ -12,7 +14,7 @@ class EditUser(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.btn_delete_user.clicked.connect(self.delete_user)
|
||||
self.update_user.clicked.connect(self.update_user_data)
|
||||
self.user_delete_frame_user_select.currentIndexChanged.connect(self.updateData)
|
||||
#Variables
|
||||
# Variables
|
||||
self.db = Database()
|
||||
self.users = self.db.getUsers()
|
||||
for user in self.users:
|
||||
@@ -56,7 +58,6 @@ class EditUser(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.user_edit_frame_new_password.clear()
|
||||
self.user_edit_frame_role_select.setCurrentText("")
|
||||
|
||||
|
||||
def delete_user(self):
|
||||
if self.user_delete_confirm.isChecked():
|
||||
username = self.user_delete_frame_user_select.currentText()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
from .widget_sources.Ui_calendar_entry import Ui_Dialog
|
||||
from PyQt6 import QtWidgets, QtCore
|
||||
from PyQt6.QtCore import pyqtSignal, QDate
|
||||
@@ -76,7 +75,6 @@ class CalendarEntry(QtWidgets.QDialog, Ui_Dialog):
|
||||
|
||||
|
||||
def launch_calendar_entry():
|
||||
|
||||
messages = Database().getMessages("2024-06-10")
|
||||
|
||||
app = QtWidgets.QApplication([])
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# import pysignal pyslot
|
||||
from PyQt6.QtCore import pyqtSignal as Signal
|
||||
from PyQt6.QtWidgets import (
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class CollapsibleWidget(object):
|
||||
pass
|
||||
|
||||
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class CollapsibleWidget(object):
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class CollapsibleWidget(object):
|
||||
|
||||
@@ -5,12 +5,11 @@ from PyQt6 import QtCore, QtWidgets, QtGui
|
||||
from PyQt6.QtGui import QRegularExpressionValidator
|
||||
from PyQt6.QtCore import QDate
|
||||
from src import Icon, logger
|
||||
from src.backend import recreateElsaFile, Semester, Database
|
||||
from src.backend import Semester, Database
|
||||
from src.logic import elsa_word_to_csv, Prof
|
||||
from src.ui import popus_confirm
|
||||
from src.ui.dialogs import ElsaAddEntry
|
||||
from src.ui.widgets import FilePicker
|
||||
from src.ui.widgets import DataGraph
|
||||
from src.ui.dialogs import ElsaAddEntry, popus_confirm
|
||||
from src.ui.widgets import FilePicker, DataGraph
|
||||
|
||||
|
||||
class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
def __init__(self):
|
||||
@@ -137,7 +136,8 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
def elsa_context_menu(self, position):
|
||||
menu = QtWidgets.QMenu()
|
||||
# TODO: add functions
|
||||
pass
|
||||
pass
|
||||
|
||||
def elsa_table_entry(self):
|
||||
data = ElsaAddEntry()
|
||||
selected_row = self.table_elsa_list.currentRow()
|
||||
@@ -157,7 +157,7 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
else:
|
||||
data.search(pages=pages)
|
||||
data.exec()
|
||||
|
||||
|
||||
def add_new_elsa(self):
|
||||
self.create_frame_elsa.setEnabled(True)
|
||||
self.elsa_cancel_create.setEnabled(True)
|
||||
@@ -196,7 +196,7 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.db.updateElsaApparat(elsa_id, prof, semester, date)
|
||||
self.elsa_update.setEnabled(False)
|
||||
self.cancel_elsa_creation()
|
||||
|
||||
|
||||
def confirm_popup(self, message: str, title: str):
|
||||
popup = popus_confirm(title=title)
|
||||
popup.textEdit.setReadOnly(True)
|
||||
@@ -225,7 +225,7 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
mail=self.newProf_mail.text(),
|
||||
telnr=self.newProf_telnr.text(),
|
||||
title=self.newProf_title.text(),
|
||||
fullname=f"{prof.split(", ")[0]} {prof.split(", ")[1]}",
|
||||
fullname=f"{prof.split(', ')[0]} {prof.split(', ')[1]}",
|
||||
)
|
||||
prof_id = self.db.getProfId(profdata)
|
||||
logger.debug(profdata, prof_id)
|
||||
@@ -443,7 +443,7 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.elsa_table.setRowCount(0)
|
||||
elsa_apparats = self.db.getElsaApparats()
|
||||
elsa_apparats = natsorted(elsa_apparats, key=lambda x: x[2], reverse=True)
|
||||
# x = semester, y = number of apparats
|
||||
# x = semester, y = number of apparats
|
||||
|
||||
for apparat in elsa_apparats:
|
||||
data = self.insert_elsa_into_table(apparat)
|
||||
@@ -474,10 +474,11 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
0, 1, QtWidgets.QTableWidgetItem(str(self.graph_data["y"][i]))
|
||||
)
|
||||
self.elsa_statistics.addTab(graph, "Graph")
|
||||
|
||||
|
||||
|
||||
def launch():
|
||||
logger.debug("Launching Elsa Dialog")
|
||||
app = QtWidgets.QApplication([])
|
||||
window = ElsaDialog()
|
||||
window.show()
|
||||
app.exec()
|
||||
app.exec()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import random
|
||||
from typing import Union
|
||||
|
||||
@@ -124,7 +123,7 @@ class DataGraph(QtWidgets.QWidget):
|
||||
years.sort()
|
||||
for year in years:
|
||||
SoSe_year = f"SoSe{year}"
|
||||
WiSe_year = f"WiSe{year}/{year+1}"
|
||||
WiSe_year = f"WiSe{year}/{year + 1}"
|
||||
if SoSe_year not in SoSe_data.keys():
|
||||
SoSe_data[SoSe_year] = 0
|
||||
if WiSe_year not in WiSe_data.keys():
|
||||
|
||||
28
src/ui/widgets/iconLine.py
Normal file
28
src/ui/widgets/iconLine.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from .widget_sources.Ui_icon_widget import Ui_Dialog
|
||||
from PyQt6 import QtWidgets, QtCore, QtGui
|
||||
from PyQt6.QtCore import Qt
|
||||
from src import logger
|
||||
|
||||
|
||||
class IconWidget(QtWidgets.QWidget, Ui_Dialog):
|
||||
def __init__(self, icon_name: str, icon_filename: str):
|
||||
super(IconWidget, self).__init__(None)
|
||||
self.setupUi(self)
|
||||
self.btn_change_icon.clicked.connect(self.change_icon)
|
||||
self.icon_filename_line.setText(icon_filename)
|
||||
self.icon_name_settings.setText(icon_name)
|
||||
|
||||
def change_icon(self):
|
||||
file_dialog = QtWidgets.QFileDialog()
|
||||
file_dialog.setFileMode(QtWidgets.QFileDialog.FileMode.ExistingFile)
|
||||
file_dialog.setNameFilter("Images (*.ico *.svg)")
|
||||
if file_dialog.exec():
|
||||
self.icon_filename_line.setText(
|
||||
file_dialog.selectedFiles()[0].split("/")[-1]
|
||||
)
|
||||
logger.debug(
|
||||
"Icon changed to: {}", file_dialog.selectedFiles()[0].split("/")[-1]
|
||||
)
|
||||
|
||||
def return_data(self):
|
||||
return self.icon_name_settings.text(), self.icon_filename_line.text()
|
||||
@@ -4,8 +4,7 @@ from PyQt6.QtCore import pyqtSignal
|
||||
from src.backend import Database, Semester
|
||||
from src import logger
|
||||
from src.logic import custom_sort, Prof, sort_semesters_list
|
||||
from src.ui import ApparatExtendDialog
|
||||
from src.ui.dialogs import Mail_Dialog
|
||||
from src.ui.dialogs import Mail_Dialog, ApparatExtendDialog
|
||||
from src.ui.widgets import DataGraph, StatusWidget
|
||||
|
||||
from natsort import natsorted
|
||||
@@ -129,7 +128,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.book_search_result.setItem(
|
||||
0, 1, QtWidgets.QTableWidgetItem(book[0].signature)
|
||||
)
|
||||
# print(book[1])
|
||||
# #print(book[1])
|
||||
self.book_search_result.setItem(
|
||||
0,
|
||||
2,
|
||||
@@ -170,7 +169,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.btn_notify_for_deletion.setEnabled(False)
|
||||
|
||||
def setStatisticTableSize(self):
|
||||
# # print(self.statistics_table.size(), self.statistics_table.rowCount())
|
||||
# # #print(self.statistics_table.size(), self.statistics_table.rowCount())
|
||||
size = self.statistics_table.size()
|
||||
h = size.height()
|
||||
w = size.width()
|
||||
@@ -286,7 +285,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
selected_apparats.append(self.tableWidget.item(i, 2).text())
|
||||
selected_apparat_rows.append(i)
|
||||
# delete all selected apparats
|
||||
# # print(selected_apparats)
|
||||
# # #print(selected_apparats)
|
||||
logger.info(f"Deleting apparats: {selected_apparats}")
|
||||
for apparat in selected_apparats:
|
||||
self.db.deleteApparat(apparat, self.semester)
|
||||
@@ -374,7 +373,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
# set the items 0 = clickable checkbox, 1 = appname, 2 = profname, 3 = fach
|
||||
self.tableWidget.setItem(i, 0, QtWidgets.QTableWidgetItem(""))
|
||||
self.tableWidget.setItem(i, 1, QtWidgets.QTableWidgetItem(data[i][1]))
|
||||
#set tooltip for the apparat name
|
||||
# set tooltip for the apparat name
|
||||
self.tableWidget.item(i, 1).setToolTip(data[i][1])
|
||||
self.tableWidget.setItem(i, 2, QtWidgets.QTableWidgetItem(str(data[i][4])))
|
||||
self.tableWidget.setItem(i, 3, QtWidgets.QTableWidgetItem(data[i][2]))
|
||||
@@ -439,12 +438,12 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
apparat = args[1]
|
||||
if header == "deleted" and parent_depth == 2:
|
||||
# TODO: warn message here
|
||||
print("warning")
|
||||
logger.warning("Semesterapparat wurde bereits gelöscht")
|
||||
if parent_depth == 1:
|
||||
# person selected case - open all apparats from this person in the tableWidget
|
||||
self.tableWidget.setRowCount(0)
|
||||
name = apparat.split("(")[0].strip()
|
||||
prof_id = self.db.getProfId({"profname":name})
|
||||
prof_id = self.db.getProfId({"profname": name})
|
||||
apparats = self.db.getApparatsByProf(prof_id)
|
||||
for app in apparats:
|
||||
# set the items 0 = clickable checkbox, 1 = appname, 2 = profname, 3 = fach
|
||||
@@ -472,13 +471,13 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
"Dieser Semesterapparat kann nicht gelöscht werden, da er bereits gelöscht wurde"
|
||||
)
|
||||
elif parent_depth == 2:
|
||||
# print("depth", parent_depth)
|
||||
# #print("depth", parent_depth)
|
||||
# apparat selected case - open the apparat in the frame
|
||||
self.apparat_open.emit(apparat)
|
||||
return
|
||||
|
||||
def emit_signal(self, *args):
|
||||
# print("emit_signal", *args)
|
||||
# #print("emit_signal", *args)
|
||||
self.apparat_open.emit(args[1])
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\widgets\widget_sources\admin_create_user.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.7.1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\widgets\widget_sources\admin_edit_prof.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.7.1
|
||||
@@ -27,10 +26,14 @@ class Ui_Dialog(object):
|
||||
self.faculty_member_old_telnr.setObjectName("faculty_member_old_telnr")
|
||||
self.gridLayout_2.addWidget(self.faculty_member_old_telnr, 1, 1, 1, 1)
|
||||
self.edit_faculty_member_title = QtWidgets.QLineEdit(parent=Dialog)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.edit_faculty_member_title.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.edit_faculty_member_title.sizePolicy().hasHeightForWidth()
|
||||
)
|
||||
self.edit_faculty_member_title.setSizePolicy(sizePolicy)
|
||||
self.edit_faculty_member_title.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.edit_faculty_member_title.setReadOnly(True)
|
||||
@@ -43,7 +46,9 @@ class Ui_Dialog(object):
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.gridLayout_2.addWidget(self.label_3, 1, 0, 1, 1)
|
||||
self.edit_faculty_member_select_member = QtWidgets.QComboBox(parent=Dialog)
|
||||
self.edit_faculty_member_select_member.setObjectName("edit_faculty_member_select_member")
|
||||
self.edit_faculty_member_select_member.setObjectName(
|
||||
"edit_faculty_member_select_member"
|
||||
)
|
||||
self.gridLayout_2.addWidget(self.edit_faculty_member_select_member, 0, 1, 1, 1)
|
||||
self.faculty_member_oldmail = QtWidgets.QLineEdit(parent=Dialog)
|
||||
self.faculty_member_oldmail.setReadOnly(True)
|
||||
@@ -57,7 +62,12 @@ class Ui_Dialog(object):
|
||||
self.delete_faculty_member.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.delete_faculty_member.setObjectName("delete_faculty_member")
|
||||
self.horizontalLayout.addWidget(self.delete_faculty_member)
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
spacerItem = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Fixed,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
self.horizontalLayout.addItem(spacerItem)
|
||||
self.update_faculty_member = QtWidgets.QPushButton(parent=Dialog)
|
||||
self.update_faculty_member.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
@@ -81,10 +91,14 @@ class Ui_Dialog(object):
|
||||
self.label_9.setObjectName("label_9")
|
||||
self.gridLayout_3.addWidget(self.label_9, 4, 0, 1, 1)
|
||||
self.edit_faculty_member_new_title = QtWidgets.QLineEdit(parent=Dialog)
|
||||
self.edit_faculty_member_new_title.setObjectName("edit_faculty_member_new_title")
|
||||
self.edit_faculty_member_new_title.setObjectName(
|
||||
"edit_faculty_member_new_title"
|
||||
)
|
||||
self.gridLayout_3.addWidget(self.edit_faculty_member_new_title, 0, 1, 1, 1)
|
||||
self.user_faculty_member_new_telnr = QtWidgets.QLineEdit(parent=Dialog)
|
||||
self.user_faculty_member_new_telnr.setObjectName("user_faculty_member_new_telnr")
|
||||
self.user_faculty_member_new_telnr.setObjectName(
|
||||
"user_faculty_member_new_telnr"
|
||||
)
|
||||
self.gridLayout_3.addWidget(self.user_faculty_member_new_telnr, 3, 1, 1, 1)
|
||||
self.label_8 = QtWidgets.QLabel(parent=Dialog)
|
||||
self.label_8.setObjectName("label_8")
|
||||
@@ -99,7 +113,9 @@ class Ui_Dialog(object):
|
||||
self.user_faculty_member_new_name.setObjectName("user_faculty_member_new_name")
|
||||
self.gridLayout_3.addWidget(self.user_faculty_member_new_name, 2, 1, 1, 1)
|
||||
self.edit_faculty_member_new_surname = QtWidgets.QLineEdit(parent=Dialog)
|
||||
self.edit_faculty_member_new_surname.setObjectName("edit_faculty_member_new_surname")
|
||||
self.edit_faculty_member_new_surname.setObjectName(
|
||||
"edit_faculty_member_new_surname"
|
||||
)
|
||||
self.gridLayout_3.addWidget(self.edit_faculty_member_new_surname, 1, 1, 1, 1)
|
||||
self.label_5 = QtWidgets.QLabel(parent=Dialog)
|
||||
self.label_5.setObjectName("label_5")
|
||||
@@ -124,14 +140,28 @@ class Ui_Dialog(object):
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
Dialog.setTabOrder(self.edit_faculty_member_select_member, self.faculty_member_old_telnr)
|
||||
Dialog.setTabOrder(
|
||||
self.edit_faculty_member_select_member, self.faculty_member_old_telnr
|
||||
)
|
||||
Dialog.setTabOrder(self.faculty_member_old_telnr, self.faculty_member_oldmail)
|
||||
Dialog.setTabOrder(self.faculty_member_oldmail, self.edit_faculty_member_new_title)
|
||||
Dialog.setTabOrder(self.edit_faculty_member_new_title, self.edit_faculty_member_new_surname)
|
||||
Dialog.setTabOrder(self.edit_faculty_member_new_surname, self.user_faculty_member_new_name)
|
||||
Dialog.setTabOrder(self.user_faculty_member_new_name, self.user_faculty_member_new_telnr)
|
||||
Dialog.setTabOrder(self.user_faculty_member_new_telnr, self.user_faculty_member_new_mail)
|
||||
Dialog.setTabOrder(self.user_faculty_member_new_mail, self.edit_faculty_member_title)
|
||||
Dialog.setTabOrder(
|
||||
self.faculty_member_oldmail, self.edit_faculty_member_new_title
|
||||
)
|
||||
Dialog.setTabOrder(
|
||||
self.edit_faculty_member_new_title, self.edit_faculty_member_new_surname
|
||||
)
|
||||
Dialog.setTabOrder(
|
||||
self.edit_faculty_member_new_surname, self.user_faculty_member_new_name
|
||||
)
|
||||
Dialog.setTabOrder(
|
||||
self.user_faculty_member_new_name, self.user_faculty_member_new_telnr
|
||||
)
|
||||
Dialog.setTabOrder(
|
||||
self.user_faculty_member_new_telnr, self.user_faculty_member_new_mail
|
||||
)
|
||||
Dialog.setTabOrder(
|
||||
self.user_faculty_member_new_mail, self.edit_faculty_member_title
|
||||
)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\widgets\widget_sources\admin_edit_user.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.7.1
|
||||
@@ -29,7 +28,9 @@ class Ui_Dialog(object):
|
||||
self.user_edit_frame_new_password.setObjectName("user_edit_frame_new_password")
|
||||
self.gridLayout.addWidget(self.user_edit_frame_new_password, 1, 1, 1, 1)
|
||||
self.user_delete_frame_user_select = QtWidgets.QComboBox(parent=Dialog)
|
||||
self.user_delete_frame_user_select.setObjectName("user_delete_frame_user_select")
|
||||
self.user_delete_frame_user_select.setObjectName(
|
||||
"user_delete_frame_user_select"
|
||||
)
|
||||
self.gridLayout.addWidget(self.user_delete_frame_user_select, 0, 1, 1, 1)
|
||||
self.label_2 = QtWidgets.QLabel(parent=Dialog)
|
||||
self.label_2.setObjectName("label_2")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\widgets\widget_sources\calendar_entry.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.7.1
|
||||
@@ -23,10 +22,14 @@ class Ui_Dialog(object):
|
||||
self.horizontalLayout.addWidget(self.label_14)
|
||||
self.line_app_info = QtWidgets.QLineEdit(parent=Dialog)
|
||||
self.line_app_info.setEnabled(True)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.line_app_info.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.line_app_info.sizePolicy().hasHeightForWidth()
|
||||
)
|
||||
self.line_app_info.setSizePolicy(sizePolicy)
|
||||
self.line_app_info.setMaximumSize(QtCore.QSize(30, 16777215))
|
||||
self.line_app_info.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
@@ -39,10 +42,14 @@ class Ui_Dialog(object):
|
||||
self.btn_delete_message.setObjectName("btn_delete_message")
|
||||
self.horizontalLayout.addWidget(self.btn_delete_message)
|
||||
self.spin_select_message = QtWidgets.QSpinBox(parent=Dialog)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy = QtWidgets.QSizePolicy(
|
||||
QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed
|
||||
)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.spin_select_message.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.spin_select_message.sizePolicy().hasHeightForWidth()
|
||||
)
|
||||
self.spin_select_message.setSizePolicy(sizePolicy)
|
||||
self.spin_select_message.setMaximumSize(QtCore.QSize(500, 16777215))
|
||||
self.spin_select_message.setMinimum(1)
|
||||
|
||||
@@ -185,17 +185,29 @@ class Ui_Dialog(object):
|
||||
self.verticalLayout_3.addItem(spacerItem4)
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout_3)
|
||||
self.verticalLayout.addWidget(self.create_frame_elsa)
|
||||
self.results = QtWidgets.QFrame(parent=Dialog)
|
||||
self.results.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||
self.results.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||
self.results.setObjectName("results")
|
||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.results)
|
||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||
self.media_table = QtWidgets.QFrame(parent=self.results)
|
||||
self.media_table.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||
self.media_table.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||
self.media_table.setObjectName("media_table")
|
||||
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.media_table)
|
||||
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
||||
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
|
||||
self.quote_entry = QtWidgets.QPushButton(parent=Dialog)
|
||||
self.quote_entry = QtWidgets.QPushButton(parent=self.media_table)
|
||||
self.quote_entry.setObjectName("quote_entry")
|
||||
self.horizontalLayout_6.addWidget(self.quote_entry)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_6.addItem(spacerItem5)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_6)
|
||||
self.verticalLayout_4.addLayout(self.horizontalLayout_6)
|
||||
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
||||
self.table_elsa_list = QtWidgets.QTableWidget(parent=Dialog)
|
||||
self.table_elsa_list = QtWidgets.QTableWidget(parent=self.media_table)
|
||||
self.table_elsa_list.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.table_elsa_list.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||
self.table_elsa_list.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectItems)
|
||||
@@ -231,7 +243,16 @@ class Ui_Dialog(object):
|
||||
self.table_elsa_list.horizontalHeader().setDefaultSectionSize(85)
|
||||
self.table_elsa_list.horizontalHeader().setMinimumSectionSize(31)
|
||||
self.horizontalLayout_5.addWidget(self.table_elsa_list)
|
||||
self.elsa_statistics = QtWidgets.QTabWidget(parent=Dialog)
|
||||
self.horizontalLayout_5.setStretch(0, 7)
|
||||
self.verticalLayout_4.addLayout(self.horizontalLayout_5)
|
||||
self.horizontalLayout_3.addWidget(self.media_table)
|
||||
self.statistics = QtWidgets.QFrame(parent=self.results)
|
||||
self.statistics.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||
self.statistics.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||
self.statistics.setObjectName("statistics")
|
||||
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.statistics)
|
||||
self.verticalLayout_5.setObjectName("verticalLayout_5")
|
||||
self.elsa_statistics = QtWidgets.QTabWidget(parent=self.statistics)
|
||||
self.elsa_statistics.setObjectName("elsa_statistics")
|
||||
self.tab = QtWidgets.QWidget()
|
||||
self.tab.setObjectName("tab")
|
||||
@@ -252,12 +273,12 @@ class Ui_Dialog(object):
|
||||
self.elsa_statistics_table.horizontalHeader().setDefaultSectionSize(169)
|
||||
self.horizontalLayout_7.addWidget(self.elsa_statistics_table)
|
||||
self.elsa_statistics.addTab(self.tab, "")
|
||||
self.horizontalLayout_5.addWidget(self.elsa_statistics)
|
||||
self.horizontalLayout_5.setStretch(0, 7)
|
||||
self.horizontalLayout_5.setStretch(1, 3)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_5)
|
||||
self.verticalLayout_5.addWidget(self.elsa_statistics)
|
||||
self.horizontalLayout_3.addWidget(self.statistics)
|
||||
self.verticalLayout.addWidget(self.results)
|
||||
self.verticalLayout.setStretch(0, 1)
|
||||
self.verticalLayout.setStretch(3, 2)
|
||||
self.verticalLayout.setStretch(1, 1)
|
||||
self.verticalLayout.setStretch(2, 2)
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
self.elsa_statistics.setCurrentIndex(0)
|
||||
@@ -277,12 +298,8 @@ class Ui_Dialog(object):
|
||||
Dialog.setTabOrder(self.seperateEntries, self.check_file_elsa)
|
||||
Dialog.setTabOrder(self.check_file_elsa, self.elsa_save)
|
||||
Dialog.setTabOrder(self.elsa_save, self.elsa_update)
|
||||
Dialog.setTabOrder(self.elsa_update, self.quote_entry)
|
||||
Dialog.setTabOrder(self.quote_entry, self.elsa_statistics)
|
||||
Dialog.setTabOrder(self.elsa_statistics, self.table_elsa_list)
|
||||
Dialog.setTabOrder(self.table_elsa_list, self.elsa_table)
|
||||
Dialog.setTabOrder(self.elsa_table, self.elsa_statistics_table)
|
||||
Dialog.setTabOrder(self.elsa_statistics_table, self.dokument_list_elsa)
|
||||
Dialog.setTabOrder(self.elsa_update, self.elsa_table)
|
||||
Dialog.setTabOrder(self.elsa_table, self.dokument_list_elsa)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
|
||||
41
src/ui/widgets/widget_sources/Ui_icon_widget.py
Normal file
41
src/ui/widgets/widget_sources/Ui_icon_widget.py
Normal file
@@ -0,0 +1,41 @@
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\widgets\widget_sources\icon_widget.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.7.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_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(400, 40)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout(Dialog)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.icon_name_settings = QtWidgets.QLabel(parent=Dialog)
|
||||
self.icon_name_settings.setText("")
|
||||
self.icon_name_settings.setObjectName("icon_name_settings")
|
||||
self.horizontalLayout.addWidget(self.icon_name_settings)
|
||||
self.icon_filename_line = QtWidgets.QLineEdit(parent=Dialog)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.icon_filename_line.sizePolicy().hasHeightForWidth())
|
||||
self.icon_filename_line.setSizePolicy(sizePolicy)
|
||||
self.icon_filename_line.setMinimumSize(QtCore.QSize(230, 0))
|
||||
self.icon_filename_line.setObjectName("icon_filename_line")
|
||||
self.horizontalLayout.addWidget(self.icon_filename_line)
|
||||
self.btn_change_icon = QtWidgets.QToolButton(parent=Dialog)
|
||||
self.btn_change_icon.setObjectName("btn_change_icon")
|
||||
self.horizontalLayout.addWidget(self.btn_change_icon)
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
||||
self.btn_change_icon.setText(_translate("Dialog", "..."))
|
||||
@@ -150,6 +150,10 @@ class Ui_Dialog(object):
|
||||
self.apparatResult.setObjectName("apparatResult")
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout(self.apparatResult)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.app_results = QtWidgets.QWidget(parent=self.apparatResult)
|
||||
self.app_results.setObjectName("app_results")
|
||||
self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.app_results)
|
||||
self.verticalLayout_6.setObjectName("verticalLayout_6")
|
||||
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
||||
self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
|
||||
@@ -157,17 +161,17 @@ class Ui_Dialog(object):
|
||||
self.verticalLayout_5 = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout_5.setObjectName("verticalLayout_5")
|
||||
self.horizontalLayout_7.addLayout(self.verticalLayout_5)
|
||||
self.btn_del_select_apparats = QtWidgets.QPushButton(parent=self.apparatResult)
|
||||
self.btn_del_select_apparats = QtWidgets.QPushButton(parent=self.app_results)
|
||||
self.btn_del_select_apparats.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||
self.btn_del_select_apparats.setObjectName("btn_del_select_apparats")
|
||||
self.horizontalLayout_7.addWidget(self.btn_del_select_apparats)
|
||||
self.btn_notify_for_deletion = QtWidgets.QPushButton(parent=self.apparatResult)
|
||||
self.btn_notify_for_deletion = QtWidgets.QPushButton(parent=self.app_results)
|
||||
self.btn_notify_for_deletion.setObjectName("btn_notify_for_deletion")
|
||||
self.horizontalLayout_7.addWidget(self.btn_notify_for_deletion)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_7.addItem(spacerItem4)
|
||||
self.verticalLayout_4.addLayout(self.horizontalLayout_7)
|
||||
self.tableWidget = QtWidgets.QTableWidget(parent=self.apparatResult)
|
||||
self.tableWidget = QtWidgets.QTableWidget(parent=self.app_results)
|
||||
self.tableWidget.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.tableWidget.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
||||
self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||
@@ -186,13 +190,18 @@ class Ui_Dialog(object):
|
||||
self.tableWidget.setHorizontalHeaderItem(4, item)
|
||||
self.tableWidget.horizontalHeader().setStretchLastSection(True)
|
||||
self.verticalLayout_4.addWidget(self.tableWidget)
|
||||
self.horizontalLayout.addLayout(self.verticalLayout_4)
|
||||
self.tabWidget_3 = QtWidgets.QTabWidget(parent=self.apparatResult)
|
||||
self.verticalLayout_6.addLayout(self.verticalLayout_4)
|
||||
self.horizontalLayout.addWidget(self.app_results)
|
||||
self.stats = QtWidgets.QFrame(parent=self.apparatResult)
|
||||
self.stats.setObjectName("stats")
|
||||
self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.stats)
|
||||
self.verticalLayout_8.setObjectName("verticalLayout_8")
|
||||
self.tabWidget_3 = QtWidgets.QTabWidget(parent=self.stats)
|
||||
self.tabWidget_3.setObjectName("tabWidget_3")
|
||||
self.statistic_table = QtWidgets.QWidget()
|
||||
self.statistic_table.setObjectName("statistic_table")
|
||||
self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.statistic_table)
|
||||
self.verticalLayout_6.setObjectName("verticalLayout_6")
|
||||
self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.statistic_table)
|
||||
self.verticalLayout_7.setObjectName("verticalLayout_7")
|
||||
self.statistics_table = QtWidgets.QTableWidget(parent=self.statistic_table)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
@@ -219,17 +228,16 @@ class Ui_Dialog(object):
|
||||
self.statistics_table.horizontalHeader().setSortIndicatorShown(True)
|
||||
self.statistics_table.horizontalHeader().setStretchLastSection(False)
|
||||
self.statistics_table.verticalHeader().setStretchLastSection(True)
|
||||
self.verticalLayout_6.addWidget(self.statistics_table)
|
||||
self.verticalLayout_7.addWidget(self.statistics_table)
|
||||
self.dataLayout = QtWidgets.QHBoxLayout()
|
||||
self.dataLayout.setObjectName("dataLayout")
|
||||
self.verticalLayout_6.addLayout(self.dataLayout)
|
||||
self.verticalLayout_7.addLayout(self.dataLayout)
|
||||
self.tabWidget_3.addTab(self.statistic_table, "")
|
||||
self.graph_table = QtWidgets.QWidget()
|
||||
self.graph_table.setObjectName("graph_table")
|
||||
self.tabWidget_3.addTab(self.graph_table, "")
|
||||
self.horizontalLayout.addWidget(self.tabWidget_3)
|
||||
self.horizontalLayout.setStretch(0, 55)
|
||||
self.horizontalLayout.setStretch(1, 45)
|
||||
self.verticalLayout_8.addWidget(self.tabWidget_3)
|
||||
self.horizontalLayout.addWidget(self.stats)
|
||||
self.stackedWidget_4.addWidget(self.apparatResult)
|
||||
self.bookresult = QtWidgets.QWidget()
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
@@ -283,10 +291,7 @@ class Ui_Dialog(object):
|
||||
Dialog.setTabOrder(self.box_semester, self.box_erstellsemester)
|
||||
Dialog.setTabOrder(self.box_erstellsemester, self.box_dauerapp)
|
||||
Dialog.setTabOrder(self.box_dauerapp, self.btn_search)
|
||||
Dialog.setTabOrder(self.btn_search, self.btn_del_select_apparats)
|
||||
Dialog.setTabOrder(self.btn_del_select_apparats, self.btn_notify_for_deletion)
|
||||
Dialog.setTabOrder(self.btn_notify_for_deletion, self.tabWidget_3)
|
||||
Dialog.setTabOrder(self.tabWidget_3, self.book_search_result)
|
||||
Dialog.setTabOrder(self.btn_search, self.book_search_result)
|
||||
Dialog.setTabOrder(self.book_search_result, self.seach_by_signature)
|
||||
Dialog.setTabOrder(self.seach_by_signature, self.search_by_title)
|
||||
Dialog.setTabOrder(self.search_by_title, self.book_search)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,0,0,2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,1,2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
@@ -403,160 +403,196 @@ hinzufügen</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QPushButton" name="quote_entry">
|
||||
<property name="text">
|
||||
<string> Eintrag zitieren </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5" stretch="7,3">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="table_elsa_list">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectItems</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||
<number>31</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>85</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Autor(en) des Werks</string>
|
||||
<widget class="QFrame" name="results">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QFrame" name="media_table">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignLeading|AlignVCenter</set>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Autor(en) des Beitrags</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignLeading|AlignVCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Jahr</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Heft</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Auflage</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Titel des Werks</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Beitragstitel</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Seiten</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Ort</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Verlag</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Signatur</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Art</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="elsa_statistics">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Tabelle</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="elsa_statistics_table">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QPushButton" name="quote_entry">
|
||||
<property name="text">
|
||||
<string> Eintrag zitieren </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5" stretch="7">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="table_elsa_list">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectItems</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||
<number>31</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>85</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Autor(en) des Werks</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignLeading|AlignVCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Autor(en) des Beitrags</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignLeading|AlignVCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Jahr</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Heft</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Auflage</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Titel des Werks</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Beitragstitel</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Seiten</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Ort</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Verlag</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Signatur</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Art</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="statistics">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="elsa_statistics">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="textElideMode">
|
||||
<enum>Qt::ElideMiddle</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>169</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Semester</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Zugang</string>
|
||||
</property>
|
||||
</column>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Tabelle</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="elsa_statistics_table">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="textElideMode">
|
||||
<enum>Qt::ElideMiddle</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>169</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Semester</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Zugang</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -577,11 +613,7 @@ hinzufügen</string>
|
||||
<tabstop>check_file_elsa</tabstop>
|
||||
<tabstop>elsa_save</tabstop>
|
||||
<tabstop>elsa_update</tabstop>
|
||||
<tabstop>quote_entry</tabstop>
|
||||
<tabstop>elsa_statistics</tabstop>
|
||||
<tabstop>table_elsa_list</tabstop>
|
||||
<tabstop>elsa_table</tabstop>
|
||||
<tabstop>elsa_statistics_table</tabstop>
|
||||
<tabstop>dokument_list_elsa</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
|
||||
51
src/ui/widgets/widget_sources/icon_widget.ui
Normal file
51
src/ui/widgets/widget_sources/icon_widget.ui
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="icon_name_settings">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="icon_filename_line">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>230</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btn_change_icon">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -315,176 +315,188 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="apparatResult">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="55,45">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_del_select_apparats">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ausgewählte Löschen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_notify_for_deletion">
|
||||
<property name="statusTip">
|
||||
<string>Zeigt für jeden ausgewählten Apparat eine eMail-Vorlage an</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ausgewählte Benachrichtigen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Apparatsname</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Apparatsnummer</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Person</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Fach</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QWidget" name="app_results" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_del_select_apparats">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ausgewählte Löschen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_notify_for_deletion">
|
||||
<property name="statusTip">
|
||||
<string>Zeigt für jeden ausgewählten Apparat eine eMail-Vorlage an</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ausgewählte Benachrichtigen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Apparatsname</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Apparatsnummer</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Person</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Fach</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget_3">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="statistic_table">
|
||||
<attribute name="title">
|
||||
<string>Tabelle</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="statistics_table">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderCascadingSectionResizes">
|
||||
<bool>true</bool>
|
||||
<widget class="QFrame" name="stats">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget_3">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="statistic_table">
|
||||
<attribute name="title">
|
||||
<string>Tabelle</string>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||
<number>40</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>80</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Semester</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Zugang</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Abgang</string>
|
||||
</property>
|
||||
</column>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="statistics_table">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderCascadingSectionResizes">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||
<number>40</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>80</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Semester</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Zugang</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Abgang</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="dataLayout"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="dataLayout"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="graph_table">
|
||||
<attribute name="title">
|
||||
<string>Erstellte und gelöschte Semesterapparate</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QWidget" name="graph_table">
|
||||
<attribute name="title">
|
||||
<string>Erstellte und gelöschte Semesterapparate</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -557,9 +569,6 @@
|
||||
<tabstop>box_erstellsemester</tabstop>
|
||||
<tabstop>box_dauerapp</tabstop>
|
||||
<tabstop>btn_search</tabstop>
|
||||
<tabstop>btn_del_select_apparats</tabstop>
|
||||
<tabstop>btn_notify_for_deletion</tabstop>
|
||||
<tabstop>tabWidget_3</tabstop>
|
||||
<tabstop>book_search_result</tabstop>
|
||||
<tabstop>seach_by_signature</tabstop>
|
||||
<tabstop>search_by_title</tabstop>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
|
||||
from .blob import create_blob
|
||||
from .icon import Icon
|
||||
from .pickles import dump_pickle, load_pickle
|
||||
from .sortgenerator import app_sort, name_sort
|
||||
from .richtext import SemesterDocument
|
||||
from .richtext import SemesterDocument
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
def create_blob(file):
|
||||
"""
|
||||
Creates a blob from a file.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import darkdetect
|
||||
from omegaconf import OmegaConf
|
||||
from PyQt6 import QtGui
|
||||
@@ -21,12 +20,12 @@ class Icon:
|
||||
recolor (bool, optional): If Icon should be recolored. Defaults to True.
|
||||
color (str, optional): Color type to use. Configured in config file. Defaults to None.
|
||||
"""
|
||||
assert (
|
||||
icon_type in settings.icons.icons.keys()
|
||||
), f"Icon {icon_type} not in config file"
|
||||
assert (
|
||||
color in settings.icons.colors.keys() or color is None
|
||||
), f"Color {color} not in config file"
|
||||
assert icon_type in settings.icons.icons.keys(), (
|
||||
f"Icon {icon_type} not in config file"
|
||||
)
|
||||
assert color in settings.icons.colors.keys() or color is None, (
|
||||
f"Color {color} not in config file"
|
||||
)
|
||||
icon = settings.icons.get(icon_type)
|
||||
dark = darkdetect.isDark()
|
||||
if dark:
|
||||
@@ -49,8 +48,8 @@ class Icon:
|
||||
except AttributeError:
|
||||
widget.setWindowIcon(self.icon)
|
||||
|
||||
def add_icon(self, icon_path,recolor=False):
|
||||
icon = self.changeColor(icon_path,recolor)
|
||||
def add_icon(self, icon_path, recolor=False):
|
||||
icon = self.changeColor(icon_path, recolor)
|
||||
|
||||
# use icon bytes to create a pixmap
|
||||
pixmap = QtGui.QPixmap()
|
||||
@@ -70,7 +69,7 @@ class Icon:
|
||||
stroke = re.search(r"stroke=\"(.*?)\"", cicon)
|
||||
if stroke:
|
||||
stroke = stroke.group(1)
|
||||
|
||||
|
||||
if fill and stroke:
|
||||
# replace stroke
|
||||
newicon = icon.replace(stroke.encode(), config.color.encode())
|
||||
@@ -87,8 +86,7 @@ class Icon:
|
||||
)
|
||||
return self.icon
|
||||
|
||||
|
||||
def changeColor(self,icon_path,recolor) -> bytes:
|
||||
def changeColor(self, icon_path, recolor) -> bytes:
|
||||
"""change the color of the svg icon to the color set in the config file
|
||||
|
||||
Args:
|
||||
@@ -102,7 +100,7 @@ class Icon:
|
||||
icon = file.read()
|
||||
if recolor:
|
||||
cicon = str(icon)
|
||||
|
||||
|
||||
try:
|
||||
fill = re.search(r"fill=\"(.*?)\"", cicon).group(1)
|
||||
except AttributeError:
|
||||
@@ -112,6 +110,5 @@ class Icon:
|
||||
return icon
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("This is a module and can not be executed directly.")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import pickle
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user