الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

إستفسار حوول فتح نافذه فرعيه (python interface )

بدأه joharah في 19 أبريل 2012 · 3 رد · 972 مشاهدة · في لغة Python
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السسسلام علليكم أيها الاعضاء الكرام ,, أنا لدي مشرووع مشروع تخرج ومشروعنا قمنا بعمله ب لغة البايثون ,, والان نحن في الواجهات ,, لدي مشكله الان فيه ,, أنا قمت بعمل واجهة البرنامج الاساسيه ونافذه أخرى للاعدادات لكن مشكلتي لا أعرف كيف أربط بينهم ,, أعني عند الضغط ع زر إعدادات في واجهة البرنامج الاساسيه تفتح لي نافذة الاعدادات هذا الذي اريده ,, كيف أستطيع أن اقووم بذالك

قمت بعمل الواجهات في Qt disgner

هذه الواجهه الاولى

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'Guard_mail.ui'
#
# Created: Sun Apr 15 19:35:43 2012
#      by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    _fromUtf8 = lambda s: s

class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(528, 427)
        Form.setLayoutDirection(QtCore.Qt.LeftToRight)
        Form.setAutoFillBackground(False)
        self.frame = QtGui.QFrame(Form)
        self.frame.setGeometry(QtCore.QRect(9, 10, 491, 81))
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(100, 77, 55))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(100, 77, 55))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
        brush = QtGui.QBrush(QtGui.QColor(100, 77, 55))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(100, 77, 55))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(100, 77, 55))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
        brush = QtGui.QBrush(QtGui.QColor(100, 77, 55))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
        self.frame.setPalette(palette)
        self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtGui.QFrame.Sunken)
        self.frame.setLineWidth(26)
        self.frame.setMidLineWidth(25)
        self.frame.setObjectName(_fromUtf8("frame"))
        self.pushButton = QtGui.QPushButton(self.frame)
        self.pushButton.setGeometry(QtCore.QRect(10, 0, 101, 81))
        self.pushButton.setText(_fromUtf8(""))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/img_02.jpg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton.setIcon(icon)
        self.pushButton.setIconSize(QtCore.QSize(100, 100))
        self.pushButton.setObjectName(_fromUtf8("pushButton"))
        self.frame_2 = QtGui.QFrame(self.frame)
        self.frame_2.setGeometry(QtCore.QRect(9, 9, 451, 61))
        self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtGui.QFrame.Sunken)
        self.frame_2.setObjectName(_fromUtf8("frame_2"))
        self.textEdit = QtGui.QTextEdit(self.frame_2)
        self.textEdit.setEnabled(False)
        self.textEdit.setGeometry(QtCore.QRect(180, 10, 171, 41))
        self.textEdit.setFrameShape(QtGui.QFrame.StyledPanel)
        self.textEdit.setFrameShadow(QtGui.QFrame.Sunken)
        self.textEdit.setLineWidth(3)
        self.textEdit.setOverwriteMode(False)
        self.textEdit.setObjectName(_fromUtf8("textEdit"))
        self.label = QtGui.QLabel(self.frame_2)
        self.label.setGeometry(QtCore.QRect(300, 40, 51, 16))
        self.label.setObjectName(_fromUtf8("label"))
        self.toolButton = QtGui.QToolButton(Form)
        self.toolButton.setGeometry(QtCore.QRect(10, 150, 81, 51))
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/magnifier.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButton.setIcon(icon1)
        self.toolButton.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)
        self.toolButton.setObjectName(_fromUtf8("toolButton"))
        self.toolButton_3 = QtGui.QToolButton(Form)
        QtCore.QObject.connect(self.toolButton,QtCore.SIGNAL("clicked()"), self.file_dialog)
        self.toolButton_3.setGeometry(QtCore.QRect(10, 240, 81, 51))
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/page_white_wrench.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButton_3.setIcon(icon2)
        self.toolButton_3.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)
        self.toolButton_3.setObjectName(_fromUtf8("toolButton_3"))
        self.widget = QtGui.QWidget(Form)
        self.widget.setGeometry(QtCore.QRect(109, 100, 401, 291))
        self.widget.setObjectName(_fromUtf8("widget"))
        self.verticalLayout = QtGui.QVBoxLayout(self.widget)
        self.verticalLayout.setMargin(0)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.treeWidget = QtGui.QTreeWidget(self.widget)
        self.treeWidget.setEnabled(True)
        self.treeWidget.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.treeWidget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
        self.treeWidget.setAutoScroll(True)
        self.treeWidget.setAutoScrollMargin(10)
        self.treeWidget.setIndentation(6)
        self.treeWidget.setObjectName(_fromUtf8("treeWidget"))
        self.treeWidget.header().setMinimumSectionSize(22)
        self.treeWidget.header().setStretchLastSection(True)
        self.verticalLayout.addWidget(self.treeWidget)
        self.toolButton_4 = QtGui.QToolButton(Form)
        self.toolButton_4.setEnabled(True)
        self.toolButton_4.setGeometry(QtCore.QRect(444, 390, 51, 20))
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/help.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButton_4.setIcon(icon3)
        self.toolButton_4.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
        self.toolButton_4.setObjectName(_fromUtf8("toolButton_4"))

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def file_dialog(selfchecked=None):
        if checked==None: return
        dialog = QDialog()
        dialog.ui = Ui_MyDialog()
        dialog.ui.setupUi(dialog)
        dialog.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        dialog.exec_()


    def retranslateUi(self, Form):
        Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
        self.textEdit.setHtml(QtGui.QApplication.translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:16pt; font-weight:600; color:#ba890e;\">Guard mail</span></p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("Form", "Unti-Spam", None, QtGui.QApplication.UnicodeUTF8))
        self.toolButton.setText(QtGui.QApplication.translate("Form", "Check Now ", None, QtGui.QApplication.UnicodeUTF8))
        self.toolButton_3.setText(QtGui.QApplication.translate("Form", "Settings", None, QtGui.QApplication.UnicodeUTF8))
        self.treeWidget.headerItem().setText(0, QtGui.QApplication.translate("Form", "From", None, QtGui.QApplication.UnicodeUTF8))
        self.treeWidget.headerItem().setText(1, QtGui.QApplication.translate("Form", "Subject", None, QtGui.QApplication.UnicodeUTF8))
        self.treeWidget.headerItem().setText(2, QtGui.QApplication.translate("Form", "Recieved", None, QtGui.QApplication.UnicodeUTF8))
        self.toolButton_4.setText(QtGui.QApplication.translate("Form", "help", None, QtGui.QApplication.UnicodeUTF8))

import draggableicons_rc

if __name__ == "__main__":
    import sys
    app = QtGui.QApplication(sys.argv)
    Form = QtGui.QWidget()
    ui = Ui_Form()
    ui.setupUi(Form)
    Form.show()
    sys.exit(app.exec_())

وهذه كود الاعدادات

 class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.setWindowModality(QtCore.Qt.WindowModal)
        Form.resize(472, 537)
        Form.setAutoFillBackground(False)
        self.tabWidget = QtGui.QTabWidget(Form)
        self.tabWidget.setGeometry(QtCore.QRect(10, 10, 453, 481))
        self.tabWidget.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
        self.widget = QtGui.QWidget()
        self.widget.setObjectName(_fromUtf8("widget"))
        self.listView_addAccount = QtGui.QListView(self.widget)
        self.listView_addAccount.setGeometry(QtCore.QRect(10, 60, 256, 321))
        self.listView_addAccount.setObjectName(_fromUtf8("listView_addAccount"))
        self.label = QtGui.QLabel(self.widget)
        self.label.setGeometry(QtCore.QRect(1, 11, 281, 16))
        self.label.setObjectName(_fromUtf8("label"))
        self.pushButton_4 = QtGui.QPushButton(self.widget)
        self.pushButton_4.setGeometry(QtCore.QRect(311, 121, 75, 23))
        self.pushButton_4.setObjectName(_fromUtf8("pushButton_4"))
        self.pushButton = QtGui.QPushButton(self.widget)
        self.pushButton.setGeometry(QtCore.QRect(311, 150, 75, 23))
        self.pushButton.setObjectName(_fromUtf8("pushButton"))
        self.pushButton_5 = QtGui.QPushButton(self.widget)
        self.pushButton_5.setGeometry(QtCore.QRect(311, 179, 75, 23))
        self.pushButton_5.setObjectName(_fromUtf8("pushButton_5"))
        self.tabWidget.addTab(self.widget, _fromUtf8(""))
        self.tab_2 = QtGui.QWidget()
        self.tab_2.setObjectName(_fromUtf8("tab_2"))
        self.label_2 = QtGui.QLabel(self.tab_2)
        self.label_2.setGeometry(QtCore.QRect(9, 9, 43, 16))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.label_3 = QtGui.QLabel(self.tab_2)
        self.label_3.setGeometry(QtCore.QRect(9, 28, 128, 16))
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.horizontalSlider = QtGui.QSlider(self.tab_2)
        self.horizontalSlider.setGeometry(QtCore.QRect(236, 28, 84, 19))
        self.horizontalSlider.setMinimum(1)
        self.horizontalSlider.setMaximum(60)
        self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider.setObjectName(_fromUtf8("horizontalSlider"))
        self.label_4 = QtGui.QLabel(self.tab_2)
        self.label_4.setGeometry(QtCore.QRect(368, 28, 16, 16))
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.label_5 = QtGui.QLabel(self.tab_2)
        self.label_5.setGeometry(QtCore.QRect(392, 28, 37, 16))
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.checkBox = QtGui.QCheckBox(self.tab_2)
        self.checkBox.setGeometry(QtCore.QRect(9, 53, 259, 17))
        self.checkBox.setObjectName(_fromUtf8("checkBox"))
        self.checkBox_2 = QtGui.QCheckBox(self.tab_2)
        self.checkBox_2.setEnabled(False)
        self.checkBox_2.setGeometry(QtCore.QRect(9, 76, 295, 17))
        self.checkBox_2.setObjectName(_fromUtf8("checkBox_2"))
        self.line = QtGui.QFrame(self.tab_2)
        self.line.setGeometry(QtCore.QRect(80, 10, 371, 20))
        self.line.setFrameShape(QtGui.QFrame.HLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName(_fromUtf8("line"))
        self.line_2 = QtGui.QFrame(self.tab_2)
        self.line_2.setGeometry(QtCore.QRect(-1, 90, 451, 20))
        self.line_2.setFrameShape(QtGui.QFrame.HLine)
        self.line_2.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_2.setObjectName(_fromUtf8("line_2"))
        self.label_6 = QtGui.QLabel(self.tab_2)
        self.label_6.setGeometry(QtCore.QRect(9, 137, 47, 16))
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.checkBox_3 = QtGui.QCheckBox(self.tab_2)
        self.checkBox_3.setGeometry(QtCore.QRect(9, 157, 194, 17))
        self.checkBox_3.setObjectName(_fromUtf8("checkBox_3"))
        self.comboBox = QtGui.QComboBox(self.tab_2)
        self.comboBox.setGeometry(QtCore.QRect(308, 156, 72, 20))
        self.comboBox.setObjectName(_fromUtf8("comboBox"))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.label_7 = QtGui.QLabel(self.tab_2)
        self.label_7.setGeometry(QtCore.QRect(9, 182, 35, 16))
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.checkBox_Monday = QtGui.QCheckBox(self.tab_2)
        self.checkBox_Monday.setGeometry(QtCore.QRect(166, 182, 64, 17))
        self.checkBox_Monday.setObjectName(_fromUtf8("checkBox_Monday"))
        self.checkBox_Tuesday = QtGui.QCheckBox(self.tab_2)
        self.checkBox_Tuesday.setGeometry(QtCore.QRect(236, 182, 63, 17))
        self.checkBox_Tuesday.setObjectName(_fromUtf8("checkBox_Tuesday"))
        self.checkBox_Wednesday = QtGui.QCheckBox(self.tab_2)
        self.checkBox_Wednesday.setGeometry(QtCore.QRect(308, 182, 80, 17))
        self.checkBox_Wednesday.setObjectName(_fromUtf8("checkBox_Wednesday"))
        self.checkBox_Friday = QtGui.QCheckBox(self.tab_2)
        self.checkBox_Friday.setGeometry(QtCore.QRect(166, 205, 53, 17))
        self.checkBox_Friday.setObjectName(_fromUtf8("checkBox_Friday"))
        self.checkBox_Saturday = QtGui.QCheckBox(self.tab_2)
        self.checkBox_Saturday.setGeometry(QtCore.QRect(271, 205, 67, 17))
        self.checkBox_Saturday.setObjectName(_fromUtf8("checkBox_Saturday"))
        self.checkBox_Thursday = QtGui.QCheckBox(self.tab_2)
        self.checkBox_Thursday.setGeometry(QtCore.QRect(9, 205, 68, 17))
        self.checkBox_Thursday.setObjectName(_fromUtf8("checkBox_Thursday"))
        self.checkBox_Sunday = QtGui.QCheckBox(self.tab_2)
        self.checkBox_Sunday.setGeometry(QtCore.QRect(344, 205, 62, 17))
        self.checkBox_Sunday.setObjectName(_fromUtf8("checkBox_Sunday"))
        self.checkBox_4 = QtGui.QCheckBox(self.tab_2)
        self.checkBox_4.setGeometry(QtCore.QRect(9, 228, 243, 17))
        self.checkBox_4.setObjectName(_fromUtf8("checkBox_4"))
        self.checkBox_5 = QtGui.QCheckBox(self.tab_2)
        self.checkBox_5.setGeometry(QtCore.QRect(9, 251, 158, 17))
        self.checkBox_5.setObjectName(_fromUtf8("checkBox_5"))
        self.line_4 = QtGui.QFrame(self.tab_2)
        self.line_4.setGeometry(QtCore.QRect(80, 140, 371, 20))
        self.line_4.setFrameShape(QtGui.QFrame.HLine)
        self.line_4.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_4.setObjectName(_fromUtf8("line_4"))
        self.line_5 = QtGui.QFrame(self.tab_2)
        self.line_5.setGeometry(QtCore.QRect(-1, 270, 451, 20))
        self.line_5.setFrameShape(QtGui.QFrame.HLine)
        self.line_5.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_5.setObjectName(_fromUtf8("line_5"))
        self.label_8 = QtGui.QLabel(self.tab_2)
        self.label_8.setGeometry(QtCore.QRect(10, 310, 48, 16))
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.checkBox_PANE = QtGui.QCheckBox(self.tab_2)
        self.checkBox_PANE.setGeometry(QtCore.QRect(15, 340, 117, 17))
        self.checkBox_PANE.setObjectName(_fromUtf8("checkBox_PANE"))
        self.checkBox_6 = QtGui.QCheckBox(self.tab_2)
        self.checkBox_6.setGeometry(QtCore.QRect(201, 340, 178, 17))
        self.checkBox_6.setObjectName(_fromUtf8("checkBox_6"))
        self.line_7 = QtGui.QFrame(self.tab_2)
        self.line_7.setGeometry(QtCore.QRect(70, 310, 381, 20))
        self.line_7.setFrameShape(QtGui.QFrame.HLine)
        self.line_7.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_7.setObjectName(_fromUtf8("line_7"))
        self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
        self.tab = QtGui.QWidget()
        self.tab.setObjectName(_fromUtf8("tab"))
        self.label_9 = QtGui.QLabel(self.tab)
        self.label_9.setGeometry(QtCore.QRect(10, 20, 181, 16))
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.label_10 = QtGui.QLabel(self.tab)
        self.label_10.setGeometry(QtCore.QRect(10, 40, 271, 16))
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.listWidget_knownGood = QtGui.QListWidget(self.tab)
        self.listWidget_knownGood.setGeometry(QtCore.QRect(10, 60, 281, 151))
        self.listWidget_knownGood.setObjectName(_fromUtf8("listWidget_knownGood"))
        self.pushButton_Add_knownGood = QtGui.QPushButton(self.tab)
        self.pushButton_Add_knownGood.setGeometry(QtCore.QRect(340, 100, 75, 23))
        self.pushButton_Add_knownGood.setObjectName(_fromUtf8("pushButton_Add_knownGood"))
        self.pushButton_Remove_KnownGood = QtGui.QPushButton(self.tab)
        self.pushButton_Remove_KnownGood.setGeometry(QtCore.QRect(340, 140, 75, 23))
        self.pushButton_Remove_KnownGood.setObjectName(_fromUtf8("pushButton_Remove_KnownGood"))
        self.label_11 = QtGui.QLabel(self.tab)
        self.label_11.setGeometry(QtCore.QRect(10, 240, 101, 16))
        self.label_11.setObjectName(_fromUtf8("label_11"))
        self.label_12 = QtGui.QLabel(self.tab)
        self.label_12.setGeometry(QtCore.QRect(10, 260, 311, 16))
        self.label_12.setObjectName(_fromUtf8("label_12"))
        self.listWidget_knownBad = QtGui.QListWidget(self.tab)
        self.listWidget_knownBad.setGeometry(QtCore.QRect(10, 280, 281, 161))
        self.listWidget_knownBad.setObjectName(_fromUtf8("listWidget_knownBad"))
        self.pushButton_Add_knownBad = QtGui.QPushButton(self.tab)
        self.pushButton_Add_knownBad.setGeometry(QtCore.QRect(340, 310, 75, 23))
        self.pushButton_Add_knownBad.setObjectName(_fromUtf8("pushButton_Add_knownBad"))
        self.pushButton_Remove_KnownBad = QtGui.QPushButton(self.tab)
        self.pushButton_Remove_KnownBad.setGeometry(QtCore.QRect(340, 350, 75, 23))
        self.pushButton_Remove_KnownBad.setObjectName(_fromUtf8("pushButton_Remove_KnownBad"))
        self.tabWidget.addTab(self.tab, _fromUtf8(""))
        self.tab_3 = QtGui.QWidget()
        self.tab_3.setObjectName(_fromUtf8("tab_3"))
        self.label_13 = QtGui.QLabel(self.tab_3)
        self.label_13.setGeometry(QtCore.QRect(11, 21, 92, 16))
        self.label_13.setLineWidth(4)
        self.label_13.setObjectName(_fromUtf8("label_13"))
        self.checkBox_7 = QtGui.QCheckBox(self.tab_3)
        self.checkBox_7.setGeometry(QtCore.QRect(11, 40, 292, 30))
        self.checkBox_7.setObjectName(_fromUtf8("checkBox_7"))
        self.checkBox_8 = QtGui.QCheckBox(self.tab_3)
        self.checkBox_8.setGeometry(QtCore.QRect(11, 76, 380, 17))
        self.checkBox_8.setObjectName(_fromUtf8("checkBox_8"))
        self.checkBox_9 = QtGui.QCheckBox(self.tab_3)
        self.checkBox_9.setGeometry(QtCore.QRect(11, 99, 314, 17))
        self.checkBox_9.setObjectName(_fromUtf8("checkBox_9"))
        self.checkBox_10 = QtGui.QCheckBox(self.tab_3)
        self.checkBox_10.setGeometry(QtCore.QRect(11, 122, 221, 17))
        self.checkBox_10.setObjectName(_fromUtf8("checkBox_10"))
        self.label_16 = QtGui.QLabel(self.tab_3)
        self.label_16.setGeometry(QtCore.QRect(11, 171, 76, 16))
        self.label_16.setObjectName(_fromUtf8("label_16"))
        self.checkBox_soft = QtGui.QCheckBox(self.tab_3)
        self.checkBox_soft.setGeometry(QtCore.QRect(11, 190, 171, 17))
        self.checkBox_soft.setObjectName(_fromUtf8("checkBox_soft"))
        self.checkBox_14 = QtGui.QCheckBox(self.tab_3)
        self.checkBox_14.setGeometry(QtCore.QRect(11, 213, 442, 30))
        self.checkBox_14.setObjectName(_fromUtf8("checkBox_14"))
        self.checkBox_15 = QtGui.QCheckBox(self.tab_3)
        self.checkBox_15.setGeometry(QtCore.QRect(11, 249, 400, 30))
        self.checkBox_15.setObjectName(_fromUtf8("checkBox_15"))
        self.label_14 = QtGui.QLabel(self.tab_3)
        self.label_14.setGeometry(QtCore.QRect(12, 321, 88, 16))
        self.label_14.setObjectName(_fromUtf8("label_14"))
        self.label_15 = QtGui.QLabel(self.tab_3)
        self.label_15.setGeometry(QtCore.QRect(12, 340, 324, 16))
        self.label_15.setObjectName(_fromUtf8("label_15"))
        self.checkBox_11 = QtGui.QCheckBox(self.tab_3)
        self.checkBox_11.setGeometry(QtCore.QRect(12, 359, 233, 17))
        self.checkBox_11.setObjectName(_fromUtf8("checkBox_11"))
        self.checkBox_12 = QtGui.QCheckBox(self.tab_3)
        self.checkBox_12.setGeometry(QtCore.QRect(12, 382, 176, 17))
        self.checkBox_12.setObjectName(_fromUtf8("checkBox_12"))
        self.checkBox_13 = QtGui.QCheckBox(self.tab_3)
        self.checkBox_13.setGeometry(QtCore.QRect(12, 405, 158, 17))
        self.checkBox_13.setObjectName(_fromUtf8("checkBox_13"))
        self.tabWidget.addTab(self.tab_3, _fromUtf8(""))
        self.pushButton_6 = QtGui.QPushButton(Form)
        self.pushButton_6.setGeometry(QtCore.QRect(280, 500, 75, 23))
        self.pushButton_6.setObjectName(_fromUtf8("pushButton_6"))
        self.pushButton_3 = QtGui.QPushButton(Form)
        self.pushButton_3.setGeometry(QtCore.QRect(370, 500, 75, 23))
        self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
        self.pushButton_2 = QtGui.QPushButton(Form)
        self.pushButton_2.setGeometry(QtCore.QRect(10, 500, 75, 23))
        self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))

        self.retranslateUi(Form)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QObject.connect(self.pushButton_3, QtCore.SIGNAL(_fromUtf8("clicked()")), Form.close)
        QtCore.QObject.connect(self.pushButton_6, QtCore.SIGNAL(_fromUtf8("clicked()")), self.tabWidget.update)
        QtCore.QObject.connect(self.horizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.label_4.setNum)
        QtCore.QObject.connect(self.checkBox, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.checkBox_2.setEnabled)
        QtCore.QObject.connect(self.checkBox_soft, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.checkBox_14.setDisabled)
        QtCore.QObject.connect(self.checkBox_soft, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.checkBox_15.setDisabled)
        QtCore.QObject.connect(self.checkBox_14, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.checkBox_soft.setDisabled)
        QtCore.QObject.connect(self.checkBox_14, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.checkBox_15.setDisabled)
        QtCore.QObject.connect(self.checkBox_15, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.checkBox_14.setDisabled)
        QtCore.QObject.connect(self.checkBox_15, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.checkBox_soft.setDisabled)
        QtCore.QMetaObject.connectSlotsByName(Form)
        Form.setTabOrder(self.tabWidget, self.pushButton_3)
        Form.setTabOrder(self.pushButton_3, self.pushButton_4)
        Form.setTabOrder(self.pushButton_4, self.pushButton)
        Form.setTabOrder(self.pushButton, self.pushButton_5)
        Form.setTabOrder(self.pushButton_5, self.listView_addAccount)
        Form.setTabOrder(self.listView_addAccount, self.horizontalSlider)
        Form.setTabOrder(self.horizontalSlider, self.checkBox)
        Form.setTabOrder(self.checkBox, self.checkBox_2)
        Form.setTabOrder(self.checkBox_2, self.checkBox_3)
        Form.setTabOrder(self.checkBox_3, self.comboBox)
        Form.setTabOrder(self.comboBox, self.checkBox_Friday)
        Form.setTabOrder(self.checkBox_Friday, self.checkBox_Tuesday)
        Form.setTabOrder(self.checkBox_Tuesday, self.checkBox_Wednesday)
        Form.setTabOrder(self.checkBox_Wednesday, self.checkBox_Saturday)
        Form.setTabOrder(self.checkBox_Saturday, self.checkBox_Thursday)
        Form.setTabOrder(self.checkBox_Thursday, self.checkBox_Sunday)
        Form.setTabOrder(self.checkBox_Sunday, self.checkBox_4)
        Form.setTabOrder(self.checkBox_4, self.checkBox_5)
        Form.setTabOrder(self.checkBox_5, self.checkBox_PANE)
        Form.setTabOrder(self.checkBox_PANE, self.checkBox_6)
        Form.setTabOrder(self.checkBox_6, self.listWidget_knownGood)
        Form.setTabOrder(self.listWidget_knownGood, self.pushButton_Add_knownGood)
        Form.setTabOrder(self.pushButton_Add_knownGood, self.pushButton_Remove_KnownGood)
        Form.setTabOrder(self.pushButton_Remove_KnownGood, self.listWidget_knownBad)
        Form.setTabOrder(self.listWidget_knownBad, self.pushButton_Add_knownBad)
        Form.setTabOrder(self.pushButton_Add_knownBad, self.pushButton_Remove_KnownBad)
        Form.setTabOrder(self.pushButton_Remove_KnownBad, self.checkBox_11)
        Form.setTabOrder(self.checkBox_11, self.checkBox_12)
        Form.setTabOrder(self.checkBox_12, self.checkBox_13)
        Form.setTabOrder(self.checkBox_13, self.checkBox_soft)
        Form.setTabOrder(self.checkBox_soft, self.checkBox_14)
        Form.setTabOrder(self.checkBox_14, self.checkBox_15)
        Form.setTabOrder(self.checkBox_15, self.checkBox_7)
        Form.setTabOrder(self.checkBox_7, self.checkBox_8)
        Form.setTabOrder(self.checkBox_8, self.checkBox_9)
        Form.setTabOrder(self.checkBox_9, self.checkBox_10)
        Form.setTabOrder(self.checkBox_10, self.checkBox_Monday)
        Form.setTabOrder(self.checkBox_Monday, self.pushButton_6)

    def retranslateUi(self, Form):
        Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("Form", "Put here the accounts that you want to check it for spam :", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_4.setText(QtGui.QApplication.translate("Form", "Add", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton.setText(QtGui.QApplication.translate("Form", "Change", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_5.setText(QtGui.QApplication.translate("Form", "Remove", None, QtGui.QApplication.UnicodeUTF8))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.widget), QtGui.QApplication.translate("Form", "Accounts", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(QtGui.QApplication.translate("Form", "Checking", None, QtGui.QApplication.UnicodeUTF8))
        self.label_3.setText(QtGui.QApplication.translate("Form", "Check for new spam every", None, QtGui.QApplication.UnicodeUTF8))
        self.label_4.setText(QtGui.QApplication.translate("Form", "1", None, QtGui.QApplication.UnicodeUTF8))
        self.label_5.setText(QtGui.QApplication.translate("Form", "minutes", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox.setText(QtGui.QApplication.translate("Form", "I use a dial-up account to connect to the internet", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_2.setText(QtGui.QApplication.translate("Form", "Check for new spam as soon as I connect to the internet", None, QtGui.QApplication.UnicodeUTF8))
        self.label_6.setText(QtGui.QApplication.translate("Form", "Reporting", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_3.setText(QtGui.QApplication.translate("Form", "Send me spam reports via e-mail at ", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(0, QtGui.QApplication.translate("Form", "12:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(1, QtGui.QApplication.translate("Form", "1:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(2, QtGui.QApplication.translate("Form", " 2:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(3, QtGui.QApplication.translate("Form", "3:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(4, QtGui.QApplication.translate("Form", "4:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(5, QtGui.QApplication.translate("Form", "5:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(6, QtGui.QApplication.translate("Form", "6:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(7, QtGui.QApplication.translate("Form", "7:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(8, QtGui.QApplication.translate("Form", "8:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(9, QtGui.QApplication.translate("Form", "9:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(10, QtGui.QApplication.translate("Form", "10:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(11, QtGui.QApplication.translate("Form", "11:00 AM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(12, QtGui.QApplication.translate("Form", "12:00 PM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(13, QtGui.QApplication.translate("Form", "1:00 PM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(14, QtGui.QApplication.translate("Form", "2:00 PM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(15, QtGui.QApplication.translate("Form", "3:00 PM ", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(16, QtGui.QApplication.translate("Form", "4:00 PM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(17, QtGui.QApplication.translate("Form", "5:00 PM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(18, QtGui.QApplication.translate("Form", "6:00 PM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(19, QtGui.QApplication.translate("Form", "7:00 PM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(20, QtGui.QApplication.translate("Form", "8:00 PM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(21, QtGui.QApplication.translate("Form", "9:00 PM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(22, QtGui.QApplication.translate("Form", "10:00 PM", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.setItemText(23, QtGui.QApplication.translate("Form", "11:00 PM", None, QtGui.QApplication.UnicodeUTF8))
        self.label_7.setText(QtGui.QApplication.translate("Form", "Every :", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_Monday.setText(QtGui.QApplication.translate("Form", "Monday ", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_Tuesday.setText(QtGui.QApplication.translate("Form", "Tuesday", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_Wednesday.setText(QtGui.QApplication.translate("Form", "Wednesday", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_Friday.setText(QtGui.QApplication.translate("Form", "Friday", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_Saturday.setText(QtGui.QApplication.translate("Form", "Saturday", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_Thursday.setText(QtGui.QApplication.translate("Form", "Thursday", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_Sunday.setText(QtGui.QApplication.translate("Form", "Sunday ", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_4.setText(QtGui.QApplication.translate("Form", "Send reports even when there\'s no new spam", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_5.setText(QtGui.QApplication.translate("Form", "Send reports to the account", None, QtGui.QApplication.UnicodeUTF8))
        self.label_8.setText(QtGui.QApplication.translate("Form", "Interface ", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_PANE.setText(QtGui.QApplication.translate("Form", "Show Preview Pane", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_6.setText(QtGui.QApplication.translate("Form", "Prompt Before Deleting Messges", None, QtGui.QApplication.UnicodeUTF8))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QtGui.QApplication.translate("Form", "Options ", None, QtGui.QApplication.UnicodeUTF8))
        self.label_9.setText(QtGui.QApplication.translate("Form", "Known Good Senders and Recipients", None, QtGui.QApplication.UnicodeUTF8))
        self.label_10.setText(QtGui.QApplication.translate("Form", "We will not filter mail sent to or from these addresses", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_Add_knownGood.setText(QtGui.QApplication.translate("Form", "Add", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_Remove_KnownGood.setText(QtGui.QApplication.translate("Form", "Remove", None, QtGui.QApplication.UnicodeUTF8))
        self.label_11.setText(QtGui.QApplication.translate("Form", "Know Bad Senders", None, QtGui.QApplication.UnicodeUTF8))
        self.label_12.setText(QtGui.QApplication.translate("Form", "We will attempt to intercept messages from these addresses", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_Add_knownBad.setText(QtGui.QApplication.translate("Form", "Add", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_Remove_KnownBad.setText(QtGui.QApplication.translate("Form", "Remove", None, QtGui.QApplication.UnicodeUTF8))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QtGui.QApplication.translate("Form", "Known Senders", None, QtGui.QApplication.UnicodeUTF8))
        self.label_13.setText(QtGui.QApplication.translate("Form", "Filter Configuration", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_7.setText(QtGui.QApplication.translate("Form", "Attempt to block messages with dangerous attachments\n"
"(.EXE .PIF .VBS .BAT .SCR .COM .REG .WSH .VBE)\'", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_8.setText(QtGui.QApplication.translate("Form", "Custom Filters and Attachment Blocking can override Known Good Senders", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_9.setText(QtGui.QApplication.translate("Form", "Permanently delete messages that are almost certainly spam", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_10.setText(QtGui.QApplication.translate("Form", "Block delivery failure messages (bounces ", None, QtGui.QApplication.UnicodeUTF8))
        self.label_16.setText(QtGui.QApplication.translate("Form", "Filter Sensitivity", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_soft.setText(QtGui.QApplication.translate("Form", "Soft : This will Stop some Spam", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_14.setText(QtGui.QApplication.translate("Form", "Default : This will stop most Spam emails and very few marketing messages/newsletters\n"
"you have signed up for voluntarily", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_15.setText(QtGui.QApplication.translate("Form", "Hard : This will stop almost all spam and some marketing messages/newsletters\n"
"you have signed up for voluntarily", None, QtGui.QApplication.UnicodeUTF8))
        self.label_14.setText(QtGui.QApplication.translate("Form", "Advanced Options", None, QtGui.QApplication.UnicodeUTF8))
        self.label_15.setText(QtGui.QApplication.translate("Form", "These options stop more spam , but may cause slower performance", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_11.setText(QtGui.QApplication.translate("Form", "Check domains for known problem networks", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_12.setText(QtGui.QApplication.translate("Form", "lookup WHOIS data for domains", None, QtGui.QApplication.UnicodeUTF8))
        self.checkBox_13.setText(QtGui.QApplication.translate("Form", "Enable DNS blacklist support", None, QtGui.QApplication.UnicodeUTF8))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QtGui.QApplication.translate("Form", "Filter Settings", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_6.setText(QtGui.QApplication.translate("Form", "OK", No

أرجووا من عنده الامكانيه والاستطاعه أن يفّعل الزر ليفتح النافذه : (

أوو لوو تستطيعووا أن تدلووني ع مصمم واجهات يستطيع أن يربط بين كودنا ويصمم لنا واجهه بسيطه ,, اكوون له من الشاكرين الممتنييين : )

تم تعديل هذه المشاركة بواسطة joharah في 19 أبريل 2012 في 17:30

#2

الأخ الكريم/الأخت الكريمة

السلام عليكم ورحمة الله وبركاته

مرحباً بكم في منتدى الفريق العربي للبرمجة

نود تنبيهك أن العنوان غير مناسب.

الرجاء اختيار عنوان مناسب أكثر في مواضيعك القادمة، وهذا بمثابة إشعار للأهمية.

وفي حال التكرار سيتعرض موضوعك للإغلاق والحذف!!!

قواعد المشاركة

/index.php?showtopic=29343

شاكرين لكم حُسن تعاونكم

Do as I say, not as I do

We are Anonymous. We are Legion. We don't forgive. We don't forget

#3

شكرراً أخي ,, تم التعديل

#4

لديك ملفين الواجهة مثلا MainWindow.ui و Settings.ui

بالنسبة لي أقوم بأنشاء كلاس منفصلة لكل واجهة كالتالي

from settings import *
class MainWindow(QtGui.QWidget):
    def __init__(self):
        QtGui.QWidget.__init__(self)
        uic.loadUi("MainWindow.ui", self)
        ...
        ...
        ...

	def connectSignals(self):
		'''
		Here u connect the button to the methos showSettingsDialog()
		'''
		... 


	def showSettingsDialog():
		mysettings = Settings()
		mysettings.show()

class Settings(QtGui.QDialog):
    def __init__(self):
        QtGui.QDialog.__init__(self)
        uic.loadUi("SettingsDialog.ui", self)
        ...
        ...
        ...

وفي كود النافذة الرئيسية أستدعي كلاس نافذة اﻷعدادات import ثم في كود الزر أنشئ كائن منه وأظهره كما بالكود السابق

1 −1

مواضيع مشابهة