python类Window()的实例源码

TextClassificationLib.py 文件源码 项目:TextStageProcessor 作者: mhyhre 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, dirname, morph, configurations, parent):
        super().__init__()
        uic.loadUi('sources/DialogClassificationLib.ui', self)

        flags = Qt.Window | Qt.WindowSystemMenuHint | Qt.WindowMinimizeButtonHint | Qt.WindowMaximizeButtonHint | Qt.WindowCloseButtonHint
        self.setWindowFlags(flags)

        self.morph = morph
        self.configurations = configurations
        self.parent = parent
        self.input_dir = dirname
        self.lineEditInputDir.setText(dirname)

        self.profiler = Profiler()

        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        self.buttonClassify.clicked.connect(self.makeClassification)

        output_dir = self.configurations.get("output_files_directory", "output_files")

        self.calculator = ClassificationLibCalculator(self.input_dir, output_dir, morph, self.configurations)
        self.calculator.signals.Finished.connect(self.onCalculationFinish)
        self.calculator.signals.UpdateProgressBar.connect(self.onUpdateProgressBar)
        self.calculator.signals.PrintInfo.connect(self.onTextLogAdd)
        self.output_dir = configurations.get("output_files_directory", "output_files/classification") + "/"
testwindowflags.py 文件源码 项目:incubator-senssoft-userale-pyqt5 作者: apache 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self):
        super(ControllerWindow, self).__init__()

        self.previewWindow = PreviewWindow(self)

        self.createTypeGroupBox()
        self.createHintsGroupBox()

        quitButton = QPushButton("&Quit")
        quitButton.clicked.connect(self.close)

        bottomLayout = QHBoxLayout()
        bottomLayout.addStretch()
        bottomLayout.addWidget(quitButton)

        mainLayout = QVBoxLayout()
        mainLayout.addWidget(self.typeGroupBox)
        mainLayout.addWidget(self.hintsGroupBox)
        mainLayout.addLayout(bottomLayout)
        self.setLayout(mainLayout)

        self.setWindowTitle("Window Flags")
        self.updatePreview()
testwindowflags.py 文件源码 项目:incubator-senssoft-userale-pyqt5 作者: apache 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def createTypeGroupBox(self):
        self.typeGroupBox = QGroupBox("Type")

        self.windowRadioButton = self.createRadioButton("Window")
        self.dialogRadioButton = self.createRadioButton("Dialog")
        self.sheetRadioButton = self.createRadioButton("Sheet")
        self.drawerRadioButton = self.createRadioButton("Drawer")
        self.popupRadioButton = self.createRadioButton("Popup")
        self.toolRadioButton = self.createRadioButton("Tool")
        self.toolTipRadioButton = self.createRadioButton("Tooltip")
        self.splashScreenRadioButton = self.createRadioButton("Splash screen")
        self.windowRadioButton.setChecked(True)

        layout = QGridLayout()
        layout.addWidget(self.windowRadioButton, 0, 0)
        layout.addWidget(self.dialogRadioButton, 1, 0)
        layout.addWidget(self.sheetRadioButton, 2, 0)
        layout.addWidget(self.drawerRadioButton, 3, 0)
        layout.addWidget(self.popupRadioButton, 0, 1)
        layout.addWidget(self.toolRadioButton, 1, 1)
        layout.addWidget(self.toolTipRadioButton, 2, 1)
        layout.addWidget(self.splashScreenRadioButton, 3, 1)
        self.typeGroupBox.setLayout(layout)
videoconsole.py 文件源码 项目:vidcutter 作者: ozmartian 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def __init__(self, parent=None):
        super(ConsoleWidget, self).__init__(parent)
        self.parent = parent
        self.edit = VideoConsole(self)
        buttons = QDialogButtonBox()
        buttons.setCenterButtons(True)
        clearButton = buttons.addButton('Clear', QDialogButtonBox.ResetRole)
        clearButton.clicked.connect(self.edit.clear)
        closeButton = buttons.addButton(QDialogButtonBox.Close)
        closeButton.clicked.connect(self.close)
        closeButton.setDefault(True)
        layout = QVBoxLayout()
        layout.addWidget(self.edit)
        layout.addWidget(buttons)
        self.setLayout(layout)
        self.setWindowTitle('{0} Console'.format(qApp.applicationName()))
        self.setWindowFlags(Qt.Window | Qt.WindowCloseButtonHint)
        self.setWindowModality(Qt.NonModal)
