Merhaba değerli dostlarım ve hocalarım
Askere gitmeden son bir konu açayım dedim
bu konumda basit bir login paneli yazdım ve sizinle paylaşmak istedim.
ÖZELLİKLERİ
Pek bir özelliği yok sadece tema özelliği ekledim siz istediğiniz gibi geliştirebilirsiniz
SS
KOD
Askere gitmeden son bir konu açayım dedim
bu konumda basit bir login paneli yazdım ve sizinle paylaşmak istedim.
ÖZELLİKLERİ
Pek bir özelliği yok sadece tema özelliği ekledim siz istediğiniz gibi geliştirebilirsiniz
SS
KOD
Python:
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QLabel, QLineEdit, QPushButton, QComboBox, QMessageBox
from PyQt5.QtGui import QFont
from PyQt5.QtCore import Qt
class HackerLoginPanel(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("Luxer Giriş Paneli")
self.setStyleSheet("background-color: black; color: #00ff00; font-family: 'Courier New';")
self.layout = QVBoxLayout()
self.setLayout(self.layout)
ascii_art_label = QLabel()
ascii_art = """
█████╗ ██╗ ██╗████████╗██╗ ██████╗ ██████╗ ██████╗
██╔══██╗╚██╗ ██╔╝╚══██╔══╝██║ ██╔═══██╗██╔════╝ ██╔═══██╗
███████║ ╚████╔╝ ██║ ██║ ██║ ██║██║ ███╗██║ ██║
██╔══██║ ╚██╔╝ ██║ ██║ ██║ ██║██║ ██║██║ ██║
██║ ██║ ██║ ██║ ███████╗╚██████╔╝╚██████╔╝╚██████╔╝
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝
██╗ ██╗ ██╗██╗ ██╗███████╗██████╗
██║ ██║ ██║╚██╗██╔╝██╔════╝██╔══██╗
██║ ██║ ██║ ╚███╔╝ █████╗ ██████╔╝
██║ ██║ ██║ ██╔██╗ ██╔══╝ ██╔══██╗
███████╗╚██████╔╝██╔╝ ██╗███████╗██║ ██║
╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
"""
ascii_art_label.setText(ascii_art)
ascii_art_label.setFont(QFont('Courier New', 12))
ascii_art_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.layout.addWidget(ascii_art_label)
input_layout = QVBoxLayout()
self.layout.addLayout(input_layout)
self.username_label = QLabel("Kullanıcı Adı")
self.username_label.setFont(QFont('Monospace', 12))
input_layout.addWidget(self.username_label, alignment=Qt.AlignmentFlag.AlignCenter)
self.username_input = QLineEdit()
input_layout.addWidget(self.username_input)
self.password_label = QLabel("Şifre")
self.password_label.setFont(QFont('Monospace', 12))
input_layout.addWidget(self.password_label, alignment=Qt.AlignmentFlag.AlignCenter)
self.password_input = QLineEdit()
self.password_input.setEchoMode(QLineEdit.EchoMode.Password)
input_layout.addWidget(self.password_input)
self.theme_combobox = QComboBox()
self.theme_combobox.addItems(["Yeşil", "Kırmızı", "Mavi", "Mor", "Turkuaz"])
self.theme_combobox.currentIndexChanged.connect(self.change_theme)
self.layout.addWidget(self.theme_combobox, alignment=Qt.AlignmentFlag.AlignCenter)
self.login_button = QPushButton("Giriş Yap")
self.login_button.setStyleSheet("""
QPushButton {
background-color: #008000; /* Yeşil */
border: 2px solid #00ff00;
border-radius: 5px;
color: white;
font-weight: bold;
}
QPushButton:hover {
background-color: #00a000; /* Daha koyu yeşil */
}
""")
self.login_button.clicked.connect(self.check_credentials)
self.layout.addWidget(self.login_button, alignment=Qt.AlignmentFlag.AlignCenter)
def change_theme(self, index):
if index == 0:
self.setStyleSheet("background-color: black; color: #00ff00; font-family: 'Courier New';")
self.login_button.setStyleSheet("""
QPushButton {
background-color: #008000; /* Yeşil */
border: 2px solid #00ff00;
border-radius: 5px;
color: white;
font-weight: bold;
}
QPushButton:hover {
background-color: #00a000; /* Daha koyu yeşil */
}
""")
elif index == 1:
self.setStyleSheet("background-color: black; color: red; font-family: 'Courier New';")
self.login_button.setStyleSheet("""
QPushButton {
background-color: #800000; /* Kırmızı */
border: 2px solid #ff0000;
border-radius: 5px;
color: white;
font-weight: bold;
}
QPushButton:hover {
background-color: #a00000; /* Daha koyu kırmızı */
}
""")
elif index == 2:
self.setStyleSheet("background-color: black; color: blue; font-family: 'Courier New';")
self.login_button.setStyleSheet("""
QPushButton {
background-color: #000080; /* Mavi */
border: 2px solid #0000ff;
border-radius: 5px;
color: white;
font-weight: bold;
}
QPushButton:hover {
background-color: #0000a0; /* Daha koyu mavi */
}
""")
elif index == 3:
self.setStyleSheet("background-color: black; color: purple; font-family: 'Courier New';")
self.login_button.setStyleSheet("""
QPushButton {
background-color: #800080; /* Mor */
border: 2px solid #ff00ff;
border-radius: 5px;
color: white;
font-weight: bold;
}
QPushButton:hover {
background-color: #9400d3; /* Daha koyu mor */
}
""")
elif index == 4:
self.setStyleSheet("background-color: black; color: #008b8b; font-family: 'Courier New';")
self.login_button.setStyleSheet("""
QPushButton {
background-color: #008b8b; /* Turkuaz */
border: 2px solid #00ced1;
border-radius: 5px;
color: white;
font-weight: bold;
}
QPushButton:hover {
background-color: #00bfbf; /* Daha koyu turkuaz */
}
""")
def check_credentials(self):
username = self.username_input.text()
password = self.password_input.text()
if username == "admin" and password == "admin123":
QMessageBox.information(self, "Başarılı", "Giriş başarılı!")
else:
QMessageBox.critical(self, "Hata", "Kullanıcı adı veya şifre hatalı!")
if __name__ == "__main__":
app = QApplication(sys.argv)
window = HackerLoginPanel()
window.show()
sys.exit(app.exec_())
Moderatör tarafında düzenlendi: