add wfh files
This commit is contained in:
@@ -33,7 +33,7 @@ lint:
|
|||||||
- bandit@1.7.7
|
- bandit@1.7.7
|
||||||
- markdownlint@0.39.0
|
- markdownlint@0.39.0
|
||||||
- yamllint@1.34.0
|
- yamllint@1.34.0
|
||||||
- black@24.1.1
|
- black@24.2.0
|
||||||
actions:
|
actions:
|
||||||
disabled:
|
disabled:
|
||||||
- trunk-fmt-pre-commit
|
- trunk-fmt-pre-commit
|
||||||
|
|||||||
4266
docs/database.html
Normal file
4266
docs/database.html
Normal file
File diff suppressed because it is too large
Load Diff
132
docs/db.html
Normal file
132
docs/db.html
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
|
||||||
|
<meta name="generator" content="pdoc 0.10.0" />
|
||||||
|
<title>db API documentation</title>
|
||||||
|
<meta name="description" content="" />
|
||||||
|
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
|
||||||
|
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/typography.min.css" integrity="sha256-7l/o7C8jubJiy74VsKTidCy1yBkRtiUGbVkYBylBqUg=" crossorigin>
|
||||||
|
<link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/github.min.css" crossorigin>
|
||||||
|
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:30px;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:1em 0 .50em 0}h3{font-size:1.4em;margin:25px 0 10px 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .3s ease-in-out}a:hover{color:#e82}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900}pre code{background:#f8f8f8;font-size:.8em;line-height:1.4em}code{background:#f2f2f1;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{background:#f8f8f8;border:0;border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0;padding:1ex}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-weight:bold;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em .5em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||||
|
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.item .name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul{padding-left:1.5em}.toc > ul > li{margin-top:.5em}}</style>
|
||||||
|
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||||
|
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js" integrity="sha256-Uv3H6lx7dJmRfRvH8TH6kJD1TSK1aFcwgx+mdg3epi8=" crossorigin></script>
|
||||||
|
<script>window.addEventListener('DOMContentLoaded', () => hljs.initHighlighting())</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
<article id="content">
|
||||||
|
<header>
|
||||||
|
<h1 class="title">Module <code>db</code></h1>
|
||||||
|
</header>
|
||||||
|
<section>
|
||||||
|
<p>Module <code>db</code> provides the database schema for the semesterapparat application.</p>
|
||||||
|
</section>
|
||||||
|
<section id="section-intro">
|
||||||
|
<details class="source" open="">
|
||||||
|
<summary>
|
||||||
|
<span>Expand source code</span>
|
||||||
|
</summary>
|
||||||
|
<pre><code class="python">CREATE_TABLE_APPARAT = """CREATE TABLE semesterapparat (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
|
name TEXT,
|
||||||
|
prof_id INTEGER,
|
||||||
|
fach TEXT,
|
||||||
|
appnr INTEGER,
|
||||||
|
erstellsemester TEXT,
|
||||||
|
verlängert_am TEXT,
|
||||||
|
dauer BOOLEAN,
|
||||||
|
verlängerung_bis TEXT,
|
||||||
|
deletion_status INTEGER,
|
||||||
|
deleted_date TEXT,
|
||||||
|
apparat_id_adis INTEGER,
|
||||||
|
prof_id_adis INTEGER,
|
||||||
|
konto INTEGER REFERENCES app_kontos (id),
|
||||||
|
FOREIGN KEY (prof_id) REFERENCES prof (id)
|
||||||
|
)"""
|
||||||
|
CREATE_TABLE_MEDIA = """CREATE TABLE media (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
|
bookdata BLOB,
|
||||||
|
app_id INTEGER,
|
||||||
|
prof_id INTEGER,
|
||||||
|
deleted INTEGER DEFAULT (0),
|
||||||
|
available BOOLEAN,
|
||||||
|
reservation BOOLEAN,
|
||||||
|
FOREIGN KEY (prof_id) REFERENCES prof (id),
|
||||||
|
FOREIGN KEY (app_id) REFERENCES semesterapparat (id)
|
||||||
|
)"""
|
||||||
|
CREATE_TABLE_APPKONTOS = """CREATE TABLE app_kontos (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
|
app_id INTEGER,
|
||||||
|
konto INTEGER,
|
||||||
|
passwort TEXT,
|
||||||
|
FOREIGN KEY (app_id) REFERENCES semesterapparat (id)
|
||||||
|
)"""
|
||||||
|
CREATE_TABLE_FILES = """CREATE TABLE files (
|
||||||
|
id INTEGER PRIMARY KEY,
|
||||||
|
filename TEXT,
|
||||||
|
fileblob BLOB,
|
||||||
|
app_id INTEGER,
|
||||||
|
filetyp TEXT,
|
||||||
|
prof_id INTEGER REFERENCES prof (id),
|
||||||
|
FOREIGN KEY (app_id) REFERENCES semesterapparat (id)
|
||||||
|
)"""
|
||||||
|
CREATE_TABLE_MESSAGES = """CREATE TABLE messages (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
|
created_at date NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
message TEXT NOT NULL,
|
||||||
|
remind_at date NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
user_id INTEGER NOT NULL,
|
||||||
|
appnr INTEGER,
|
||||||
|
FOREIGN KEY (user_id) REFERENCES user (id)
|
||||||
|
)"""
|
||||||
|
CREATE_TABLE_PROF = """CREATE TABLE prof (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
|
titel TEXT,
|
||||||
|
fname TEXT,
|
||||||
|
lname TEXT,
|
||||||
|
fullname TEXT NOT NULL UNIQUE,
|
||||||
|
mail TEXT,
|
||||||
|
telnr TEXT
|
||||||
|
)"""
|
||||||
|
CREATE_TABLE_USER = """CREATE TABLE user (
|
||||||
|
id integer NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||||
|
created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
username TEXT NOT NULL UNIQUE,
|
||||||
|
password TEXT NOT NULL,
|
||||||
|
salt TEXT NOT NULL,
|
||||||
|
role TEXT NOT NULL,
|
||||||
|
email TEXT UNIQUE,
|
||||||
|
name TEXT
|
||||||
|
)"""
|
||||||
|
CREATE_TABLE_SUBJECTS = """CREATE TABLE subjects (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
|
name TEXT NOT NULL UNIQUE
|
||||||
|
)"""</code></pre>
|
||||||
|
</details>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
<nav id="sidebar">
|
||||||
|
<h1>Index</h1>
|
||||||
|
<div class="toc">
|
||||||
|
<ul></ul>
|
||||||
|
</div>
|
||||||
|
<ul id="index">
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</main>
|
||||||
|
<footer id="footer">
|
||||||
|
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -7,14 +7,31 @@ from src.backend.database import Database
|
|||||||
# change passwords for apparats, change passwords for users, list users, create and delete users etc
|
# change passwords for apparats, change passwords for users, list users, create and delete users etc
|
||||||
# create a class that has all commands. for each command, create a function that does the thing
|
# create a class that has all commands. for each command, create a function that does the thing
|
||||||
class AdminCommands:
|
class AdminCommands:
|
||||||
|
"""Basic Admin commands for the admin console. This class is used to create, delete, and list users. It also has the ability to change passwords for users.
|
||||||
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
"""Defaulf Constructor for the AdminCommands class.
|
||||||
|
"""
|
||||||
self.db = Database()
|
self.db = Database()
|
||||||
|
|
||||||
def create_password(self, password):
|
def create_password(self, password:str)->tuple[str,str]:
|
||||||
|
"""Create a hashed password and a salt for the password.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
password (str): the base password to be hashed.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
tuple[str,str]: a tuple containing the hashed password and the salt used to hash the password.
|
||||||
|
"""
|
||||||
salt = self.create_salt()
|
salt = self.create_salt()
|
||||||
hashed_password = self.hash_password(password)
|
hashed_password = self.hash_password(password)
|
||||||
return (hashed_password,salt)
|
return (hashed_password,salt)
|
||||||
def create_salt(self):
|
def create_salt(self)->str:
|
||||||
|
"""Generate a random 16 digit long salt for the password.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: the randomized salt
|
||||||
|
"""
|
||||||
return "".join(
|
return "".join(
|
||||||
random.choices(
|
random.choices(
|
||||||
"abcdefghijklmnopqrstuvwxyzQWERTZUIOPLKJHGFDSAYXCVBNM0123456789", k=16
|
"abcdefghijklmnopqrstuvwxyzQWERTZUIOPLKJHGFDSAYXCVBNM0123456789", k=16
|
||||||
@@ -22,31 +39,47 @@ class AdminCommands:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def create_admin(self):
|
def create_admin(self):
|
||||||
|
"""Create the admin in the database. This is only used once, when the database is created.
|
||||||
|
"""
|
||||||
salt = self.create_salt()
|
salt = self.create_salt()
|
||||||
hashed_password = self.hash_password("admin")
|
hashed_password = self.hash_password("admin")
|
||||||
self.db.createUser("admin", salt+hashed_password, "admin", salt)
|
self.db.createUser("admin", salt+hashed_password, "admin", salt)
|
||||||
|
|
||||||
def hash_password(self, password):
|
def hash_password(self, password:str)->str:
|
||||||
|
"""Hash a password using SHA256.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
password (str): the password to be hashed.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: the hashed password.
|
||||||
|
"""
|
||||||
hashed = hashlib.sha256((password).encode("utf-8")).hexdigest()
|
hashed = hashlib.sha256((password).encode("utf-8")).hexdigest()
|
||||||
return hashed
|
return hashed
|
||||||
|
|
||||||
def list_users(self):
|
def list_users(self)->list[tuple]:
|
||||||
|
"""List all available users in the database.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list[tuple]: a list of all users, containing all stored data for each user in a tuple.
|
||||||
|
"""
|
||||||
return self.db.getUsers()
|
return self.db.getUsers()
|
||||||
|
|
||||||
def delete_user(self, username):
|
def delete_user(self, username:str):
|
||||||
|
"""Delete a selected user from the database.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
username (str): the username of the user to be deleted.
|
||||||
|
"""
|
||||||
self.db.deleteUser(username)
|
self.db.deleteUser(username)
|
||||||
|
|
||||||
def change_password(self, username, password):
|
def change_password(self, username, password):
|
||||||
|
"""change the password for a user.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
username (str): username of the user to change the password for.
|
||||||
|
password (str): the new, non-hashed password to change to.
|
||||||
|
"""
|
||||||
hashed_password = self.hash_password(password)
|
hashed_password = self.hash_password(password)
|
||||||
self.db.changePassword(username, hashed_password)
|
self.db.changePassword(username, hashed_password)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
c = AdminCommands()
|
|
||||||
c.create_user("test", "test", "user")
|
|
||||||
c.create_user("admin", "admin", "admin")
|
|
||||||
print(c.list_users())
|
|
||||||
c.delete_user("test")
|
|
||||||
print(c.list_users())
|
|
||||||
c.change_password("admin", "nopass")
|
|
||||||
print(c.list_users())
|
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ class Database:
|
|||||||
if self.get_db_contents() is None:
|
if self.get_db_contents() is None:
|
||||||
logger.log_critical("Database does not exist, creating tables")
|
logger.log_critical("Database does not exist, creating tables")
|
||||||
self.create_tables()
|
self.create_tables()
|
||||||
|
|
||||||
def get_db_contents(self)->Union[List[Tuple], None]:
|
def get_db_contents(self)->Union[List[Tuple], None]:
|
||||||
"""
|
"""
|
||||||
Get the contents of the
|
Get the contents of the
|
||||||
@@ -51,7 +50,6 @@ class Database:
|
|||||||
return cursor.fetchall()
|
return cursor.fetchall()
|
||||||
except sql.OperationalError:
|
except sql.OperationalError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def connect(self)->sql.Connection:
|
def connect(self)->sql.Connection:
|
||||||
"""
|
"""
|
||||||
Connect to the database
|
Connect to the database
|
||||||
@@ -60,7 +58,6 @@ class Database:
|
|||||||
sql.Connection: The active connection to the database
|
sql.Connection: The active connection to the database
|
||||||
"""
|
"""
|
||||||
return sql.connect(self.db_path)
|
return sql.connect(self.db_path)
|
||||||
|
|
||||||
def close_connection(self, conn: sql.Connection):
|
def close_connection(self, conn: sql.Connection):
|
||||||
"""
|
"""
|
||||||
closes the connection to the database
|
closes the connection to the database
|
||||||
@@ -70,7 +67,6 @@ class Database:
|
|||||||
- conn (sql.Connection): the connection to be closed
|
- conn (sql.Connection): the connection to be closed
|
||||||
"""
|
"""
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
def create_tables(self):
|
def create_tables(self):
|
||||||
"""
|
"""
|
||||||
Create the tables in the database
|
Create the tables in the database
|
||||||
@@ -87,7 +83,6 @@ class Database:
|
|||||||
cursor.execute(CREATE_TABLE_SUBJECTS)
|
cursor.execute(CREATE_TABLE_SUBJECTS)
|
||||||
conn.commit()
|
conn.commit()
|
||||||
self.close_connection(conn)
|
self.close_connection(conn)
|
||||||
|
|
||||||
def insertInto(self, query:str, params:Tuple) -> None:
|
def insertInto(self, query:str, params:Tuple) -> None:
|
||||||
"""
|
"""
|
||||||
Insert sent data into the database
|
Insert sent data into the database
|
||||||
@@ -102,7 +97,6 @@ class Database:
|
|||||||
cursor.execute(query, params)
|
cursor.execute(query, params)
|
||||||
conn.commit()
|
conn.commit()
|
||||||
self.close_connection(conn)
|
self.close_connection(conn)
|
||||||
|
|
||||||
def query_db(self, query: str, args: Tuple = (), one: bool = False)->Union[Tuple, List[Tuple]]:
|
def query_db(self, query: str, args: Tuple = (), one: bool = False)->Union[Tuple, List[Tuple]]:
|
||||||
"""
|
"""
|
||||||
Query the Database for the sent query.
|
Query the Database for the sent query.
|
||||||
@@ -125,7 +119,7 @@ class Database:
|
|||||||
return (rv[0] if rv else None) if one else rv
|
return (rv[0] if rv else None) if one else rv
|
||||||
|
|
||||||
# Books
|
# Books
|
||||||
def addBookToDatabase(self, bookdata:BookData,app_id:str, prof_id:str):
|
def addBookToDatabase(self, bookdata:BookData,app_id:Union[str,int], prof_id:Union[str,int]):
|
||||||
"""
|
"""
|
||||||
Add books to the database. Both app_id and prof_id are required to add the book to the database, as the app_id and prof_id are used to select the books later on.
|
Add books to the database. Both app_id and prof_id are required to add the book to the database, as the app_id and prof_id are used to select the books later on.
|
||||||
|
|
||||||
@@ -166,7 +160,7 @@ class Database:
|
|||||||
cursor.execute(query, params)
|
cursor.execute(query, params)
|
||||||
conn.commit()
|
conn.commit()
|
||||||
self.close_connection(conn)
|
self.close_connection(conn)
|
||||||
def getBookIdBasedOnSignature(self, app_id:str, prof_id:str,signature:str)->int:
|
def getBookIdBasedOnSignature(self, app_id:Union[str,int], prof_id:Union[str,int],signature:str)->int:
|
||||||
"""
|
"""
|
||||||
Get a book id based on the signature of the book.
|
Get a book id based on the signature of the book.
|
||||||
|
|
||||||
@@ -182,7 +176,7 @@ class Database:
|
|||||||
books = [(load_pickle(i[0]),i[1]) for i in result]
|
books = [(load_pickle(i[0]),i[1]) for i in result]
|
||||||
book = [i for i in books if i[0].signature == signature][0][1]
|
book = [i for i in books if i[0].signature == signature][0][1]
|
||||||
return book
|
return book
|
||||||
def getBookBasedOnSignature(self, app_id:str, prof_id:str,signature:str)->BookData:
|
def getBookBasedOnSignature(self, app_id:Union[str,int], prof_id:Union[str,int],signature:str)->BookData:
|
||||||
"""
|
"""
|
||||||
Get the book based on the signature of the book.
|
Get the book based on the signature of the book.
|
||||||
|
|
||||||
@@ -255,7 +249,7 @@ class Database:
|
|||||||
available (str): The availability of the book
|
available (str): The availability of the book
|
||||||
"""
|
"""
|
||||||
self.query_db("UPDATE media SET available=? WHERE id=?", (available,book_id))
|
self.query_db("UPDATE media SET available=? WHERE id=?", (available,book_id))
|
||||||
def getBookId(self, bookdata:BookData, app_id, prof_id)->int:
|
def getBookId(self, bookdata:BookData, app_id:Union[str,int], prof_id:Union[str,int])->int:
|
||||||
"""
|
"""
|
||||||
Get the id of a book based on the metadata of the book
|
Get the id of a book based on the metadata of the book
|
||||||
|
|
||||||
@@ -280,7 +274,7 @@ class Database:
|
|||||||
BookData: The metadata of the book wrapped in a BookData object
|
BookData: The metadata of the book wrapped in a BookData object
|
||||||
"""
|
"""
|
||||||
return load_pickle(self.query_db("SELECT bookdata FROM media WHERE id=?", (book_id,), one=True)[0])
|
return load_pickle(self.query_db("SELECT bookdata FROM media WHERE id=?", (book_id,), one=True)[0])
|
||||||
def getBooks(self, app_id, prof_id, deleted=0)->list[dict[int, BookData, int]]:
|
def getBooks(self, app_id:Union[str,int], prof_id:Union[str,int], deleted=0)->list[dict[int, BookData, int]]:
|
||||||
"""
|
"""
|
||||||
Get the Books based on the apparat id and the professor id
|
Get the Books based on the apparat id and the professor id
|
||||||
|
|
||||||
@@ -301,7 +295,6 @@ class Database:
|
|||||||
data["available"] = result_a[2]
|
data["available"] = result_a[2]
|
||||||
ret_result.append(data)
|
ret_result.append(data)
|
||||||
return ret_result
|
return ret_result
|
||||||
|
|
||||||
def updateBookdata(self, book_id, bookdata:BookData):
|
def updateBookdata(self, book_id, bookdata:BookData):
|
||||||
"""
|
"""
|
||||||
Update the bookdata in the database
|
Update the bookdata in the database
|
||||||
@@ -321,7 +314,7 @@ class Database:
|
|||||||
self.query_db("UPDATE media SET deleted=1 WHERE id=?", (book_id,))
|
self.query_db("UPDATE media SET deleted=1 WHERE id=?", (book_id,))
|
||||||
|
|
||||||
# File Interactions
|
# File Interactions
|
||||||
def getBlob(self, filename, app_id):
|
def getBlob(self, filename, app_id:Union[str,int]):
|
||||||
"""
|
"""
|
||||||
Get a blob from the database
|
Get a blob from the database
|
||||||
|
|
||||||
@@ -333,7 +326,15 @@ class Database:
|
|||||||
bytes: The file stored in
|
bytes: The file stored in
|
||||||
"""
|
"""
|
||||||
return self.query_db("SELECT fileblob FROM files WHERE filename=? AND app_id=?", (filename,app_id), one=True)[0]
|
return self.query_db("SELECT fileblob FROM files WHERE filename=? AND app_id=?", (filename,app_id), one=True)[0]
|
||||||
def insertFile(self, file: list[dict], app_id: int, prof_id):
|
def insertFile(self, file: list[dict], app_id:Union[str,int], prof_id:Union[str,int]):
|
||||||
|
"""Instert a list of files into the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
file (list[dict]): a list containing all the files to be inserted
|
||||||
|
Structured: [{"name": "filename", "path": "path", "type": "filetype"}]
|
||||||
|
app_id (int): the id of the apparat
|
||||||
|
prof_id (str): the id of the professor
|
||||||
|
"""
|
||||||
for f in file:
|
for f in file:
|
||||||
filename = f["name"]
|
filename = f["name"]
|
||||||
path = f["path"]
|
path = f["path"]
|
||||||
@@ -343,7 +344,17 @@ class Database:
|
|||||||
blob = create_blob(path)
|
blob = create_blob(path)
|
||||||
query = "INSERT OR IGNORE INTO files (filename, fileblob, app_id, filetyp,prof_id) VALUES (?, ?, ?, ?,?)"
|
query = "INSERT OR IGNORE INTO files (filename, fileblob, app_id, filetyp,prof_id) VALUES (?, ?, ?, ?,?)"
|
||||||
self.query_db(query, (filename, blob, app_id, filetyp,prof_id))
|
self.query_db(query, (filename, blob, app_id, filetyp,prof_id))
|
||||||
def recreateFile(self, filename, app_id,filetype):
|
def recreateFile(self, filename:str, app_id:Union[str,int],filetype:str)->str:
|
||||||
|
"""Recreate a file from the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
filename (str): the name of the file
|
||||||
|
app_id (Union[str,int]): the id of the apparat
|
||||||
|
filetype (str): the extension of the file to be created
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: The filename of the recreated file
|
||||||
|
"""
|
||||||
blob = self.getBlob(filename, app_id)
|
blob = self.getBlob(filename, app_id)
|
||||||
tempdir = config.database.tempdir
|
tempdir = config.database.tempdir
|
||||||
tempdir = tempdir.replace("~", str(Path.home()))
|
tempdir = tempdir.replace("~", str(Path.home()))
|
||||||
@@ -356,23 +367,57 @@ class Database:
|
|||||||
file.write(blob)
|
file.write(blob)
|
||||||
print("file created")
|
print("file created")
|
||||||
return file.name
|
return file.name
|
||||||
def getFiles(self, app_id:int, prof_id:int)->list[tuple]:
|
def getFiles(self, app_id:Union[str,int], prof_id:int)->list[tuple]:
|
||||||
|
"""Get all the files associated with the apparat and the professor
|
||||||
|
|
||||||
|
Args:
|
||||||
|
app_id (Union[str,int]): The id of the apparat
|
||||||
|
prof_id (Union[str,int]): the id of the professor
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list[tuple]: a list of tuples containing the filename and the filetype for the corresponding apparat and professor
|
||||||
|
"""
|
||||||
return self.query_db("SELECT filename, filetyp FROM files WHERE app_id=? AND prof_id=?", (app_id,prof_id))
|
return self.query_db("SELECT filename, filetyp FROM files WHERE app_id=? AND prof_id=?", (app_id,prof_id))
|
||||||
|
|
||||||
def getSemersters(self):
|
def getSemersters(self)->list[str]:
|
||||||
|
"""Return all the unique semesters in the database
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list: a list of strings containing the semesters
|
||||||
|
"""
|
||||||
data = self.query_db("SELECT DISTINCT erstellsemester FROM semesterapparat")
|
data = self.query_db("SELECT DISTINCT erstellsemester FROM semesterapparat")
|
||||||
return [i[0] for i in data]
|
return [i[0] for i in data]
|
||||||
|
|
||||||
def getSubjects(self):
|
def getSubjects(self):
|
||||||
|
"""Get all the subjects in the database
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list[tuple]: a list of tuples containing the subjects
|
||||||
|
"""
|
||||||
return self.query_db("SELECT * FROM subjects")
|
return self.query_db("SELECT * FROM subjects")
|
||||||
|
|
||||||
# Messages
|
# Messages
|
||||||
def addMessage(self, message:dict,user, appnr):
|
def addMessage(self, message:dict,user:str, app_id:Union[str,int]):
|
||||||
|
"""add a Message to the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
message (dict): the message to be added
|
||||||
|
user (str): the user who added the message
|
||||||
|
app_id (Union[str,int]): the id of the apparat
|
||||||
|
"""
|
||||||
def __getUserId(user):
|
def __getUserId(user):
|
||||||
return self.query_db("SELECT id FROM user WHERE username=?", (user,), one=True)[0]
|
return self.query_db("SELECT id FROM user WHERE username=?", (user,), one=True)[0]
|
||||||
user_id = __getUserId(user)
|
user_id = __getUserId(user)
|
||||||
self.query_db("INSERT INTO messages (message, user_id, remind_at,appnr) VALUES (?,?,?,?)", (message["message"],user_id,message["remind_at"],appnr))
|
self.query_db("INSERT INTO messages (message, user_id, remind_at,appnr) VALUES (?,?,?,?)", (message["message"],user_id,message["remind_at"],app_id))
|
||||||
def getMessages(self, date:str):
|
def getMessages(self, date:str)->list[dict[str, str, str, str]]:
|
||||||
|
"""Get all the messages for a specific date
|
||||||
|
|
||||||
|
Args:
|
||||||
|
date (str): a date.datetime object formatted as a string in the format "YYYY-MM-DD"
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list[dict[str, str, str, str]]: a list of dictionaries containing the message, the user who added the message, the apparat id and the id of the message
|
||||||
|
"""
|
||||||
def __get_user_name(user_id):
|
def __get_user_name(user_id):
|
||||||
return self.query_db("SELECT username FROM user WHERE id=?", (user_id,), one=True)[0]
|
return self.query_db("SELECT username FROM user WHERE id=?", (user_id,), one=True)[0]
|
||||||
messages = self.query_db("SELECT * FROM messages WHERE remind_at=?", (date,))
|
messages = self.query_db("SELECT * FROM messages WHERE remind_at=?", (date,))
|
||||||
@@ -387,48 +432,74 @@ class Database:
|
|||||||
]
|
]
|
||||||
return ret
|
return ret
|
||||||
def deleteMessage(self, message_id):
|
def deleteMessage(self, message_id):
|
||||||
|
"""Delete a message from the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
message_id (str): the id of the message
|
||||||
|
"""
|
||||||
self.query_db("DELETE FROM messages WHERE id=?", (message_id,))
|
self.query_db("DELETE FROM messages WHERE id=?", (message_id,))
|
||||||
|
|
||||||
# Prof data
|
# Prof data
|
||||||
def getProfNameById(self, prof_id:int,add_title:bool=False):
|
def getProfNameById(self, prof_id:Union[str,int],add_title:bool=False)->str:
|
||||||
|
"""Get a professor name based on the id
|
||||||
|
|
||||||
|
Args:
|
||||||
|
prof_id (Union[str,int]): The id of the professor
|
||||||
|
add_title (bool, optional): wether to add the title or no. Defaults to False.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: The name of the professor
|
||||||
|
"""
|
||||||
prof = self.query_db("SELECT fullname FROM prof WHERE id=?", (prof_id,), one=True)
|
prof = self.query_db("SELECT fullname FROM prof WHERE id=?", (prof_id,), one=True)
|
||||||
if add_title:
|
if add_title:
|
||||||
return f"{self.getTitleById(prof_id)}{prof[0]}"
|
return f"{self.getTitleById(prof_id)}{prof[0]}"
|
||||||
else:
|
else:
|
||||||
return prof[0]
|
return prof[0]
|
||||||
def getTitleById(self, prof_id:int):
|
def getTitleById(self, prof_id:Union[str,int])->str:
|
||||||
|
"""get the title of a professor based on the id
|
||||||
|
|
||||||
|
Args:
|
||||||
|
prof_id (Union[str,int]): the id of the professor
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: the title of the professor, with an added whitespace at the end, if no title is present, an empty string is returned
|
||||||
|
"""
|
||||||
title = self.query_db("SELECT titel FROM prof WHERE id=?", (prof_id,), one=True)[0]
|
title = self.query_db("SELECT titel FROM prof WHERE id=?", (prof_id,), one=True)[0]
|
||||||
return f"{title} " if title is not None else ""
|
return f"{title} " if title is not None else ""
|
||||||
def getProfByName(self, prof_name:str):
|
def getProfByName(self, prof_name:str)->tuple:
|
||||||
return self.query_db("SELECT * FROM prof WHERE fullname=?", (prof_name,), one=True)
|
"""get all the data of a professor based on the name
|
||||||
def getProfId(self, prof_name:str):
|
|
||||||
"""
|
|
||||||
getProfId _summary_
|
|
||||||
|
|
||||||
:param prof_name: _description_
|
Args:
|
||||||
:type prof_name: str
|
prof_name (str): the name of the professor
|
||||||
:return: _description_
|
|
||||||
:rtype: _type_
|
Returns:
|
||||||
|
tuple: the data of the professor
|
||||||
"""
|
"""
|
||||||
|
return self.query_db("SELECT * FROM prof WHERE fullname=?", (prof_name,), one=True)
|
||||||
|
def getProfId(self, prof_name:str)->Optional[int]:
|
||||||
|
"""Get the id of a professor based on the name
|
||||||
|
|
||||||
|
Args:
|
||||||
|
prof_name (str): the name of the professor
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Optional[int]: the id of the professor, if the professor is not found, None is returned
|
||||||
|
"""
|
||||||
|
|
||||||
data = self.getProfByName(prof_name.replace(",", ""))
|
data = self.getProfByName(prof_name.replace(",", ""))
|
||||||
if data is None:
|
if data is None:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
return data[0]
|
return data[0]
|
||||||
def getSpecificProfData(self, prof_id:int, fields:List[str]):
|
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
|
||||||
getSpecificProfData _summary_
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
----
|
prof_id (Union[str,int]): the id of the professor
|
||||||
- prof_id (int): _description_
|
fields (List[str]): a list of fields to be returned
|
||||||
- fields (List[str]): _description_
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
-------
|
tuple: a tuple containing the requested data
|
||||||
- _type_: _description_
|
|
||||||
"""
|
"""
|
||||||
query = "SELECT "
|
query = "SELECT "
|
||||||
for field in fields:
|
for field in fields:
|
||||||
@@ -437,10 +508,22 @@ class Database:
|
|||||||
query += " FROM prof WHERE id=?"
|
query += " FROM prof WHERE id=?"
|
||||||
return self.query_db(query, (prof_id,), one=True)[0]
|
return self.query_db(query, (prof_id,), one=True)[0]
|
||||||
def getProfData(self, profname:str):
|
def getProfData(self, profname:str):
|
||||||
|
"""Get mail, telephone number and title of a professor based on the name
|
||||||
|
|
||||||
|
Args:
|
||||||
|
profname (str): name of the professor
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
tuple: the mail, telephone number and title of the professor
|
||||||
|
"""
|
||||||
data = self.query_db("SELECT mail, telnr, titel FROM prof WHERE fullname=?", (profname.replace(",",""),), one=True)
|
data = self.query_db("SELECT mail, telnr, titel FROM prof WHERE fullname=?", (profname.replace(",",""),), one=True)
|
||||||
return data
|
return data
|
||||||
def createProf(self, prof_details:dict):
|
def createProf(self, prof_details:dict):
|
||||||
|
"""Create a professor in the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
prof_details (dict): a dictionary containing the details of the professor
|
||||||
|
"""
|
||||||
prof_title = prof_details["prof_title"]
|
prof_title = prof_details["prof_title"]
|
||||||
prof_fname = prof_details["profname"].split(",")[1]
|
prof_fname = prof_details["profname"].split(",")[1]
|
||||||
prof_fname = prof_fname.strip()
|
prof_fname = prof_fname.strip()
|
||||||
@@ -452,14 +535,38 @@ class Database:
|
|||||||
params = (prof_title, prof_fname, prof_lname, prof_mail, prof_tel, prof_fullname)
|
params = (prof_title, prof_fname, prof_lname, prof_mail, prof_tel, prof_fullname)
|
||||||
query = "INSERT OR IGNORE INTO prof (titel, fname, lname, mail, telnr, fullname) VALUES (?, ?, ?, ?, ?, ?)"
|
query = "INSERT OR IGNORE INTO prof (titel, fname, lname, mail, telnr, fullname) VALUES (?, ?, ?, ?, ?, ?)"
|
||||||
self.insertInto(query=query, params=params)
|
self.insertInto(query=query, params=params)
|
||||||
def getProfs(self):
|
def getProfs(self)->list[tuple]:
|
||||||
|
"""Return all the professors in the database
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list[tuple]: a list containing all the professors in individual tuples
|
||||||
|
"""
|
||||||
return self.query_db("SELECT * FROM prof")
|
return self.query_db("SELECT * FROM prof")
|
||||||
|
|
||||||
# Apparat
|
# Apparat
|
||||||
def getAllAparats(self,deleted=0):
|
def getAllAparats(self,deleted=0)->list[tuple]:
|
||||||
|
"""Get all the apparats in the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
deleted (int, optional): Switch the result to use . Defaults to 0.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list[tuple]: a list of tuples containing the apparats
|
||||||
|
"""
|
||||||
return self.query_db("SELECT * FROM semesterapparat WHERE deletion_status=?", (deleted,))
|
return self.query_db("SELECT * FROM semesterapparat WHERE deletion_status=?", (deleted,))
|
||||||
def getApparatData(self, appnr, appname)->ApparatData:
|
def getApparatData(self, appnr, appname)->ApparatData:
|
||||||
|
"""Get the Apparat data based on the apparat number and the name
|
||||||
|
|
||||||
|
Args:
|
||||||
|
appnr (str): the apparat number
|
||||||
|
appname (str): the name of the apparat
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
NoResultError: an error is raised if no result is found
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
ApparatData: the appended data of the apparat wrapped in an ApparatData object
|
||||||
|
"""
|
||||||
result = self.query_db("SELECT * FROM semesterapparat WHERE appnr=? AND name=?", (appnr,appname), one=True)
|
result = self.query_db("SELECT * FROM semesterapparat WHERE appnr=? AND name=?", (appnr,appname), one=True)
|
||||||
if result is None:
|
if result is None:
|
||||||
raise NoResultError("No result found")
|
raise NoResultError("No result found")
|
||||||
@@ -480,36 +587,59 @@ class Database:
|
|||||||
apparat.prof_adis_id = result[12]
|
apparat.prof_adis_id = result[12]
|
||||||
return apparat
|
return apparat
|
||||||
def getUnavailableApparatNumbers(self)->List[int]:
|
def getUnavailableApparatNumbers(self)->List[int]:
|
||||||
"""
|
"""Get a list of all the apparat numbers in the database that are currently in use
|
||||||
getUnavailableApparatNumbers returns a list of all currently used ApparatNumbers
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
-------
|
List[int]: the list of used apparat numbers
|
||||||
- number(List[int]): a list of all currently used apparat numbers
|
|
||||||
"""
|
"""
|
||||||
numbers = self.query_db("SELECT appnr FROM semesterapparat WHERE deletion_status=0")
|
numbers = self.query_db("SELECT appnr FROM semesterapparat WHERE deletion_status=0")
|
||||||
numbers = [i[0] for i in numbers]
|
numbers = [i[0] for i in numbers]
|
||||||
logger.log_info(f"Currently used apparat numbers: {numbers}")
|
logger.log_info(f"Currently used apparat numbers: {numbers}")
|
||||||
return numbers
|
return numbers
|
||||||
def setNewSemesterDate(self, appnr, newDate, dauerapp=False):
|
def setNewSemesterDate(self, app_id:Union[str,int], newDate, dauerapp=False):
|
||||||
|
"""Set the new semester date for an apparat
|
||||||
|
|
||||||
|
Args:
|
||||||
|
app_id (Union[str,int]): the id of the apparat
|
||||||
|
newDate (str): the new date
|
||||||
|
dauerapp (bool, optional): if the apparat was changed to dauerapparat. Defaults to False.
|
||||||
|
"""
|
||||||
date = datetime.datetime.strptime(newDate, "%d.%m.%Y").strftime("%Y-%m-%d")
|
date = datetime.datetime.strptime(newDate, "%d.%m.%Y").strftime("%Y-%m-%d")
|
||||||
if dauerapp:
|
if dauerapp:
|
||||||
self.query_db("UPDATE semesterapparat SET verlängerung_bis=?, dauerapp=? WHERE appnr=?", (date,dauerapp,appnr))
|
self.query_db("UPDATE semesterapparat SET verlängerung_bis=?, dauerapp=? WHERE appnr=?", (date,dauerapp,app_id))
|
||||||
else:
|
else:
|
||||||
self.query_db("UPDATE semesterapparat SET endsemester=? WHERE appnr=?", (date,appnr))
|
self.query_db("UPDATE semesterapparat SET endsemester=? WHERE appnr=?", (date,app_id))
|
||||||
def getApparatId(self, apparat_name):
|
def getApparatId(self, apparat_name)->Optional[int]:
|
||||||
|
"""get the id of an apparat based on the name
|
||||||
|
|
||||||
|
Args:
|
||||||
|
apparat_name (str): the name of the apparat e.g. "Semesterapparat 1"
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Optional[int]: the id of the apparat, if the apparat is not found, None is returned
|
||||||
|
"""
|
||||||
data = self.query_db("SELECT appnr FROM semesterapparat WHERE name=?", (apparat_name,), one=True)
|
data = self.query_db("SELECT appnr FROM semesterapparat WHERE name=?", (apparat_name,), one=True)
|
||||||
if data is None:
|
if data is None:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
return data[0]
|
return data[0]
|
||||||
def createApparat(self, apparat:ApparatData)->Optional[AppPresentError]|int:
|
def createApparat(self, apparat:ApparatData)->int:
|
||||||
|
"""create the apparat in the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
apparat (ApparatData): the wrapped metadata of the apparat
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
AppPresentError: an error describing that the apparats chosen id is already present in the database
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Optional[int]: the id of the apparat
|
||||||
|
"""
|
||||||
|
|
||||||
prof_id = self.getProfId(apparat.profname)
|
prof_id = self.getProfId(apparat.profname)
|
||||||
app_id = self.getApparatId(apparat.appname)
|
app_id = self.getApparatId(apparat.appname)
|
||||||
if app_id:
|
if app_id:
|
||||||
return AppPresentError(app_id)
|
raise AppPresentError(app_id)
|
||||||
|
|
||||||
self.createProf(apparat.get_prof_details())
|
self.createProf(apparat.get_prof_details())
|
||||||
prof_id = self.getProfId(apparat.profname)
|
prof_id = self.getProfId(apparat.profname)
|
||||||
@@ -518,9 +648,25 @@ class Database:
|
|||||||
logger.log_info(query)
|
logger.log_info(query)
|
||||||
self.query_db(query)
|
self.query_db(query)
|
||||||
return self.getApparatId(apparat.appname)
|
return self.getApparatId(apparat.appname)
|
||||||
def getApparatsByProf(self, prof_id:int)->list[tuple]:
|
def getApparatsByProf(self, prof_id:Union[str,int])->list[tuple]:
|
||||||
|
"""Get all apparats based on the professor id
|
||||||
|
|
||||||
|
Args:
|
||||||
|
prof_id (Union[str,int]): the id of the professor
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list[tuple]: a list of tuples containing the apparats
|
||||||
|
"""
|
||||||
return self.query_db("SELECT * FROM semesterapparat WHERE prof_id=?", (prof_id,))
|
return self.query_db("SELECT * FROM semesterapparat WHERE prof_id=?", (prof_id,))
|
||||||
def getApparatsBySemester(self, semester:str)->dict:
|
def getApparatsBySemester(self, semester:str)->dict[list]:
|
||||||
|
"""get all apparats based on the semester
|
||||||
|
|
||||||
|
Args:
|
||||||
|
semester (str): the selected semester
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
dict[list]: a list off all created and deleted apparats for the selected semester
|
||||||
|
"""
|
||||||
data = self.query_db("SELECT name, prof_id FROM semesterapparat WHERE erstellsemester=?", (semester,))
|
data = self.query_db("SELECT name, prof_id FROM semesterapparat WHERE erstellsemester=?", (semester,))
|
||||||
conn = self.connect()
|
conn = self.connect()
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
@@ -550,6 +696,11 @@ class Database:
|
|||||||
self.close_connection(conn)
|
self.close_connection(conn)
|
||||||
return {"created": c_ret, "deleted": d_ret}
|
return {"created": c_ret, "deleted": d_ret}
|
||||||
def getApparatCountBySemester(self)->tuple[list[str],list[int]]:
|
def getApparatCountBySemester(self)->tuple[list[str],list[int]]:
|
||||||
|
"""get a list of all apparats created and deleted by semester
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
tuple[list[str],list[int]]: a tuple containing two lists, the first list contains the semesters, the second list contains the amount of apparats created and deleted for the corresponding semester
|
||||||
|
"""
|
||||||
conn = self.connect()
|
conn = self.connect()
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
semesters = self.getSemersters()
|
semesters = self.getSemersters()
|
||||||
@@ -574,13 +725,41 @@ class Database:
|
|||||||
ret.append(e_tuple)
|
ret.append(e_tuple)
|
||||||
self.close_connection(conn)
|
self.close_connection(conn)
|
||||||
return ret
|
return ret
|
||||||
def deleteApparat(self, appnr, semester):
|
def deleteApparat(self, app_id:Union[str,int], semester:str):
|
||||||
self.query_db("UPDATE semesterapparat SET deletion_status=1, deleted_date=? WHERE appnr=?", (semester,appnr))
|
"""Delete an apparat from the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
app_id (Union[str, int]): the id of the apparat
|
||||||
|
semester (str): the semester the apparat should be deleted from
|
||||||
|
"""
|
||||||
|
self.query_db("UPDATE semesterapparat SET deletion_status=1, deleted_date=? WHERE appnr=?", (semester,app_id))
|
||||||
def isEternal(self, id):
|
def isEternal(self, id):
|
||||||
|
"""check if the apparat is eternal (dauerapparat)
|
||||||
|
|
||||||
|
Args:
|
||||||
|
id (int): the id of the apparat to be checked
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
int: the state of the apparat
|
||||||
|
"""
|
||||||
return self.query_db("SELECT dauer FROM semesterapparat WHERE appnr=?", (id,), one=True)
|
return self.query_db("SELECT dauer FROM semesterapparat WHERE appnr=?", (id,), one=True)
|
||||||
def getApparatName(self, app_id, prof_id):
|
def getApparatName(self, app_id:Union[str,int], prof_id:Union[str,int]):
|
||||||
|
"""get the name of the apparat based on the id
|
||||||
|
|
||||||
|
Args:
|
||||||
|
app_id (Union[str,int]): the id of the apparat
|
||||||
|
prof_id (Union[str,int]): the id of the professor
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: the name of the apparat
|
||||||
|
"""
|
||||||
return self.query_db("SELECT name FROM semesterapparat WHERE appnr=? AND prof_id=?", (app_id,prof_id), one=True)[0]
|
return self.query_db("SELECT name FROM semesterapparat WHERE appnr=? AND prof_id=?", (app_id,prof_id), one=True)[0]
|
||||||
def updateApparat(self, apparat_data:ApparatData):
|
def updateApparat(self, apparat_data:ApparatData):
|
||||||
|
"""Update an apparat in the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
apparat_data (ApparatData): the new metadata of the apparat
|
||||||
|
"""
|
||||||
query = f"UPDATE semesterapparat SET name = ?, fach = ?, dauer = ?, prof_id = ? WHERE appnr = ?"
|
query = f"UPDATE semesterapparat SET name = ?, fach = ?, dauer = ?, prof_id = ? WHERE appnr = ?"
|
||||||
params = (
|
params = (
|
||||||
apparat_data.appname,
|
apparat_data.appname,
|
||||||
@@ -590,13 +769,39 @@ class Database:
|
|||||||
apparat_data.appnr,
|
apparat_data.appnr,
|
||||||
)
|
)
|
||||||
self.query_db(query, params)
|
self.query_db(query, params)
|
||||||
def checkApparatExists(self, apparat_name):
|
def checkApparatExists(self, apparat_name:str):
|
||||||
|
"""check if the apparat is already present in the database based on the name
|
||||||
|
|
||||||
|
Args:
|
||||||
|
apparat_name (str): the name of the apparat
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
bool: True if the apparat is present, False if not
|
||||||
|
"""
|
||||||
return True if self.query_db("SELECT appnr FROM semesterapparat WHERE name=?", (apparat_name,), one=True) else False
|
return True if self.query_db("SELECT appnr FROM semesterapparat WHERE name=?", (apparat_name,), one=True) else False
|
||||||
def checkApparatExistsById(self, apparat_id):
|
def checkApparatExistsById(self, app_id:Union[str,int])->bool:
|
||||||
return True if self.query_db("SELECT appnr FROM semesterapparat WHERE appnr=?", (apparat_id,), one=True) else False
|
"""a check to see if the apparat is already present in the database, based on the id
|
||||||
|
|
||||||
|
Args:
|
||||||
|
app_id (Union[str, int]): the id of the apparat
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
bool: True if the apparat is present, False if not
|
||||||
|
"""
|
||||||
|
return True if self.query_db("SELECT appnr FROM semesterapparat WHERE appnr=?", (app_id,), one=True) else False
|
||||||
# Statistics
|
# Statistics
|
||||||
def statistic_request(self, **kwargs: Any):
|
def statistic_request(self, **kwargs: Any):
|
||||||
|
"""Take n amount of kwargs and return the result of the query
|
||||||
|
"""
|
||||||
def __query(query):
|
def __query(query):
|
||||||
|
"""execute the query and return the result
|
||||||
|
|
||||||
|
Args:
|
||||||
|
query (str): the constructed query
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list: the result of the query
|
||||||
|
"""
|
||||||
conn = self.connect()
|
conn = self.connect()
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
result = cursor.execute(query).fetchall()
|
result = cursor.execute(query).fetchall()
|
||||||
@@ -647,11 +852,23 @@ class Database:
|
|||||||
|
|
||||||
# Admin data
|
# Admin data
|
||||||
def getUser(self):
|
def getUser(self):
|
||||||
|
"""Get a single user from the database"""
|
||||||
return self.query_db("SELECT * FROM user", one=True)
|
return self.query_db("SELECT * FROM user", one=True)
|
||||||
def getUsers(self):
|
def getUsers(self)->list[tuple]:
|
||||||
|
"""Return a list of tuples of all the users in the database"""
|
||||||
return self.query_db("SELECT * FROM user")
|
return self.query_db("SELECT * FROM user")
|
||||||
|
|
||||||
def login(self, user, hashed_password):
|
def login(self, user, hashed_password):
|
||||||
|
"""try to login the user.
|
||||||
|
The salt for the user will be requested from the database and then added to the hashed password. The password will then be compared to the password in the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
user (str): username that tries to login
|
||||||
|
hashed_password (str): the password the user tries to login with
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
bool: True if the login was successful, False if not
|
||||||
|
"""
|
||||||
salt = self.query_db("SELECT salt FROM user WHERE username=?", (user,), one=True)[0]
|
salt = self.query_db("SELECT salt FROM user WHERE username=?", (user,), one=True)[0]
|
||||||
if salt is None:
|
if salt is None:
|
||||||
return False
|
return False
|
||||||
@@ -662,30 +879,68 @@ class Database:
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
def changePassword(self, user, new_password):
|
def changePassword(self, user, new_password):
|
||||||
|
"""change the password of a user.
|
||||||
|
The password will be added with the salt and then committed to the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
user (str): username
|
||||||
|
new_password (str): the hashed password
|
||||||
|
"""
|
||||||
salt = self.query_db("SELECT salt FROM user WHERE username=?", (user,), one=True)[0]
|
salt = self.query_db("SELECT salt FROM user WHERE username=?", (user,), one=True)[0]
|
||||||
new_password = salt + new_password
|
new_password = salt + new_password
|
||||||
self.query_db("UPDATE user SET password=? WHERE username=?", (new_password,user))
|
self.query_db("UPDATE user SET password=? WHERE username=?", (new_password,user))
|
||||||
def getRole(self, user):
|
def getRole(self, user):
|
||||||
|
"""get the role of the user
|
||||||
|
|
||||||
|
Args:
|
||||||
|
user (str): username
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: the name of the role
|
||||||
|
"""
|
||||||
return self.query_db("SELECT role FROM user WHERE username=?", (user,), one=True)[0]
|
return self.query_db("SELECT role FROM user WHERE username=?", (user,), one=True)[0]
|
||||||
def getRoles(self):
|
def getRoles(self)->list[tuple]:
|
||||||
|
"""get all the roles in the database
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list[str]: a list of all the roles
|
||||||
|
"""
|
||||||
return self.query_db("SELECT role FROM user")
|
return self.query_db("SELECT role FROM user")
|
||||||
def checkUsername(self, user):
|
def checkUsername(self, user)->bool:
|
||||||
|
"""a check to see if the username is already present in the database
|
||||||
|
|
||||||
|
Args:
|
||||||
|
user (str): the username
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
bool: True if the username is present, False if not
|
||||||
|
"""
|
||||||
data = self.query_db("SELECT username FROM user WHERE username=?", (user,), one=True)
|
data = self.query_db("SELECT username FROM user WHERE username=?", (user,), one=True)
|
||||||
return True if data is not None else False
|
return True if data is not None else False
|
||||||
def createUser(self, user, password, role, salt):
|
def createUser(self, user, password, role, salt):
|
||||||
"""Create a user based on passed data.
|
"""create an user from the AdminCommands class.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
----
|
user (str): the username of the user
|
||||||
- username (str): Username to be used
|
password (str): a hashed password
|
||||||
- password (str): the salted password
|
role (str): the role of the user
|
||||||
- role (str): Role of the user
|
salt (str): a salt for the password
|
||||||
- salt (str): a random salt for the user
|
|
||||||
"""
|
"""
|
||||||
self.query_db("INSERT OR IGNORE INTO user (username, password, role, salt) VALUES (?,?,?,?)", (user,password,role,salt))
|
self.query_db("INSERT OR IGNORE INTO user (username, password, role, salt) VALUES (?,?,?,?)", (user,password,role,salt))
|
||||||
def deleteUser(self, user):
|
def deleteUser(self, user):
|
||||||
|
"""delete an unser
|
||||||
|
|
||||||
|
Args:
|
||||||
|
user (str): username of the user
|
||||||
|
"""
|
||||||
self.query_db("DELETE FROM user WHERE username=?", (user,))
|
self.query_db("DELETE FROM user WHERE username=?", (user,))
|
||||||
def updateUser(self, username, data:dict[str, str]):
|
def updateUser(self, username, data:dict[str, str]):
|
||||||
|
"""changge the data of a user
|
||||||
|
|
||||||
|
Args:
|
||||||
|
username (str): the username of the user
|
||||||
|
data (dict[str, str]): the data to be changed
|
||||||
|
"""
|
||||||
conn = self.connect()
|
conn = self.connect()
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
query = "UPDATE user SET "
|
query = "UPDATE user SET "
|
||||||
@@ -699,13 +954,33 @@ class Database:
|
|||||||
cursor.execute(query, params)
|
cursor.execute(query, params)
|
||||||
conn.commit()
|
conn.commit()
|
||||||
self.close_connection(conn)
|
self.close_connection(conn)
|
||||||
def getFacultyMember(self, name:str):
|
def getFacultyMember(self, name:str)->tuple:
|
||||||
|
"""get a faculty member based on the name
|
||||||
|
|
||||||
|
Args:
|
||||||
|
name (str): the name to be searched for
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
tuple: a tuple containing the data of the faculty member
|
||||||
|
"""
|
||||||
return self.query_db("SELECT titel, fname,lname,mail,telnr,fullname FROM prof WHERE fullname=?", (name,), one=True)
|
return self.query_db("SELECT titel, fname,lname,mail,telnr,fullname FROM prof WHERE fullname=?", (name,), one=True)
|
||||||
def updateFacultyMember(self, data, oldlname, oldfname):
|
def updateFacultyMember(self, data:dict, oldlname:str, oldfname:str):
|
||||||
|
"""update the data of a faculty member
|
||||||
|
|
||||||
|
Args:
|
||||||
|
data (dict): a dictionary containing the data to be updated
|
||||||
|
oldlname (str): the old last name of the faculty member
|
||||||
|
oldfname (str): the old first name of the faculty member
|
||||||
|
"""
|
||||||
placeholders = ", ".join([f"{i}=:{i} " for i in data.keys()])
|
placeholders = ", ".join([f"{i}=:{i} " for i in data.keys()])
|
||||||
query = f"UPDATE prof SET {placeholders} WHERE lname = :oldlname AND fname = :oldfname"
|
query = f"UPDATE prof SET {placeholders} WHERE lname = :oldlname AND fname = :oldfname"
|
||||||
data["oldlname"] = oldlname
|
data["oldlname"] = oldlname
|
||||||
data["oldfname"] = oldfname
|
data["oldfname"] = oldfname
|
||||||
self.query_db(query, data)
|
self.query_db(query, data)
|
||||||
def getFacultyMembers(self):
|
def getFacultyMembers(self):
|
||||||
|
"""get a list of all faculty members
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list[tuple]: a list of tuples containing the faculty members
|
||||||
|
"""
|
||||||
return self.query_db("SELECT titel, fname,lname,mail,telnr,fullname FROM prof")
|
return self.query_db("SELECT titel, fname,lname,mail,telnr,fullname FROM prof")
|
||||||
|
|||||||
@@ -24,21 +24,18 @@ from src.ui import (
|
|||||||
FilePicker,
|
FilePicker,
|
||||||
GraphWidget,
|
GraphWidget,
|
||||||
Mail_Dialog,
|
Mail_Dialog,
|
||||||
Message_Widget,
|
|
||||||
Settings,
|
|
||||||
StatusWidget,
|
StatusWidget,
|
||||||
Ui_Semesterapparat,
|
Ui_Semesterapparat,
|
||||||
edit_bookdata_ui,
|
edit_bookdata_ui,
|
||||||
fileparser_ui,
|
|
||||||
login_ui,
|
login_ui,
|
||||||
medienadder_ui,
|
medienadder_ui,
|
||||||
parsed_titles_ui,
|
parsed_titles_ui,
|
||||||
popus_confirm,
|
popus_confirm,
|
||||||
reminder_ui,
|
reminder_ui,
|
||||||
settings_ui,
|
settings_ui,
|
||||||
new_subject_ui,
|
|
||||||
)
|
)
|
||||||
# from src.logic.webrequest import BibTextTransformer, WebRequest
|
# from src.logic.webrequest import BibTextTransformer, WebRequest
|
||||||
|
from src.utils import documentationview
|
||||||
from src.backend.admin_console import AdminCommands
|
from src.backend.admin_console import AdminCommands
|
||||||
from src.backend.semester import generateSemesterByDate
|
from src.backend.semester import generateSemesterByDate
|
||||||
from src.backend.create_file import recreateFile
|
from src.backend.create_file import recreateFile
|
||||||
@@ -171,6 +168,9 @@ class Ui(Ui_Semesterapparat):
|
|||||||
self.tableWidget_apparate.setSortingEnabled(True)
|
self.tableWidget_apparate.setSortingEnabled(True)
|
||||||
# self.tableWidget_apparate.text
|
# self.tableWidget_apparate.text
|
||||||
self.actionEinstellungen.triggered.connect(self.open_settings)
|
self.actionEinstellungen.triggered.connect(self.open_settings)
|
||||||
|
#if help>documentation is clicked, open the documentation or shortcut is pressed
|
||||||
|
self.actionDokumentation.triggered.connect(self.open_documentation)
|
||||||
|
|
||||||
# set validators
|
# set validators
|
||||||
self.sem_year.setText(str(QtCore.QDate.currentDate().year()))
|
self.sem_year.setText(str(QtCore.QDate.currentDate().year()))
|
||||||
self.prof_mail.setValidator(
|
self.prof_mail.setValidator(
|
||||||
@@ -307,6 +307,10 @@ class Ui(Ui_Semesterapparat):
|
|||||||
self.app_fach.setCurrentText("")
|
self.app_fach.setCurrentText("")
|
||||||
self.app_fach.addItems([subject[1] for subject in self.db.getSubjects()])
|
self.app_fach.addItems([subject[1] for subject in self.db.getSubjects()])
|
||||||
|
|
||||||
|
def open_documentation(self):
|
||||||
|
documentation = documentationview.DocumentationViewer()
|
||||||
|
documentation.show()
|
||||||
|
|
||||||
def tabW1_changed(self):
|
def tabW1_changed(self):
|
||||||
if self.tabWidget.currentIndex() == 1:
|
if self.tabWidget.currentIndex() == 1:
|
||||||
# self.tabWidget.setCurrentIndex(1)
|
# self.tabWidget.setCurrentIndex(1)
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\semesterapparat_ui.ui'
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file '/home/alexander/GitHub/SemesterapparatsManager/src/ui/semesterapparat_ui.ui'
|
||||||
#
|
#
|
||||||
# Created by: PyQt6 UI code generator 6.3.1
|
# Created by: PyQt6 UI code generator 5.15.10
|
||||||
#
|
#
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
# run again. Do not edit this file unless you know what you are doing.
|
||||||
|
|
||||||
|
|
||||||
@@ -12,20 +14,20 @@ from PyQt6 import QtCore, QtGui, QtWidgets
|
|||||||
class Ui_MainWindow(object):
|
class Ui_MainWindow(object):
|
||||||
def setupUi(self, MainWindow):
|
def setupUi(self, MainWindow):
|
||||||
MainWindow.setObjectName("MainWindow")
|
MainWindow.setObjectName("MainWindow")
|
||||||
MainWindow.setWindowModality(QtCore.Qt.WindowModality.WindowModal)
|
MainWindow.setWindowModality(QtCore.Qt.WindowModal)
|
||||||
MainWindow.setEnabled(True)
|
MainWindow.setEnabled(True)
|
||||||
MainWindow.resize(1593, 800)
|
MainWindow.resize(1601, 800)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
|
||||||
MainWindow.setSizePolicy(sizePolicy)
|
MainWindow.setSizePolicy(sizePolicy)
|
||||||
MainWindow.setMinimumSize(QtCore.QSize(1278, 800))
|
MainWindow.setMinimumSize(QtCore.QSize(1278, 800))
|
||||||
MainWindow.setMaximumSize(QtCore.QSize(1920, 800))
|
MainWindow.setMaximumSize(QtCore.QSize(1920, 800))
|
||||||
MainWindow.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.NoContextMenu)
|
MainWindow.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
|
||||||
MainWindow.setStatusTip("")
|
MainWindow.setStatusTip("")
|
||||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
|
||||||
@@ -42,10 +44,10 @@ class Ui_MainWindow(object):
|
|||||||
self.gridLayout = QtWidgets.QGridLayout()
|
self.gridLayout = QtWidgets.QGridLayout()
|
||||||
self.gridLayout.setObjectName("gridLayout")
|
self.gridLayout.setObjectName("gridLayout")
|
||||||
self.tabWidget = QtWidgets.QTabWidget(self.verticalLayoutWidget)
|
self.tabWidget = QtWidgets.QTabWidget(self.verticalLayoutWidget)
|
||||||
self.tabWidget.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.tabWidget.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.tabWidget.setObjectName("tabWidget")
|
self.tabWidget.setObjectName("tabWidget")
|
||||||
self.tab = QtWidgets.QWidget()
|
self.tab = QtWidgets.QWidget()
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.tab.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.tab.sizePolicy().hasHeightForWidth())
|
||||||
@@ -61,29 +63,29 @@ class Ui_MainWindow(object):
|
|||||||
self.formLayout.setObjectName("formLayout")
|
self.formLayout.setObjectName("formLayout")
|
||||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
|
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
|
||||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
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.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||||
self.verticalLayout_2.addItem(spacerItem)
|
self.verticalLayout_2.addItem(spacerItem)
|
||||||
self.load_app = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
|
self.load_app = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
|
||||||
self.load_app.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.load_app.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.load_app.setObjectName("load_app")
|
self.load_app.setObjectName("load_app")
|
||||||
self.verticalLayout_2.addWidget(self.load_app)
|
self.verticalLayout_2.addWidget(self.load_app)
|
||||||
self.create_new_app = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
|
self.create_new_app = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
|
||||||
self.create_new_app.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.create_new_app.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.create_new_app.setObjectName("create_new_app")
|
self.create_new_app.setObjectName("create_new_app")
|
||||||
self.verticalLayout_2.addWidget(self.create_new_app)
|
self.verticalLayout_2.addWidget(self.create_new_app)
|
||||||
self.cancel_active_selection = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
|
self.cancel_active_selection = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
|
||||||
self.cancel_active_selection.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.cancel_active_selection.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.cancel_active_selection.setObjectName("cancel_active_selection")
|
self.cancel_active_selection.setObjectName("cancel_active_selection")
|
||||||
self.verticalLayout_2.addWidget(self.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.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||||
self.verticalLayout_2.addItem(spacerItem1)
|
self.verticalLayout_2.addItem(spacerItem1)
|
||||||
self.formLayout.setLayout(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.verticalLayout_2)
|
self.formLayout.setLayout(1, QtWidgets.QFormLayout.LabelRole, self.verticalLayout_2)
|
||||||
self.tableWidget_apparate = QtWidgets.QTableWidget(self.horizontalLayoutWidget_2)
|
self.tableWidget_apparate = QtWidgets.QTableWidget(self.horizontalLayoutWidget_2)
|
||||||
self.tableWidget_apparate.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.tableWidget_apparate.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.tableWidget_apparate.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
|
self.tableWidget_apparate.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
|
||||||
self.tableWidget_apparate.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.SelectedClicked)
|
self.tableWidget_apparate.setEditTriggers(QtWidgets.QAbstractItemView.SelectedClicked)
|
||||||
self.tableWidget_apparate.setAlternatingRowColors(True)
|
self.tableWidget_apparate.setAlternatingRowColors(True)
|
||||||
self.tableWidget_apparate.setTextElideMode(QtCore.Qt.TextElideMode.ElideMiddle)
|
self.tableWidget_apparate.setTextElideMode(QtCore.Qt.ElideMiddle)
|
||||||
self.tableWidget_apparate.setObjectName("tableWidget_apparate")
|
self.tableWidget_apparate.setObjectName("tableWidget_apparate")
|
||||||
self.tableWidget_apparate.setColumnCount(6)
|
self.tableWidget_apparate.setColumnCount(6)
|
||||||
self.tableWidget_apparate.setRowCount(0)
|
self.tableWidget_apparate.setRowCount(0)
|
||||||
@@ -100,18 +102,18 @@ class Ui_MainWindow(object):
|
|||||||
item = QtWidgets.QTableWidgetItem()
|
item = QtWidgets.QTableWidgetItem()
|
||||||
self.tableWidget_apparate.setHorizontalHeaderItem(5, item)
|
self.tableWidget_apparate.setHorizontalHeaderItem(5, item)
|
||||||
self.tableWidget_apparate.horizontalHeader().setCascadingSectionResizes(True)
|
self.tableWidget_apparate.horizontalHeader().setCascadingSectionResizes(True)
|
||||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.tableWidget_apparate)
|
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.tableWidget_apparate)
|
||||||
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
|
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
|
||||||
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
||||||
self.formLayout.setLayout(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_4)
|
self.formLayout.setLayout(2, QtWidgets.QFormLayout.FieldRole, self.horizontalLayout_4)
|
||||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
||||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||||
self.formLayout.setLayout(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.horizontalLayout_3)
|
self.formLayout.setLayout(3, QtWidgets.QFormLayout.LabelRole, self.horizontalLayout_3)
|
||||||
self.horizontalLayout_2.addLayout(self.formLayout)
|
self.horizontalLayout_2.addLayout(self.formLayout)
|
||||||
self.line = QtWidgets.QFrame(self.tab)
|
self.line = QtWidgets.QFrame(self.tab)
|
||||||
self.line.setGeometry(QtCore.QRect(0, 160, 1261, 21))
|
self.line.setGeometry(QtCore.QRect(0, 160, 1261, 21))
|
||||||
self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
self.line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||||
self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||||
self.line.setObjectName("line")
|
self.line.setObjectName("line")
|
||||||
self.gridLayoutWidget_2 = QtWidgets.QWidget(self.tab)
|
self.gridLayoutWidget_2 = QtWidgets.QWidget(self.tab)
|
||||||
self.gridLayoutWidget_2.setEnabled(True)
|
self.gridLayoutWidget_2.setEnabled(True)
|
||||||
@@ -121,7 +123,7 @@ class Ui_MainWindow(object):
|
|||||||
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
|
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
|
||||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||||
self.app_group_box = QtWidgets.QGroupBox(self.gridLayoutWidget_2)
|
self.app_group_box = QtWidgets.QGroupBox(self.gridLayoutWidget_2)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.app_group_box.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.app_group_box.sizePolicy().hasHeightForWidth())
|
||||||
@@ -132,7 +134,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(True)
|
font.setBold(True)
|
||||||
font.setWeight(75)
|
font.setWeight(75)
|
||||||
self.app_group_box.setFont(font)
|
self.app_group_box.setFont(font)
|
||||||
self.app_group_box.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter)
|
self.app_group_box.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
|
||||||
self.app_group_box.setCheckable(False)
|
self.app_group_box.setCheckable(False)
|
||||||
self.app_group_box.setObjectName("app_group_box")
|
self.app_group_box.setObjectName("app_group_box")
|
||||||
self.dokument_list = QtWidgets.QTableWidget(self.app_group_box)
|
self.dokument_list = QtWidgets.QTableWidget(self.app_group_box)
|
||||||
@@ -143,13 +145,13 @@ class Ui_MainWindow(object):
|
|||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
font.setKerning(False)
|
font.setKerning(False)
|
||||||
self.dokument_list.setFont(font)
|
self.dokument_list.setFont(font)
|
||||||
self.dokument_list.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.dokument_list.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.dokument_list.setAcceptDrops(True)
|
self.dokument_list.setAcceptDrops(True)
|
||||||
self.dokument_list.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
|
self.dokument_list.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
|
||||||
self.dokument_list.setDragEnabled(True)
|
self.dokument_list.setDragEnabled(True)
|
||||||
self.dokument_list.setDragDropMode(QtWidgets.QAbstractItemView.DragDropMode.DropOnly)
|
self.dokument_list.setDragDropMode(QtWidgets.QAbstractItemView.DropOnly)
|
||||||
self.dokument_list.setDefaultDropAction(QtCore.Qt.DropAction.LinkAction)
|
self.dokument_list.setDefaultDropAction(QtCore.Qt.LinkAction)
|
||||||
self.dokument_list.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
|
self.dokument_list.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
|
||||||
self.dokument_list.setObjectName("dokument_list")
|
self.dokument_list.setObjectName("dokument_list")
|
||||||
self.dokument_list.setColumnCount(4)
|
self.dokument_list.setColumnCount(4)
|
||||||
self.dokument_list.setRowCount(0)
|
self.dokument_list.setRowCount(0)
|
||||||
@@ -176,13 +178,13 @@ class Ui_MainWindow(object):
|
|||||||
self.frame = QtWidgets.QFrame(self.app_group_box)
|
self.frame = QtWidgets.QFrame(self.app_group_box)
|
||||||
self.frame.setEnabled(True)
|
self.frame.setEnabled(True)
|
||||||
self.frame.setGeometry(QtCore.QRect(10, 30, 1241, 151))
|
self.frame.setGeometry(QtCore.QRect(10, 30, 1241, 151))
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
|
||||||
self.frame.setSizePolicy(sizePolicy)
|
self.frame.setSizePolicy(sizePolicy)
|
||||||
self.frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||||
self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
self.frame.setObjectName("frame")
|
self.frame.setObjectName("frame")
|
||||||
self.label_5 = QtWidgets.QLabel(self.frame)
|
self.label_5 = QtWidgets.QLabel(self.frame)
|
||||||
self.label_5.setGeometry(QtCore.QRect(250, 20, 91, 21))
|
self.label_5.setGeometry(QtCore.QRect(250, 20, 91, 21))
|
||||||
@@ -199,7 +201,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.sem_winter.setFont(font)
|
self.sem_winter.setFont(font)
|
||||||
self.sem_winter.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.sem_winter.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.sem_winter.setObjectName("sem_winter")
|
self.sem_winter.setObjectName("sem_winter")
|
||||||
self.label_4 = QtWidgets.QLabel(self.frame)
|
self.label_4 = QtWidgets.QLabel(self.frame)
|
||||||
self.label_4.setGeometry(QtCore.QRect(10, 80, 71, 21))
|
self.label_4.setGeometry(QtCore.QRect(10, 80, 71, 21))
|
||||||
@@ -216,7 +218,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.drpdwn_app_nr.setFont(font)
|
self.drpdwn_app_nr.setFont(font)
|
||||||
self.drpdwn_app_nr.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhDigitsOnly)
|
self.drpdwn_app_nr.setInputMethodHints(QtCore.Qt.ImhDigitsOnly)
|
||||||
self.drpdwn_app_nr.setEditable(True)
|
self.drpdwn_app_nr.setEditable(True)
|
||||||
self.drpdwn_app_nr.setObjectName("drpdwn_app_nr")
|
self.drpdwn_app_nr.setObjectName("drpdwn_app_nr")
|
||||||
self.app_name = QtWidgets.QLineEdit(self.frame)
|
self.app_name = QtWidgets.QLineEdit(self.frame)
|
||||||
@@ -226,7 +228,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.app_name.setFont(font)
|
self.app_name.setFont(font)
|
||||||
self.app_name.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
self.app_name.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||||
self.app_name.setObjectName("app_name")
|
self.app_name.setObjectName("app_name")
|
||||||
self.sem_sommer = QtWidgets.QRadioButton(self.frame)
|
self.sem_sommer = QtWidgets.QRadioButton(self.frame)
|
||||||
self.sem_sommer.setGeometry(QtCore.QRect(340, 70, 82, 17))
|
self.sem_sommer.setGeometry(QtCore.QRect(340, 70, 82, 17))
|
||||||
@@ -235,7 +237,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.sem_sommer.setFont(font)
|
self.sem_sommer.setFont(font)
|
||||||
self.sem_sommer.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.sem_sommer.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.sem_sommer.setObjectName("sem_sommer")
|
self.sem_sommer.setObjectName("sem_sommer")
|
||||||
self.label_3 = QtWidgets.QLabel(self.frame)
|
self.label_3 = QtWidgets.QLabel(self.frame)
|
||||||
self.label_3.setGeometry(QtCore.QRect(10, 50, 61, 20))
|
self.label_3.setGeometry(QtCore.QRect(10, 50, 61, 20))
|
||||||
@@ -260,7 +262,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.sem_year.setFont(font)
|
self.sem_year.setFont(font)
|
||||||
self.sem_year.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
self.sem_year.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||||
self.sem_year.setMaxLength(4)
|
self.sem_year.setMaxLength(4)
|
||||||
self.sem_year.setObjectName("sem_year")
|
self.sem_year.setObjectName("sem_year")
|
||||||
self.label_2 = QtWidgets.QLabel(self.frame)
|
self.label_2 = QtWidgets.QLabel(self.frame)
|
||||||
@@ -310,7 +312,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.prof_mail.setFont(font)
|
self.prof_mail.setFont(font)
|
||||||
self.prof_mail.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhEmailCharactersOnly)
|
self.prof_mail.setInputMethodHints(QtCore.Qt.ImhEmailCharactersOnly)
|
||||||
self.prof_mail.setMaxLength(200)
|
self.prof_mail.setMaxLength(200)
|
||||||
self.prof_mail.setPlaceholderText("")
|
self.prof_mail.setPlaceholderText("")
|
||||||
self.prof_mail.setObjectName("prof_mail")
|
self.prof_mail.setObjectName("prof_mail")
|
||||||
@@ -329,7 +331,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.prof_tel_nr.setFont(font)
|
self.prof_tel_nr.setFont(font)
|
||||||
self.prof_tel_nr.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhDigitsOnly)
|
self.prof_tel_nr.setInputMethodHints(QtCore.Qt.ImhDigitsOnly)
|
||||||
self.prof_tel_nr.setPlaceholderText("")
|
self.prof_tel_nr.setPlaceholderText("")
|
||||||
self.prof_tel_nr.setObjectName("prof_tel_nr")
|
self.prof_tel_nr.setObjectName("prof_tel_nr")
|
||||||
self.label_10 = QtWidgets.QLabel(self.frame)
|
self.label_10 = QtWidgets.QLabel(self.frame)
|
||||||
@@ -347,10 +349,10 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.drpdwn_prof_name.setFont(font)
|
self.drpdwn_prof_name.setFont(font)
|
||||||
self.drpdwn_prof_name.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
self.drpdwn_prof_name.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||||
self.drpdwn_prof_name.setEditable(True)
|
self.drpdwn_prof_name.setEditable(True)
|
||||||
self.drpdwn_prof_name.setCurrentText("")
|
self.drpdwn_prof_name.setCurrentText("")
|
||||||
self.drpdwn_prof_name.setInsertPolicy(QtWidgets.QComboBox.InsertPolicy.InsertAlphabetically)
|
self.drpdwn_prof_name.setInsertPolicy(QtWidgets.QComboBox.InsertAlphabetically)
|
||||||
self.drpdwn_prof_name.setFrame(True)
|
self.drpdwn_prof_name.setFrame(True)
|
||||||
self.drpdwn_prof_name.setObjectName("drpdwn_prof_name")
|
self.drpdwn_prof_name.setObjectName("drpdwn_prof_name")
|
||||||
self.mail_mand = QtWidgets.QLabel(self.frame)
|
self.mail_mand = QtWidgets.QLabel(self.frame)
|
||||||
@@ -392,7 +394,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.fach_mand.setFont(font)
|
self.fach_mand.setFont(font)
|
||||||
self.fach_mand.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.fach_mand.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.fach_mand.setObjectName("fach_mand")
|
self.fach_mand.setObjectName("fach_mand")
|
||||||
self._mand = QtWidgets.QLabel(self.frame)
|
self._mand = QtWidgets.QLabel(self.frame)
|
||||||
self._mand.setGeometry(QtCore.QRect(330, 60, 16, 21))
|
self._mand.setGeometry(QtCore.QRect(330, 60, 16, 21))
|
||||||
@@ -439,7 +441,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.label_12.setFont(font)
|
self.label_12.setFont(font)
|
||||||
self.label_12.setObjectName("label_12")
|
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.LabelRole, self.label_12)
|
||||||
self.prof_id_adis = QtWidgets.QLineEdit(self.formLayoutWidget_2)
|
self.prof_id_adis = QtWidgets.QLineEdit(self.formLayoutWidget_2)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(9)
|
font.setPointSize(9)
|
||||||
@@ -447,7 +449,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.prof_id_adis.setFont(font)
|
self.prof_id_adis.setFont(font)
|
||||||
self.prof_id_adis.setObjectName("prof_id_adis")
|
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.FieldRole, self.prof_id_adis)
|
||||||
self.label_13 = QtWidgets.QLabel(self.formLayoutWidget_2)
|
self.label_13 = QtWidgets.QLabel(self.formLayoutWidget_2)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(9)
|
font.setPointSize(9)
|
||||||
@@ -455,10 +457,10 @@ class Ui_MainWindow(object):
|
|||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.label_13.setFont(font)
|
self.label_13.setFont(font)
|
||||||
self.label_13.setObjectName("label_13")
|
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.LabelRole, self.label_13)
|
||||||
self.apparat_id_adis = QtWidgets.QLineEdit(self.formLayoutWidget_2)
|
self.apparat_id_adis = QtWidgets.QLineEdit(self.formLayoutWidget_2)
|
||||||
self.apparat_id_adis.setObjectName("apparat_id_adis")
|
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.FieldRole, self.apparat_id_adis)
|
||||||
self.check_send_mail = QtWidgets.QCheckBox(self.frame)
|
self.check_send_mail = QtWidgets.QCheckBox(self.frame)
|
||||||
self.check_send_mail.setGeometry(QtCore.QRect(450, 120, 91, 17))
|
self.check_send_mail.setGeometry(QtCore.QRect(450, 120, 91, 17))
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
@@ -469,8 +471,8 @@ class Ui_MainWindow(object):
|
|||||||
self.check_send_mail.setObjectName("check_send_mail")
|
self.check_send_mail.setObjectName("check_send_mail")
|
||||||
self.frame_3 = QtWidgets.QFrame(self.frame)
|
self.frame_3 = QtWidgets.QFrame(self.frame)
|
||||||
self.frame_3.setGeometry(QtCore.QRect(510, 0, 241, 61))
|
self.frame_3.setGeometry(QtCore.QRect(510, 0, 241, 61))
|
||||||
self.frame_3.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||||
self.frame_3.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
self.frame_3.setObjectName("frame_3")
|
self.frame_3.setObjectName("frame_3")
|
||||||
self.gridLayoutWidget_5 = QtWidgets.QWidget(self.frame_3)
|
self.gridLayoutWidget_5 = QtWidgets.QWidget(self.frame_3)
|
||||||
self.gridLayoutWidget_5.setGeometry(QtCore.QRect(0, 0, 241, 61))
|
self.gridLayoutWidget_5.setGeometry(QtCore.QRect(0, 0, 241, 61))
|
||||||
@@ -487,7 +489,7 @@ class Ui_MainWindow(object):
|
|||||||
self.app_fach.setFont(font)
|
self.app_fach.setFont(font)
|
||||||
self.app_fach.setObjectName("app_fach")
|
self.app_fach.setObjectName("app_fach")
|
||||||
self.gridLayout_6.addWidget(self.app_fach, 0, 0, 1, 1)
|
self.gridLayout_6.addWidget(self.app_fach, 0, 0, 1, 1)
|
||||||
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.gridLayout_6.addItem(spacerItem2, 0, 1, 1, 1)
|
self.gridLayout_6.addItem(spacerItem2, 0, 1, 1, 1)
|
||||||
self.prof_title = QtWidgets.QLineEdit(self.frame)
|
self.prof_title = QtWidgets.QLineEdit(self.frame)
|
||||||
self.prof_title.setGeometry(QtCore.QRect(110, 50, 71, 20))
|
self.prof_title.setGeometry(QtCore.QRect(110, 50, 71, 20))
|
||||||
@@ -496,7 +498,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.prof_title.setFont(font)
|
self.prof_title.setFont(font)
|
||||||
self.prof_title.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
self.prof_title.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||||
self.prof_title.setObjectName("prof_title")
|
self.prof_title.setObjectName("prof_title")
|
||||||
self.mail_mand.raise_()
|
self.mail_mand.raise_()
|
||||||
self._mand.raise_()
|
self._mand.raise_()
|
||||||
@@ -534,18 +536,18 @@ class Ui_MainWindow(object):
|
|||||||
self.dokument_list.raise_()
|
self.dokument_list.raise_()
|
||||||
self.gridLayout_2.addWidget(self.app_group_box, 1, 0, 1, 1)
|
self.gridLayout_2.addWidget(self.app_group_box, 1, 0, 1, 1)
|
||||||
self.tableWidget_apparat_media = QtWidgets.QTableWidget(self.gridLayoutWidget_2)
|
self.tableWidget_apparat_media = QtWidgets.QTableWidget(self.gridLayoutWidget_2)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Expanding)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Expanding)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(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.setSizePolicy(sizePolicy)
|
||||||
self.tableWidget_apparat_media.setMinimumSize(QtCore.QSize(1259, 0))
|
self.tableWidget_apparat_media.setMinimumSize(QtCore.QSize(1259, 0))
|
||||||
self.tableWidget_apparat_media.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.tableWidget_apparat_media.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.tableWidget_apparat_media.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
self.tableWidget_apparat_media.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
||||||
self.tableWidget_apparat_media.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
|
self.tableWidget_apparat_media.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
|
||||||
self.tableWidget_apparat_media.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
self.tableWidget_apparat_media.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||||
self.tableWidget_apparat_media.setAlternatingRowColors(True)
|
self.tableWidget_apparat_media.setAlternatingRowColors(True)
|
||||||
self.tableWidget_apparat_media.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
|
self.tableWidget_apparat_media.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
|
||||||
self.tableWidget_apparat_media.setObjectName("tableWidget_apparat_media")
|
self.tableWidget_apparat_media.setObjectName("tableWidget_apparat_media")
|
||||||
self.tableWidget_apparat_media.setColumnCount(7)
|
self.tableWidget_apparat_media.setColumnCount(7)
|
||||||
self.tableWidget_apparat_media.setRowCount(0)
|
self.tableWidget_apparat_media.setRowCount(0)
|
||||||
@@ -575,12 +577,12 @@ class Ui_MainWindow(object):
|
|||||||
self.gridLayout_2.addWidget(self.label, 2, 0, 1, 1)
|
self.gridLayout_2.addWidget(self.label, 2, 0, 1, 1)
|
||||||
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
|
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
|
||||||
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
||||||
spacerItem3 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
|
spacerItem3 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout_5.addItem(spacerItem3)
|
self.horizontalLayout_5.addItem(spacerItem3)
|
||||||
self.chkbx_show_del_media = QtWidgets.QCheckBox(self.gridLayoutWidget_2)
|
self.chkbx_show_del_media = QtWidgets.QCheckBox(self.gridLayoutWidget_2)
|
||||||
self.chkbx_show_del_media.setObjectName("chkbx_show_del_media")
|
self.chkbx_show_del_media.setObjectName("chkbx_show_del_media")
|
||||||
self.horizontalLayout_5.addWidget(self.chkbx_show_del_media)
|
self.horizontalLayout_5.addWidget(self.chkbx_show_del_media)
|
||||||
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
|
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout_5.addItem(spacerItem4)
|
self.horizontalLayout_5.addItem(spacerItem4)
|
||||||
self.btn_reserve = QtWidgets.QPushButton(self.gridLayoutWidget_2)
|
self.btn_reserve = QtWidgets.QPushButton(self.gridLayoutWidget_2)
|
||||||
self.btn_reserve.setObjectName("btn_reserve")
|
self.btn_reserve.setObjectName("btn_reserve")
|
||||||
@@ -591,15 +593,15 @@ class Ui_MainWindow(object):
|
|||||||
self.label_info.setObjectName("label_info")
|
self.label_info.setObjectName("label_info")
|
||||||
self.add_layout.addWidget(self.label_info)
|
self.add_layout.addWidget(self.label_info)
|
||||||
self.line_2 = QtWidgets.QFrame(self.gridLayoutWidget_2)
|
self.line_2 = QtWidgets.QFrame(self.gridLayoutWidget_2)
|
||||||
self.line_2.setFrameShape(QtWidgets.QFrame.Shape.VLine)
|
self.line_2.setFrameShape(QtWidgets.QFrame.VLine)
|
||||||
self.line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||||
self.line_2.setObjectName("line_2")
|
self.line_2.setObjectName("line_2")
|
||||||
self.add_layout.addWidget(self.line_2)
|
self.add_layout.addWidget(self.line_2)
|
||||||
self.progress_label = QtWidgets.QLabel(self.gridLayoutWidget_2)
|
self.progress_label = QtWidgets.QLabel(self.gridLayoutWidget_2)
|
||||||
self.progress_label.setObjectName("progress_label")
|
self.progress_label.setObjectName("progress_label")
|
||||||
self.add_layout.addWidget(self.progress_label)
|
self.add_layout.addWidget(self.progress_label)
|
||||||
self.horizontalLayout_5.addLayout(self.add_layout)
|
self.horizontalLayout_5.addLayout(self.add_layout)
|
||||||
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
|
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout_5.addItem(spacerItem5)
|
self.horizontalLayout_5.addItem(spacerItem5)
|
||||||
self.avail_layout = QtWidgets.QHBoxLayout()
|
self.avail_layout = QtWidgets.QHBoxLayout()
|
||||||
self.avail_layout.setObjectName("avail_layout")
|
self.avail_layout.setObjectName("avail_layout")
|
||||||
@@ -608,19 +610,19 @@ class Ui_MainWindow(object):
|
|||||||
self.label_20.setObjectName("label_20")
|
self.label_20.setObjectName("label_20")
|
||||||
self.horizontalLayout_5.addWidget(self.label_20)
|
self.horizontalLayout_5.addWidget(self.label_20)
|
||||||
self.line_3 = QtWidgets.QFrame(self.gridLayoutWidget_2)
|
self.line_3 = QtWidgets.QFrame(self.gridLayoutWidget_2)
|
||||||
self.line_3.setFrameShape(QtWidgets.QFrame.Shape.VLine)
|
self.line_3.setFrameShape(QtWidgets.QFrame.VLine)
|
||||||
self.line_3.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||||
self.line_3.setObjectName("line_3")
|
self.line_3.setObjectName("line_3")
|
||||||
self.horizontalLayout_5.addWidget(self.line_3)
|
self.horizontalLayout_5.addWidget(self.line_3)
|
||||||
self.avail_status = QtWidgets.QLabel(self.gridLayoutWidget_2)
|
self.avail_status = QtWidgets.QLabel(self.gridLayoutWidget_2)
|
||||||
self.avail_status.setObjectName("avail_status")
|
self.avail_status.setObjectName("avail_status")
|
||||||
self.horizontalLayout_5.addWidget(self.avail_status)
|
self.horizontalLayout_5.addWidget(self.avail_status)
|
||||||
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout_5.addItem(spacerItem6)
|
self.horizontalLayout_5.addItem(spacerItem6)
|
||||||
self.gridLayout_2.addLayout(self.horizontalLayout_5, 4, 0, 1, 1)
|
self.gridLayout_2.addLayout(self.horizontalLayout_5, 4, 0, 1, 1)
|
||||||
self.add_medium = QtWidgets.QPushButton(self.tab)
|
self.add_medium = QtWidgets.QPushButton(self.tab)
|
||||||
self.add_medium.setGeometry(QtCore.QRect(0, 700, 121, 20))
|
self.add_medium.setGeometry(QtCore.QRect(0, 700, 121, 20))
|
||||||
self.add_medium.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.add_medium.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.add_medium.setObjectName("add_medium")
|
self.add_medium.setObjectName("add_medium")
|
||||||
self.tabWidget.addTab(self.tab, "")
|
self.tabWidget.addTab(self.tab, "")
|
||||||
self.tab_2 = QtWidgets.QWidget()
|
self.tab_2 = QtWidgets.QWidget()
|
||||||
@@ -686,13 +688,13 @@ class Ui_MainWindow(object):
|
|||||||
self.box_person.setEditable(True)
|
self.box_person.setEditable(True)
|
||||||
self.box_person.setObjectName("box_person")
|
self.box_person.setObjectName("box_person")
|
||||||
self.gridLayout_3.addWidget(self.box_person, 1, 1, 1, 1)
|
self.gridLayout_3.addWidget(self.box_person, 1, 1, 1, 1)
|
||||||
spacerItem7 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
spacerItem7 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||||
self.gridLayout_3.addItem(spacerItem7, 4, 0, 1, 1)
|
self.gridLayout_3.addItem(spacerItem7, 4, 0, 1, 1)
|
||||||
self.label_15 = QtWidgets.QLabel(self.gridLayoutWidget)
|
self.label_15 = QtWidgets.QLabel(self.gridLayoutWidget)
|
||||||
self.label_15.setObjectName("label_15")
|
self.label_15.setObjectName("label_15")
|
||||||
self.gridLayout_3.addWidget(self.label_15, 3, 0, 1, 1)
|
self.gridLayout_3.addWidget(self.label_15, 3, 0, 1, 1)
|
||||||
self.check_deletable = QtWidgets.QCheckBox(self.gridLayoutWidget)
|
self.check_deletable = QtWidgets.QCheckBox(self.gridLayoutWidget)
|
||||||
self.check_deletable.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
self.check_deletable.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||||
self.check_deletable.setText("")
|
self.check_deletable.setText("")
|
||||||
self.check_deletable.setObjectName("check_deletable")
|
self.check_deletable.setObjectName("check_deletable")
|
||||||
self.gridLayout_3.addWidget(self.check_deletable, 3, 1, 1, 1)
|
self.gridLayout_3.addWidget(self.check_deletable, 3, 1, 1, 1)
|
||||||
@@ -711,28 +713,28 @@ class Ui_MainWindow(object):
|
|||||||
self.formLayout_6.setObjectName("formLayout_6")
|
self.formLayout_6.setObjectName("formLayout_6")
|
||||||
self.label_25 = QtWidgets.QLabel(self.formLayoutWidget)
|
self.label_25 = QtWidgets.QLabel(self.formLayoutWidget)
|
||||||
self.label_25.setObjectName("label_25")
|
self.label_25.setObjectName("label_25")
|
||||||
self.formLayout_6.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_25)
|
self.formLayout_6.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_25)
|
||||||
self.book_search = QtWidgets.QPushButton(self.formLayoutWidget)
|
self.book_search = QtWidgets.QPushButton(self.formLayoutWidget)
|
||||||
self.book_search.setObjectName("book_search")
|
self.book_search.setObjectName("book_search")
|
||||||
self.formLayout_6.setWidget(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.book_search)
|
self.formLayout_6.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.book_search)
|
||||||
self.seach_by_signature = QtWidgets.QLineEdit(self.formLayoutWidget)
|
self.seach_by_signature = QtWidgets.QLineEdit(self.formLayoutWidget)
|
||||||
self.seach_by_signature.setClearButtonEnabled(True)
|
self.seach_by_signature.setClearButtonEnabled(True)
|
||||||
self.seach_by_signature.setObjectName("seach_by_signature")
|
self.seach_by_signature.setObjectName("seach_by_signature")
|
||||||
self.formLayout_6.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.seach_by_signature)
|
self.formLayout_6.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.seach_by_signature)
|
||||||
self.label_26 = QtWidgets.QLabel(self.formLayoutWidget)
|
self.label_26 = QtWidgets.QLabel(self.formLayoutWidget)
|
||||||
self.label_26.setObjectName("label_26")
|
self.label_26.setObjectName("label_26")
|
||||||
self.formLayout_6.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_26)
|
self.formLayout_6.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_26)
|
||||||
self.search_by_title = QtWidgets.QLineEdit(self.formLayoutWidget)
|
self.search_by_title = QtWidgets.QLineEdit(self.formLayoutWidget)
|
||||||
self.search_by_title.setClearButtonEnabled(True)
|
self.search_by_title.setClearButtonEnabled(True)
|
||||||
self.search_by_title.setObjectName("search_by_title")
|
self.search_by_title.setObjectName("search_by_title")
|
||||||
self.formLayout_6.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.search_by_title)
|
self.formLayout_6.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.search_by_title)
|
||||||
spacerItem8 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
spacerItem8 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||||
self.formLayout_6.setItem(2, QtWidgets.QFormLayout.ItemRole.LabelRole, spacerItem8)
|
self.formLayout_6.setItem(2, QtWidgets.QFormLayout.LabelRole, spacerItem8)
|
||||||
self.tabWidget_2.addTab(self.tab_4, "")
|
self.tabWidget_2.addTab(self.tab_4, "")
|
||||||
self.verticalLayout_3.addWidget(self.tabWidget_2)
|
self.verticalLayout_3.addWidget(self.tabWidget_2)
|
||||||
self.stackedWidget_4 = QtWidgets.QStackedWidget(self.verticalLayoutWidget_2)
|
self.stackedWidget_4 = QtWidgets.QStackedWidget(self.verticalLayoutWidget_2)
|
||||||
self.stackedWidget_4.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.stackedWidget_4.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||||
self.stackedWidget_4.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.stackedWidget_4.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
self.stackedWidget_4.setObjectName("stackedWidget_4")
|
self.stackedWidget_4.setObjectName("stackedWidget_4")
|
||||||
self.stackedWidget_4Page1 = QtWidgets.QWidget()
|
self.stackedWidget_4Page1 = QtWidgets.QWidget()
|
||||||
self.stackedWidget_4Page1.setObjectName("stackedWidget_4Page1")
|
self.stackedWidget_4Page1.setObjectName("stackedWidget_4Page1")
|
||||||
@@ -748,14 +750,14 @@ class Ui_MainWindow(object):
|
|||||||
self.gridLayout_4.setContentsMargins(0, 0, 0, 0)
|
self.gridLayout_4.setContentsMargins(0, 0, 0, 0)
|
||||||
self.gridLayout_4.setObjectName("gridLayout_4")
|
self.gridLayout_4.setObjectName("gridLayout_4")
|
||||||
self.statistics_table = QtWidgets.QTableWidget(self.gridLayoutWidget_3)
|
self.statistics_table = QtWidgets.QTableWidget(self.gridLayoutWidget_3)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.statistics_table.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.statistics_table.sizePolicy().hasHeightForWidth())
|
||||||
self.statistics_table.setSizePolicy(sizePolicy)
|
self.statistics_table.setSizePolicy(sizePolicy)
|
||||||
self.statistics_table.setMaximumSize(QtCore.QSize(16777215, 16777215))
|
self.statistics_table.setMaximumSize(QtCore.QSize(16777215, 16777215))
|
||||||
self.statistics_table.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.statistics_table.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.statistics_table.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
self.statistics_table.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||||
self.statistics_table.setAlternatingRowColors(True)
|
self.statistics_table.setAlternatingRowColors(True)
|
||||||
self.statistics_table.setObjectName("statistics_table")
|
self.statistics_table.setObjectName("statistics_table")
|
||||||
self.statistics_table.setColumnCount(3)
|
self.statistics_table.setColumnCount(3)
|
||||||
@@ -786,18 +788,18 @@ class Ui_MainWindow(object):
|
|||||||
self.horizontalLayout_7.setContentsMargins(0, 0, 0, 0)
|
self.horizontalLayout_7.setContentsMargins(0, 0, 0, 0)
|
||||||
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
|
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
|
||||||
self.btn_del_select_apparats = QtWidgets.QPushButton(self.horizontalLayoutWidget_3)
|
self.btn_del_select_apparats = QtWidgets.QPushButton(self.horizontalLayoutWidget_3)
|
||||||
self.btn_del_select_apparats.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
self.btn_del_select_apparats.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||||
self.btn_del_select_apparats.setObjectName("btn_del_select_apparats")
|
self.btn_del_select_apparats.setObjectName("btn_del_select_apparats")
|
||||||
self.horizontalLayout_7.addWidget(self.btn_del_select_apparats)
|
self.horizontalLayout_7.addWidget(self.btn_del_select_apparats)
|
||||||
spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout_7.addItem(spacerItem9)
|
self.horizontalLayout_7.addItem(spacerItem9)
|
||||||
self.table = QtWidgets.QWidget(self.widget)
|
self.table = QtWidgets.QWidget(self.widget)
|
||||||
self.table.setGeometry(QtCore.QRect(0, 50, 761, 391))
|
self.table.setGeometry(QtCore.QRect(0, 50, 761, 391))
|
||||||
self.table.setObjectName("table")
|
self.table.setObjectName("table")
|
||||||
self.tableWidget = QtWidgets.QTableWidget(self.table)
|
self.tableWidget = QtWidgets.QTableWidget(self.table)
|
||||||
self.tableWidget.setGeometry(QtCore.QRect(0, 0, 761, 391))
|
self.tableWidget.setGeometry(QtCore.QRect(0, 0, 761, 391))
|
||||||
self.tableWidget.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.tableWidget.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||||
self.tableWidget.setObjectName("tableWidget")
|
self.tableWidget.setObjectName("tableWidget")
|
||||||
self.tableWidget.setColumnCount(5)
|
self.tableWidget.setColumnCount(5)
|
||||||
self.tableWidget.setRowCount(0)
|
self.tableWidget.setRowCount(0)
|
||||||
@@ -816,8 +818,8 @@ class Ui_MainWindow(object):
|
|||||||
self.page.setObjectName("page")
|
self.page.setObjectName("page")
|
||||||
self.book_search_result = QtWidgets.QTableWidget(self.page)
|
self.book_search_result = QtWidgets.QTableWidget(self.page)
|
||||||
self.book_search_result.setGeometry(QtCore.QRect(10, 20, 1081, 421))
|
self.book_search_result.setGeometry(QtCore.QRect(10, 20, 1081, 421))
|
||||||
self.book_search_result.setFrameShadow(QtWidgets.QFrame.Shadow.Plain)
|
self.book_search_result.setFrameShadow(QtWidgets.QFrame.Plain)
|
||||||
self.book_search_result.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
self.book_search_result.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||||
self.book_search_result.setAlternatingRowColors(True)
|
self.book_search_result.setAlternatingRowColors(True)
|
||||||
self.book_search_result.setObjectName("book_search_result")
|
self.book_search_result.setObjectName("book_search_result")
|
||||||
self.book_search_result.setColumnCount(3)
|
self.book_search_result.setColumnCount(3)
|
||||||
@@ -847,8 +849,8 @@ class Ui_MainWindow(object):
|
|||||||
self.select_action_box.addItem("")
|
self.select_action_box.addItem("")
|
||||||
self.user_create_frame = QtWidgets.QFrame(self.tab_5)
|
self.user_create_frame = QtWidgets.QFrame(self.tab_5)
|
||||||
self.user_create_frame.setGeometry(QtCore.QRect(10, 60, 591, 141))
|
self.user_create_frame.setGeometry(QtCore.QRect(10, 60, 591, 141))
|
||||||
self.user_create_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.user_create_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||||
self.user_create_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.user_create_frame.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
self.user_create_frame.setObjectName("user_create_frame")
|
self.user_create_frame.setObjectName("user_create_frame")
|
||||||
self.gridLayoutWidget_4 = QtWidgets.QWidget(self.user_create_frame)
|
self.gridLayoutWidget_4 = QtWidgets.QWidget(self.user_create_frame)
|
||||||
self.gridLayoutWidget_4.setGeometry(QtCore.QRect(0, 0, 581, 141))
|
self.gridLayoutWidget_4.setGeometry(QtCore.QRect(0, 0, 581, 141))
|
||||||
@@ -869,7 +871,7 @@ class Ui_MainWindow(object):
|
|||||||
self.label_23 = QtWidgets.QLabel(self.gridLayoutWidget_4)
|
self.label_23 = QtWidgets.QLabel(self.gridLayoutWidget_4)
|
||||||
self.label_23.setObjectName("label_23")
|
self.label_23.setObjectName("label_23")
|
||||||
self.gridLayout_5.addWidget(self.label_23, 1, 0, 1, 1)
|
self.gridLayout_5.addWidget(self.label_23, 1, 0, 1, 1)
|
||||||
spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.gridLayout_5.addItem(spacerItem10, 0, 4, 1, 1)
|
self.gridLayout_5.addItem(spacerItem10, 0, 4, 1, 1)
|
||||||
self.user_frame_userrole = QtWidgets.QComboBox(self.gridLayoutWidget_4)
|
self.user_frame_userrole = QtWidgets.QComboBox(self.gridLayoutWidget_4)
|
||||||
self.user_frame_userrole.setObjectName("user_frame_userrole")
|
self.user_frame_userrole.setObjectName("user_frame_userrole")
|
||||||
@@ -887,8 +889,8 @@ class Ui_MainWindow(object):
|
|||||||
self.gridLayout_5.addWidget(self.user_frame_err_message, 1, 4, 1, 1)
|
self.gridLayout_5.addWidget(self.user_frame_err_message, 1, 4, 1, 1)
|
||||||
self.user_delete_frame = QtWidgets.QFrame(self.tab_5)
|
self.user_delete_frame = QtWidgets.QFrame(self.tab_5)
|
||||||
self.user_delete_frame.setGeometry(QtCore.QRect(10, 60, 591, 141))
|
self.user_delete_frame.setGeometry(QtCore.QRect(10, 60, 591, 141))
|
||||||
self.user_delete_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.user_delete_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||||
self.user_delete_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.user_delete_frame.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
self.user_delete_frame.setObjectName("user_delete_frame")
|
self.user_delete_frame.setObjectName("user_delete_frame")
|
||||||
self.gridLayoutWidget_7 = QtWidgets.QWidget(self.user_delete_frame)
|
self.gridLayoutWidget_7 = QtWidgets.QWidget(self.user_delete_frame)
|
||||||
self.gridLayoutWidget_7.setGeometry(QtCore.QRect(0, 0, 581, 141))
|
self.gridLayoutWidget_7.setGeometry(QtCore.QRect(0, 0, 581, 141))
|
||||||
@@ -898,12 +900,12 @@ class Ui_MainWindow(object):
|
|||||||
self.gridLayout_8.setObjectName("gridLayout_8")
|
self.gridLayout_8.setObjectName("gridLayout_8")
|
||||||
self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
|
self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
|
||||||
self.horizontalLayout_8.setObjectName("horizontalLayout_8")
|
self.horizontalLayout_8.setObjectName("horizontalLayout_8")
|
||||||
spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout_8.addItem(spacerItem11)
|
self.horizontalLayout_8.addItem(spacerItem11)
|
||||||
self.pushButton = QtWidgets.QPushButton(self.gridLayoutWidget_7)
|
self.pushButton = QtWidgets.QPushButton(self.gridLayoutWidget_7)
|
||||||
self.pushButton.setObjectName("pushButton")
|
self.pushButton.setObjectName("pushButton")
|
||||||
self.horizontalLayout_8.addWidget(self.pushButton)
|
self.horizontalLayout_8.addWidget(self.pushButton)
|
||||||
spacerItem12 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
spacerItem12 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout_8.addItem(spacerItem12)
|
self.horizontalLayout_8.addItem(spacerItem12)
|
||||||
self.gridLayout_8.addLayout(self.horizontalLayout_8, 1, 1, 1, 1)
|
self.gridLayout_8.addLayout(self.horizontalLayout_8, 1, 1, 1, 1)
|
||||||
self.label_34 = QtWidgets.QLabel(self.gridLayoutWidget_7)
|
self.label_34 = QtWidgets.QLabel(self.gridLayoutWidget_7)
|
||||||
@@ -913,10 +915,10 @@ class Ui_MainWindow(object):
|
|||||||
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_8.addWidget(self.user_delete_frame_user_select, 0, 1, 1, 1)
|
self.gridLayout_8.addWidget(self.user_delete_frame_user_select, 0, 1, 1, 1)
|
||||||
self.user_delete_confirm = QtWidgets.QRadioButton(self.gridLayoutWidget_7)
|
self.user_delete_confirm = QtWidgets.QRadioButton(self.gridLayoutWidget_7)
|
||||||
self.user_delete_confirm.setLayoutDirection(QtCore.Qt.LayoutDirection.RightToLeft)
|
self.user_delete_confirm.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||||
self.user_delete_confirm.setObjectName("user_delete_confirm")
|
self.user_delete_confirm.setObjectName("user_delete_confirm")
|
||||||
self.gridLayout_8.addWidget(self.user_delete_confirm, 1, 0, 1, 1)
|
self.gridLayout_8.addWidget(self.user_delete_confirm, 1, 0, 1, 1)
|
||||||
spacerItem13 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
spacerItem13 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.gridLayout_8.addItem(spacerItem13, 0, 2, 1, 1)
|
self.gridLayout_8.addItem(spacerItem13, 0, 2, 1, 1)
|
||||||
self.user_delete_err_message = QtWidgets.QLabel(self.gridLayoutWidget_7)
|
self.user_delete_err_message = QtWidgets.QLabel(self.gridLayoutWidget_7)
|
||||||
self.user_delete_err_message.setText("")
|
self.user_delete_err_message.setText("")
|
||||||
@@ -924,8 +926,8 @@ class Ui_MainWindow(object):
|
|||||||
self.gridLayout_8.addWidget(self.user_delete_err_message, 1, 2, 1, 1)
|
self.gridLayout_8.addWidget(self.user_delete_err_message, 1, 2, 1, 1)
|
||||||
self.user_edit_frame = QtWidgets.QFrame(self.tab_5)
|
self.user_edit_frame = QtWidgets.QFrame(self.tab_5)
|
||||||
self.user_edit_frame.setGeometry(QtCore.QRect(10, 60, 591, 141))
|
self.user_edit_frame.setGeometry(QtCore.QRect(10, 60, 591, 141))
|
||||||
self.user_edit_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.user_edit_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||||
self.user_edit_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.user_edit_frame.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
self.user_edit_frame.setObjectName("user_edit_frame")
|
self.user_edit_frame.setObjectName("user_edit_frame")
|
||||||
self.gridLayoutWidget_10 = QtWidgets.QWidget(self.user_edit_frame)
|
self.gridLayoutWidget_10 = QtWidgets.QWidget(self.user_edit_frame)
|
||||||
self.gridLayoutWidget_10.setGeometry(QtCore.QRect(0, 0, 581, 141))
|
self.gridLayoutWidget_10.setGeometry(QtCore.QRect(0, 0, 581, 141))
|
||||||
@@ -956,12 +958,12 @@ class Ui_MainWindow(object):
|
|||||||
self.user_edit_frame_new_password.setMaximumSize(QtCore.QSize(150, 16777215))
|
self.user_edit_frame_new_password.setMaximumSize(QtCore.QSize(150, 16777215))
|
||||||
self.user_edit_frame_new_password.setObjectName("user_edit_frame_new_password")
|
self.user_edit_frame_new_password.setObjectName("user_edit_frame_new_password")
|
||||||
self.gridLayout_11.addWidget(self.user_edit_frame_new_password, 1, 1, 1, 1)
|
self.gridLayout_11.addWidget(self.user_edit_frame_new_password, 1, 1, 1, 1)
|
||||||
spacerItem14 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
spacerItem14 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
self.gridLayout_11.addItem(spacerItem14, 0, 4, 1, 1)
|
self.gridLayout_11.addItem(spacerItem14, 0, 4, 1, 1)
|
||||||
self.edit_faculty_member = QtWidgets.QFrame(self.tab_5)
|
self.edit_faculty_member = QtWidgets.QFrame(self.tab_5)
|
||||||
self.edit_faculty_member.setGeometry(QtCore.QRect(10, 60, 1051, 241))
|
self.edit_faculty_member.setGeometry(QtCore.QRect(10, 60, 1051, 241))
|
||||||
self.edit_faculty_member.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.edit_faculty_member.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||||
self.edit_faculty_member.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.edit_faculty_member.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
self.edit_faculty_member.setObjectName("edit_faculty_member")
|
self.edit_faculty_member.setObjectName("edit_faculty_member")
|
||||||
self.gridLayoutWidget_11 = QtWidgets.QWidget(self.edit_faculty_member)
|
self.gridLayoutWidget_11 = QtWidgets.QWidget(self.edit_faculty_member)
|
||||||
self.gridLayoutWidget_11.setGeometry(QtCore.QRect(0, 0, 751, 223))
|
self.gridLayoutWidget_11.setGeometry(QtCore.QRect(0, 0, 751, 223))
|
||||||
@@ -973,66 +975,66 @@ class Ui_MainWindow(object):
|
|||||||
self.formLayout_2.setObjectName("formLayout_2")
|
self.formLayout_2.setObjectName("formLayout_2")
|
||||||
self.label_43 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
self.label_43 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
||||||
self.label_43.setObjectName("label_43")
|
self.label_43.setObjectName("label_43")
|
||||||
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_43)
|
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_43)
|
||||||
self.edit_faculty_member_new_title = QtWidgets.QComboBox(self.gridLayoutWidget_11)
|
self.edit_faculty_member_new_title = QtWidgets.QComboBox(self.gridLayoutWidget_11)
|
||||||
self.edit_faculty_member_new_title.setEditable(True)
|
self.edit_faculty_member_new_title.setEditable(True)
|
||||||
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.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.edit_faculty_member_new_title)
|
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.edit_faculty_member_new_title)
|
||||||
self.label_44 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
self.label_44 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
||||||
self.label_44.setObjectName("label_44")
|
self.label_44.setObjectName("label_44")
|
||||||
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_44)
|
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_44)
|
||||||
self.edit_faculty_member_new_surname = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
self.edit_faculty_member_new_surname = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
||||||
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.formLayout_2.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.edit_faculty_member_new_surname)
|
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.edit_faculty_member_new_surname)
|
||||||
self.label_45 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
self.label_45 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
||||||
self.label_45.setObjectName("label_45")
|
self.label_45.setObjectName("label_45")
|
||||||
self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_45)
|
self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_45)
|
||||||
self.user_faculty_member_new_name = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
self.user_faculty_member_new_name = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
||||||
self.user_faculty_member_new_name.setObjectName("user_faculty_member_new_name")
|
self.user_faculty_member_new_name.setObjectName("user_faculty_member_new_name")
|
||||||
self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.user_faculty_member_new_name)
|
self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.user_faculty_member_new_name)
|
||||||
self.gridLayout_12.addLayout(self.formLayout_2, 2, 2, 1, 1)
|
self.gridLayout_12.addLayout(self.formLayout_2, 2, 2, 1, 1)
|
||||||
self.formLayout_4 = QtWidgets.QFormLayout()
|
self.formLayout_4 = QtWidgets.QFormLayout()
|
||||||
self.formLayout_4.setObjectName("formLayout_4")
|
self.formLayout_4.setObjectName("formLayout_4")
|
||||||
self.edit_faculty_member_title = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
self.edit_faculty_member_title = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
||||||
self.edit_faculty_member_title.setFocusPolicy(QtCore.Qt.FocusPolicy.TabFocus)
|
self.edit_faculty_member_title.setFocusPolicy(QtCore.Qt.TabFocus)
|
||||||
self.edit_faculty_member_title.setReadOnly(True)
|
self.edit_faculty_member_title.setReadOnly(True)
|
||||||
self.edit_faculty_member_title.setObjectName("edit_faculty_member_title")
|
self.edit_faculty_member_title.setObjectName("edit_faculty_member_title")
|
||||||
self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.edit_faculty_member_title)
|
self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.edit_faculty_member_title)
|
||||||
self.edit_faculty_member_select_member = QtWidgets.QComboBox(self.gridLayoutWidget_11)
|
self.edit_faculty_member_select_member = QtWidgets.QComboBox(self.gridLayoutWidget_11)
|
||||||
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.formLayout_4.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.edit_faculty_member_select_member)
|
self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.edit_faculty_member_select_member)
|
||||||
self.label_46 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
self.label_46 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
||||||
self.label_46.setObjectName("label_46")
|
self.label_46.setObjectName("label_46")
|
||||||
self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_46)
|
self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_46)
|
||||||
self.faculty_member_old_telnr = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
self.faculty_member_old_telnr = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
||||||
self.faculty_member_old_telnr.setFocusPolicy(QtCore.Qt.FocusPolicy.ClickFocus)
|
self.faculty_member_old_telnr.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||||
self.faculty_member_old_telnr.setReadOnly(True)
|
self.faculty_member_old_telnr.setReadOnly(True)
|
||||||
self.faculty_member_old_telnr.setObjectName("faculty_member_old_telnr")
|
self.faculty_member_old_telnr.setObjectName("faculty_member_old_telnr")
|
||||||
self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.faculty_member_old_telnr)
|
self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.faculty_member_old_telnr)
|
||||||
self.label_49 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
self.label_49 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
||||||
self.label_49.setObjectName("label_49")
|
self.label_49.setObjectName("label_49")
|
||||||
self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_49)
|
self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_49)
|
||||||
self.faculty_member_oldmail = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
self.faculty_member_oldmail = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
||||||
self.faculty_member_oldmail.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.faculty_member_oldmail.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.faculty_member_oldmail.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhNone)
|
self.faculty_member_oldmail.setInputMethodHints(QtCore.Qt.ImhNone)
|
||||||
self.faculty_member_oldmail.setReadOnly(True)
|
self.faculty_member_oldmail.setReadOnly(True)
|
||||||
self.faculty_member_oldmail.setObjectName("faculty_member_oldmail")
|
self.faculty_member_oldmail.setObjectName("faculty_member_oldmail")
|
||||||
self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.faculty_member_oldmail)
|
self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.faculty_member_oldmail)
|
||||||
self.gridLayout_12.addLayout(self.formLayout_4, 0, 2, 1, 1)
|
self.gridLayout_12.addLayout(self.formLayout_4, 0, 2, 1, 1)
|
||||||
self.formLayout_5 = QtWidgets.QFormLayout()
|
self.formLayout_5 = QtWidgets.QFormLayout()
|
||||||
self.formLayout_5.setObjectName("formLayout_5")
|
self.formLayout_5.setObjectName("formLayout_5")
|
||||||
self.label_47 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
self.label_47 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
||||||
self.label_47.setObjectName("label_47")
|
self.label_47.setObjectName("label_47")
|
||||||
self.formLayout_5.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_47)
|
self.formLayout_5.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_47)
|
||||||
self.label_48 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
self.label_48 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
||||||
self.label_48.setObjectName("label_48")
|
self.label_48.setObjectName("label_48")
|
||||||
self.formLayout_5.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_48)
|
self.formLayout_5.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_48)
|
||||||
self.user_faculty_member_new_mail = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
self.user_faculty_member_new_mail = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
||||||
self.user_faculty_member_new_mail.setObjectName("user_faculty_member_new_mail")
|
self.user_faculty_member_new_mail.setObjectName("user_faculty_member_new_mail")
|
||||||
self.formLayout_5.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.user_faculty_member_new_mail)
|
self.formLayout_5.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.user_faculty_member_new_mail)
|
||||||
self.user_faculty_member_new_telnr = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
self.user_faculty_member_new_telnr = QtWidgets.QLineEdit(self.gridLayoutWidget_11)
|
||||||
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.formLayout_5.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.user_faculty_member_new_telnr)
|
self.formLayout_5.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.user_faculty_member_new_telnr)
|
||||||
self.gridLayout_12.addLayout(self.formLayout_5, 2, 4, 1, 1)
|
self.gridLayout_12.addLayout(self.formLayout_5, 2, 4, 1, 1)
|
||||||
self.label_41 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
self.label_41 = QtWidgets.QLabel(self.gridLayoutWidget_11)
|
||||||
self.label_41.setObjectName("label_41")
|
self.label_41.setObjectName("label_41")
|
||||||
@@ -1060,7 +1062,7 @@ class Ui_MainWindow(object):
|
|||||||
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
||||||
self.groupBox_2 = QtWidgets.QGroupBox(self.frame_creation_progress)
|
self.groupBox_2 = QtWidgets.QGroupBox(self.frame_creation_progress)
|
||||||
self.groupBox_2.setEnabled(True)
|
self.groupBox_2.setEnabled(True)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
|
||||||
@@ -1073,7 +1075,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.appdata_check.setFont(font)
|
self.appdata_check.setFont(font)
|
||||||
self.appdata_check.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.appdata_check.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.appdata_check.setObjectName("appdata_check")
|
self.appdata_check.setObjectName("appdata_check")
|
||||||
self.media_check = QtWidgets.QCheckBox(self.groupBox_2)
|
self.media_check = QtWidgets.QCheckBox(self.groupBox_2)
|
||||||
self.media_check.setGeometry(QtCore.QRect(20, 70, 241, 41))
|
self.media_check.setGeometry(QtCore.QRect(20, 70, 241, 41))
|
||||||
@@ -1082,7 +1084,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.media_check.setFont(font)
|
self.media_check.setFont(font)
|
||||||
self.media_check.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.media_check.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.media_check.setObjectName("media_check")
|
self.media_check.setObjectName("media_check")
|
||||||
self.ids_check = QtWidgets.QCheckBox(self.groupBox_2)
|
self.ids_check = QtWidgets.QCheckBox(self.groupBox_2)
|
||||||
self.ids_check.setGeometry(QtCore.QRect(20, 140, 241, 41))
|
self.ids_check.setGeometry(QtCore.QRect(20, 140, 241, 41))
|
||||||
@@ -1091,11 +1093,11 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.ids_check.setFont(font)
|
self.ids_check.setFont(font)
|
||||||
self.ids_check.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.ids_check.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.ids_check.setObjectName("ids_check")
|
self.ids_check.setObjectName("ids_check")
|
||||||
self.verticalLayout_4.addWidget(self.groupBox_2)
|
self.verticalLayout_4.addWidget(self.groupBox_2)
|
||||||
self.groupBox = QtWidgets.QGroupBox(self.frame_creation_progress)
|
self.groupBox = QtWidgets.QGroupBox(self.frame_creation_progress)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
|
||||||
@@ -1110,9 +1112,9 @@ class Ui_MainWindow(object):
|
|||||||
font.setUnderline(False)
|
font.setUnderline(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
font.setKerning(True)
|
font.setKerning(True)
|
||||||
font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferDefault)
|
font.setStyleStrategy(QtGui.QFont.PreferDefault)
|
||||||
self.media_checked.setFont(font)
|
self.media_checked.setFont(font)
|
||||||
self.media_checked.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.media_checked.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.media_checked.setObjectName("media_checked")
|
self.media_checked.setObjectName("media_checked")
|
||||||
self.media_edited_check = QtWidgets.QCheckBox(self.groupBox)
|
self.media_edited_check = QtWidgets.QCheckBox(self.groupBox)
|
||||||
self.media_edited_check.setGeometry(QtCore.QRect(20, 70, 241, 41))
|
self.media_edited_check.setGeometry(QtCore.QRect(20, 70, 241, 41))
|
||||||
@@ -1123,9 +1125,9 @@ class Ui_MainWindow(object):
|
|||||||
font.setUnderline(False)
|
font.setUnderline(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
font.setKerning(True)
|
font.setKerning(True)
|
||||||
font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferDefault)
|
font.setStyleStrategy(QtGui.QFont.PreferDefault)
|
||||||
self.media_edited_check.setFont(font)
|
self.media_edited_check.setFont(font)
|
||||||
self.media_edited_check.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.media_edited_check.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.media_edited_check.setObjectName("media_edited_check")
|
self.media_edited_check.setObjectName("media_edited_check")
|
||||||
self.app_created = QtWidgets.QCheckBox(self.groupBox)
|
self.app_created = QtWidgets.QCheckBox(self.groupBox)
|
||||||
self.app_created.setGeometry(QtCore.QRect(20, 110, 161, 41))
|
self.app_created.setGeometry(QtCore.QRect(20, 110, 161, 41))
|
||||||
@@ -1136,9 +1138,9 @@ class Ui_MainWindow(object):
|
|||||||
font.setUnderline(False)
|
font.setUnderline(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
font.setKerning(True)
|
font.setKerning(True)
|
||||||
font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferDefault)
|
font.setStyleStrategy(QtGui.QFont.PreferDefault)
|
||||||
self.app_created.setFont(font)
|
self.app_created.setFont(font)
|
||||||
self.app_created.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.app_created.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.app_created.setObjectName("app_created")
|
self.app_created.setObjectName("app_created")
|
||||||
self.btn_copy_adis_command = QtWidgets.QPushButton(self.groupBox)
|
self.btn_copy_adis_command = QtWidgets.QPushButton(self.groupBox)
|
||||||
self.btn_copy_adis_command.setGeometry(QtCore.QRect(170, 120, 101, 23))
|
self.btn_copy_adis_command.setGeometry(QtCore.QRect(170, 120, 101, 23))
|
||||||
@@ -1149,14 +1151,14 @@ class Ui_MainWindow(object):
|
|||||||
font.setUnderline(False)
|
font.setUnderline(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
font.setKerning(True)
|
font.setKerning(True)
|
||||||
font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferDefault)
|
font.setStyleStrategy(QtGui.QFont.PreferDefault)
|
||||||
self.btn_copy_adis_command.setFont(font)
|
self.btn_copy_adis_command.setFont(font)
|
||||||
self.btn_copy_adis_command.setStatusTip("")
|
self.btn_copy_adis_command.setStatusTip("")
|
||||||
self.btn_copy_adis_command.setWhatsThis("")
|
self.btn_copy_adis_command.setWhatsThis("")
|
||||||
self.btn_copy_adis_command.setAccessibleDescription("")
|
self.btn_copy_adis_command.setAccessibleDescription("")
|
||||||
self.btn_copy_adis_command.setAutoFillBackground(False)
|
self.btn_copy_adis_command.setAutoFillBackground(False)
|
||||||
icon = QtGui.QIcon()
|
icon = QtGui.QIcon()
|
||||||
icon.addPixmap(QtGui.QPixmap("c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\../../../.designer/backup/icons/information.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
icon.addPixmap(QtGui.QPixmap("/home/alexander/GitHub/SemesterapparatsManager/src/ui/../../../.designer/backup/icons/information.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.btn_copy_adis_command.setIcon(icon)
|
self.btn_copy_adis_command.setIcon(icon)
|
||||||
self.btn_copy_adis_command.setCheckable(False)
|
self.btn_copy_adis_command.setCheckable(False)
|
||||||
self.btn_copy_adis_command.setChecked(False)
|
self.btn_copy_adis_command.setChecked(False)
|
||||||
@@ -1166,19 +1168,19 @@ class Ui_MainWindow(object):
|
|||||||
self.horizontalLayout_6.addWidget(self.frame_creation_progress)
|
self.horizontalLayout_6.addWidget(self.frame_creation_progress)
|
||||||
self.frame_2 = QtWidgets.QFrame(self.centralwidget)
|
self.frame_2 = QtWidgets.QFrame(self.centralwidget)
|
||||||
self.frame_2.setGeometry(QtCore.QRect(1280, 10, 301, 341))
|
self.frame_2.setGeometry(QtCore.QRect(1280, 10, 301, 341))
|
||||||
self.frame_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||||
self.frame_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
self.frame_2.setObjectName("frame_2")
|
self.frame_2.setObjectName("frame_2")
|
||||||
self.calendarWidget = QtWidgets.QCalendarWidget(self.frame_2)
|
self.calendarWidget = QtWidgets.QCalendarWidget(self.frame_2)
|
||||||
self.calendarWidget.setGeometry(QtCore.QRect(0, 0, 291, 191))
|
self.calendarWidget.setGeometry(QtCore.QRect(0, 0, 291, 191))
|
||||||
self.calendarWidget.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.calendarWidget.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.calendarWidget.setGridVisible(True)
|
self.calendarWidget.setGridVisible(True)
|
||||||
self.calendarWidget.setVerticalHeaderFormat(QtWidgets.QCalendarWidget.VerticalHeaderFormat.NoVerticalHeader)
|
self.calendarWidget.setVerticalHeaderFormat(QtWidgets.QCalendarWidget.NoVerticalHeader)
|
||||||
self.calendarWidget.setObjectName("calendarWidget")
|
self.calendarWidget.setObjectName("calendarWidget")
|
||||||
self.message_frame = QtWidgets.QFrame(self.frame_2)
|
self.message_frame = QtWidgets.QFrame(self.frame_2)
|
||||||
self.message_frame.setGeometry(QtCore.QRect(0, 210, 301, 121))
|
self.message_frame.setGeometry(QtCore.QRect(0, 210, 301, 121))
|
||||||
self.message_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.message_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||||
self.message_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.message_frame.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
self.message_frame.setObjectName("message_frame")
|
self.message_frame.setObjectName("message_frame")
|
||||||
self.label_14 = QtWidgets.QLabel(self.message_frame)
|
self.label_14 = QtWidgets.QLabel(self.message_frame)
|
||||||
self.label_14.setGeometry(QtCore.QRect(10, 10, 47, 20))
|
self.label_14.setGeometry(QtCore.QRect(10, 10, 47, 20))
|
||||||
@@ -1186,15 +1188,15 @@ class Ui_MainWindow(object):
|
|||||||
self.line_app_info = QtWidgets.QLineEdit(self.message_frame)
|
self.line_app_info = QtWidgets.QLineEdit(self.message_frame)
|
||||||
self.line_app_info.setEnabled(True)
|
self.line_app_info.setEnabled(True)
|
||||||
self.line_app_info.setGeometry(QtCore.QRect(60, 10, 31, 20))
|
self.line_app_info.setGeometry(QtCore.QRect(60, 10, 31, 20))
|
||||||
self.line_app_info.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.line_app_info.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.line_app_info.setObjectName("line_app_info")
|
self.line_app_info.setObjectName("line_app_info")
|
||||||
self.message_box = QtWidgets.QTextEdit(self.message_frame)
|
self.message_box = QtWidgets.QTextEdit(self.message_frame)
|
||||||
self.message_box.setGeometry(QtCore.QRect(10, 40, 281, 71))
|
self.message_box.setGeometry(QtCore.QRect(10, 40, 281, 71))
|
||||||
self.message_box.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.message_box.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.message_box.setObjectName("message_box")
|
self.message_box.setObjectName("message_box")
|
||||||
self.btn_delete_message = QtWidgets.QPushButton(self.message_frame)
|
self.btn_delete_message = QtWidgets.QPushButton(self.message_frame)
|
||||||
self.btn_delete_message.setGeometry(QtCore.QRect(130, 10, 75, 23))
|
self.btn_delete_message.setGeometry(QtCore.QRect(130, 10, 75, 23))
|
||||||
self.btn_delete_message.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.btn_delete_message.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.btn_delete_message.setObjectName("btn_delete_message")
|
self.btn_delete_message.setObjectName("btn_delete_message")
|
||||||
self.spin_select_message = QtWidgets.QSpinBox(self.message_frame)
|
self.spin_select_message = QtWidgets.QSpinBox(self.message_frame)
|
||||||
self.spin_select_message.setGeometry(QtCore.QRect(210, 10, 74, 22))
|
self.spin_select_message.setGeometry(QtCore.QRect(210, 10, 74, 22))
|
||||||
@@ -1205,26 +1207,33 @@ class Ui_MainWindow(object):
|
|||||||
self.label_total_day_messages.setObjectName("label_total_day_messages")
|
self.label_total_day_messages.setObjectName("label_total_day_messages")
|
||||||
MainWindow.setCentralWidget(self.centralwidget)
|
MainWindow.setCentralWidget(self.centralwidget)
|
||||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1593, 21))
|
self.menubar.setGeometry(QtCore.QRect(0, 0, 1601, 30))
|
||||||
self.menubar.setObjectName("menubar")
|
self.menubar.setObjectName("menubar")
|
||||||
self.menuDatei = QtWidgets.QMenu(self.menubar)
|
self.menuDatei = QtWidgets.QMenu(self.menubar)
|
||||||
self.menuDatei.setObjectName("menuDatei")
|
self.menuDatei.setObjectName("menuDatei")
|
||||||
self.menuEinstellungen = QtWidgets.QMenu(self.menubar)
|
self.menuEinstellungen = QtWidgets.QMenu(self.menubar)
|
||||||
self.menuEinstellungen.setObjectName("menuEinstellungen")
|
self.menuEinstellungen.setObjectName("menuEinstellungen")
|
||||||
|
self.menuHelp = QtWidgets.QMenu(self.menubar)
|
||||||
|
self.menuHelp.setObjectName("menuHelp")
|
||||||
MainWindow.setMenuBar(self.menubar)
|
MainWindow.setMenuBar(self.menubar)
|
||||||
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
||||||
self.statusbar.setObjectName("statusbar")
|
self.statusbar.setObjectName("statusbar")
|
||||||
MainWindow.setStatusBar(self.statusbar)
|
MainWindow.setStatusBar(self.statusbar)
|
||||||
self.actionBeenden = QtGui.QAction(MainWindow)
|
self.actionBeenden = QtWidgets.QAction(MainWindow)
|
||||||
self.actionBeenden.setShortcutVisibleInContextMenu(True)
|
self.actionBeenden.setShortcutVisibleInContextMenu(True)
|
||||||
self.actionBeenden.setObjectName("actionBeenden")
|
self.actionBeenden.setObjectName("actionBeenden")
|
||||||
self.actionEinstellungen = QtGui.QAction(MainWindow)
|
self.actionEinstellungen = QtWidgets.QAction(MainWindow)
|
||||||
self.actionEinstellungen.setShortcutVisibleInContextMenu(True)
|
self.actionEinstellungen.setShortcutVisibleInContextMenu(True)
|
||||||
self.actionEinstellungen.setObjectName("actionEinstellungen")
|
self.actionEinstellungen.setObjectName("actionEinstellungen")
|
||||||
|
self.actionDokumentation = QtWidgets.QAction(MainWindow)
|
||||||
|
self.actionDokumentation.setShortcutContext(QtCore.Qt.ApplicationShortcut)
|
||||||
|
self.actionDokumentation.setObjectName("actionDokumentation")
|
||||||
self.menuDatei.addAction(self.actionBeenden)
|
self.menuDatei.addAction(self.actionBeenden)
|
||||||
self.menuEinstellungen.addAction(self.actionEinstellungen)
|
self.menuEinstellungen.addAction(self.actionEinstellungen)
|
||||||
|
self.menuHelp.addAction(self.actionDokumentation)
|
||||||
self.menubar.addAction(self.menuDatei.menuAction())
|
self.menubar.addAction(self.menuDatei.menuAction())
|
||||||
self.menubar.addAction(self.menuEinstellungen.menuAction())
|
self.menubar.addAction(self.menuEinstellungen.menuAction())
|
||||||
|
self.menubar.addAction(self.menuHelp.menuAction())
|
||||||
|
|
||||||
self.retranslateUi(MainWindow)
|
self.retranslateUi(MainWindow)
|
||||||
self.tabWidget.setCurrentIndex(0)
|
self.tabWidget.setCurrentIndex(0)
|
||||||
@@ -1447,7 +1456,10 @@ class Ui_MainWindow(object):
|
|||||||
self.label_total_day_messages.setText(_translate("MainWindow", "TextLabel"))
|
self.label_total_day_messages.setText(_translate("MainWindow", "TextLabel"))
|
||||||
self.menuDatei.setTitle(_translate("MainWindow", "Datei"))
|
self.menuDatei.setTitle(_translate("MainWindow", "Datei"))
|
||||||
self.menuEinstellungen.setTitle(_translate("MainWindow", "Bearbeiten"))
|
self.menuEinstellungen.setTitle(_translate("MainWindow", "Bearbeiten"))
|
||||||
|
self.menuHelp.setTitle(_translate("MainWindow", "Help"))
|
||||||
self.actionBeenden.setText(_translate("MainWindow", "Beenden"))
|
self.actionBeenden.setText(_translate("MainWindow", "Beenden"))
|
||||||
self.actionBeenden.setShortcut(_translate("MainWindow", "Ctrl+Q"))
|
self.actionBeenden.setShortcut(_translate("MainWindow", "Ctrl+Q"))
|
||||||
self.actionEinstellungen.setText(_translate("MainWindow", "Einstellungen"))
|
self.actionEinstellungen.setText(_translate("MainWindow", "Einstellungen"))
|
||||||
self.actionEinstellungen.setShortcut(_translate("MainWindow", "Alt+S"))
|
self.actionEinstellungen.setShortcut(_translate("MainWindow", "Alt+S"))
|
||||||
|
self.actionDokumentation.setText(_translate("MainWindow", "Dokumentation"))
|
||||||
|
self.actionDokumentation.setShortcut(_translate("MainWindow", "F1"))
|
||||||
|
|||||||
155
src/ui/resources_rc.py
Normal file
155
src/ui/resources_rc.py
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
# Resource object code (Python 3)
|
||||||
|
# Created by: object code
|
||||||
|
# Created by: The Resource Compiler for Qt version 6.6.2
|
||||||
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
|
from PySide6 import QtCore
|
||||||
|
|
||||||
|
qt_resource_data = b"\
|
||||||
|
\x00\x00\x00\xde\
|
||||||
|
\x89\
|
||||||
|
PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
|
||||||
|
\x00\x00 \x00\x00\x00 \x02\x03\x00\x00\x00\x0e\x14\x92g\
|
||||||
|
\x00\x00\x00\x0cPLTEe-g\xff\xff\x00\x99\x99\
|
||||||
|
\x99\x00\x00\x00\xb2\x18W>\x00\x00\x00\x01tRNS\
|
||||||
|
\x00@\xe6\xd8f\x00\x00\x00\x80IDATx\xdaU\
|
||||||
|
\xcc\xb1\x0d\xc3 \x10\x85\xe1\x93\xa8Q\xf6HO\x9d)\
|
||||||
|
\x9e\xa8\x82\xd7\x88h`\x14\xca\x88)\xb2\xc4\xed`e\
|
||||||
|
\x888\xdc\x9d-\x9b\xbfy_\xf5h\xf4\xa0=\xfe\xd8\
|
||||||
|
:\xbc\x0ed\x83G\xaa3\x02b\x9b\xc1\xc0j(\x06\
|
||||||
|
\x87\x8d\xf3\x04?\x90\xea\x15a \xb6+\x18E\x8eN\
|
||||||
|
8\x08\xb2\xe2\xa9\xf0\x8aT\x05P\x04`\x01b\x13\x14\
|
||||||
|
\x16\xb0\x02\xab`\x81A\xfb\x9e\x08\xba\xb1\xd3m\x93~\
|
||||||
|
\x9d\xa8ko\xa2\xbb\xa2\xfd\x01\xa6\xe9X\x86\xbd\xa6E\
|
||||||
|
\x00\x00\x00\x00IEND\xaeB`\x82\
|
||||||
|
\x00\x00\x00\xf5\
|
||||||
|
\x89\
|
||||||
|
PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
|
||||||
|
\x00\x00 \x00\x00\x00 \x04\x03\x00\x00\x00\x81Tg\xc7\
|
||||||
|
\x00\x00\x00\x0fPLTEet-\xff\xff\xff\x99\x99\
|
||||||
|
\x99\x00\x00\xff\x00\x00\x00\x06\xefPJ\x00\x00\x00\x01t\
|
||||||
|
RNS\x00@\xe6\xd8f\x00\x00\x00\x94IDAT\
|
||||||
|
x\xda\xad\x91\xd1\x09\x03!\x10D\x17\xb9\x066g\x01\
|
||||||
|
fH\x03\xc1\x06\xa2\xd8\x7fM\xc9:\x1eC$\x9fy\
|
||||||
|
?\xe2\xe3\xad\x88\xda$\x01(&pw\xf7\x1b\xb4w\
|
||||||
|
r\x99\xe4\x17\x85\x22\xfa\xb3>\xdd=+\xa8\xb5\xc6\xf2\
|
||||||
|
b \x91\x19\xac\x91\x99P\x88\xce\x09\x91\x0b\xc5\x19g\
|
||||||
|
H\xd0P\xe0/\x22}\x89\xfeCpf\x89\x1c\xefv\
|
||||||
|
p?M\x0faM\x17\x07\xcc\x22!\x0c\x82\xe1d\x00\
|
||||||
|
\xebQG\x8b~\xe8+\xf0\x18\xd13\xa0A\x0ba\x22\
|
||||||
|
}D\xf4\xe2\xd8\x85\xb5]\x1c\xbb0\xec\x22Q\xbc\x01\
|
||||||
|
\x01\xb7#\x93\xf0\xcb\xa6\x83\x00\x00\x00\x00IEND\
|
||||||
|
\xaeB`\x82\
|
||||||
|
\x00\x00\x00\xfc\
|
||||||
|
\x89\
|
||||||
|
PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
|
||||||
|
\x00\x00 \x00\x00\x00 \x02\x03\x00\x00\x00\x0e\x14\x92g\
|
||||||
|
\x00\x00\x00\x0cPLTEe-g\xff\xff\xff\x99\x99\
|
||||||
|
\x99\xff\x00\x00\x9e\xb6)\xe3\x00\x00\x00\x01tRNS\
|
||||||
|
\x00@\xe6\xd8f\x00\x00\x00\x9eIDATx\xdaM\
|
||||||
|
\x8e\xb1\x0d\xc20\x10E\xbfBI\xc1\x1eP0B\xa6\
|
||||||
|
8\xa5\xf4(\xf6()#/\x11\x96H\x0deD\x1f\
|
||||||
|
)\xb2p>w!'\xf1\xaa\xa7\xfb\xdf\xbe\x03p\xe2\
|
||||||
|
\x07;-\xf9\x00l\xc0\xdf\xe8B\xe5H\xc8\x97\x0a\x8d\
|
||||||
|
\xd5*\xc6f\x95'\x19\x99T:\xd6\xa0\xd2V\xe1\xd2\
|
||||||
|
i\xbb\xa5\xc4)\xa8\x90S\x90\xc8Ue\x11\xe1.U\
|
||||||
|
:\xb2\xa8P\x02\xff\xc5#/\x17\x7f^\xfc\xc3\xd9W\
|
||||||
|
\xcc\xbet\xf03z?\xac\x07h\x94\x04\x8c&o\x00\
|
||||||
|
w\x93A\xe5|T\xd0\x8c\x9a$(7n\x19F\x93\
|
||||||
|
\xb3&\xc65\x03\xf8\x02;d\xa4\x1d\xa53i\xfd\x00\
|
||||||
|
\x00\x00\x00IEND\xaeB`\x82\
|
||||||
|
\x00\x00\x00\xfc\
|
||||||
|
\x89\
|
||||||
|
PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
|
||||||
|
\x00\x00 \x00\x00\x00 \x04\x03\x00\x00\x00\x81Tg\xc7\
|
||||||
|
\x00\x00\x00\x0fPLTEet-\xff\xff\xff\x99\x99\
|
||||||
|
\x99\x00\x00\xff\x00\x00\x00\x06\xefPJ\x00\x00\x00\x01t\
|
||||||
|
RNS\x00@\xe6\xd8f\x00\x00\x00\x9bIDAT\
|
||||||
|
x\xda\x85\xd1\xc1\x0d\x03!\x0cD\xd1\x11\xda\x06\x1c(\
|
||||||
|
\x00\xac4\x80h \xfa\xaf)\xf1:\xc6\x84K\xe6\
|
||||||
|
\xb2\xda\xa7\x0f\x17p/0s\x86\x8f\x0b\x11=\xd8\xff\
|
||||||
|
Ig\x12\xc8\x96\x15\xca\x82\xe4AkM>/\x0b\x22\
|
||||||
|
\xc5V%Y\x01\x91%v\xe2\x0bCO8\xa4\xac\x10\
|
||||||
|
\xab\xdc\xe1\xa0\xcd\x0d\xbc\xa0\x9e@\xff\x80\x16\x84\x9fb\
|
||||||
|
\x18\xc4V\x0dP6H\x9c\x81k;2\x04\xd0\xb7+\
|
||||||
|
\x19\xb0\xc4\x03`\x92nJ \x0b\xb3K?\xfd)\xf8\
|
||||||
|
9\xa5\x97\xc0\x84\xbb\x00|\xe1\x03\x19\xfb\xae\x13\xd0O\
|
||||||
|
\xb8N\x00\x9f\x10\x14\xde\xf9|#;u\x5c\xf4%\x00\
|
||||||
|
\x00\x00\x00IEND\xaeB`\x82\
|
||||||
|
"
|
||||||
|
|
||||||
|
qt_resource_name = b"\
|
||||||
|
\x00\x08\
|
||||||
|
\x0b\xca\xa3^\
|
||||||
|
\x00q\
|
||||||
|
\x00u\x00e\x00s\x00t\x00i\x00o\x00n\
|
||||||
|
\x00\x08\
|
||||||
|
\x09\x0a\xf4<\
|
||||||
|
\x00c\
|
||||||
|
\x00r\x00i\x00t\x00i\x00c\x00a\x00l\
|
||||||
|
\x00\x0b\
|
||||||
|
\x09\xd86\x9e\
|
||||||
|
\x00i\
|
||||||
|
\x00n\x00f\x00o\x00r\x00m\x00a\x00t\x00i\x00o\x00n\
|
||||||
|
\x00\x0a\
|
||||||
|
\x04S\x86\xf5\
|
||||||
|
\x00w\
|
||||||
|
\x00a\x00r\x00n\x00_\x00i\x00m\x00a\x00g\x00e\
|
||||||
|
\x00\x05\
|
||||||
|
\x00o\xa6S\
|
||||||
|
\x00i\
|
||||||
|
\x00c\x00o\x00n\x00s\
|
||||||
|
\x00\x0b\
|
||||||
|
\x00\xb5E\xe7\
|
||||||
|
\x00w\
|
||||||
|
\x00a\x00r\x00n\x00i\x00n\x00g\x00.\x00p\x00n\x00g\
|
||||||
|
\x00\x0f\
|
||||||
|
\x06\xb2\xe7'\
|
||||||
|
\x00i\
|
||||||
|
\x00n\x00f\x00o\x00r\x00m\x00a\x00t\x00i\x00o\x00n\x00.\x00p\x00n\x00g\
|
||||||
|
\x00\x0c\
|
||||||
|
\x04-B\xa7\
|
||||||
|
\x00c\
|
||||||
|
\x00r\x00i\x00t\x00i\x00c\x00a\x00l\x00.\x00p\x00n\x00g\
|
||||||
|
\x00\x0c\
|
||||||
|
\x03v\xc2\x07\
|
||||||
|
\x00q\
|
||||||
|
\x00u\x00e\x00s\x00t\x00i\x00o\x00n\x00.\x00p\x00n\x00g\
|
||||||
|
"
|
||||||
|
|
||||||
|
qt_resource_struct = b"\
|
||||||
|
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x04\x00\x00\x00\x01\
|
||||||
|
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||||
|
\x00\x00\x00H\x00\x02\x00\x00\x00\x01\x00\x00\x00\x0b\
|
||||||
|
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||||
|
\x00\x00\x00\x16\x00\x02\x00\x00\x00\x01\x00\x00\x00\x09\
|
||||||
|
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||||
|
\x00\x00\x00,\x00\x02\x00\x00\x00\x01\x00\x00\x00\x07\
|
||||||
|
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||||
|
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x05\
|
||||||
|
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||||
|
\x00\x00\x00b\x00\x02\x00\x00\x00\x01\x00\x00\x00\x06\
|
||||||
|
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||||
|
\x00\x00\x00\xd0\x00\x00\x00\x00\x00\x01\x00\x00\x02\xdb\
|
||||||
|
\x00\x00\x01\x8d\xabem#\
|
||||||
|
\x00\x00\x00b\x00\x02\x00\x00\x00\x01\x00\x00\x00\x08\
|
||||||
|
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||||
|
\x00\x00\x00\x8e\x00\x00\x00\x00\x00\x01\x00\x00\x00\xe2\
|
||||||
|
\x00\x00\x01\x8d\xabem!\
|
||||||
|
\x00\x00\x00b\x00\x02\x00\x00\x00\x01\x00\x00\x00\x0a\
|
||||||
|
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||||
|
\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x01\x00\x00\x01\xdb\
|
||||||
|
\x00\x00\x01\x8d\xabem!\
|
||||||
|
\x00\x00\x00b\x00\x02\x00\x00\x00\x01\x00\x00\x00\x0c\
|
||||||
|
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||||
|
\x00\x00\x00r\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
|
||||||
|
\x00\x00\x01\x8d\xabem#\
|
||||||
|
"
|
||||||
|
|
||||||
|
def qInitResources():
|
||||||
|
QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||||
|
|
||||||
|
def qCleanupResources():
|
||||||
|
QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||||
|
|
||||||
|
qInitResources()
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1593</width>
|
<width>1601</width>
|
||||||
<height>800</height>
|
<height>800</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -1725,12 +1725,12 @@
|
|||||||
<attribute name="horizontalHeaderCascadingSectionResizes">
|
<attribute name="horizontalHeaderCascadingSectionResizes">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
|
||||||
<number>59</number>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||||
<number>24</number>
|
<number>24</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||||
|
<number>59</number>
|
||||||
|
</attribute>
|
||||||
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
@@ -2817,8 +2817,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1593</width>
|
<width>1601</width>
|
||||||
<height>21</height>
|
<height>30</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuDatei">
|
<widget class="QMenu" name="menuDatei">
|
||||||
@@ -2870,6 +2870,12 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Dokumentation</string>
|
<string>Dokumentation</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>F1</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcutContext">
|
||||||
|
<enum>Qt::ApplicationShortcut</enum>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
54
src/ui/widgets/webview.ui
Normal file
54
src/ui/widgets/webview.ui
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MainWindow</class>
|
||||||
|
<widget class="QMainWindow" name="MainWindow">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>600</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>MainWindow</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
<widget class="QWebEngineView" name="webEngineView">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>160</x>
|
||||||
|
<y>190</y>
|
||||||
|
<width>300</width>
|
||||||
|
<height>200</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="url">
|
||||||
|
<url>
|
||||||
|
<string>about:blank</string>
|
||||||
|
</url>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>30</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>QWebEngineView</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header location="global">QtWebEngineWidgets/QWebEngineView</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
37
src/ui/widgets/webview_ui.py
Normal file
37
src/ui/widgets/webview_ui.py
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Form implementation generated from reading ui file '/home/alexander/GitHub/SemesterapparatsManager/src/ui/widgets/webview.ui'
|
||||||
|
#
|
||||||
|
# Created by: PyQt6 UI code generator 6.6.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
|
||||||
|
from PySide6 import QtWebEngineWidgets
|
||||||
|
|
||||||
|
|
||||||
|
class Ui_MainWindow(object):
|
||||||
|
def setupUi(self, MainWindow):
|
||||||
|
MainWindow.setObjectName("MainWindow")
|
||||||
|
MainWindow.resize(800, 600)
|
||||||
|
self.centralwidget = QtWidgets.QWidget(parent=MainWindow)
|
||||||
|
self.centralwidget.setObjectName("centralwidget")
|
||||||
|
self.webEngineView = QtWebEngineWidgets.QWebEngineView(parent=self.centralwidget)
|
||||||
|
self.webEngineView.setGeometry(QtCore.QRect(160, 190, 300, 200))
|
||||||
|
self.webEngineView.setUrl(QtCore.QUrl("about:blank"))
|
||||||
|
self.webEngineView.setObjectName("webEngineView")
|
||||||
|
MainWindow.setCentralWidget(self.centralwidget)
|
||||||
|
self.menubar = QtWidgets.QMenuBar(parent=MainWindow)
|
||||||
|
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 30))
|
||||||
|
self.menubar.setObjectName("menubar")
|
||||||
|
MainWindow.setMenuBar(self.menubar)
|
||||||
|
self.statusbar = QtWidgets.QStatusBar(parent=MainWindow)
|
||||||
|
self.statusbar.setObjectName("statusbar")
|
||||||
|
MainWindow.setStatusBar(self.statusbar)
|
||||||
|
|
||||||
|
self.retranslateUi(MainWindow)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||||
|
|
||||||
|
def retranslateUi(self, MainWindow):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
|
||||||
37
src/utils/documentationview.py
Normal file
37
src/utils/documentationview.py
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import sys
|
||||||
|
#from PyQt6 import Webview
|
||||||
|
from PySide6.QtWebEngineWidgets import QWebEngineView
|
||||||
|
import os
|
||||||
|
from PySide6.QtWidgets import QTabWidget
|
||||||
|
|
||||||
|
documentation_path = "docs"
|
||||||
|
|
||||||
|
class DocumentationViewer(QMainWindow):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
self.setWindowTitle("Documentation Viewer")
|
||||||
|
self.setGeometry(100, 100, 800, 600)
|
||||||
|
|
||||||
|
self.tabs = QTabWidget()
|
||||||
|
self.setCentralWidget(self.tabs)
|
||||||
|
|
||||||
|
self.set_documentation_tabs()
|
||||||
|
|
||||||
|
def set_documentation_tabs(self):
|
||||||
|
files = [os.path.join(documentation_path, file) for file in os.listdir(documentation_path) if file.endswith(".html")]
|
||||||
|
for file in files:
|
||||||
|
with open(file, "r") as f:
|
||||||
|
html_content = f.read()
|
||||||
|
tab_name = os.path.basename(file).split(".")[0]
|
||||||
|
self.load_documentation(tab_name, html_content)
|
||||||
|
def load_documentation(self, tab_name="Documentation", html_content="<h1>Documentation</h1><p>Your HTML documentation content goes here.</p>"):
|
||||||
|
documentation_tab = QWebEngineView()
|
||||||
|
documentation_tab.setHtml(html_content)
|
||||||
|
self.tabs.addTab(documentation_tab, tab_name)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
viewer = DocumentationViewer()
|
||||||
|
viewer.show()
|
||||||
|
sys.exit(app.exec())
|
||||||
|
|
||||||
Reference in New Issue
Block a user