TextDecomposeAndRuleApply.py 文件源码 项目:TextStageProcessor 作者: mhyhre 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __init__(self, filenames, morph, configurations, parent):
        super().__init__()
        uic.loadUi('sources/DialogDecomposeAndRuleApply.ui', self)

        flags = Qt.Window | Qt.WindowSystemMenuHint | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint;
        self.setWindowFlags(flags)

        self.filenames = filenames
        self.morph = morph
        self.configurations = configurations
        self.parent = parent

        self.profiler = Profiler()

        self.nu = []
        self.ns = []
        self.nv = []
        self.all_idf_word_keys = []
        self.texts = []

        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)

        self.buttonProcess.clicked.connect(self.process)
        self.textEdit.setText("")
windowflags.py 文件源码 项目:Mac-Python-3.X 作者: L1nwatch 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __init__(self):
        super(ControllerWindow, self).__init__()

        self.previewWindow = PreviewWindow(self)

        self.createTypeGroupBox()
        self.createHintsGroupBox()

        quitButton = QPushButton("&Quit")
        quitButton.clicked.connect(self.close)

        bottomLayout = QHBoxLayout()
        bottomLayout.addStretch()
        bottomLayout.addWidget(quitButton)

        mainLayout = QVBoxLayout()
        mainLayout.addWidget(self.typeGroupBox)
        mainLayout.addWidget(self.hintsGroupBox)
        mainLayout.addLayout(bottomLayout)
        self.setLayout(mainLayout)

        self.setWindowTitle("Window Flags")
        self.updatePreview()
windowflags.py 文件源码 项目:examples 作者: pyqt 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self):
        super(ControllerWindow, self).__init__()

        self.previewWindow = PreviewWindow(self)

        self.createTypeGroupBox()
        self.createHintsGroupBox()

        quitButton = QPushButton("&Quit")
        quitButton.clicked.connect(self.close)

        bottomLayout = QHBoxLayout()
        bottomLayout.addStretch()
        bottomLayout.addWidget(quitButton)

        mainLayout = QVBoxLayout()
        mainLayout.addWidget(self.typeGroupBox)
        mainLayout.addWidget(self.hintsGroupBox)
        mainLayout.addLayout(bottomLayout)
        self.setLayout(mainLayout)

        self.setWindowTitle("Window Flags")
        self.updatePreview()
windowflags.py 文件源码 项目:examples 作者: pyqt 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def createTypeGroupBox(self):
        self.typeGroupBox = QGroupBox("Type")

        self.windowRadioButton = self.createRadioButton("Window")
        self.dialogRadioButton = self.createRadioButton("Dialog")
        self.sheetRadioButton = self.createRadioButton("Sheet")
        self.drawerRadioButton = self.createRadioButton("Drawer")
        self.popupRadioButton = self.createRadioButton("Popup")
        self.toolRadioButton = self.createRadioButton("Tool")
        self.toolTipRadioButton = self.createRadioButton("Tooltip")
        self.splashScreenRadioButton = self.createRadioButton("Splash screen")
        self.windowRadioButton.setChecked(True)

        layout = QGridLayout()
        layout.addWidget(self.windowRadioButton, 0, 0)
        layout.addWidget(self.dialogRadioButton, 1, 0)
        layout.addWidget(self.sheetRadioButton, 2, 0)
        layout.addWidget(self.drawerRadioButton, 3, 0)
        layout.addWidget(self.popupRadioButton, 0, 1)
        layout.addWidget(self.toolRadioButton, 1, 1)
        layout.addWidget(self.toolTipRadioButton, 2, 1)
        layout.addWidget(self.splashScreenRadioButton, 3, 1)
        self.typeGroupBox.setLayout(layout)
