Example #1
0
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)
Example #2
0
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
Example #3
0
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)
Example #4
0
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)
Example #5
0
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)
Example #6
0
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)
Example #7
0
class Ui_DosyaSil(QtWidgets.QDialog):
    clicked = QtCore.pyqtSignal(bool)

    def __init__(self):
        super(Ui_DosyaSil, self).__init__()
        self.initui()

    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)

    def retranslateUi(self, DosyaSil):
        _translate = QtCore.QCoreApplication.translate
        DosyaSil.setWindowTitle(_translate("DosyaSil", "Dosya Sil"))
        item = self.tableWidget.horizontalHeaderItem(0)
        item.setText(_translate("DosyaSil", "Id"))
        item = self.tableWidget.horizontalHeaderItem(1)
        item.setText(_translate("DosyaSil", "Uzlaşma No"))
        item = self.tableWidget.horizontalHeaderItem(2)
        item.setText(_translate("DosyaSil", "Soruşturma No"))
        item = self.tableWidget.horizontalHeaderItem(3)
        item.setText(_translate("DosyaSil", "M. Esas No"))
        item = self.tableWidget.horizontalHeaderItem(4)
        item.setText(_translate("DosyaSil", "Suç"))
        item = self.tableWidget.horizontalHeaderItem(5)
        item.setText(_translate("DosyaSil", "Tevdi Tarihi"))
        item = self.tableWidget.horizontalHeaderItem(6)
        item.setText(_translate("DosyaSil", "Nitelik"))
        item = self.tableWidget.horizontalHeaderItem(7)
        item.setText(_translate("DosyaSil", "Durum"))
        item = self.tableWidget.horizontalHeaderItem(8)
        item.setText(_translate("DosyaSil", "Teslim Tarihi"))
        self.label.setText(_translate("DosyaSil", "Listelenmesini istedğiniz Dosya Türü"))
        self.comboBox.setItemText(0, _translate("DosyaSil", "Tüm Dosyalar"))
        self.comboBox.setItemText(1, _translate("DosyaSil", "Aktif Dosyalar"))
        self.comboBox.setItemText(2, _translate("DosyaSil", "Kapanmış Dosyalar"))
        self.pushButton.setText(_translate("DosyaSil", "Sil"))

    def tum_dosyalar(self):
        sonuc = self.db.komut("select * from dosyalar")
        if len(sonuc) == 0:
            self.pushButton.setDisabled(True)
        else:
            self.pushButton.setDisabled(False)

        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 aktif_dosyalar(self):
        sonuc = self.db.komut("select * from dosyalar where durum ='1'")
        if len(sonuc) == 0:
            self.pushButton.setDisabled(True)
        else:
            self.pushButton.setDisabled(False)
        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 pasif_dosyalar(self):
        sonuc = self.db.komut("select * from dosyalar where durum ='0'")
        if len(sonuc) == 0:
            self.pushButton.setDisabled(True)
        else:
            self.pushButton.setDisabled(False)
        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 adana(self):
        if self.comboBox.currentIndex() == 0:
            self.tableWidget.removeRow(self.tableWidget.rowCount())
            self.tum_dosyalar()
        elif self.comboBox.currentIndex() == 1:
            self.tableWidget.removeRow(self.tableWidget.rowCount())
            self.aktif_dosyalar()
        elif self.comboBox.currentIndex() == 2:
            self.tableWidget.removeRow(self.tableWidget.rowCount())
            self.pasif_dosyalar()
        else:
            pass

    def dosya_bul(self, row, column):
        dosya = self.tableWidget.item(row, 0)
        dosya_2 = self.tableWidget.item(row, 1)
        self.dosya_id = dosya.text()
        self.dosya_ad = dosya_2.text()

    def sil(self):
        if mico.sorusor("Dosya Silme Uarısı",self.dosya_ad," No'lu dosyayı silmek isteiğinize emin misiniz") == True:
            if self.db.yapistir("delete from dosyalar where id='{}'".format(self.dosya_id)) == True:
                self.db.yapistir("delete from taraflar where dosya ='{0}'".format(self.dosya_ad))
                self.db.yapistir("delete from edim where dosya = '{0}'".format(self.dosya_ad))
                self.db.yapistir("delete from ek where dosya = '{0}'".format(self.dosya_ad))
                self.db.yapistir(" delete from giderler where dosya = '{0}'".format(self.dosya_ad))
                self.db.yapistir("delete from olaylar where uzno = '{0}'".format(self.dosya_ad))
                self.db.yapistir("delete from temsilciler where dosya = '{0}'".format(self.dosya_ad))
                self.db.yapistir("delete from tercuman where dosya = '{0}'".format(self.dosya_ad))
                self.db.yapistir("delete from uzatma where dosya = '{0}'".format(self.dosya_ad))
                self.db.yapistir("delete from uzbas where dosya = '{0}'".format(self.dosya_ad))
                self.db.yapistir("delete from uzgor where dosya = '{0}'".format(self.dosya_ad))
                self.db.yapistir("delete from sonuc where dosya = '{0}'".format(self.dosya_ad))
                mico.bilgilendir("Dosya başarıyla silindi", "Dosya Silme Uyarısı")
                self.on_changed_value(False)
            else:
                pass
            self.adana()
        else:
            mico.bilgilendir("Dosya silme işlemi iptal edildi", "Dosya Silme İptali")


    def on_changed_value(self, value):
        self.clicked.emit(value)
