class Ui_BolgeEkle(QtWidgets.QDialog): signal = QtCore.pyqtSignal(int) def __init__(self): super(Ui_BolgeEkle, self).__init__() self.yaz = VbagKur() self.setupUi() def setupUi(self): self.setObjectName("BolgeEkle") self.resize(366, 133) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/rolix/docky.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.setWindowIcon(icon) self.label = QtWidgets.QLabel(self) self.label.setGeometry(QtCore.QRect(10, -1, 100, 100)) self.label.setText("") self.label.setPixmap(QtGui.QPixmap(":/rolix/docky.png")) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.label_2 = QtWidgets.QLabel(self) self.label_2.setGeometry(QtCore.QRect(140, 20, 60, 20)) self.label_2.setObjectName("label_2") self.lineEdit = QtWidgets.QLineEdit(self) self.lineEdit.setGeometry(QtCore.QRect(210, 20, 130, 20)) self.lineEdit.setObjectName("lineEdit") self.lineEdit_2 = QtWidgets.QLineEdit(self) self.lineEdit_2.setGeometry(QtCore.QRect(210, 50, 130, 20)) self.lineEdit_2.setObjectName("lineEdit_2") self.label_3 = QtWidgets.QLabel(self) self.label_3.setGeometry(QtCore.QRect(140, 50, 60, 20)) self.label_3.setObjectName("label_3") self.pushButton = QtWidgets.QPushButton(self) self.pushButton.setGeometry(QtCore.QRect(270, 90, 72, 23)) self.pushButton.setObjectName("pushButton") self.retranslateUi() self.pushButton.clicked.connect(self.ekle) QtCore.QMetaObject.connectSlotsByName(self) def ekle(self): self.yaz.bolge_ekle(self.lineEdit.text(), self.lineEdit_2.text()) mesaj = self.lineEdit_2.text() + " Bölgesi Veritanına eklendi" mes.uyari(mesaj, "Bilgilendirme") self.lineEdit.clear() self.lineEdit_2.clear() self.on_change_value(1) def retranslateUi(self): _translate = QtCore.QCoreApplication.translate self.setWindowTitle(_translate("BolgeEkle", "Bölge Ekle")) self.label_2.setText(_translate("BolgeEkle", "Bölge Kodu")) self.label_3.setText(_translate("BolgeEkle", "Bölge Adı")) self.pushButton.setText(_translate("BolgeEkle", "Ekle")) def on_change_value(self, value): self.signal.emit(value)
class Ui_PersonelSil(QtWidgets.QDialog): signal = QtCore.pyqtSignal(int) def __init__(self): super(Ui_PersonelSil, self).__init__() self.yaz = VbagKur() self.setupUi() def setupUi(self): self.setObjectName("PersonelSil") self.resize(452, 197) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/rolix/dialog-error.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.setWindowIcon(icon) self.label = QtWidgets.QLabel(self) self.label.setGeometry(QtCore.QRect(10, 10, 121, 121)) self.label.setText("") self.label.setPixmap(QtGui.QPixmap(":/rolix/dialog-error.png")) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.listWidget = QtWidgets.QListWidget(self) self.listWidget.setGeometry(QtCore.QRect(120, 10, 311, 141)) self.listWidget.setObjectName("listWidget") self.pushButton = QtWidgets.QPushButton(self) self.pushButton.setGeometry(QtCore.QRect(360, 160, 73, 23)) self.pushButton.setObjectName("pushButton") self.personel_bul() self.retranslateUi() self.pushButton.clicked.connect(self.perisil) self.listWidget.itemDoubleClicked['QListWidgetItem*'].connect(self.perisil) QtCore.QMetaObject.connectSlotsByName(self) def personel_bul(self): sorgu = self.yaz.kolon_oku("ad", "personel") for i in range(len(sorgu)): self.listWidget.addItem(sorgu[i][0]) def perisil(self): if mes.per_sil(self.listWidget.currentItem().text()) == True: self.yaz.kayit_sil("personel", "ad", self.listWidget.currentItem().text()) self.listWidget.clear() self.personel_bul() self.on_changed_value(1) else: pass def retranslateUi(self): _translate = QtCore.QCoreApplication.translate self.setWindowTitle(_translate("PersonelSil", "Personel Sil")) self.pushButton.setText(_translate("PersonelSil", "Sil")) def on_changed_value(self, value): self.signal.emit(value)
def cins_yaz(self): self.yaz = VbagKur() ad = self.lineEdit.text() if ad == "": mesaj = "Lütfen bir gemi türü giriniz !!" mes.uyari(mesaj, "Bilgi Giriş Hatası") else: self.yaz.isle("INSERT INTO gemitur VALUES(NULL, '{}')".format(ad)) mesaj = ad + " türü veritabanına eklendi" mes.uyari(mesaj, "Kayıt Eklendi") self.lineEdit.clear()
def setupUi(self, UzlastirmaciEkle): self.db = VbagKur() UzlastirmaciEkle.setObjectName("UzlastirmaciEkle") UzlastirmaciEkle.resize(441, 257) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("lib/icon/credentials-preferences.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) UzlastirmaciEkle.setWindowIcon(icon) self.label = QtWidgets.QLabel(UzlastirmaciEkle) self.label.setGeometry(QtCore.QRect(160, 10, 90, 20)) self.label.setObjectName("label") self.lineEdit = QtWidgets.QLineEdit(UzlastirmaciEkle) self.lineEdit.setGeometry(QtCore.QRect(220, 10, 211, 20)) self.lineEdit.setObjectName("lineEdit") self.lineEdit_2 = QtWidgets.QLineEdit(UzlastirmaciEkle) self.lineEdit_2.setGeometry(QtCore.QRect(220, 40, 211, 20)) self.lineEdit_2.setObjectName("lineEdit_2") self.label_2 = QtWidgets.QLabel(UzlastirmaciEkle) self.label_2.setGeometry(QtCore.QRect(160, 40, 90, 20)) self.label_2.setObjectName("label_2") self.label_3 = QtWidgets.QLabel(UzlastirmaciEkle) self.label_3.setGeometry(QtCore.QRect(160, 70, 90, 20)) self.label_3.setObjectName("label_3") self.lineEdit_3 = QtWidgets.QLineEdit(UzlastirmaciEkle) self.lineEdit_3.setGeometry(QtCore.QRect(220, 70, 211, 20)) self.lineEdit_3.setObjectName("lineEdit_3") self.lineEdit_4 = QtWidgets.QLineEdit(UzlastirmaciEkle) self.lineEdit_4.setGeometry(QtCore.QRect(220, 100, 211, 20)) self.lineEdit_4.setObjectName("lineEdit_4") self.label_4 = QtWidgets.QLabel(UzlastirmaciEkle) self.label_4.setGeometry(QtCore.QRect(160, 100, 90, 20)) self.label_4.setObjectName("label_4") self.label_5 = QtWidgets.QLabel(UzlastirmaciEkle) self.label_5.setGeometry(QtCore.QRect(160, 130, 90, 20)) self.label_5.setObjectName("label_5") self.textEdit = QtWidgets.QTextEdit(UzlastirmaciEkle) self.textEdit.setGeometry(QtCore.QRect(220, 130, 211, 81)) self.textEdit.setObjectName("textEdit") self.pushButton = QtWidgets.QPushButton(UzlastirmaciEkle) self.pushButton.setGeometry(QtCore.QRect(360, 220, 75, 23)) self.pushButton.setObjectName("pushButton") self.label_6 = QtWidgets.QLabel(UzlastirmaciEkle) self.label_6.setGeometry(QtCore.QRect(20, 30, 121, 121)) self.label_6.setText("") self.label_6.setPixmap( QtGui.QPixmap("lib/icon/credentials-preferences.png")) self.label_6.setObjectName("label_6") self.retranslateUi(UzlastirmaciEkle) self.pushButton.clicked.connect(self.uz_ekle) QtCore.QMetaObject.connectSlotsByName(UzlastirmaciEkle)
class Gider(QtWidgets.QDialog): clicked = QtCore.pyqtSignal(bool) def __init__(self): super(Gider, self).__init__() self.db = VbagKur() def init_ui(self, dosya): self.dosya = dosya self.resize(241, 143) self.gridLayout = QtWidgets.QGridLayout(self) self.gridLayout.setObjectName("gridLayout") self.label = QtWidgets.QLabel(self) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.lineEdit = QtWidgets.QLineEdit(self) self.lineEdit.setObjectName("lineEdit") self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 2) self.label_2 = QtWidgets.QLabel(self) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) self.lineEdit_2 = QtWidgets.QLineEdit(self) self.lineEdit_2.setObjectName("lineEdit_2") self.gridLayout.addWidget(self.lineEdit_2, 1, 1, 1, 2) spacerItem = QtWidgets.QSpacerItem(139, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 2, 0, 1, 2) self.pushButton = QtWidgets.QPushButton(self) self.pushButton.setObjectName("pushButton") self.gridLayout.addWidget(self.pushButton, 2, 2, 1, 1) self.setWindowTitle("Dosya Gider Ekle") self.label.setText("Yapılan Harcama Adı") self.label_2.setText("Harcama Tutarı") self.pushButton.setText("Ekle") self.pushButton.clicked.connect(self.bilgi_topla) def bilgi_topla(self): harcama = self.lineEdit.text() tutar = self.lineEdit_2.text() if harcama == "" or tutar == "": baslik = "Gider Ekleme Hatası" mesaj = "Gider eklemek için boş alanların tamamını doldurmalısınız" bilgilendir(mesaj, baslik) else: if self.db.gider_ekle(harcama, tutar, self.dosya) == True: baslik = "Gider Ekleme" mesaj = self.dosya + " No'lu dosya gider bilgilerine " + harcama + " gideri " + tutar + " TL olarak eklendi " bilgilendir(mesaj, baslik) self.lineEdit.clear() self.lineEdit_2.clear() self.on_changed_value(False) else: baslik = "Gider Ekleme Hatası" mesaj = "Veritabanı probleminden kaynaklı veri eklenemedi" bilgilendir(mesaj, baslik) # Sinyali Gönder def on_changed_value(self, value): self.clicked.emit(value)
class Ui_GemiSil(object): def __init__(self): self.yaz = VbagKur() def setupUi(self, GemiSil): GemiSil.setObjectName("GemiSil") GemiSil.resize(306, 349) self.label = QtWidgets.QLabel(GemiSil) self.label.setGeometry(QtCore.QRect(10, 10, 100, 20)) self.label.setObjectName("label") self.lineEdit = QtWidgets.QLineEdit(GemiSil) self.lineEdit.setGeometry(QtCore.QRect(90, 10, 111, 20)) self.lineEdit.setObjectName("lineEdit") self.pushButton = QtWidgets.QPushButton(GemiSil) self.pushButton.setGeometry(QtCore.QRect(210, 10, 72, 23)) self.pushButton.setObjectName("pushButton") self.listWidget = QtWidgets.QListWidget(GemiSil) self.listWidget.setGeometry(QtCore.QRect(10, 40, 271, 291)) self.listWidget.setObjectName("listWidget") self.retranslateUi(GemiSil) self.pushButton.clicked.connect(self.gemi_bul) self.listWidget.itemDoubleClicked.connect(self.sil) QtCore.QMetaObject.connectSlotsByName(GemiSil) def gemi_bul(self): self.listWidget.clear() sor = self.yaz.hepsini_oku("gad", "gemiler", "kod", self.lineEdit.text()) for i in range(len(sor)): self.listWidget.addItem(sor[i][0]) def sil(self): if mes.soru(self.listWidget.currentItem().text()) == True: self.yaz.kayit_sil("gemiler", "gad", self.listWidget.currentItem().text()) self.listWidget.clear() self.gemi_bul() else: pass def retranslateUi(self, GemiSil): _translate = QtCore.QCoreApplication.translate GemiSil.setWindowTitle(_translate("GemiSil", "Gemi Kaydı Sil")) self.label.setText(_translate("GemiSil", "Müşteri Kodu")) self.pushButton.setText(_translate("GemiSil", "Listele"))
def setupUi(self, SablonDuzenle): self.sablon_id = None self.db = VbagKur() SablonDuzenle.setObjectName("SablonDuzenle") SablonDuzenle.resize(561, 408) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/newPrefix/lib/icon/gnome-contacts.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) SablonDuzenle.setWindowIcon(icon) self.gridLayout = QtWidgets.QGridLayout(SablonDuzenle) self.gridLayout.setObjectName("gridLayout") self.label = QtWidgets.QLabel(SablonDuzenle) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.label_3 = QtWidgets.QLabel(SablonDuzenle) self.label_3.setObjectName("label_3") self.gridLayout.addWidget(self.label_3, 0, 1, 1, 1) self.listWidget = QtWidgets.QListWidget(SablonDuzenle) self.listWidget.setMinimumSize(QtCore.QSize(200, 0)) self.listWidget.setMaximumSize(QtCore.QSize(200, 16777215)) self.listWidget.setObjectName("listWidget") self.gridLayout.addWidget(self.listWidget, 1, 0, 3, 1) self.lineEdit = QtWidgets.QLineEdit(SablonDuzenle) self.lineEdit.setObjectName("lineEdit") self.gridLayout.addWidget(self.lineEdit, 1, 1, 1, 3) self.label_2 = QtWidgets.QLabel(SablonDuzenle) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 2, 1, 1, 1) self.textEdit = QtWidgets.QTextEdit(SablonDuzenle) self.textEdit.setObjectName("textEdit") self.gridLayout.addWidget(self.textEdit, 3, 1, 1, 3) spacerItem = QtWidgets.QSpacerItem(509, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 4, 0, 1, 2) self.pushButton = QtWidgets.QPushButton(SablonDuzenle) self.pushButton.setObjectName("pushButton") self.gridLayout.addWidget(self.pushButton, 4, 2, 1, 1) self.pushButton_2 = QtWidgets.QPushButton(SablonDuzenle) self.pushButton_2.setObjectName("pushButton_2") self.gridLayout.addWidget(self.pushButton_2, 4, 3, 1, 1) self.retranslateUi(SablonDuzenle) self.pushButton.clicked.connect(self.sablon_sil) self.pushButton_2.clicked.connect(self.sablon_guncelle) self.listWidget.itemDoubleClicked['QListWidgetItem*'].connect(self.hazirlik_bitir) self.hazirlik() QtCore.QMetaObject.connectSlotsByName(SablonDuzenle)
def setupUi(self, UzlasmaciSil): self.db = VbagKur() UzlasmaciSil.setObjectName("UzlasmaciSil") UzlasmaciSil.resize(525, 389) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("lib/icon/credentials-preferences.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) UzlasmaciSil.setWindowIcon(icon) self.gridLayout = QtWidgets.QGridLayout(UzlasmaciSil) self.gridLayout.setObjectName("gridLayout") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.tableWidget = QtWidgets.QTableWidget(UzlasmaciSil) self.tableWidget.setObjectName("tableWidget") self.tableWidget.setColumnCount(5) self.tableWidget.setRowCount(0) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(0, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(1, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(2, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(3, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(4, item) self.tableWidget.verticalHeader().setVisible(False) self.verticalLayout.addWidget(self.tableWidget) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem) self.pushButton = QtWidgets.QPushButton(UzlasmaciSil) self.pushButton.setEnabled(False) self.pushButton.setObjectName("pushButton") self.pushButton.setWhatsThis("Etkin olması için listeden bir uzlaştırmacı seçin") self.horizontalLayout_4.addWidget(self.pushButton) self.verticalLayout.addLayout(self.horizontalLayout_4) self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1) self.uzlasmaci_tarama() self.tableWidget.cellClicked.connect(self.parametre_olustur) self.pushButton.clicked.connect(self.sil) self.retranslateUi(UzlasmaciSil) QtCore.QMetaObject.connectSlotsByName(UzlasmaciSil)
def setupUi(self, SablonEkle): self.db = VbagKur() SablonEkle.setObjectName("SablonEkle") SablonEkle.resize(541, 305) icon = QtGui.QIcon() icon.addPixmap( QtGui.QPixmap(":/newPrefix/lib/icon/gnome-contacts.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) SablonEkle.setWindowIcon(icon) self.gridLayout = QtWidgets.QGridLayout(SablonEkle) self.gridLayout.setObjectName("gridLayout") self.label = QtWidgets.QLabel(SablonEkle) self.label.setMinimumSize(QtCore.QSize(90, 0)) self.label.setMaximumSize(QtCore.QSize(90, 16777215)) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.lineEdit = QtWidgets.QLineEdit(SablonEkle) self.lineEdit.setObjectName("lineEdit") self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 2) self.label_2 = QtWidgets.QLabel(SablonEkle) self.label_2.setMinimumSize(QtCore.QSize(90, 0)) self.label_2.setMaximumSize(QtCore.QSize(90, 16777215)) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) self.textEdit = QtWidgets.QTextEdit(SablonEkle) self.textEdit.setObjectName("textEdit") self.gridLayout.addWidget(self.textEdit, 1, 1, 2, 2) spacerItem = QtWidgets.QSpacerItem(20, 210, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem, 2, 0, 1, 1) spacerItem1 = QtWidgets.QSpacerItem(393, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem1, 3, 0, 1, 2) self.pushButton = QtWidgets.QPushButton(SablonEkle) self.pushButton.setObjectName("pushButton") self.gridLayout.addWidget(self.pushButton, 3, 2, 1, 1) self.retranslateUi(SablonEkle) self.pushButton.clicked.connect(self.sablon_ekle) QtCore.QMetaObject.connectSlotsByName(SablonEkle)
class Ui_CinsEkle(object): def setupUi(self, CinsEkle): CinsEkle.setObjectName("CinsEkle") CinsEkle.resize(382, 54) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) CinsEkle.setWindowIcon(icon) self.gridLayout = QtWidgets.QGridLayout(CinsEkle) self.gridLayout.setObjectName("gridLayout") self.label = QtWidgets.QLabel(CinsEkle) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.lineEdit = QtWidgets.QLineEdit(CinsEkle) self.lineEdit.setObjectName("lineEdit") self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 1) self.pushButton = QtWidgets.QPushButton(CinsEkle) self.pushButton.setObjectName("pushButton") self.gridLayout.addWidget(self.pushButton, 0, 2, 1, 1) self.retranslateUi(CinsEkle) self.pushButton.clicked.connect(self.cins_yaz) QtCore.QMetaObject.connectSlotsByName(CinsEkle) def retranslateUi(self, CinsEkle): _translate = QtCore.QCoreApplication.translate CinsEkle.setWindowTitle(_translate("CinsEkle", "Gemi Türü Ekle")) self.label.setText(_translate("CinsEkle", "Yeni Gemi Türü Ekle")) self.pushButton.setText(_translate("CinsEkle", "Ekle")) def cins_yaz(self): self.yaz = VbagKur() ad = self.lineEdit.text() if ad == "": mesaj = "Lütfen bir gemi türü giriniz !!" mes.uyari(mesaj, "Bilgi Giriş Hatası") else: self.yaz.isle("INSERT INTO gemitur VALUES(NULL, '{}')".format(ad)) mesaj = ad + " türü veritabanına eklendi" mes.uyari(mesaj, "Kayıt Eklendi") self.lineEdit.clear()
class Ekler(QtWidgets.QDialog): clicked = QtCore.pyqtSignal(bool) def __init__(self): super(Ekler, self).__init__() self.db = VbagKur() def init_ui(self, dosya): self.dosya = dosya self.resize(241, 103) self.gridLayout = QtWidgets.QGridLayout(self) self.gridLayout.setObjectName("gridLayout") self.label = QtWidgets.QLabel(self) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.lineEdit = QtWidgets.QLineEdit(self) self.lineEdit.setObjectName("lineEdit") self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 2) spacerItem = QtWidgets.QSpacerItem(139, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 2, 0, 1, 2) self.pushButton = QtWidgets.QPushButton(self) self.pushButton.setObjectName("pushButton") self.gridLayout.addWidget(self.pushButton, 2, 2, 1, 1) self.setWindowTitle("Dosya Ekle") self.label.setText("Eklenecek Dosya Adı") self.pushButton.setText("Ekle") self.pushButton.clicked.connect(self.bilgi_topla) def bilgi_topla(self): dosya_adi = self.lineEdit.text() if dosya_adi == "": baslik = "Dosya Eki Ekleme Hatası" mesaj = "Dosya Ek'i eklemek için boş alanların tamamını doldurmalısınız" bilgilendir(mesaj, baslik) else: if self.db.ek_ekle(dosya_adi, self.dosya) == True: baslik = "Dosya Ekleme" mesaj = self.dosya + " No'lu soruşturmanın Ek Dosya bilgilerine " + dosya_adi + " dosyası eklendi " bilgilendir(mesaj, baslik) self.lineEdit.clear() self.on_changed_value(False) else: baslik = "Ek Ekleme Hatası" mesaj = "Veritabanı probleminden kaynaklı veri eklenemedi" bilgilendir(mesaj, baslik) # Sinyali Gönder def on_changed_value(self, value): self.clicked.emit(value)
def setupUi(self, Settings): self.db = VbagKur() Settings.setObjectName("Settings") Settings.resize(578, 220) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/newPrefix/lib/icon/application-default-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Settings.setWindowIcon(icon) self.label = QtWidgets.QLabel(Settings) self.label.setGeometry(QtCore.QRect(10, 10, 141, 20)) self.label.setObjectName("label") self.lineEdit = QtWidgets.QLineEdit(Settings) self.lineEdit.setGeometry(QtCore.QRect(160, 10, 351, 20)) self.lineEdit.setObjectName("lineEdit") self.pushButton = QtWidgets.QPushButton(Settings) self.pushButton.setGeometry(QtCore.QRect(520, 10, 51, 23)) self.pushButton.setObjectName("pushButton") self.label_2 = QtWidgets.QLabel(Settings) self.label_2.setGeometry(QtCore.QRect(10, 40, 141, 20)) self.label_2.setObjectName("label_2") self.lineEdit_2 = QtWidgets.QLineEdit(Settings) self.lineEdit_2.setGeometry(QtCore.QRect(160, 40, 411, 20)) self.lineEdit_2.setObjectName("lineEdit_2") self.label_3 = QtWidgets.QLabel(Settings) self.label_3.setGeometry(QtCore.QRect(10, 70, 141, 20)) self.label_3.setObjectName("label_3") self.lineEdit_3 = QtWidgets.QLineEdit(Settings) self.lineEdit_3.setGeometry(QtCore.QRect(160, 70, 411, 20)) self.lineEdit_3.setObjectName("lineEdit_3") self.pushButton_2 = QtWidgets.QPushButton(Settings) self.pushButton_2.setGeometry(QtCore.QRect(450, 100, 121, 23)) self.pushButton_2.setObjectName("pushButton_2") self.lineEdit.setReadOnly(True) self.veritabani_bilgisi_cek() self.retranslateUi(Settings) self.pushButton.clicked.connect(self.dosya_kayit_yeri) self.pushButton_2.clicked.connect(self.bilgi_guncelle) QtCore.QMetaObject.connectSlotsByName(Settings)
class Ui_UzlasmaciSil(object): def setupUi(self, UzlasmaciSil): self.db = VbagKur() UzlasmaciSil.setObjectName("UzlasmaciSil") UzlasmaciSil.resize(525, 389) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("lib/icon/credentials-preferences.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) UzlasmaciSil.setWindowIcon(icon) self.gridLayout = QtWidgets.QGridLayout(UzlasmaciSil) self.gridLayout.setObjectName("gridLayout") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.tableWidget = QtWidgets.QTableWidget(UzlasmaciSil) self.tableWidget.setObjectName("tableWidget") self.tableWidget.setColumnCount(5) self.tableWidget.setRowCount(0) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(0, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(1, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(2, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(3, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(4, item) self.tableWidget.verticalHeader().setVisible(False) self.verticalLayout.addWidget(self.tableWidget) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem) self.pushButton = QtWidgets.QPushButton(UzlasmaciSil) self.pushButton.setEnabled(False) self.pushButton.setObjectName("pushButton") self.pushButton.setWhatsThis("Etkin olması için listeden bir uzlaştırmacı seçin") self.horizontalLayout_4.addWidget(self.pushButton) self.verticalLayout.addLayout(self.horizontalLayout_4) self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1) self.uzlasmaci_tarama() self.tableWidget.cellClicked.connect(self.parametre_olustur) self.pushButton.clicked.connect(self.sil) self.retranslateUi(UzlasmaciSil) QtCore.QMetaObject.connectSlotsByName(UzlasmaciSil) def retranslateUi(self, UzlasmaciSil): _translate = QtCore.QCoreApplication.translate UzlasmaciSil.setWindowTitle(_translate("UzlasmaciSil", "Uzlaşmacı Sil")) item = self.tableWidget.horizontalHeaderItem(0) item.setText(_translate("UzlasmaciSil", "İd")) item = self.tableWidget.horizontalHeaderItem(1) item.setText(_translate("UzlasmaciSil", "Ad Soyad")) item = self.tableWidget.horizontalHeaderItem(2) item.setText(_translate("UzlasmaciSil", "Sicil No")) item = self.tableWidget.horizontalHeaderItem(3) item.setText(_translate("UzlasmaciSil", "Telefon")) item = self.tableWidget.horizontalHeaderItem(4) item.setText(_translate("UzlasmaciSil", "sehir")) self.pushButton.setText(_translate("UzlasmaciSil", "Sil")) def uzlasmaci_tarama(self): sonuc = self.db.komut("select id,isim,sicil,tel,sehir FROM uzlasmaci") self.tableWidget.setRowCount(len(sonuc)) satir = 0 sutun = 0 for i in range(len(sonuc)): for im in range(len(sonuc[i])): self.tableWidget.setItem(satir, sutun, QtWidgets.QTableWidgetItem("{}".format(sonuc[i][im]))) sutun += 1 sutun = 0 satir += 1 def parametre_olustur(self, row, column): secilen = self.tableWidget.item(row, column) self.secilen_id = self.tableWidget.item(row, 0) self.pushButton.setDisabled(False) def sil_soru(self): dens_box = QtWidgets.QMessageBox() dens_box.setIcon(QtWidgets.QMessageBox.Question) dens_box.setWindowTitle('Kayıt Silme Uyarısı !!!') yazi = " Seçilen kayıt bilgilerini veritabanından silmek istediğinize emin misiniz ?" dens_box.setText(yazi) dens_box.setStandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No) buttonY = dens_box.button(QtWidgets.QMessageBox.Yes) buttonY.setText('EVET') buttonN = dens_box.button(QtWidgets.QMessageBox.No) buttonN.setText('HAYIR') dens_box.exec_() if dens_box.clickedButton() == buttonY: return True else: return False def bilg(self, mesaj, baslik): inf = QtWidgets.QMessageBox() inf.setIcon(QtWidgets.QMessageBox.Information) inf.setWindowTitle(baslik) inf.setText(mesaj) inf.setStandardButtons(QtWidgets.QMessageBox.Ok) inf.exec_() def sil(self, id): if self.sil_soru() == True: if self.db.satir_sil("DELETE FROM uzlasmaci Where id = '{}'".format(self.secilen_id.text())) == True: baslik = " Kayıt Silme Uyarısı" mesaj = "Kayıt Başarıyla silindi" self.bilg(mesaj, baslik) self.uzlasmaci_tarama() else: pass
def init_ui(self): self.db = VbagKur() self.resize(423, 263) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/newPrefix/lib/icon/ubuntuone.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.setWindowIcon(icon) self.radioButton = QtWidgets.QRadioButton(self) self.radioButton.setGeometry(QtCore.QRect(240, 10, 82, 17)) self.radioButton.setObjectName("radioButton") self.radioButton_2 = QtWidgets.QRadioButton(self) self.radioButton_2.setGeometry(QtCore.QRect(330, 10, 82, 17)) self.radioButton_2.setObjectName("radioButton_2") self.label = QtWidgets.QLabel(self) self.label.setGeometry(QtCore.QRect(130, 40, 90, 20)) self.label.setObjectName("label") self.lineEdit = QtWidgets.QLineEdit(self) self.lineEdit.setGeometry(QtCore.QRect(240, 40, 170, 20)) self.lineEdit.setObjectName("lineEdit") self.lineEdit_2 = QtWidgets.QLineEdit(self) self.lineEdit_2.setGeometry(QtCore.QRect(240, 70, 170, 20)) self.lineEdit_2.setObjectName("lineEdit_2") self.label_2 = QtWidgets.QLabel(self) self.label_2.setGeometry(QtCore.QRect(130, 70, 90, 20)) self.label_2.setObjectName("label_2") self.label_3 = QtWidgets.QLabel(self) self.label_3.setGeometry(QtCore.QRect(130, 100, 90, 20)) self.label_3.setObjectName("label_3") self.lineEdit_3 = QtWidgets.QLineEdit(self) self.lineEdit_3.setGeometry(QtCore.QRect(240, 100, 170, 20)) self.lineEdit_3.setObjectName("lineEdit_3") self.lineEdit_4 = QtWidgets.QLineEdit(self) self.lineEdit_4.setGeometry(QtCore.QRect(240, 130, 170, 20)) self.lineEdit_4.setObjectName("lineEdit_4") self.label_5 = QtWidgets.QLabel(self) self.label_5.setGeometry(QtCore.QRect(130, 130, 90, 20)) self.label_5.setObjectName("label_5") self.lineEdit_5 = QtWidgets.QLineEdit(self) self.lineEdit_5.setGeometry(QtCore.QRect(240, 160, 170, 20)) self.lineEdit_5.setObjectName("lineEdit_5") self.label_7 = QtWidgets.QLabel(self) self.label_7.setGeometry(QtCore.QRect(130, 160, 90, 20)) self.label_7.setObjectName("label_7") self.label_4 = QtWidgets.QLabel(self) self.label_4.setGeometry(QtCore.QRect(130, 10, 90, 20)) self.label_4.setObjectName("label_4") self.label_8 = QtWidgets.QLabel(self) self.label_8.setGeometry(QtCore.QRect(130, 190, 90, 20)) self.label_8.setObjectName("label_8") self.comboBox = QtWidgets.QComboBox(self) self.comboBox.setGeometry(QtCore.QRect(239, 190, 171, 22)) self.comboBox.setObjectName("comboBox") self.frame = QtWidgets.QFrame(self) self.frame.setGeometry(QtCore.QRect(-11, 0, 141, 381)) self.frame.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.label_6 = QtWidgets.QLabel(self.frame) self.label_6.setGeometry(QtCore.QRect(30, 50, 121, 121)) self.label_6.setText("") self.label_6.setPixmap( QtGui.QPixmap(":/newPrefix/lib/icon/ubuntuone.png")) self.label_6.setObjectName("label_6") self.pushButton = QtWidgets.QPushButton(self) self.pushButton.setGeometry(QtCore.QRect(336, 230, 75, 23)) self.pushButton.setObjectName("pushButton") self.radioButton.setChecked(True) self.retranslateUi(self) self.pushButton.clicked.connect(self.close) QtCore.QMetaObject.connectSlotsByName(self) self.pushButton.clicked.connect(self.buton_birinci_gorev) self.setWindowTitle("Yeni Uzlaşma Dosyası Ekle") self.uzlastirmaci_cek() self.show()
class DosyaOlustur(QtWidgets.QDialog): # Added a signal clicked = pyqtSignal(bool) def __init__(self): super(DosyaOlustur, self).__init__() self.init_ui() def init_ui(self): self.db = VbagKur() self.resize(423, 263) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/newPrefix/lib/icon/ubuntuone.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.setWindowIcon(icon) self.radioButton = QtWidgets.QRadioButton(self) self.radioButton.setGeometry(QtCore.QRect(240, 10, 82, 17)) self.radioButton.setObjectName("radioButton") self.radioButton_2 = QtWidgets.QRadioButton(self) self.radioButton_2.setGeometry(QtCore.QRect(330, 10, 82, 17)) self.radioButton_2.setObjectName("radioButton_2") self.label = QtWidgets.QLabel(self) self.label.setGeometry(QtCore.QRect(130, 40, 90, 20)) self.label.setObjectName("label") self.lineEdit = QtWidgets.QLineEdit(self) self.lineEdit.setGeometry(QtCore.QRect(240, 40, 170, 20)) self.lineEdit.setObjectName("lineEdit") self.lineEdit_2 = QtWidgets.QLineEdit(self) self.lineEdit_2.setGeometry(QtCore.QRect(240, 70, 170, 20)) self.lineEdit_2.setObjectName("lineEdit_2") self.label_2 = QtWidgets.QLabel(self) self.label_2.setGeometry(QtCore.QRect(130, 70, 90, 20)) self.label_2.setObjectName("label_2") self.label_3 = QtWidgets.QLabel(self) self.label_3.setGeometry(QtCore.QRect(130, 100, 90, 20)) self.label_3.setObjectName("label_3") self.lineEdit_3 = QtWidgets.QLineEdit(self) self.lineEdit_3.setGeometry(QtCore.QRect(240, 100, 170, 20)) self.lineEdit_3.setObjectName("lineEdit_3") self.lineEdit_4 = QtWidgets.QLineEdit(self) self.lineEdit_4.setGeometry(QtCore.QRect(240, 130, 170, 20)) self.lineEdit_4.setObjectName("lineEdit_4") self.label_5 = QtWidgets.QLabel(self) self.label_5.setGeometry(QtCore.QRect(130, 130, 90, 20)) self.label_5.setObjectName("label_5") self.lineEdit_5 = QtWidgets.QLineEdit(self) self.lineEdit_5.setGeometry(QtCore.QRect(240, 160, 170, 20)) self.lineEdit_5.setObjectName("lineEdit_5") self.label_7 = QtWidgets.QLabel(self) self.label_7.setGeometry(QtCore.QRect(130, 160, 90, 20)) self.label_7.setObjectName("label_7") self.label_4 = QtWidgets.QLabel(self) self.label_4.setGeometry(QtCore.QRect(130, 10, 90, 20)) self.label_4.setObjectName("label_4") self.label_8 = QtWidgets.QLabel(self) self.label_8.setGeometry(QtCore.QRect(130, 190, 90, 20)) self.label_8.setObjectName("label_8") self.comboBox = QtWidgets.QComboBox(self) self.comboBox.setGeometry(QtCore.QRect(239, 190, 171, 22)) self.comboBox.setObjectName("comboBox") self.frame = QtWidgets.QFrame(self) self.frame.setGeometry(QtCore.QRect(-11, 0, 141, 381)) self.frame.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.label_6 = QtWidgets.QLabel(self.frame) self.label_6.setGeometry(QtCore.QRect(30, 50, 121, 121)) self.label_6.setText("") self.label_6.setPixmap( QtGui.QPixmap(":/newPrefix/lib/icon/ubuntuone.png")) self.label_6.setObjectName("label_6") self.pushButton = QtWidgets.QPushButton(self) self.pushButton.setGeometry(QtCore.QRect(336, 230, 75, 23)) self.pushButton.setObjectName("pushButton") self.radioButton.setChecked(True) self.retranslateUi(self) self.pushButton.clicked.connect(self.close) QtCore.QMetaObject.connectSlotsByName(self) self.pushButton.clicked.connect(self.buton_birinci_gorev) self.setWindowTitle("Yeni Uzlaşma Dosyası Ekle") self.uzlastirmaci_cek() self.show() def retranslateUi(self, DosyaOlustur): _translate = QtCore.QCoreApplication.translate DosyaOlustur.setWindowTitle(_translate("DosyaOlustur", "Dosya Oluştur")) self.label.setText(_translate("DosyaOlustur", "Uzlaşma No")) self.label_2.setText(_translate("DosyaOlustur", "Soruşturma No")) self.label_3.setText(_translate("DosyaOlustur", "Mahkeme Esas No")) self.label_5.setText(_translate("DosyaOlustur", "Suç / Suçlar")) self.pushButton.setText(_translate("DosyaOlustur", "Oluştur")) self.label_7.setText(_translate("DosyaOlustur", "Tevdi Tarihi")) self.label_4.setText(_translate("DosyaOlustur", "Dosya Türü")) self.radioButton.setText(_translate("DosyaOlustur", "Savcılık")) self.radioButton_2.setText(_translate("DosyaOlustur", "Mahkeme")) self.label_8.setText(_translate("DosyaOlustur", "Uzlaştırmacı")) def buton_birinci_gorev(self): if self.lineEdit.text() == "": mesaj = "Uzlaşma No'su girmeniz gerek" baslik = "Uzlaşma No Hatası" bilgilendir(mesaj, baslik) elif self.lineEdit_4.text() == "": mesaj = "Dava konusu suç girmeniz gerek" baslik = "Suç Hatası" bilgilendir(mesaj, baslik) elif self.lineEdit_5.text() == "": mesaj = "Teklif Tarihi eklemeniz gerek" baslik = "Teklif Tarihi Hatası" bilgilendir(mesaj, baslik) else: if self.radioButton.isChecked() == True: uzno = self.lineEdit.text() sorno = self.lineEdit_2.text() meno = self.lineEdit_3.text() suc = self.lineEdit_4.text() ttarih = self.lineEdit_5.text() uzlastirici = self.comboBox.currentText() tevdi = "Savcılık" # Dosya teslim tarihini bulmak için # teslim alınma süresinin üzerine veritabanından gelen süreyi ekliyoruz elif self.radioButton_2.isChecked() == True: uzno = self.lineEdit.text() sorno = self.lineEdit_2.text() meno = self.lineEdit_3.text() suc = self.lineEdit_4.text() ttarih = self.lineEdit_5.text() uzlastirici = self.comboBox.currentText() tevdi = "Mahkeme" sure = self.db.komut("select teslim_suresi from ayarlar") t = ttarih.replace(".", "/") formatstr = '%d/%m/%Y' t3 = datetime.datetime.strptime(t, formatstr) fark = datetime.timedelta(days=int(sure[0][0])) gelecek = t3 + fark uzatmatar = gelecek.date() if self.db.dosya_ekle(uzno, sorno, meno, suc, ttarih, tevdi, 1, uzatmatar, uzlastirici) == True: baslik = "Dosya Bilgileri Eklendi" mesaj = uzno + " Uzlaşma No'lu dosya bilgileri veritabanına başarıyla eklendi" bilgilendir(mesaj, baslik) self.lineEdit.clear() self.lineEdit_2.clear() self.lineEdit_3.clear() self.lineEdit_4.clear() self.lineEdit_5.clear() else: pass self.on_changed_value(False) def uzlastirmaci_cek(self): sor = self.db.komut("select isim from uzlasmaci") for i in range(len(sor)): self.comboBox.addItem(sor[i][0]) def on_changed_value(self, value): self.clicked.emit(value)
class Ui_BolgeYerSil(QtWidgets.QDialog): signal = QtCore.pyqtSignal(int) def __init__(self): super(Ui_BolgeYerSil, self).__init__() self.yaz = VbagKur() self.setupUi() def setupUi(self): self.setObjectName("BolgeYerSil") self.resize(632, 316) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/rolix/docky.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.setWindowIcon(icon) self.label = QtWidgets.QLabel(self) self.label.setGeometry(QtCore.QRect(10, 10, 91, 61)) self.label.setText("") self.label.setPixmap( QtGui.QPixmap(":/rolix/scalable/package-remove.svg")) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.groupBox = QtWidgets.QGroupBox(self) self.groupBox.setGeometry(QtCore.QRect(10, 80, 300, 225)) self.groupBox.setObjectName("groupBox") self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox) self.gridLayout_2.setObjectName("gridLayout_2") self.listWidget = QtWidgets.QListWidget(self.groupBox) self.listWidget.setObjectName("listWidget") self.gridLayout_2.addWidget(self.listWidget, 0, 0, 1, 1) self.groupBox_2 = QtWidgets.QGroupBox(self) self.groupBox_2.setGeometry(QtCore.QRect(320, 80, 300, 225)) self.groupBox_2.setObjectName("groupBox_2") self.gridLayout = QtWidgets.QGridLayout(self.groupBox_2) self.gridLayout.setObjectName("gridLayout") self.listWidget_2 = QtWidgets.QListWidget(self.groupBox_2) self.listWidget_2.setObjectName("listWidget_2") self.gridLayout.addWidget(self.listWidget_2, 0, 0, 1, 1) self.label_2 = QtWidgets.QLabel(self) self.label_2.setGeometry(QtCore.QRect(100, 10, 511, 51)) self.label_2.setObjectName("label_2") self.bilgi_listele() self.retranslateUi() self.listWidget.itemDoubleClicked.connect(self.silb) self.listWidget_2.itemDoubleClicked.connect(self.sily) QtCore.QMetaObject.connectSlotsByName(self) def bilgi_listele(self): self.listWidget.addItems( self.yaz.coklu_tup_temizle(self.yaz.kolon_oku("ad, kod", "bolge"))) self.listWidget_2.addItems( self.yaz.coklu_tup_temizle(self.yaz.kolon_oku("ad", "yer"))) def silb(self): if mes.yerbolsil(self.listWidget.currentItem().text()) == True: kay_no = self.yaz.komut( "select kod from bolge where ad='{}'".format( self.listWidget.currentItem().text())) self.yaz.isle("delete from yer where kod ='{}'".format(kay_no[0])) self.yaz.kayit_sil("bolge", "ad", self.listWidget.currentItem().text()) self.listWidget.clear() self.listWidget_2.clear() self.bilgi_listele() self.on_changed_value(1) else: pass def sily(self): if mes.yerbolsil(self.listWidget_2.currentItem().text()) == True: self.yaz.kayit_sil("yer", "ad", self.listWidget_2.currentItem().text()) self.listWidget.clear() self.listWidget_2.clear() self.bilgi_listele() self.on_changed_value(2) else: pass def retranslateUi(self): _translate = QtCore.QCoreApplication.translate self.setWindowTitle(_translate("BolgeYerSil", "Bölge Ve Yer Sil")) self.groupBox.setTitle(_translate("BolgeYerSil", "Bölge Listesi")) self.groupBox_2.setTitle(_translate("BolgeYerSil", "Yer Listesi")) self.label_2.setText( _translate( "BolgeYerSil", "Veritabanından silmek istediğiniz Bölge veya Yer bilgisinin üzerine çift tıklayınız." )) def on_changed_value(self, value): self.signal.emit(value)
def __init__(self): self.yaz = VbagKur() self.change_id = 0
def __init__(self): super(Ui_YogunlukGuncelle, self).__init__() self.yaz = VbagKur() self.change_id_no = 0 self.setupUi()
class Ui_YogunlukGuncelle(QtWidgets.QDialog): clicked = QtCore.pyqtSignal(bool) def __init__(self): super(Ui_YogunlukGuncelle, self).__init__() self.yaz = VbagKur() self.change_id_no = 0 self.setupUi() def setupUi(self): self.setObjectName("YogunlukGuncelle") self.resize(671, 273) self.listWidget = QtWidgets.QListWidget(self) self.listWidget.setGeometry(QtCore.QRect(10, 40, 411, 211)) self.listWidget.setObjectName("listWidget") self.label = QtWidgets.QLabel(self) self.label.setGeometry(QtCore.QRect(10, 10, 211, 20)) self.label.setObjectName("label") self.label_2 = QtWidgets.QLabel(self) self.label_2.setGeometry(QtCore.QRect(440, 40, 80, 20)) self.label_2.setObjectName("label_2") self.comboBox = QtWidgets.QComboBox(self) self.comboBox.setGeometry(QtCore.QRect(540, 40, 120, 22)) self.comboBox.setObjectName("comboBox") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.label_3 = QtWidgets.QLabel(self) self.label_3.setGeometry(QtCore.QRect(440, 70, 80, 20)) self.label_3.setObjectName("label_3") self.lineEdit = QtWidgets.QLineEdit(self) self.lineEdit.setGeometry(QtCore.QRect(540, 70, 120, 20)) self.lineEdit.setObjectName("lineEdit") self.lineEdit_2 = QtWidgets.QLineEdit(self) self.lineEdit_2.setGeometry(QtCore.QRect(540, 100, 120, 20)) self.lineEdit_2.setObjectName("lineEdit_2") self.label_4 = QtWidgets.QLabel(self) self.label_4.setGeometry(QtCore.QRect(440, 100, 80, 20)) self.label_4.setObjectName("label_4") self.lineEdit_3 = QtWidgets.QLineEdit(self) self.lineEdit_3.setGeometry(QtCore.QRect(540, 130, 120, 20)) self.lineEdit_3.setObjectName("lineEdit_3") self.label_5 = QtWidgets.QLabel(self) self.label_5.setGeometry(QtCore.QRect(440, 130, 80, 20)) self.label_5.setObjectName("label_5") self.lineEdit_4 = QtWidgets.QLineEdit(self) self.lineEdit_4.setGeometry(QtCore.QRect(540, 160, 120, 20)) self.lineEdit_4.setObjectName("lineEdit_4") self.label_6 = QtWidgets.QLabel(self) self.label_6.setGeometry(QtCore.QRect(440, 160, 80, 20)) self.label_6.setObjectName("label_6") self.lineEdit_5 = QtWidgets.QLineEdit(self) self.lineEdit_5.setGeometry(QtCore.QRect(540, 190, 120, 20)) self.lineEdit_5.setObjectName("lineEdit_4") self.label_7 = QtWidgets.QLabel(self) self.label_7.setGeometry(QtCore.QRect(440, 190, 80, 20)) self.label_7.setObjectName("label_6") self.label_7.setText("Beyanname No") self.pushButton = QtWidgets.QPushButton(self) self.pushButton.setGeometry(QtCore.QRect(580, 220, 75, 23)) self.pushButton.setObjectName("pushButton") self.yogunluk_listele() self.retranslateUi() self.listWidget.itemDoubleClicked.connect(self.oyna) self.pushButton.clicked.connect(self.yguncelle) QtCore.QMetaObject.connectSlotsByName(self) def yogunluk_listele(self): sonuc = self.yaz.density_duzenle(self.yaz.hepsini_oku("", "densitys")) sayac = 0 for i in range(int(len(sonuc) / 8)): a = str(sonuc[sayac]) + " --> " + \ str(sonuc[sayac + 1]) + " --> " + \ str(sonuc[sayac + 2]) + " --> " + \ str(sonuc[sayac + 3]) + " --> " + \ str(sonuc[sayac + 4]) + " --> " + \ str(sonuc[sayac + 5]) + " --> " + \ str(sonuc[sayac + 8]) + " --> " self.listWidget.addItem(a) sayac += 9 def oyna(self): mersi = self.listWidget.currentItem().text() sayi = int((mersi[0:3])) sorgu = self.yaz.tek_oku("densitys", "id", sayi) self.comboBox.setCurrentText(sorgu[0][2]) self.lineEdit.setText(sorgu[0][3]) self.lineEdit_2.setText(sorgu[0][4]) self.lineEdit_3.setText(sorgu[0][5]) self.lineEdit_4.setText(sorgu[0][1]) self.lineEdit_5.setText(str(sorgu[0][8])) self.change_id_no = sorgu[0][0] def yguncelle(self): self.yaz.yogunluk_gun(self.lineEdit_4.text(), self.comboBox.currentText(), self.lineEdit.text(), self.lineEdit_2.text(), self.lineEdit_3.text(), self.change_id_no, self.lineEdit_5.text()) mesajlar.uyari("Yoğunluk Bilgileri başarıyla veritabanına kaydedildi", "Bilgilendirme") self.comboBox.clear() self.lineEdit.clear() self.lineEdit_2.clear() self.lineEdit_3.clear() self.lineEdit_4.clear() self.lineEdit_5.clear() self.listWidget.clear() self.yogunluk_listele() self.on_changed_value(True) def retranslateUi(self): _translate = QtCore.QCoreApplication.translate self.setWindowTitle(_translate("YogunlukGuncelle", "Yoğunluk Güncelle")) self.label.setText( _translate("YogunlukGuncelle", "Stokta Bulunan Ürün Yoğunluklar")) self.label_2.setText(_translate("YogunlukGuncelle", "Ürün")) self.comboBox.setItemText(0, _translate("YogunlukGuncelle", "MOTORİN")) self.comboBox.setItemText(1, _translate("YogunlukGuncelle", "RME 180")) self.comboBox.setItemText(2, _translate("YogunlukGuncelle", "RMG 380")) self.label_3.setText(_translate("YogunlukGuncelle", "Litre")) self.label_4.setText(_translate("YogunlukGuncelle", "Kilogram")) self.label_5.setText(_translate("YogunlukGuncelle", "Yoğunluk")) self.label_6.setText(_translate("YogunlukGuncelle", "Yükleme Tarihi")) self.pushButton.setText(_translate("YogunlukGuncelle", "Güncelle")) def on_changed_value(self, value): self.clicked.emit(value)
class Ui_Settings(object): def setupUi(self, Settings): self.db = VbagKur() Settings.setObjectName("Settings") Settings.resize(578, 220) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/newPrefix/lib/icon/application-default-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Settings.setWindowIcon(icon) self.label = QtWidgets.QLabel(Settings) self.label.setGeometry(QtCore.QRect(10, 10, 141, 20)) self.label.setObjectName("label") self.lineEdit = QtWidgets.QLineEdit(Settings) self.lineEdit.setGeometry(QtCore.QRect(160, 10, 351, 20)) self.lineEdit.setObjectName("lineEdit") self.pushButton = QtWidgets.QPushButton(Settings) self.pushButton.setGeometry(QtCore.QRect(520, 10, 51, 23)) self.pushButton.setObjectName("pushButton") self.label_2 = QtWidgets.QLabel(Settings) self.label_2.setGeometry(QtCore.QRect(10, 40, 141, 20)) self.label_2.setObjectName("label_2") self.lineEdit_2 = QtWidgets.QLineEdit(Settings) self.lineEdit_2.setGeometry(QtCore.QRect(160, 40, 411, 20)) self.lineEdit_2.setObjectName("lineEdit_2") self.label_3 = QtWidgets.QLabel(Settings) self.label_3.setGeometry(QtCore.QRect(10, 70, 141, 20)) self.label_3.setObjectName("label_3") self.lineEdit_3 = QtWidgets.QLineEdit(Settings) self.lineEdit_3.setGeometry(QtCore.QRect(160, 70, 411, 20)) self.lineEdit_3.setObjectName("lineEdit_3") self.pushButton_2 = QtWidgets.QPushButton(Settings) self.pushButton_2.setGeometry(QtCore.QRect(450, 100, 121, 23)) self.pushButton_2.setObjectName("pushButton_2") self.lineEdit.setReadOnly(True) self.veritabani_bilgisi_cek() self.retranslateUi(Settings) self.pushButton.clicked.connect(self.dosya_kayit_yeri) self.pushButton_2.clicked.connect(self.bilgi_guncelle) QtCore.QMetaObject.connectSlotsByName(Settings) def retranslateUi(self, Settings): _translate = QtCore.QCoreApplication.translate Settings.setWindowTitle(_translate("Settings", "Ayarlar")) self.label.setText(_translate("Settings", "Uzlaştırma Dosya Kayıt Yeri")) self.pushButton.setText(_translate("Settings", "Seç")) self.label_2.setText(_translate("Settings", "Dosya Teslim Süresi")) self.label_3.setText(_translate("Settings", "Dosya Uzatma Süresi")) self.pushButton_2.setText(_translate("Settings", "Güncelle")) def veritabani_bilgisi_cek(self): sql_yer = "select * from ayarlar" sonuc = self.db.komut(sql_yer) self.lineEdit.setText(sonuc[0][2]) self.lineEdit_2.setText(sonuc[0][0]) self.lineEdit_3.setText(sonuc[0][1]) def dosya_kayit_yeri(self): directory = QtWidgets.QFileDialog.getExistingDirectory() if directory: self.lineEdit.setText(directory) def bilgi_guncelle(self): yer = self.lineEdit.text() ts = self.lineEdit_2.text() us = self.lineEdit_3.text() sql = "update ayarlar set teslim_suresi = '{}'," \ "uzatma_suresi = '{}'," \ "kayit_yeri = '{}'".format(ts, us, yer) if self.db.yapistir(sql) == True: baslik = "Veritabanı Güncellendi" mesaj = "Yapılan değişiklikler veritabanına başarıyla kaydedildi" mico.bilgilendir(mesaj, baslik) else: baslik = "Veritabanı Bağlantı Hatası" mesaj = "Veritabanı bağlantı sorunu nedeniyle değişiklikler kaydedilemedi." mico.bilgilendir(mesaj, baslik)
class TarafDuzenle(QtWidgets.QDialog): clicked = QtCore.pyqtSignal(bool) def __init__(self): super(TarafDuzenle, self).__init__() self.db = VbagKur() def init_ui(self, uno, kisi, nitelik): self.setWindowTitle("Taraf Düzenle") self.resize(272, 502) self.horizontalLayoutWidget = QtWidgets.QWidget(self) self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 20, 251, 21)) self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") self.horizontalLayout = QtWidgets.QHBoxLayout( self.horizontalLayoutWidget) self.horizontalLayout.setContentsMargins(5, 1, 1, 0) self.horizontalLayout.setSpacing(10) self.horizontalLayout.setObjectName("horizontalLayout") self.radioButton = QtWidgets.QRadioButton(self) self.radioButton.setGeometry(QtCore.QRect(20, 20, 71, 21)) self.radioButton.setChecked(True) self.radioButton.setObjectName("radioButton") self.radioButton_2 = QtWidgets.QRadioButton(self) self.radioButton_2.setGeometry(QtCore.QRect(100, 20, 71, 21)) self.radioButton_2.setObjectName("radioButton_2") self.radioButton_3 = QtWidgets.QRadioButton(self) self.radioButton_3.setGeometry(QtCore.QRect(180, 20, 71, 21)) self.radioButton_3.setObjectName("radioButton_3") self.stackedWidget = QtWidgets.QStackedWidget(self) self.stackedWidget.setGeometry(QtCore.QRect(10, 40, 261, 471)) self.stackedWidget.setObjectName("stackedWidget") self.page = QtWidgets.QWidget() self.page.setObjectName("page") self.label = QtWidgets.QLabel(self.page) self.label.setGeometry(QtCore.QRect(0, 10, 90, 20)) self.label.setObjectName("label") self.lineEdit = QtWidgets.QLineEdit(self.page) self.lineEdit.setGeometry(QtCore.QRect(70, 10, 182, 20)) self.lineEdit.setObjectName("lineEdit") self.label_21 = QtWidgets.QLabel(self.page) self.label_21.setGeometry(QtCore.QRect(0, 40, 90, 20)) self.label_21.setObjectName("label_21") self.label_21.setText("Teklif Tarihi") self.lineEdit_133 = QtWidgets.QLineEdit(self.page) self.lineEdit_133.setGeometry(QtCore.QRect(70, 40, 182, 20)) self.lineEdit_133.setObjectName("lineEdit_133") self.label_2 = QtWidgets.QLabel(self.page) self.label_2.setGeometry(QtCore.QRect(0, 70, 90, 20)) self.label_2.setObjectName("label_2") self.comboBox = QtWidgets.QComboBox(self.page) self.comboBox.setGeometry(QtCore.QRect(70, 70, 182, 22)) self.comboBox.setObjectName("comboBox") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.label_3 = QtWidgets.QLabel(self.page) self.label_3.setGeometry(QtCore.QRect(0, 100, 90, 20)) self.label_3.setObjectName("label_3") self.lineEdit_2 = QtWidgets.QLineEdit(self.page) self.lineEdit_2.setGeometry(QtCore.QRect(70, 100, 182, 20)) self.lineEdit_2.setObjectName("lineEdit_2") self.label_4 = QtWidgets.QLabel(self.page) self.label_4.setGeometry(QtCore.QRect(0, 130, 90, 20)) self.label_4.setObjectName("label_4") self.lineEdit_3 = QtWidgets.QLineEdit(self.page) self.lineEdit_3.setGeometry(QtCore.QRect(70, 130, 182, 20)) self.lineEdit_3.setObjectName("lineEdit_3") self.label_5 = QtWidgets.QLabel(self.page) self.label_5.setGeometry(QtCore.QRect(0, 160, 90, 20)) self.label_5.setObjectName("label_5") self.lineEdit_4 = QtWidgets.QLineEdit(self.page) self.lineEdit_4.setGeometry(QtCore.QRect(70, 160, 182, 20)) self.lineEdit_4.setObjectName("lineEdit_4") self.label_6 = QtWidgets.QLabel(self.page) self.label_6.setGeometry(QtCore.QRect(0, 190, 90, 20)) self.label_6.setObjectName("label_6") self.lineEdit_5 = QtWidgets.QLineEdit(self.page) self.lineEdit_5.setGeometry(QtCore.QRect(70, 190, 182, 20)) self.lineEdit_5.setObjectName("lineEdit_5") self.label_7 = QtWidgets.QLabel(self.page) self.label_7.setGeometry(QtCore.QRect(0, 220, 90, 20)) self.label_7.setObjectName("label_7") self.lineEdit_6 = QtWidgets.QLineEdit(self.page) self.lineEdit_6.setGeometry(QtCore.QRect(70, 220, 182, 20)) self.lineEdit_6.setText("") self.lineEdit_6.setObjectName("lineEdit_6") self.label_12 = QtWidgets.QLabel(self.page) self.label_12.setGeometry(QtCore.QRect(0, 250, 90, 20)) self.label_12.setObjectName("label_12") self.comboBox_2 = QtWidgets.QComboBox(self.page) self.comboBox_2.setGeometry(QtCore.QRect(70, 250, 182, 22)) self.comboBox_2.setObjectName("comboBox_2") self.comboBox_2.addItem("") self.comboBox_2.addItem("") self.comboBox_2.addItem("") self.label_8 = QtWidgets.QLabel(self.page) self.label_8.setGeometry(QtCore.QRect(0, 280, 90, 20)) self.label_8.setObjectName("label_8") self.lineEdit_7 = QtWidgets.QLineEdit(self.page) self.lineEdit_7.setGeometry(QtCore.QRect(70, 280, 182, 20)) self.lineEdit_7.setText("") self.lineEdit_7.setObjectName("lineEdit_7") self.label_20 = QtWidgets.QLabel(self.page) self.label_20.setGeometry(QtCore.QRect(0, 310, 90, 20)) self.label_20.setObjectName("label_20") self.comboBox_5 = QtWidgets.QComboBox(self.page) self.comboBox_5.setGeometry(QtCore.QRect(70, 310, 182, 22)) self.comboBox_5.setObjectName("comboBox_5") self.comboBox_5.addItem("") self.comboBox_5.addItem("") self.comboBox_5.addItem("") self.label_9 = QtWidgets.QLabel(self.page) self.label_9.setGeometry(QtCore.QRect(0, 340, 90, 20)) self.label_9.setObjectName("label_9") self.textEdit = QtWidgets.QTextEdit(self.page) self.textEdit.setGeometry(QtCore.QRect(70, 340, 181, 91)) self.textEdit.setObjectName("textEdit") self.pushButton = QtWidgets.QPushButton(self.page) self.pushButton.setGeometry(QtCore.QRect(180, 435, 75, 23)) self.pushButton.setObjectName("pushButton") self.stackedWidget.addWidget(self.page) self.page_2 = QtWidgets.QWidget() self.page_2.setObjectName("page_2") self.label_10 = QtWidgets.QLabel(self.page_2) self.label_10.setGeometry(QtCore.QRect(0, 20, 90, 20)) self.label_10.setObjectName("label_10") self.comboBox_3 = QtWidgets.QComboBox(self.page_2) self.comboBox_3.setGeometry(QtCore.QRect(100, 20, 150, 22)) self.comboBox_3.setObjectName("comboBox_3") self.label_45 = QtWidgets.QLabel(self.page_2) self.label_45.setGeometry(QtCore.QRect(0, 50, 90, 20)) self.label_45.setObjectName("label_45") self.comboBox_11 = QtWidgets.QComboBox(self.page_2) self.comboBox_11.setGeometry(QtCore.QRect(100, 50, 150, 22)) self.comboBox_11.setObjectName("comboBox_11") self.comboBox_11.addItem("") self.comboBox_11.addItem("") self.comboBox_11.addItem("") self.label_46 = QtWidgets.QLabel(self.page_2) self.label_46.setGeometry(QtCore.QRect(0, 80, 90, 20)) self.label_46.setObjectName("label_46") self.lineEdit_29 = QtWidgets.QLineEdit(self.page_2) self.lineEdit_29.setGeometry(QtCore.QRect(100, 80, 150, 20)) self.lineEdit_29.setText("") self.lineEdit_29.setObjectName("lineEdit_29") self.stackedWidget.addWidget(self.page_2) self.label_13 = QtWidgets.QLabel(self.page_2) self.label_13.setGeometry(QtCore.QRect(0, 110, 90, 20)) self.label_13.setObjectName("label_13") self.lineEdit_8 = QtWidgets.QLineEdit(self.page_2) self.lineEdit_8.setGeometry(QtCore.QRect(100, 110, 150, 20)) self.lineEdit_8.setText("") self.lineEdit_8.setObjectName("lineEdit_8") self.label_22 = QtWidgets.QLabel(self.page_2) self.label_22.setGeometry(QtCore.QRect(0, 140, 101, 20)) self.label_22.setObjectName("label_22") self.lineEdit_14 = QtWidgets.QLineEdit(self.page_2) self.lineEdit_14.setGeometry(QtCore.QRect(100, 140, 150, 20)) self.lineEdit_14.setText("") self.lineEdit_14.setObjectName("lineEdit_14") self.label_14 = QtWidgets.QLabel(self.page_2) self.label_14.setGeometry(QtCore.QRect(0, 170, 90, 20)) self.label_14.setObjectName("label_14") self.lineEdit_9 = QtWidgets.QLineEdit(self.page_2) self.lineEdit_9.setGeometry(QtCore.QRect(100, 170, 150, 20)) self.lineEdit_9.setText("") self.lineEdit_9.setObjectName("lineEdit_9") self.label_21 = QtWidgets.QLabel(self.page_2) self.label_21.setGeometry(QtCore.QRect(0, 200, 90, 20)) self.label_21.setObjectName("label_21") self.lineEdit_13 = QtWidgets.QLineEdit(self.page_2) self.lineEdit_13.setGeometry(QtCore.QRect(100, 200, 150, 20)) self.lineEdit_13.setObjectName("lineEdit_13") self.label_15 = QtWidgets.QLabel(self.page_2) self.label_15.setGeometry(QtCore.QRect(0, 230, 90, 20)) self.label_15.setObjectName("label_15") self.lineEdit_10 = QtWidgets.QLineEdit(self.page_2) self.lineEdit_10.setGeometry(QtCore.QRect(100, 230, 150, 20)) self.lineEdit_10.setText("") self.lineEdit_10.setObjectName("lineEdit_10") self.label_16 = QtWidgets.QLabel(self.page_2) self.label_16.setGeometry(QtCore.QRect(0, 260, 90, 20)) self.label_16.setObjectName("label_16") self.textEdit_2 = QtWidgets.QTextEdit(self.page_2) self.textEdit_2.setGeometry(QtCore.QRect(101, 260, 150, 101)) self.textEdit_2.setObjectName("textEdit_2") self.pushButton_2 = QtWidgets.QPushButton(self.page_2) self.pushButton_2.setGeometry(QtCore.QRect(180, 370, 75, 23)) self.pushButton_2.setObjectName("pushButton_2") self.stackedWidget.addWidget(self.page_2) self.page_3 = QtWidgets.QWidget() self.page_3.setObjectName("page_3") self.comboBox_4 = QtWidgets.QComboBox(self.page_3) self.comboBox_4.setGeometry(QtCore.QRect(70, 20, 182, 22)) self.comboBox_4.setObjectName("comboBox_4") self.label_11 = QtWidgets.QLabel(self.page_3) self.label_11.setGeometry(QtCore.QRect(0, 20, 90, 20)) self.label_11.setObjectName("label_11") self.lineEdit_11 = QtWidgets.QLineEdit(self.page_3) self.lineEdit_11.setGeometry(QtCore.QRect(70, 50, 182, 20)) self.lineEdit_11.setText("") self.lineEdit_12 = QtWidgets.QLineEdit(self.page_3) self.lineEdit_12.setGeometry(QtCore.QRect(70, 80, 182, 20)) self.lineEdit_12.setText("") self.lineEdit_12.setObjectName("lineEdit_12") self.label_17 = QtWidgets.QLabel(self.page_3) self.label_17.setGeometry(QtCore.QRect(0, 50, 90, 20)) self.label_17.setObjectName("label_17") self.label_18 = QtWidgets.QLabel(self.page_3) self.label_18.setGeometry(QtCore.QRect(0, 80, 90, 20)) self.label_18.setObjectName("label_18") self.textEdit_3 = QtWidgets.QTextEdit(self.page_3) self.textEdit_3.setGeometry(QtCore.QRect(70, 110, 182, 71)) self.textEdit_3.setObjectName("textEdit_3") self.lineEdit_11.setObjectName("lineEdit_11") self.label_19 = QtWidgets.QLabel(self.page_3) self.label_19.setGeometry(QtCore.QRect(0, 110, 90, 20)) self.label_19.setObjectName("label_19") self.pushButton_3 = QtWidgets.QPushButton(self.page_3) self.pushButton_3.setGeometry(QtCore.QRect(180, 190, 75, 23)) self.pushButton_3.setObjectName("pushButton_3") self.stackedWidget.addWidget(self.page_3) self.retranslateUi(self) self.pushButton.clicked.connect(self.sahis_guncelle) self.pushButton_2.clicked.connect(self.vekil_guncelle) self.pushButton_3.clicked.connect(self.tercuman_guncelle) QtCore.QMetaObject.connectSlotsByName(self) if nitelik == "Şahıs": self.radioButton.setChecked(True) self.radioButton_2.setDisabled(True) self.radioButton_3.setDisabled(True) self.stackedWidget.setCurrentIndex(0) sql = "select * from taraflar where dosya = '{}' and ad = '{}'".format( uno, kisi) self.bilgi_cek(sql) elif nitelik == "Vekil": self.radioButton_2.setChecked(True) self.radioButton.setDisabled(True) self.radioButton_3.setDisabled(True) self.stackedWidget.setCurrentIndex(1) sql = "select * from temsilciler where dosya = '{}' and ad = '{}'".format( uno, kisi) sonuc = self.db.komut( "select ad from taraflar where dosya = '{}'".format(uno)) for i in range(len(sonuc)): self.comboBox_3.addItem(sonuc[i][0]) self.bilgi_cek(sql) else: self.radioButton_3.setChecked(True) self.radioButton.setDisabled(True) self.radioButton_2.setDisabled(True) self.stackedWidget.setCurrentIndex(2) sonuc = self.db.komut( "select ad from taraflar where dosya = '{}'".format(uno)) for i in range(len(sonuc)): self.comboBox_4.addItem(sonuc[i][0]) sql = "select * from tercuman where dosya = '{}' and ad = '{}'".format( uno, kisi) self.bilgi_cek(sql) def retranslateUi(self, Dialog): _translate = QtCore.QCoreApplication.translate self.radioButton_2.setText(_translate("Dialog", "Vekil")) self.radioButton.setText(_translate("Dialog", "Şahıs")) self.radioButton_3.setText(_translate("Dialog", "Tercüman")) self.label.setText(_translate("Dialog", "Ad Soyad")) self.comboBox_2.setItemText(0, _translate("Dialog", "Cinsiyet")) self.comboBox_2.setItemText(1, _translate("Dialog", "Kadın")) self.comboBox_2.setItemText(2, _translate("Dialog", "Erkek")) self.comboBox_5.setItemText(0, _translate("Dialog", "Normal Tc Adresi")) self.comboBox_5.setItemText( 1, _translate("Dialog", "Göstermelik Tc Adresi")) self.comboBox_5.setItemText( 2, _translate("Dialog", "Yabancı Ülke Adresi")) self.label_20.setText(_translate("Dialog", "Adres Türü")) self.label_9.setText(_translate("Dialog", "Adres")) self.label_7.setText(_translate("Dialog", "Doğum Tarihi")) self.label_3.setText(_translate("Dialog", "TC No")) self.label_5.setText(_translate("Dialog", "Anne Adı")) self.label_4.setText(_translate("Dialog", "Baba Adı")) self.label_12.setText(_translate("Dialog", "Cinsiyet")) self.label_6.setText(_translate("Dialog", "Doğum Yeri")) self.label_2.setText(_translate("Dialog", "Taraf")) self.label_8.setText(_translate("Dialog", "Telefon")) self.comboBox.setItemText(0, _translate("Dialog", "Taraf Seç")) self.comboBox.setItemText(1, _translate("Dialog", "Mağdur / Katılan")) self.comboBox.setItemText( 2, _translate("Dialog", "Mağdur/Katılan\'ın Kanuni Temsilcisi")) self.comboBox.setItemText(3, _translate("Dialog", "Suçtan Zarar Gören")) self.comboBox.setItemText( 4, _translate("Dialog", "Suçtan Zarar Görenin Kanuni Temsilcisi")) self.comboBox.setItemText(5, _translate("Dialog", "Şüpheli / Sanık")) self.comboBox.setItemText( 6, _translate("Dialog", "Şüpheli Sanığın Kanuni Temsilcisi")) self.comboBox.setItemText(7, _translate("Dialog", "Müşteki Şüpheli")) self.comboBox.setItemText( 8, _translate("Dialog", "Müşteki Şüphelinin Kanuni Temsilcisi")) self.pushButton.setText(_translate("Dialog", "Ekle")) self.label_10.setText(_translate("Dialog", "Temsil ettiği")) self.label_15.setText(_translate("Dialog", "Telefon")) self.label_14.setText(_translate("Dialog", "T.C. No")) self.label_16.setText(_translate("Dialog", "Adres")) self.label_13.setText(_translate("Dialog", "Kayıtlı Olduğu Baro")) self.pushButton_2.setText(_translate("Dialog", "Ekle")) self.label_11.setText(_translate("Dialog", "Temsil ettiği")) self.label_17.setText(_translate("Dialog", "Ad Soyad")) self.label_18.setText(_translate("Dialog", "TC No")) self.label_19.setText(_translate("Dialog", "Adres")) self.pushButton_3.setText(_translate("Dialog", "Ekle")) self.comboBox_11.setItemText(0, _translate("Dialog", "Durum Seç")) self.comboBox_11.setItemText(1, _translate("Dialog", "Müdafi")) self.comboBox_11.setItemText(2, _translate("Dialog", "Vekil")) self.label_46.setText(_translate("Dialog", "Ad Soyad")) self.label_21.setText(_translate("Dialog", "Teklif Tarihi")) self.label_22.setText(_translate("Dialog", " Sicil No")) self.label_45.setText(_translate("Dialog", "Durum")) def bilgi_cek(self, sql): sonuc = tek_satirlik_demet_coz(self.db.komut(sql)) self.veri_doldur(sonuc) def veri_doldur(self, bilgi): if len(bilgi) == 14: self.sahis_id_no = bilgi[0] self.lineEdit.setText(bilgi[1]) self.lineEdit_133.setText(bilgi[2]) self.comboBox.setCurrentIndex(bilgi[3]) self.lineEdit_2.setText(bilgi[4]) self.lineEdit_3.setText(bilgi[5]) self.lineEdit_4.setText(bilgi[6]) self.lineEdit_5.setText(bilgi[7]) self.lineEdit_6.setText(bilgi[8]) self.comboBox_2.setCurrentText(bilgi[9]) self.lineEdit_7.setText(bilgi[10]) self.comboBox_5.setCurrentIndex(bilgi[11]) self.textEdit.setPlainText(bilgi[12]) elif len(bilgi) == 12: self.vekil_id_no = bilgi[0] self.lineEdit_29.setText(bilgi[2]) self.lineEdit_13.setText(bilgi[1]) self.lineEdit_14.setText(bilgi[3]) self.lineEdit_8.setText(bilgi[10]) self.lineEdit_9.setText(bilgi[11]) self.lineEdit_10.setText(bilgi[4]) self.textEdit_2.setPlainText(bilgi[5]) self.comboBox_3.setCurrentText(bilgi[7]) self.comboBox_11.setCurrentText(bilgi[9]) elif len(bilgi) == 7: self.tercuman_id_no = bilgi[0] self.comboBox_4.setCurrentText(bilgi[5]) self.lineEdit_11.setText(bilgi[1]) self.lineEdit_12.setText(bilgi[2]) self.textEdit_3.setPlainText(bilgi[3]) def sahis_guncelle(self): l = [] l.append(self.lineEdit.text()) l.append(self.lineEdit_133.text()) l.append(self.comboBox.currentIndex()) l.append(self.lineEdit_2.text()) l.append(self.lineEdit_3.text()) l.append(self.lineEdit_4.text()) l.append(self.lineEdit_5.text()) l.append(self.lineEdit_6.text()) l.append(self.comboBox_2.currentText()) l.append(self.lineEdit_7.text()) l.append(self.comboBox_5.currentIndex()) l.append(self.textEdit.toPlainText()) l.append(self.sahis_id_no) if guncelleme_soru(l[0]) == True: # Veritabanına Gönder if self.db.sahis_guncelle(l) == True: baslik = "Bilgi Güncelleme " mesaj = l[0] + " isimli kişinin bilgileri güncellendi" bilgilendir(mesaj, baslik) self.lineEdit.clear() self.lineEdit_133.clear() self.lineEdit_2.clear() self.lineEdit_3.clear() self.lineEdit_4.clear() self.lineEdit_5.clear() self.lineEdit_6.clear() self.lineEdit_7.clear() self.textEdit.clear() self.comboBox.setCurrentIndex(0) self.comboBox_2.setCurrentIndex(0) self.comboBox_5.setCurrentIndex(0) self.on_changed_value(False) else: pass else: pass def vekil_guncelle(self): v = [] v.append(self.lineEdit_13.text()) v.append(self.lineEdit_29.text()) v.append(self.lineEdit_14.text()) v.append(self.lineEdit_10.text()) v.append(self.textEdit_2.toPlainText()) v.append(self.comboBox_3.currentText()) v.append(self.comboBox_11.currentText()) v.append(self.lineEdit_8.text()) v.append(self.lineEdit_9.text()) v.append(self.vekil_id_no) # Veritabanına Gönder if guncelleme_soru(v[1]) == True: # Veritabanına Gönder if self.db.vekil_guncelle(v) == True: baslik = "Bilgi Güncelleme " mesaj = v[1] + " isimli kişinin bilgileri güncellendi" bilgilendir(mesaj, baslik) self.lineEdit_13.clear() self.lineEdit_29.clear() self.lineEdit_14.clear() self.lineEdit_10.clear() self.textEdit_2.clear() self.comboBox_3.setCurrentIndex(0) self.comboBox_11.setCurrentIndex(0) self.lineEdit_8.clear() self.lineEdit_9.clear() self.on_changed_value(False) else: pass else: pass def tercuman_guncelle(self): t = [] t.append(self.lineEdit_11.text()) t.append(self.lineEdit_12.text()) t.append(self.textEdit_3.toPlainText()) t.append(self.comboBox_4.currentText()) t.append(self.tercuman_id_no) # Veritabanına Gönder if guncelleme_soru(t[0]) == True: # Veritabanına Gönder if self.db.tercuman_guncelle(t) == True: baslik = "Bilgi Güncelleme " mesaj = t[0] + " isimli kişinin bilgileri güncellendi" bilgilendir(mesaj, baslik) self.lineEdit_11.clear() self.lineEdit_12.clear() self.textEdit_3.clear() self.comboBox_4.setCurrentIndex(0) self.on_changed_value(False) else: pass else: pass # Sinyali Gönder def on_changed_value(self, value): self.clicked.emit(value)
def __init__(self): super(Ui_BolgeYerSil, self).__init__() self.yaz = VbagKur() self.setupUi()
class Ui_Fg(object): def __init__(self): self.yaz = VbagKur() self.change_id = 0 def setupUi(self, Fg): Fg.setObjectName("Fg") Fg.resize(518, 406) self.label = QtWidgets.QLabel(Fg) self.label.setGeometry(QtCore.QRect(10, 10, 100, 20)) self.label.setObjectName("label") self.lineEdit = QtWidgets.QLineEdit(Fg) self.lineEdit.setGeometry(QtCore.QRect(90, 10, 200, 20)) self.lineEdit.setObjectName("lineEdit") self.pushButton = QtWidgets.QPushButton(Fg) self.pushButton.setGeometry(QtCore.QRect(320, 10, 75, 23)) self.pushButton.setObjectName("pushButton") self.label_3 = QtWidgets.QLabel(Fg) self.label_3.setGeometry(QtCore.QRect(210, 50, 68, 20)) self.label_3.setObjectName("label_3") self.label_4 = QtWidgets.QLabel(Fg) self.label_4.setGeometry(QtCore.QRect(210, 80, 68, 20)) self.label_4.setObjectName("label_4") self.label_7 = QtWidgets.QLabel(Fg) self.label_7.setGeometry(QtCore.QRect(210, 170, 68, 20)) self.label_7.setObjectName("label_7") self.label_8 = QtWidgets.QLabel(Fg) self.label_8.setGeometry(QtCore.QRect(210, 200, 91, 20)) self.label_8.setObjectName("label_8") self.label_5 = QtWidgets.QLabel(Fg) self.label_5.setGeometry(QtCore.QRect(210, 110, 68, 20)) self.label_5.setObjectName("label_5") self.label_10 = QtWidgets.QLabel(Fg) self.label_10.setGeometry(QtCore.QRect(210, 260, 68, 20)) self.label_10.setObjectName("label_10") self.label_6 = QtWidgets.QLabel(Fg) self.label_6.setGeometry(QtCore.QRect(210, 140, 68, 20)) self.label_6.setObjectName("label_6") self.label_9 = QtWidgets.QLabel(Fg) self.label_9.setGeometry(QtCore.QRect(210, 230, 68, 20)) self.label_9.setObjectName("label_9") self.lineEdit_2 = QtWidgets.QLineEdit(Fg) self.lineEdit_2.setGeometry(QtCore.QRect(310, 50, 181, 20)) self.lineEdit_2.setObjectName("lineEdit_2") self.lineEdit_3 = QtWidgets.QLineEdit(Fg) self.lineEdit_3.setGeometry(QtCore.QRect(310, 80, 181, 20)) self.lineEdit_3.setObjectName("lineEdit_3") self.lineEdit_4 = QtWidgets.QLineEdit(Fg) self.lineEdit_4.setGeometry(QtCore.QRect(310, 110, 181, 20)) self.lineEdit_4.setObjectName("lineEdit_4") self.lineEdit_5 = QtWidgets.QLineEdit(Fg) self.lineEdit_5.setGeometry(QtCore.QRect(310, 140, 181, 20)) self.lineEdit_5.setObjectName("lineEdit_5") self.lineEdit_6 = QtWidgets.QLineEdit(Fg) self.lineEdit_6.setGeometry(QtCore.QRect(310, 170, 181, 20)) self.lineEdit_6.setObjectName("lineEdit_6") self.lineEdit_7 = QtWidgets.QLineEdit(Fg) self.lineEdit_7.setGeometry(QtCore.QRect(310, 200, 181, 20)) self.lineEdit_7.setObjectName("lineEdit_7") self.lineEdit_8 = QtWidgets.QLineEdit(Fg) self.lineEdit_8.setGeometry(QtCore.QRect(310, 230, 181, 20)) self.lineEdit_8.setObjectName("lineEdit_8") self.lineEdit_9 = QtWidgets.QLineEdit(Fg) self.lineEdit_9.setGeometry(QtCore.QRect(310, 260, 181, 20)) self.lineEdit_9.setObjectName("lineEdit_9") self.pushButton_2 = QtWidgets.QPushButton(Fg) self.pushButton_2.setGeometry(QtCore.QRect(420, 350, 75, 23)) self.pushButton_2.setObjectName("pushButton_2") self.pushButton_3 = QtWidgets.QPushButton(Fg) self.pushButton_3.setGeometry(QtCore.QRect(150, 160, 41, 41)) self.pushButton_3.setObjectName("pushButton_3") self.listWidget = QtWidgets.QListWidget(Fg) self.listWidget.setGeometry(QtCore.QRect(10, 40, 131, 351)) self.listWidget.setObjectName("listWidget") self.label_12 = QtWidgets.QLabel(Fg) self.label_12.setGeometry(QtCore.QRect(210, 290, 68, 20)) self.label_12.setObjectName("label_12") self.lineEdit_10 = QtWidgets.QLineEdit(Fg) self.lineEdit_10.setGeometry(QtCore.QRect(310, 290, 181, 20)) self.lineEdit_10.setObjectName("lineEdit_10") self.label_13 = QtWidgets.QLabel(Fg) self.label_13.setGeometry(QtCore.QRect(210, 320, 68, 20)) self.label_13.setObjectName("label_13") self.lineEdit_11 = QtWidgets.QLineEdit(Fg) self.lineEdit_11.setGeometry(QtCore.QRect(310, 320, 181, 20)) self.lineEdit_11.setObjectName("lineEdit_11") self.retranslateUi(Fg) self.pushButton.clicked.connect(self.gemi_bul) self.pushButton_3.clicked.connect(self.gemi_sec) self.pushButton_2.clicked.connect(self.guncelle) self.listWidget.itemDoubleClicked.connect(self.gemi_sec) QtCore.QMetaObject.connectSlotsByName(Fg) def gemi_bul(self): sor = self.yaz.hepsini_oku("gad", "gemiler", "kod", self.lineEdit.text()) liste = [] self.listWidget.clear() for i in range(len(sor)): self.listWidget.addItem(sor[i][0]) def gemi_sec(self): soru = self.yaz.tek_oku("gemiler", "gad", self.listWidget.currentItem().text()) self.lineEdit_2.setText(str(soru[0][1])) self.lineEdit_3.setText(soru[0][2]) self.lineEdit_4.setText(soru[0][3]) self.lineEdit_5.setText(soru[0][4]) self.lineEdit_6.setText(soru[0][5]) self.lineEdit_7.setText(soru[0][6]) self.lineEdit_8.setText(soru[0][7]) self.lineEdit_9.setText(soru[0][8]) self.lineEdit_10.setText(soru[0][9]) self.lineEdit_11.setText(soru[0][10]) self.change_id = soru[0][0] def guncelle(self): self.yaz.gemi_guncelle(self.lineEdit_2.text(), self.lineEdit_3.text(), self.lineEdit_4.text(), self.lineEdit_5.text(), self.lineEdit_6.text(), self.lineEdit_7.text(), self.lineEdit_8.text(), self.lineEdit_9.text(), self.lineEdit_10.text(), self.lineEdit_11.text(), self.change_id ) mesaj = self.lineEdit_3.text() + " Gemisinin Kaydı Başarıyla Değiştirildi" mes.uyari(mesaj, "Bilgilendirme") self.lineEdit_2.clear() self.lineEdit_3.clear() self.lineEdit_4.clear() self.lineEdit_5.clear() self.lineEdit_6.clear() self.lineEdit_7.clear() self.lineEdit_8.clear() self.lineEdit_9.clear() self.lineEdit_10.clear() self.lineEdit_11.clear() self.listWidget.clear() self.gemi_bul() def retranslateUi(self, Fg): _translate = QtCore.QCoreApplication.translate Fg.setWindowTitle(_translate("Fg", "Gemi Bilgisi Düzenle")) self.label.setText(_translate("Fg", "Firma Kodu")) self.pushButton.setText(_translate("Fg", "Listele")) self.label_3.setText(_translate("Fg", "Müşteri")) self.label_4.setText(_translate("Fg", "Gemi Adı")) self.label_7.setText(_translate("Fg", "Defter No")) self.label_8.setText(_translate("Fg", "Belge No")) self.label_5.setText(_translate("Fg", "Gemi No")) self.label_10.setText(_translate("Fg", "İmo / Çağrı")) self.label_6.setText(_translate("Fg", "Gemi Cinsi")) self.label_9.setText(_translate("Fg", "Sicil No")) self.pushButton_2.setText(_translate("Fg", "Güncelle")) self.pushButton_3.setText(_translate("Fg", "Seç")) self.label_12.setText(_translate("Fg", "Acenta ")) self.label_13.setText(_translate("Fg", "Acenta Tel"))
def initui(self): self.dosya_id = None self.dosya_ad = None self.db = VbagKur() self.setObjectName("DosyaSil") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/newPrefix/lib/icon/ubuntuone.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.setWindowIcon(icon) self.resize(721, 336) self.gridLayout = QtWidgets.QGridLayout(self) self.gridLayout.setObjectName("gridLayout") self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.tableWidget = QtWidgets.QTableWidget(self) self.tableWidget.setObjectName("tableWidget") self.tableWidget.setColumnCount(9) self.tableWidget.setRowCount(0) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(0, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(1, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(2, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(3, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(4, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(5, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(6, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(7, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(8, item) self.verticalLayout_3.addWidget(self.tableWidget) self.gridLayout.addLayout(self.verticalLayout_3, 1, 0, 1, 4) self.label = QtWidgets.QLabel(self) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 1) spacerItem = QtWidgets.QSpacerItem(443, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 0, 3, 1, 1) self.comboBox = QtWidgets.QComboBox(self) self.comboBox.setObjectName("comboBox") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.setItemText(3, "") self.gridLayout.addWidget(self.comboBox, 0, 1, 1, 1) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") spacerItem1 = QtWidgets.QSpacerItem(82, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem1) self.pushButton = QtWidgets.QPushButton(self) self.pushButton.setMaximumSize(QtCore.QSize(100, 16777215)) self.pushButton.setAcceptDrops(True) self.pushButton.setObjectName("pushButton") self.horizontalLayout_2.addWidget(self.pushButton) self.gridLayout.addLayout(self.horizontalLayout_2, 2, 3, 1, 1) self.tableWidget.cellClicked.connect(self.dosya_bul) self.comboBox.currentIndexChanged.connect(self.adana) self.pushButton.setDisabled(True) self.pushButton.clicked.connect(self.sil) self.tum_dosyalar() self.retranslateUi(self) QtCore.QMetaObject.connectSlotsByName(self)
# -*- coding: utf-8 -*- from PyQt5 import QtCore, QtGui, QtWidgets from vtbgln import VbagKur import math, time, os from shutil import copy2 import xlwings as xw t = time.strftime("%d %m %Y") tar = t.replace(" ", ".") yaz = VbagKur() def gemi_listele(arg): return yaz.veri_duzenle(yaz.hepsini_oku("gad", "gemiler", "kod", arg)) def yogunluk_listele(arg): return yaz.veri_duzenle(yaz.hepsini_oku("kesafet", "densitys", "tur", arg)) def v_c_f(density, brut, sicaklik): if len(brut) == 3: sonuc_liste = [] deger = (float(density) * 2000) / 2 if int(deger) >= 839 & int(deger) <= 1075: sonuc = 186.9696 / (math.pow(deger, 2)) + 0.4862 / deger elif int(deger) >= 788 & (deger) <= 838.5: sonuc = 594.5418 / (math.pow(deger, 2)) elif int(deger) >= 770.5 & int(deger) <= 787.5:
def __init__(self): self.yaz = VbagKur()
def __init__(self): super(Ekler, self).__init__() self.db = VbagKur()
class Ui_SablonDuzenle(object): def setupUi(self, SablonDuzenle): self.sablon_id = None self.db = VbagKur() SablonDuzenle.setObjectName("SablonDuzenle") SablonDuzenle.resize(561, 408) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/newPrefix/lib/icon/gnome-contacts.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) SablonDuzenle.setWindowIcon(icon) self.gridLayout = QtWidgets.QGridLayout(SablonDuzenle) self.gridLayout.setObjectName("gridLayout") self.label = QtWidgets.QLabel(SablonDuzenle) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.label_3 = QtWidgets.QLabel(SablonDuzenle) self.label_3.setObjectName("label_3") self.gridLayout.addWidget(self.label_3, 0, 1, 1, 1) self.listWidget = QtWidgets.QListWidget(SablonDuzenle) self.listWidget.setMinimumSize(QtCore.QSize(200, 0)) self.listWidget.setMaximumSize(QtCore.QSize(200, 16777215)) self.listWidget.setObjectName("listWidget") self.gridLayout.addWidget(self.listWidget, 1, 0, 3, 1) self.lineEdit = QtWidgets.QLineEdit(SablonDuzenle) self.lineEdit.setObjectName("lineEdit") self.gridLayout.addWidget(self.lineEdit, 1, 1, 1, 3) self.label_2 = QtWidgets.QLabel(SablonDuzenle) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 2, 1, 1, 1) self.textEdit = QtWidgets.QTextEdit(SablonDuzenle) self.textEdit.setObjectName("textEdit") self.gridLayout.addWidget(self.textEdit, 3, 1, 1, 3) spacerItem = QtWidgets.QSpacerItem(509, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 4, 0, 1, 2) self.pushButton = QtWidgets.QPushButton(SablonDuzenle) self.pushButton.setObjectName("pushButton") self.gridLayout.addWidget(self.pushButton, 4, 2, 1, 1) self.pushButton_2 = QtWidgets.QPushButton(SablonDuzenle) self.pushButton_2.setObjectName("pushButton_2") self.gridLayout.addWidget(self.pushButton_2, 4, 3, 1, 1) self.retranslateUi(SablonDuzenle) self.pushButton.clicked.connect(self.sablon_sil) self.pushButton_2.clicked.connect(self.sablon_guncelle) self.listWidget.itemDoubleClicked['QListWidgetItem*'].connect(self.hazirlik_bitir) self.hazirlik() QtCore.QMetaObject.connectSlotsByName(SablonDuzenle) def retranslateUi(self, SablonDuzenle): _translate = QtCore.QCoreApplication.translate SablonDuzenle.setWindowTitle(_translate("SablonDuzenle", "Şablon Düzenle & Sil")) self.label.setText(_translate("SablonDuzenle", "Şablonlar")) self.label_3.setText(_translate("SablonDuzenle", "Şablon Adı")) self.label_2.setText(_translate("SablonDuzenle", "Şablon Metni")) self.pushButton.setText(_translate("SablonDuzenle", "Sil")) self.pushButton_2.setText(_translate("SablonDuzenle", "Güncelle")) def hazirlik(self): sor = self.db.komut("select ad from sablonlar ") if len(sor) == 0: baslik = "Şablon Düzenleme & Silme Hatası" mesaj = "Veritabanında Düzenlenecek veya silinecek herhangi bir şablon kaydı bulunmamakta" else: for i in range(len(sor)): self.listWidget.addItem(sor[i][0]) def hazirlik_bitir(self): sor = self.db.komut("select * from sablonlar where ad = '{}'".format(self.listWidget.currentItem().text())) self.sablon_id = sor[0][0] self.lineEdit.setText(sor[0][1]) self.textEdit.setPlainText(sor[0][2]) def sablon_sil(self): if mico.sorusor("Şablon Sil",self.lineEdit.text(), " Kaydını veritabanından silmek istediğinize emin misiniz ?") == True: self.db.satir_sil("Delete From sablonlar where id = '{}'".format(self.sablon_id)) baslik = "Şablon Kaydı Sil" mesaj = self.lineEdit.text() + " kaydı veritabanından başarıyla silindi" mico.bilgilendir(mesaj, baslik) self.listWidget.clear() self.hazirlik() self.lineEdit.clear() self.textEdit.clear() else: baslik = "Şablon Kaydı Silme" mesaj = "Kayıt Silme İşleminden vazgeçildi" mico.bilgilendir(mesaj, baslik) def sablon_guncelle(self): if mico.sorusor("Şablon Güncelle",self.lineEdit.text(), "Şablon bilgilerini güncellemek istediğinize emin misiniz ?") == True: self.db.yapistir("UPDATE sablonlar SET ad='{}', icerik='{}' where id = '{}'".format(self.lineEdit.text(), self.textEdit.toPlainText(), self.sablon_id)) baslik = "Şablon Güncelle" mesaj = self.lineEdit.text() + " şablonu başarıyla güncellendi" mico.bilgilendir(mesaj, baslik) self.listWidget.clear() self.hazirlik() self.lineEdit.clear() self.textEdit.clear() else: baslik = "Şablon Kaydı Güncelleme" mesaj = "Kayıt güncelleme işleminden vazgeçildi" mico.bilgilendir(mesaj, baslik)
def __init__(self): super(Ui_PersonelSil, self).__init__() self.yaz = VbagKur() self.setupUi()
def __init__(self): super(TarafDuzenle, self).__init__() self.db = VbagKur()