main.py 文件源码 项目:calibre-cloud-plugin 作者: COMU 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, parent=None):
        QDialog.__init__(self, parent)
        self.setupUi(self)
        self.setWindowFlags(Qt.Window)
        if (prefs['yy'] == '1'):
            self.getUsername.hide()
            self.getPassword.hide()
            self.label_2.hide()
            self.logout_button.clicked.connect(self.logout)
            self.label.setText("Now Session : " + prefs['username'])
        if (prefs['yy'] == '0'):
            self.logout_button.hide()
            self.getUsername.show()
            self.getPassword.show()
            self.label_2.show()
            self.getUsername.setText(prefs['username'])
            self.getPassword.setEchoMode(QLineEdit.Password)
            self.getPassword.setText(prefs['password'])
        self.downloadButton.clicked.connect(self.download)
        self.uploadButton.clicked.connect(self.upload)
        self.pushButton.clicked.connect(self.push)
        self.pullButton.clicked.connect(self.pull)
main.py 文件源码 项目:calibre-cloud-plugin 作者: COMU 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def __init__(self, parent = None):
        QDialog.__init__(self, parent)
        self.setupUi(self)
        self.setWindowFlags(Qt.Window)

        if (prefs['dd'] == '1'):
            self.getUsername.hide()
            self.getPassword.hide()
            self.label_2.hide()
            self.logout_button.clicked.connect(self.logout)

        if (prefs['dd'] == '0'):
            self.logout_button.hide()
            self.getUsername.show()
            self.getPassword.show()
            self.label_2.show()
            self.getUsername.setText(prefs['d_username'])
            self.getPassword.setEchoMode(QLineEdit.Password)
            self.getPassword.setText(prefs['d_password'])

        self.downloadButton.clicked.connect(self.download)
        self.uploadButton.clicked.connect(self.upload)
        self.pushButton.clicked.connect(self.push)
        self.pullButton.clicked.connect(self.pull)
windowflags.py 文件源码 项目:pyqt5-example 作者: guinslym 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self):
        super(ControllerWindow, self).__init__()

        self.previewWindow = PreviewWindow(self)

        self.createTypeGroupBox()
        self.createHintsGroupBox()

        quitButton = QPushButton("&Quit")
        quitButton.clicked.connect(self.close)

        bottomLayout = QHBoxLayout()
        bottomLayout.addStretch()
        bottomLayout.addWidget(quitButton)

        mainLayout = QVBoxLayout()
        mainLayout.addWidget(self.typeGroupBox)
        mainLayout.addWidget(self.hintsGroupBox)
        mainLayout.addLayout(bottomLayout)
        self.setLayout(mainLayout)

        self.setWindowTitle("Window Flags")
        self.updatePreview()
windowflags.py 文件源码 项目:pyqt5-example 作者: guinslym 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def createTypeGroupBox(self):
        self.typeGroupBox = QGroupBox("Type")

        self.windowRadioButton = self.createRadioButton("Window")
        self.dialogRadioButton = self.createRadioButton("Dialog")
        self.sheetRadioButton = self.createRadioButton("Sheet")
        self.drawerRadioButton = self.createRadioButton("Drawer")
        self.popupRadioButton = self.createRadioButton("Popup")
        self.toolRadioButton = self.createRadioButton("Tool")
        self.toolTipRadioButton = self.createRadioButton("Tooltip")
        self.splashScreenRadioButton = self.createRadioButton("Splash screen")
        self.windowRadioButton.setChecked(True)

        layout = QGridLayout()
        layout.addWidget(self.windowRadioButton, 0, 0)
        layout.addWidget(self.dialogRadioButton, 1, 0)
        layout.addWidget(self.sheetRadioButton, 2, 0)
        layout.addWidget(self.drawerRadioButton, 3, 0)
        layout.addWidget(self.popupRadioButton, 0, 1)
        layout.addWidget(self.toolRadioButton, 1, 1)
        layout.addWidget(self.toolTipRadioButton, 2, 1)
        layout.addWidget(self.splashScreenRadioButton, 3, 1)
        self.typeGroupBox.setLayout(layout)