Example #8
0
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, 482)
        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, 431))
        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_2 = QtWidgets.QLabel(self.page)
        self.label_2.setGeometry(QtCore.QRect(0, 40, 90, 20))
        self.label_2.setObjectName("label_2")
        self.comboBox = QtWidgets.QComboBox(self.page)
        self.comboBox.setGeometry(QtCore.QRect(70, 40, 182, 22))
        self.comboBox.setObjectName("comboBox")
        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, 70, 90, 20))
        self.label_3.setObjectName("label_3")
        self.lineEdit_2 = QtWidgets.QLineEdit(self.page)
        self.lineEdit_2.setGeometry(QtCore.QRect(70, 70, 182, 20))
        self.lineEdit_2.setObjectName("lineEdit_2")

        self.label_4 = QtWidgets.QLabel(self.page)
        self.label_4.setGeometry(QtCore.QRect(0, 100, 90, 20))
        self.label_4.setObjectName("label_4")
        self.lineEdit_3 = QtWidgets.QLineEdit(self.page)
        self.lineEdit_3.setGeometry(QtCore.QRect(70, 100, 182, 20))
        self.lineEdit_3.setObjectName("lineEdit_3")

        self.label_5 = QtWidgets.QLabel(self.page)
        self.label_5.setGeometry(QtCore.QRect(0, 130, 90, 20))
        self.label_5.setObjectName("label_5")
        self.lineEdit_4 = QtWidgets.QLineEdit(self.page)
        self.lineEdit_4.setGeometry(QtCore.QRect(70, 130, 182, 20))
        self.lineEdit_4.setObjectName("lineEdit_4")

        self.label_6 = QtWidgets.QLabel(self.page)
        self.label_6.setGeometry(QtCore.QRect(0, 160, 90, 20))
        self.label_6.setObjectName("label_6")
        self.lineEdit_5 = QtWidgets.QLineEdit(self.page)
        self.lineEdit_5.setGeometry(QtCore.QRect(70, 160, 182, 20))
        self.lineEdit_5.setObjectName("lineEdit_5")

        self.label_7 = QtWidgets.QLabel(self.page)
        self.label_7.setGeometry(QtCore.QRect(0, 190, 90, 20))
        self.label_7.setObjectName("label_7")
        self.lineEdit_6 = QtWidgets.QLineEdit(self.page)
        self.lineEdit_6.setGeometry(QtCore.QRect(70, 190, 182, 20))
        self.lineEdit_6.setText("")
        self.lineEdit_6.setObjectName("lineEdit_6")

        self.comboBox_2 = QtWidgets.QComboBox(self.page)
        self.comboBox_2.setGeometry(QtCore.QRect(70, 220, 182, 22))
        self.comboBox_2.setObjectName("comboBox_2")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")

        self.label_9 = QtWidgets.QLabel(self.page)
        self.label_9.setGeometry(QtCore.QRect(0, 312, 90, 20))
        self.label_9.setObjectName("label_9")

        self.lineEdit_7 = QtWidgets.QLineEdit(self.page)
        self.lineEdit_7.setGeometry(QtCore.QRect(70, 250, 182, 20))
        self.lineEdit_7.setText("")
        self.lineEdit_7.setObjectName("lineEdit_7")

        self.label_12 = QtWidgets.QLabel(self.page)
        self.label_12.setGeometry(QtCore.QRect(0, 220, 90, 20))
        self.label_12.setObjectName("label_12")

        self.comboBox_5 = QtWidgets.QComboBox(self.page)
        self.comboBox_5.setGeometry(QtCore.QRect(70, 280, 182, 22))
        self.comboBox_5.setObjectName("comboBox_5")
        self.comboBox_5.addItem("")
        self.comboBox_5.addItem("")
        self.comboBox_5.addItem("")

        self.label_20 = QtWidgets.QLabel(self.page)
        self.label_20.setGeometry(QtCore.QRect(0, 280, 90, 20))
        self.label_20.setObjectName("label_20")

        self.textEdit = QtWidgets.QTextEdit(self.page)
        self.textEdit.setGeometry(QtCore.QRect(70, 312, 181, 91))
        self.textEdit.setObjectName("textEdit")

        self.label_8 = QtWidgets.QLabel(self.page)
        self.label_8.setGeometry(QtCore.QRect(0, 250, 90, 20))
        self.label_8.setObjectName("label_8")

        self.pushButton = QtWidgets.QPushButton(self.page)
        self.pushButton.setGeometry(QtCore.QRect(180, 410, 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(70, 20, 182, 22))
        self.comboBox_3.setObjectName("comboBox_3")
        self.label_15 = QtWidgets.QLabel(self.page_2)
        self.label_15.setGeometry(QtCore.QRect(0, 110, 90, 20))
        self.label_15.setObjectName("label_15")
        self.label_14 = QtWidgets.QLabel(self.page_2)
        self.label_14.setGeometry(QtCore.QRect(0, 80, 90, 20))
        self.label_14.setObjectName("label_14")
        self.lineEdit_8 = QtWidgets.QLineEdit(self.page_2)
        self.lineEdit_8.setGeometry(QtCore.QRect(70, 50, 182, 20))
        self.lineEdit_8.setText("")
        self.lineEdit_8.setObjectName("lineEdit_8")
        self.label_16 = QtWidgets.QLabel(self.page_2)
        self.label_16.setGeometry(QtCore.QRect(0, 140, 90, 20))
        self.label_16.setObjectName("label_16")
        self.lineEdit_9 = QtWidgets.QLineEdit(self.page_2)
        self.lineEdit_9.setGeometry(QtCore.QRect(70, 80, 182, 20))
        self.lineEdit_9.setText("")
        self.lineEdit_9.setObjectName("lineEdit_9")
        self.lineEdit_10 = QtWidgets.QLineEdit(self.page_2)
        self.lineEdit_10.setGeometry(QtCore.QRect(70, 110, 182, 20))
        self.lineEdit_10.setText("")
        self.lineEdit_10.setObjectName("lineEdit_10")
        self.label_13 = QtWidgets.QLabel(self.page_2)
        self.label_13.setGeometry(QtCore.QRect(0, 50, 90, 20))
        self.label_13.setObjectName("label_13")
        self.textEdit_2 = QtWidgets.QTextEdit(self.page_2)
        self.textEdit_2.setGeometry(QtCore.QRect(70, 140, 182, 101))
        self.textEdit_2.setObjectName("textEdit_2")
        self.pushButton_2 = QtWidgets.QPushButton(self.page_2)
        self.pushButton_2.setGeometry(QtCore.QRect(180, 250, 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", "Tarcü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",
                                                "Suçtan Zarar Gören"))
        self.comboBox.setItemText(3, _translate("Dialog", "Şüpheli / Sanık"))
        self.comboBox.setItemText(4, _translate("Dialog", "Müşteki Şüpheli"))
        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", "Sicil No"))
        self.label_16.setText(_translate("Dialog", "Adres"))
        self.label_13.setText(_translate("Dialog", "Ad Soyad"))
        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"))

    def bilgi_cek(self, sql):
        sonuc = tek_satirlik_demet_coz(self.db.komut(sql))
        self.veri_doldur(sonuc)

    # Sinyali Gönder
    def on_changed_value(self, value):
        self.clicked.emit(value)
Example #9
0
class TarafEkle(QtWidgets.QDialog):
    clicked = QtCore.pyqtSignal(bool)

    def __init__(self):
        super(TarafEkle, self).__init__()
        self.db = VbagKur()

    def init_ui(self, uno):
        self.dosya_uzlasma_no = uno
        self.setWindowTitle("Taraf Ekle")
        self.resize(272, 502)
        self.horizontalLayoutWidget = QtWidgets.QWidget(self)
        self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 20, 301, 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_28 = QtWidgets.QLineEdit(self.page)
        self.lineEdit_28.setGeometry(QtCore.QRect(70, 40, 182, 20))
        self.lineEdit_28.setObjectName("lineEdit_28")

        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_11.setObjectName("lineEdit_11")

        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.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.stackedWidget.setCurrentIndex(0)
        self.radioButton.clicked.connect(self.sahis)
        self.radioButton_2.clicked.connect(self.vekil)
        self.radioButton_3.clicked.connect(self.tercuman)
        self.pushButton.clicked.connect(self.sahis_ekle)
        self.pushButton_2.clicked.connect(self.vekil_ekle)
        self.pushButton_3.clicked.connect(self.tercuman_ekle)
        QtCore.QMetaObject.connectSlotsByName(self)

    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.label_21.setText(_translate("Dialog", "Teklif Tarihi"))
        self.label_22.setText(_translate("Dialog", " Sicil No"))
        self.label_45.setText(_translate("Dialog", "Durum"))
        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"))

    def sahis(self):
        self.stackedWidget.setCurrentIndex(0)

    def vekil(self):
        self.stackedWidget.setCurrentIndex(1)
        self.comboBox_3.clear()
        sonuc = self.db.komut(
            "select ad from taraflar where dosya = '{}'".format(
                self.dosya_uzlasma_no))
        if sonuc == []:
            self.pushButton_2.setDisabled(True)
            baslik = "İlişkilendirme Hatası"
            mesaj = "Dosya'ya Kanuni Temsilci eklemeden önce tarafları ekleyin." \
                    "Savunulacak bir şey olmazsa avukat olmanın gereği kalmaz"
            bilgilendir(mesaj, baslik)
            self.sahis()
            self.radioButton.setChecked(True)
        else:
            for i in range(len(sonuc)):
                self.comboBox_3.addItem(sonuc[i][0])

    def tercuman(self):
        self.comboBox_4.clear()
        self.stackedWidget.setCurrentIndex(2)
        sonuc = self.db.komut(
            "select ad from taraflar where dosya = '{}'".format(
                self.dosya_uzlasma_no))
        if sonuc == []:
            self.pushButton_3.setDisabled(True)
            baslik = "İlişkilendirme Hatası"
            mesaj = "Dosya'ya Tercüman eklemeden önce tarafları ekleyin."
            bilgilendir(mesaj, baslik)
            self.sahis()
            self.radioButton.setChecked(True)
        else:
            for i in range(len(sonuc)):
                self.comboBox_4.addItem(sonuc[i][0])

    def sahis_ekle(self):
        ad = self.lineEdit.text()
        ttarihi = self.lineEdit_28.text()
        sifat = self.comboBox.currentIndex()
        tc = self.lineEdit_2.text()
        baba = self.lineEdit_3.text()
        ana = self.lineEdit_4.text()
        dyer = self.lineEdit_5.text()
        dtar = self.lineEdit_6.text()
        cins = self.comboBox_2.currentText()
        tel = self.lineEdit_7.text()
        adresniteligi = self.comboBox_5.currentIndex()
        adres = self.textEdit.toPlainText()

        #Veritabanına Gönder
        if self.db.tarafekle(ad, ttarihi, sifat, tc, baba, ana, dyer, dtar,
                             cins, tel, adresniteligi, adres,
                             self.dosya_uzlasma_no) == True:
            baslik = "Dosya Bilgileri Eklendi"
            mesaj = ad + " isimli kişinin bilgileri veritabanına eklendi."
            bilgilendir(mesaj, baslik)
            self.lineEdit.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.lineEdit_28.clear()
            self.textEdit.clear()
            self.comboBox.setCurrentIndex(0)
            self.comboBox_2.setCurrentIndex(0)
            self.comboBox_5.setCurrentIndex(0)
            self.on_changed_value(False)
        else:
            baslik = "Veritabanı Yazma Sorunu"
            mesaj = "Hatanın giderilmesi için ivedilikle, Mehmet Eroğlu ile görüşüp kendisine 2 bira ısmarlayınız.(Not: Tuborg Gold Şişe, mümkünse soğuk)"
            bilgilendir(mesaj, baslik)

    def vekil_ekle(self):
        vekalet = self.comboBox_3.currentText()
        nitelik = self.comboBox_11.currentText()
        ad = self.lineEdit_29.text()
        baro = self.lineEdit_8.text()
        sicil = self.lineEdit_14.text()
        tc = self.lineEdit_9.text()
        ttarihi = self.lineEdit_13.text()
        telefon = self.lineEdit_10.text()
        adres = self.textEdit_2.toPlainText()
        sifat = nitelik

        # Veritabanına Gönder
        if self.db.temsilci_ekle(ttarihi, ad, sicil, telefon, adres,
                                 self.dosya_uzlasma_no, vekalet, sifat,
                                 nitelik, baro, tc) == True:
            baslik = "Temsilci Bilgileri Eklendi"
            mesaj = ad + " isimli kişinin bilgileri" + vekalet + " kişisinin kanuni temsilcisiolarak  veritabanına eklendi."
            bilgilendir(mesaj, baslik)
            self.comboBox_3.setCurrentIndex(0)
            self.comboBox_11.setCurrentIndex(0)
            self.lineEdit_29.clear()
            self.lineEdit_13.clear()
            self.lineEdit_14.clear()
            self.lineEdit_8.clear()
            self.lineEdit_9.clear()
            self.lineEdit_10.clear()
            self.textEdit_2.clear()
            self.on_changed_value(False)
        else:
            baslik = "Veritabanı Yazma Sorunu"
            mesaj = "Hatanın giderilmesi için ivedilikle, Mehmet Eroğlu ile görüşüp kendisine 2 bira ısmarlayınız.(Not: Tuborg Gold Şişe, mümkünse soğuk)"
            bilgilendir(mesaj, baslik)

    def tercuman_ekle(self):
        vekalet = self.comboBox_4.currentText()
        ad = self.lineEdit_11.text()
        tc = self.lineEdit_12.text()
        adres = self.textEdit_3.toPlainText()
        sifat = "Tercüman"

        # Veritabanına Gönder
        if self.db.tercuman_ekle(ad, tc, adres, self.dosya_uzlasma_no, vekalet,
                                 sifat) == True:
            baslik = "Temsilci Bilgileri Eklendi"
            mesaj = ad + " isimli kişinin bilgileri " + vekalet + " kişisinin tercümanı " \
                                                                  "olarak  veritabanına eklendi."
            bilgilendir(mesaj, baslik)
            self.comboBox_4.setCurrentIndex(0)
            self.lineEdit_11.clear()
            self.lineEdit_12.clear()
            self.textEdit_3.clear()
            self.on_changed_value(False)
        else:
            baslik = "Veritabanı Yazma Sorunu"
            mesaj = "Hatanın giderilmesi için ivedilikle, Mehmet Eroğlu ile görüşüp kendisine 2 bira ısmarlayınız." \
                    "(Not: Tuborg Gold Şişe, mümkünse soğuk)"
            bilgilendir(mesaj, baslik)

    #Sinyali Gönder
    def on_changed_value(self, value):
        self.clicked.emit(value)