Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
paule32 committed Nov 26, 2024
1 parent 3537ac7 commit 6716e07
Show file tree
Hide file tree
Showing 7 changed files with 220 additions and 20 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,9 @@ src/xx11.py.bak
src/xx1.py
src/xx3.py
src/xx10.py
src/locales/de_de/LC_MESSAGES/observer.po.bak
src/tools.pro/__pycache__/stub.cpython-313.pyc
src/tools.pro/__pycache__/zipfiles.cpython-313.pyc
src/tools.pro/flags/__pycache__/downresize.cpython-313.pyc
src/locales/en_us/LC_MESSAGES/observer.mo.gz
src/locales/de_de/LC_MESSAGES/observer.mo.gz
43 changes: 43 additions & 0 deletions src/build_loc.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
:: ---------------------------------------------------------------------------
:: Datei: build_loc.bat - Windows MS-DOS Batch file
:: Author: Jens Kallup - paule32
::
:: Rechte: (c) 2024 by kallup non-profit software
:: all rights reserved
::
:: only for education, and for non-profit usage !!!
:: commercial use ist not allowed.
:: ---------------------------------------------------------------------------
@echo off
echo create directories...

:: ---------------------------------------------------------------------------
:: for default, the neccassary localization directories, and file are already
:: exists. But I add a "mkdir" command, and return value check for future use
:: new languages can be add into the for range block.
:: ---------------------------------------------------------------------------
:: en => English
:: de => German
:: ---------------------------------------------------------------------------
mkdir __pycache__\_internal\locales\de_de\LC_MESSAGES
mkdir __pycache__\_internal\locales\en_us\LC_MESSAGES

set BASEDIR=%cd%

::set PYTHONPATH=
::%PY%\Lib;%PY%\Lib\site-packagesss
::set PYTHONHOME=
set SRC=%BASEDIR%/src
set VPA=%BASEDIR%/venv

cd %BASEDIR%\locales\de_de\LC_MESSAGES
rm -rf observer.mo.gz
msgfmt -o observer.mo observer.po
gzip -9 observer.mo
copy observer.mo.gz %BASEDIR%\__pycache__\_internal\locales\de_de\LC_MESSAGES

cd %BASEDIR%\locales\en_us\LC_MESSAGES
rm -rf observer.mo.gz
msgfmt -o observer.mo observer.po
gzip -9 observer.mo
copy observer.mo.gz %BASEDIR%\__pycache__\_internal\locales\en_us\LC_MESSAGES
61 changes: 41 additions & 20 deletions src/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16129,47 +16129,68 @@ def ApplicationAtExit():
class LoginDialog(QDialog):
def __init__(self):
super().__init__()
self.setWindowTitle("Login Screen")
self.setGeometry(100, 100, 400, 300)

self.setWindowTitle("Login")
self.setGeometry(100, 100, 450, 400)
self.setStyleSheet(_("login_dialog_style"))

# Hauptlayout des Dialogs
layout = QVBoxLayout()

# Bild (Logo oder Symbol)
self.logo_label = QLabel(self)
pixmap = QPixmap("path/to/your/image.png") # Ersetze den Pfad durch den Pfad zu deinem Bild
self.logo_label.setPixmap(pixmap)
self.logo_label.setAlignment(Qt.AlignCenter)
layout.addWidget(self.logo_label)

# Eingabe-ComboBox
# Titel: Login
self.title_label = QLabel("Login")
self.title_label.setAlignment(Qt.AlignCenter)
self.title_label.setFont(QFont("Arial", 18, QFont.Bold))
self.title_label.setStyleSheet("color: #ffffff;")
self.title_label.setMaximumHeight(100)
layout.addWidget(self.title_label)

# ComboBox zur Auswahl
self.combo_box = QComboBox()
self.combo_box.addItems(["Option 1", "Option 2", "Option 3"])
layout.addWidget(self.combo_box)
self.combo_box.setStyleSheet(_("login_dialog_combobox"))

# Weitere Eingabezeile unterhalb der ComboBox
layout.addWidget(self.combo_box)

# Eingabefeld unter der ComboBox
self.additional_field = QLineEdit()
self.additional_field.setPlaceholderText("Zusätzliche Eingabe")
layout.addWidget(self.additional_field)
self.additional_field.setPlaceholderText(_("type in server"))
self.additional_field.setStyleSheet(_("login_dialog_edit1"))
self.additional_field.mouseDoubleClickEvent = self.open_additional_dialog

layout.addWidget(self.additional_field)

# Eingabe für Benutzername
self.username_field = QLineEdit()
self.username_field.setPlaceholderText("Benutzername eingeben")
layout.addWidget(self.username_field)
self.username_field.setPlaceholderText(_("type in username"))
self.username_field.setStyleSheet(_("login_dialog_edit2"))

layout.addWidget(self.username_field)

# Eingabe für Passwort
self.password_field = QLineEdit()
self.password_field.setPlaceholderText("Passwort eingeben")
self.password_field.setPlaceholderText(_("type in password"))
self.password_field.setEchoMode(QLineEdit.Password)
layout.addWidget(self.password_field)
self.password_field.setStyleSheet(_("login_dialog_pass"))

layout.addWidget(self.password_field)

# Login-Button
self.login_button = QPushButton("Login")
layout.addWidget(self.login_button)
self.login_button = QPushButton(_("Login into the System"))
self.login_button.setStyleSheet(_("login_dialog_push"))

self.login_button.setCursor(Qt.PointingHandCursor)
layout.addWidget(self.login_button)

# Setze das Layout
self.setLayout(layout)

def open_additional_dialog(self, event):
additional_dialog = QDialog(self)
additional_dialog.setWindowTitle("Zusätzlicher Dialog")
additional_dialog.setGeometry(150, 150, 300, 200)
additional_dialog.exec_()

# ------------------------------------------------------------------------
# this is our "main" entry point, where the application will start.
# ------------------------------------------------------------------------
Expand Down
Binary file modified src/locales/de_de/LC_MESSAGES/observer.mo.gz
Binary file not shown.
65 changes: 65 additions & 0 deletions src/locales/de_de/LC_MESSAGES/observer.po
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,71 @@ msgstr ""
"\"Persian (Farsi)\",\"Polish\",\"Portuguese\",\"Romanian\",\"Russian\",\"Serbian\",\"Serbian-Cyrillic\",\"Slovak\","
"\"Slovene\",\"Spanish\",\"Swedish\",\"Turkish\",\"Ukrainian\",\"Vietnamese\"]"

msgid "login_dialog_style"
msgstr ""
"background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,"
"stop: 0 #000080,"
"stop: 1 #000000);"
"border: 4px solid red;"
"border-radius: 8px;"

msgid "login_dialog_combobox"
msgstr ""
"background-color: #fff;"
"padding: 6px;"
"font-size: 14px;"
"line-height: 20px;"
"border: 2px solid #ffffff;"
"border-radius: 4px;"
"margin: 8px 0;"
"font-family: monospace;"

msgid "login_dialog_edit1"
msgstr ""
"background-color: #fff;"
"padding: 6px;"
"font-size: 14px;"
"line-height: 20px;"
"border: 2px solid #ffffff;"
"border-radius: 4px;"
"margin: 8px 0;"
"font-family: monospace;"

msgid "login_dialog_edit2"
msgstr ""
"background-color: #fff;"
"padding: 6px;"
"font-size: 14px;"
"line-height: 20px;"
"border: 2px solid #ffffff;"
"border-radius: 4px;"
"margin: 8px 0;"
"font-family: monospace;"

msgid "login_dialog_pass"
msgstr ""
"background-color: #fff;"
"padding: 6px;"
"font-size: 14px;"
"line-height: 20px;"
"border: 2px solid #ffffff;"
"border-radius: 4px;"
"margin: 8px 0;"
"font-family: monospace;"

msgid "login_dialog_push"
msgstr ""
"padding: 8px;"
"background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, "
"stop: 0 #243949, stop: 1 #517fa4);"
"color: #ffffff;"
"font-size: 14px;"
"line-height: 20px;"
"font-weight: 500;"
"text-transform: uppercase;"
"border: none;"
"border-radius: 4px;"

msgid "opti00"
msgstr "wählen Sie ein gewünschtes Ausgabe-Format:"

Expand Down
Binary file modified src/locales/en_us/LC_MESSAGES/observer.mo.gz
Binary file not shown.
65 changes: 65 additions & 0 deletions src/locales/en_us/LC_MESSAGES/observer.po
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,71 @@ msgstr ""
"\"Persian (Farsi)\",\"Polish\",\"Portuguese\",\"Romanian\",\"Russian\",\"Serbian\",\"Serbian-Cyrillic\",\"Slovak\","
"\"Slovene\",\"Spanish\",\"Swedish\",\"Turkish\",\"Ukrainian\",\"Vietnamese\"]"

msgid "login_dialog_style"
msgstr ""
"background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,"
"stop: 0 #000080,"
"stop: 1 #000000);"
"border: 4px solid red;"
"border-radius: 8px;"

msgid "login_dialog_combobox"
msgstr ""
"background-color: #fff;"
"padding: 6px;"
"font-size: 14px;"
"line-height: 20px;"
"border: 2px solid #ffffff;"
"border-radius: 4px;"
"margin: 8px 0;"
"font-family: monospace;"

msgid "login_dialog_edit1"
msgstr ""
"background-color: #fff;"
"padding: 6px;"
"font-size: 14px;"
"line-height: 20px;"
"border: 2px solid #ffffff;"
"border-radius: 4px;"
"margin: 8px 0;"
"font-family: monospace;"

msgid "login_dialog_edit2"
msgstr ""
"background-color: #fff;"
"padding: 6px;"
"font-size: 14px;"
"line-height: 20px;"
"border: 2px solid #ffffff;"
"border-radius: 4px;"
"margin: 8px 0;"
"font-family: monospace;"

msgid "login_dialog_pass"
msgstr ""
"background-color: #fff;"
"padding: 6px;"
"font-size: 14px;"
"line-height: 20px;"
"border: 2px solid #ffffff;"
"border-radius: 4px;"
"margin: 8px 0;"
"font-family: monospace;"

msgid "login_dialog_push"
msgstr ""
"padding: 8px;"
"background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, "
"stop: 0 #243949, stop: 1 #517fa4);"
"color: #ffffff;"
"font-size: 14px;"
"line-height: 20px;"
"font-weight: 500;"
"text-transform: uppercase;"
"border: none;"
"border-radius: 4px;"

msgid "opti00"
msgstr "Select a desired extraction mode:"

Expand Down

0 comments on commit 6716e07

Please sign in to comment.