testwindowflags.py 文件源码 项目:incubator-senssoft-userale-pyqt5 作者: apache 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def createHintsGroupBox(self):
        self.hintsGroupBox = QGroupBox("Hints")

        self.msWindowsFixedSizeDialogCheckBox = self.createCheckBox("MS Windows fixed size dialog")
        self.x11BypassWindowManagerCheckBox = self.createCheckBox("X11 bypass window manager")
        self.framelessWindowCheckBox = self.createCheckBox("Frameless window")
        self.windowTitleCheckBox = self.createCheckBox("Window title")
        self.windowSystemMenuCheckBox = self.createCheckBox("Window system menu")
        self.windowMinimizeButtonCheckBox = self.createCheckBox("Window minimize button")
        self.windowMaximizeButtonCheckBox = self.createCheckBox("Window maximize button")
        self.windowCloseButtonCheckBox = self.createCheckBox("Window close button")
        self.windowContextHelpButtonCheckBox = self.createCheckBox("Window context help button")
        self.windowShadeButtonCheckBox = self.createCheckBox("Window shade button")
        self.windowStaysOnTopCheckBox = self.createCheckBox("Window stays on top")
        self.windowStaysOnBottomCheckBox = self.createCheckBox("Window stays on bottom")
        self.customizeWindowHintCheckBox = self.createCheckBox("Customize window")

        layout = QGridLayout()
        layout.addWidget(self.msWindowsFixedSizeDialogCheckBox, 0, 0)
        layout.addWidget(self.x11BypassWindowManagerCheckBox, 1, 0)
        layout.addWidget(self.framelessWindowCheckBox, 2, 0)
        layout.addWidget(self.windowTitleCheckBox, 3, 0)
        layout.addWidget(self.windowSystemMenuCheckBox, 4, 0)
        layout.addWidget(self.windowMinimizeButtonCheckBox, 0, 1)
        layout.addWidget(self.windowMaximizeButtonCheckBox, 1, 1)
        layout.addWidget(self.windowCloseButtonCheckBox, 2, 1)
        layout.addWidget(self.windowContextHelpButtonCheckBox, 3, 1)
        layout.addWidget(self.windowShadeButtonCheckBox, 4, 1)
        layout.addWidget(self.windowStaysOnTopCheckBox, 5, 1)
        layout.addWidget(self.windowStaysOnBottomCheckBox, 6, 1)
        layout.addWidget(self.customizeWindowHintCheckBox, 5, 0)
        self.hintsGroupBox.setLayout(layout)
baseWindows.py 文件源码 项目:defconQt 作者: trufont 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, parent=None, flags=Qt.Window):
        super(BaseMainWindow, self).__init__(parent, flags)
        self.setAttribute(Qt.WA_DeleteOnClose)
        _bootstrapGCCache(self)
baseWindows.py 文件源码 项目:defconQt 作者: trufont 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __init__(self, parent=None, flags=Qt.Window):
        super(BaseWindow, self).__init__(parent, flags)
        self.setAttribute(Qt.WA_DeleteOnClose)
        _bootstrapGCCache(self)
XiSquare.py 文件源码 项目:TextStageProcessor 作者: mhyhre 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, filename, morph, configurations, parent):
        super().__init__()
        uic.loadUi('sources/XiSquare.ui', self)
        self.configurations = configurations

        flags = Qt.Window | Qt.WindowSystemMenuHint | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint;
        self.setWindowFlags(flags)

        self.parent = parent
        self.all_idf_word_keys = []

        self.input_path = ''
        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        self.buttonProcess.clicked.connect(self.processIt)
        self.textEdit.setText("")

        self.profiler = Profiler()

        self.configurations["minimal_word_size"] = 4
        self.configurations["cut_ADJ"] = False
        output_dir = self.configurations.get("output_files_directory", "output_files")
        self.progressBar.setValue(0)

        self.checkBoxNeedApriori.toggled.connect(self.onActivateApriori)
        self.groupBoxApriori.setVisible(False)

        self.calculator = XiCalculator(filename, output_dir, morph, self.configurations)
        self.calculator.signals.Finished.connect(self.onCalculationFinish)
        self.calculator.signals.UpdateProgressBar.connect(self.onUpdateProgressBar)
        self.calculator.signals.PrintInfo.connect(self.onTextLogAdd)
TextLSA.py 文件源码 项目:TextStageProcessor 作者: mhyhre 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __init__(self):
        super().__init__()
        self.setupUi(self)
        flags = Qt.Window | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint;
        self.setWindowFlags(flags)
        fig = Figure()
        self.addmpl(fig)
TextLSA.py 文件源码 项目:TextStageProcessor 作者: mhyhre 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __init__(self, filenames, morph, configurations, parent):
        super().__init__()
        uic.loadUi('sources/DialogConfigLSA.ui', self)

        self.morph = morph
        self.configurations = configurations
        self.parent = parent

        self.xs = []
        self.ys = []
        self.short_filenames = []
        self.similarity = None
        self.profiler = Profiler()

        flags = Qt.Window | Qt.WindowSystemMenuHint | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint;
        self.setWindowFlags(flags)

        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)

        self.buttonMakeLSA.clicked.connect(self.makeLSA)
        self.button2DView.clicked.connect(self.make2DView)
        self.buttonRelationTable.clicked.connect(self.showRelationTable)

        self.radio_preprocessing_full.toggled.connect(self.onChangePreprocMethod)
        self.radio_preprocessing_stopwords.toggled.connect(self.onChangePreprocMethod)

        output_dir = self.configurations.get("output_files_directory", "output_files")

        self.calculator = LsaCalculator(filenames,  self.configurations, output_dir, morph, self.textEdit)
        self.calculator.signals.Finished.connect(self.onCalculationFinish)
        self.calculator.signals.UpdateProgressBar.connect(self.onUpdateProgressBar)
        self.calculator.signals.PrintInfo.connect(self.onTextLogAdd)

        self.textEdit.setText("")
TextClassification.py 文件源码 项目:TextStageProcessor 作者: mhyhre 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __init__(self, dirname, morph, configurations, parent):
        super().__init__()
        uic.loadUi('sources/DialogConfigClassification.ui', self)

        flags = Qt.Window | Qt.WindowSystemMenuHint | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint
        self.setWindowFlags(flags)

        self.morph = morph
        self.configurations = configurations
        self.parent = parent
        self.input_dir = dirname
        self.lineEditInputDir.setText(dirname)

        self.profiler = Profiler()

        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        self.buttonClassify.clicked.connect(self.makeClassification)
        self.textEdit.setText("")
        self.groupBox_KNN.setVisible(False)

        self.radioButtonNaiveBayes.toggled.connect(self.onChangeMethod)
        self.radioButtonRocchio.toggled.connect(self.onChangeMethod)
        self.radioButtonKNN.toggled.connect(self.onChangeMethod)
        self.radioButtonLLSF.toggled.connect(self.onChangeMethod)
        self.radioButtonID3.toggled.connect(self.onChangeMethod)

        output_dir = self.configurations.get("output_files_directory", "output_files")

        self.calculator = ClassificationCalculator(self.input_dir, output_dir, morph, self.configurations)
        self.calculator.signals.Finished.connect(self.onCalculationFinish)
        self.calculator.signals.UpdateProgressBar.connect(self.onUpdateProgressBar)
        self.calculator.signals.PrintInfo.connect(self.onTextLogAdd)

        self.output_dir = configurations.get("output_files_directory", "output_files/classification") + "/"
TextClasterization.py 文件源码 项目:TextStageProcessor 作者: mhyhre 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def __init__(self, filenames, morph, configurations, parent):
        super().__init__()
        uic.loadUi('sources/DialogConfigClasterization.ui', self)

        flags = Qt.Window | Qt.WindowSystemMenuHint | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint
        self.setWindowFlags(flags)

        self.filenames = filenames
        self.morph = morph
        self.configurations = configurations
        self.parent = parent

        self.somMap = []
        self.somDLocations = []

        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        self.startMethod.clicked.connect(self.OnStartMethod)
        self.textEdit.setText("")
        self.parameters.setVisible(False)
        self.parameters_DBSCAN.setVisible(False)
        self.parameters_SOM.setVisible(False)
        output_dir = self.configurations.get("output_files_directory", "output_files")
        self.progressBar.setValue(0)
        self.profiler = Profiler()

        self.calculator = ClasterizationCalculator(filenames, output_dir, morph, self.configurations, self.textEdit)
        self.calculator.setMethod('1')
        self.calculator.signals.Finished.connect(self.onCalculationFinish)
        self.calculator.signals.UpdateProgressBar.connect(self.onUpdateProgressBar)
        self.calculator.signals.PrintInfo.connect(self.onTextLogAdd)

        self.radioButton_Hierarhy.toggled.connect(self.onChangeMethod)
        self.radioButton_KMiddle.toggled.connect(self.onChangeMethod)
        self.radioButton_SMiddle.toggled.connect(self.onChangeMethod)
        self.radioButton_DBSCAN.toggled.connect(self.onChangeMethod)
        self.radioButton_C3M.toggled.connect(self.onChangeMethod)
        self.radioButton_SOM.toggled.connect(self.onChangeMethod)
        self.drawSOMDiagram.clicked.connect(self.onDrawSOMDiagram)
TextClastering.py 文件源码 项目:TextStageProcessor 作者: mhyhre 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __init__(self, filenames, morph, configurations, parent):
        super().__init__()
        uic.loadUi('sources/DialogClastering.ui', self)

        flags = Qt.Window | Qt.WindowSystemMenuHint | Qt.WindowMinimizeButtonHint | Qt.WindowMaximizeButtonHint | Qt.WindowCloseButtonHint
        self.setWindowFlags(flags)

        fig = Figure()
        self.addmpl(fig)

        self.filenames = filenames
        self.morph = morph
        self.configurations = configurations
        self.parent = parent

        output_dir = self.configurations.get("output_files_directory", "output_files")

        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        self.startMethod.clicked.connect(self.OnStartMethod)

        self.textEdit.setText("")
        self.progressBar.setValue(0)

        self.profiler = Profiler()

        self.calculator = ClasteringCalculator(filenames, output_dir, morph, self.configurations, self.textEdit)
        self.calculator.signals.Finished.connect(self.onCalculationFinish)
        self.calculator.signals.UpdateProgressBar.connect(self.onUpdateProgressBar)
        self.calculator.signals.PrintInfo.connect(self.onTextLogAdd)
windowflags.py 文件源码 项目:Mac-Python-3.X 作者: L1nwatch 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def createTypeGroupBox(self):
        self.typeGroupBox = QGroupBox("Type")

        self.windowRadioButton = self.createRadioButton("Window")
        self.dialogRadioButton = self.createRadioButton("Dialog")
        self.sheetRadioButton = self.createRadioButton("Sheet")
        self.drawerRadioButton = self.createRadioButton("Drawer")
        self.popupRadioButton = self.createRadioButton("Popup")
        self.toolRadioButton = self.createRadioButton("Tool")
        self.toolTipRadioButton = self.createRadioButton("Tooltip")
        self.splashScreenRadioButton = self.createRadioButton("Splash screen")
        self.windowRadioButton.setChecked(True)

        layout = QGridLayout()
        layout.addWidget(self.windowRadioButton, 0, 0)
        layout.addWidget(self.dialogRadioButton, 1, 0)
        layout.addWidget(self.sheetRadioButton, 2, 0)
        layout.addWidget(self.drawerRadioButton, 3, 0)
        layout.addWidget(self.popupRadioButton, 0, 1)
        layout.addWidget(self.toolRadioButton, 1, 1)
        layout.addWidget(self.toolTipRadioButton, 2, 1)
        layout.addWidget(self.splashScreenRadioButton, 3, 1)
        self.typeGroupBox.setLayout(layout)
windowflags.py 文件源码 项目:Mac-Python-3.X 作者: L1nwatch 项目源码 文件源码 阅读 67 收藏 0 点赞 0 评论 0
def createHintsGroupBox(self):
        self.hintsGroupBox = QGroupBox("Hints")

        self.msWindowsFixedSizeDialogCheckBox = self.createCheckBox("MS Windows fixed size dialog")
        self.x11BypassWindowManagerCheckBox = self.createCheckBox("X11 bypass window manager")
        self.framelessWindowCheckBox = self.createCheckBox("Frameless window")
        self.windowTitleCheckBox = self.createCheckBox("Window title")
        self.windowSystemMenuCheckBox = self.createCheckBox("Window system menu")
        self.windowMinimizeButtonCheckBox = self.createCheckBox("Window minimize button")
        self.windowMaximizeButtonCheckBox = self.createCheckBox("Window maximize button")
        self.windowCloseButtonCheckBox = self.createCheckBox("Window close button")
        self.windowContextHelpButtonCheckBox = self.createCheckBox("Window context help button")
        self.windowShadeButtonCheckBox = self.createCheckBox("Window shade button")
        self.windowStaysOnTopCheckBox = self.createCheckBox("Window stays on top")
        self.windowStaysOnBottomCheckBox = self.createCheckBox("Window stays on bottom")
        self.customizeWindowHintCheckBox = self.createCheckBox("Customize window")

        layout = QGridLayout()
        layout.addWidget(self.msWindowsFixedSizeDialogCheckBox, 0, 0)
        layout.addWidget(self.x11BypassWindowManagerCheckBox, 1, 0)
        layout.addWidget(self.framelessWindowCheckBox, 2, 0)
        layout.addWidget(self.windowTitleCheckBox, 3, 0)
        layout.addWidget(self.windowSystemMenuCheckBox, 4, 0)
        layout.addWidget(self.windowMinimizeButtonCheckBox, 0, 1)
        layout.addWidget(self.windowMaximizeButtonCheckBox, 1, 1)
        layout.addWidget(self.windowCloseButtonCheckBox, 2, 1)
        layout.addWidget(self.windowContextHelpButtonCheckBox, 3, 1)
        layout.addWidget(self.windowShadeButtonCheckBox, 4, 1)
        layout.addWidget(self.windowStaysOnTopCheckBox, 5, 1)
        layout.addWidget(self.windowStaysOnBottomCheckBox, 6, 1)
        layout.addWidget(self.customizeWindowHintCheckBox, 5, 0)
        self.hintsGroupBox.setLayout(layout)
windowflags.py 文件源码 项目:examples 作者: pyqt 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def createHintsGroupBox(self):
        self.hintsGroupBox = QGroupBox("Hints")

        self.msWindowsFixedSizeDialogCheckBox = self.createCheckBox("MS Windows fixed size dialog")
        self.x11BypassWindowManagerCheckBox = self.createCheckBox("X11 bypass window manager")
        self.framelessWindowCheckBox = self.createCheckBox("Frameless window")
        self.windowTitleCheckBox = self.createCheckBox("Window title")
        self.windowSystemMenuCheckBox = self.createCheckBox("Window system menu")
        self.windowMinimizeButtonCheckBox = self.createCheckBox("Window minimize button")
        self.windowMaximizeButtonCheckBox = self.createCheckBox("Window maximize button")
        self.windowCloseButtonCheckBox = self.createCheckBox("Window close button")
        self.windowContextHelpButtonCheckBox = self.createCheckBox("Window context help button")
        self.windowShadeButtonCheckBox = self.createCheckBox("Window shade button")
        self.windowStaysOnTopCheckBox = self.createCheckBox("Window stays on top")
        self.windowStaysOnBottomCheckBox = self.createCheckBox("Window stays on bottom")
        self.customizeWindowHintCheckBox = self.createCheckBox("Customize window")

        layout = QGridLayout()
        layout.addWidget(self.msWindowsFixedSizeDialogCheckBox, 0, 0)
        layout.addWidget(self.x11BypassWindowManagerCheckBox, 1, 0)
        layout.addWidget(self.framelessWindowCheckBox, 2, 0)
        layout.addWidget(self.windowTitleCheckBox, 3, 0)
        layout.addWidget(self.windowSystemMenuCheckBox, 4, 0)
        layout.addWidget(self.windowMinimizeButtonCheckBox, 0, 1)
        layout.addWidget(self.windowMaximizeButtonCheckBox, 1, 1)
        layout.addWidget(self.windowCloseButtonCheckBox, 2, 1)
        layout.addWidget(self.windowContextHelpButtonCheckBox, 3, 1)
        layout.addWidget(self.windowShadeButtonCheckBox, 4, 1)
        layout.addWidget(self.windowStaysOnTopCheckBox, 5, 1)
        layout.addWidget(self.windowStaysOnBottomCheckBox, 6, 1)
        layout.addWidget(self.customizeWindowHintCheckBox, 5, 0)
        self.hintsGroupBox.setLayout(layout)
main.py 文件源码 项目:calibre-cloud-plugin 作者: COMU 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __init__(self, parent=None):
        QDialog.__init__(self, parent)
        self.setupUi(self)
        self.setWindowFlags(Qt.Window)
        self.googleDeauthButton.clicked.connect(self.googleDeAuth)
        self.uploadButton.clicked.connect(self.doGoogleUpload)
        self.downloadButton.clicked.connect(self.doGoogleDownload)
        username = getpass.getuser()
        if_exits = os.path.exists('/home/%s/.credentials/drive-calibre.json'%(username))
        if (if_exits == False):
            self.googleAuthButton.clicked.connect(self.googleAuth)
        else:
            self.googleAuthButton.hide()
            self.googleDeauthButton.setGeometry(30, 20, 99, 71)
            self.googleDeauthButton.resize(240,70)
main.py 文件源码 项目:calibre-cloud-plugin 作者: COMU 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self, parent=None):
        QDialog.__init__(self, parent)
        self.setupUi(self)
        self.setWindowFlags(Qt.Window)
        self.label_appname.setText("Cloud Sync")
        self.label_version.setText(__version__)
        self.label_expl.setText(_("Local or server files are synchronized with this plugin."))
        self.label_copy.setText('Copyright © 2017 – Kerim Ölçer\n'
    'Copyright © 2017 – Ali Güven Odaba??o?lu')
        self.label_cs.setText("This program comes with absolutely no warranty.\n"
    "See the GNU General Public License, version 3 or "
    "later for details.")


#MainWindow
main.py 文件源码 项目:calibre-cloud-plugin 作者: COMU 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        self.setupUi(self)
        self.setWindowFlags(Qt.Window)
        self.move(QDesktopWidget().availableGeometry().center() - self.frameGeometry().center())
        self.label_version.setText(__version__)
        self.yandex_button.clicked.connect(self.yandex_dialog)
        self.google_button.clicked.connect(self.google_dialog)
        self.dropbox_button.clicked.connect(self.dropbox_dialog)
        self.question_button.clicked.connect(self.about)
        self.license_button.clicked.connect(self.openUrl)
notepad_menubar.py 文件源码 项目:OpenTutorials_PyQt 作者: RavenKyu 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def __init__(self):
            QMainWindow.__init__(self, flags=Qt.Window)
            self.filename = "????"
            self.init_window()
notepad.py 文件源码 项目:OpenTutorials_PyQt 作者: RavenKyu 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def __init__(self):
        QMainWindow.__init__(self, flags=Qt.Window)
        self.menu = MenuBarWidget()
        self.status_bar = StatusBar()
        self.editor = TextEditor()
        self.translator = QTranslator()  # I18N ??
        self.filename = str()
        self.change_locale("translate\\" + QLocale.system().name() + ".qm")  # ??? ??? ??

        self.document_prt = QPrinter()

        self.init_window()
        self.init_setting()
i18n_02.py 文件源码 项目:OpenTutorials_PyQt 作者: RavenKyu 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __init__(self):
        QWidget.__init__(self, flags=Qt.Window)
        self.setMinimumWidth(330)
        self.lb = QLabel()
        self.qb = QComboBox()
        self.qb.addItems([n[0] for n in self.I18N])  # ?? ??? ???? ?? ??
        self.init_widget()


问题


面经


文章

微信
公众号

扫码关注公众号