def __init__(self, parent=None, string_0=None):
        QDialog.__init__(self, parent)

        self.resize(100, 70)
        self.setWindowTitle("Edit Comment")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.txtComment = TextBoxPanel(self)
        self.txtComment.Caption = ""
        self.txtComment.LabelWidth = 0
        verticalLayoutDlg.addWidget(self.txtComment)

        self.btnBoxOkCancel = QDialogButtonBox(self)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        self.btnOK = self.btnBoxOkCancel.button(QDialogButtonBox.Ok)
        # btnOK.setText("Create")
        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)
        self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject)
        self.connect(self.txtComment, SIGNAL("Event_0"),
                     self.txtComment_TextChanged)

        self.txtComment.Value = string_0
        self.btnOK.setEnabled(False)
    def __init__(self, parent=None):
        super(ActionWidget, self).__init__(parent)
        self.drawButton = QPushButton("Draw")
        self.cardButton = QPushButton("Use\nCard")
        self.healMainButton = QPushButton("Heal\nMain")

        # Button dimensions
        button_policy = QSizePolicy(QSizePolicy.Preferred,
                                    QSizePolicy.Preferred)
        button_policy.setHeightForWidth(True)
        self.drawButton.setSizePolicy(button_policy)
        self.cardButton.setSizePolicy(button_policy)
        self.healMainButton.setSizePolicy(button_policy)

        # dimensions
        policy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        self.setSizePolicy(policy)

        # layout
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.addWidget(self.drawButton)
        self.horizontalLayout.addWidget(self.cardButton)
        self.horizontalLayout.addWidget(self.healMainButton)
        self.setLayout(self.horizontalLayout)

        self.show()
Exemple #3
0
    def setup_widgets_and_layout(self):

        sizePolicy = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)

        self.gridLayout = QGridLayout(self)
        self.splitter = QSplitter(self)
        self.splitter.setOrientation(Qt.Horizontal)

        self.peakmap_plotter = PeakmapPlotter(self.splitter)

        self.verticalLayoutWidget = QWidget(self.splitter)
        self.verticalLayout = QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setMargin(0)

        self.params = PeakMapScalingParameters(self.verticalLayoutWidget)
        sizePolicy = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.params.sizePolicy().hasHeightForWidth())
        self.params.setSizePolicy(sizePolicy)

        self.verticalLayout.addWidget(self.params)

        spacerItem = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.MinimumExpanding)
        self.verticalLayout.addItem(spacerItem)
        self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)
    def __init__(self, parent):
        QWidget.__init__(self, parent)
        while not isinstance(parent, QDialog):
            parent = parent.parent()
        self.setObjectName("CheckedListBox" +
                           str(len(parent.findChildren(CheckedListBox))))

        self.setObjectName("checkBoxWidget")
        self.hLayout = QHBoxLayout(self)
        self.hLayout.setObjectName("hLayout")

        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)

        # self.frame = Frame()
        self.listView = QListView(self)
        self.hLayout.addWidget(self.listView)

        self.stdModel = QStandardItemModel()
        self.listView.setModel(self.stdModel)

        self.hasObject = False
        self.objList = []

        self.checkBoxList = []

        self.listView.pressed.connect(self.listView_clicked)
    def __init__(self, parent):
        QWidget.__init__(self, parent)
        while not isinstance(parent, QDialog):
            parent = parent.parent()
        self.setObjectName("CheckBox" +
                           str(len(parent.findChildren(CheckBox))))

        self.hLayout = QHBoxLayout(self)
        self.hLayout.setObjectName("hLayout")
        self.hLayout.setSpacing(0)
        self.hLayout.setContentsMargins(0, 0, 0, 0)

        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)

        self.checkBox = QCheckBox(self)
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        self.checkBox.setObjectName(self.objectName() + "_checkbox")
        sizePolicy.setHeightForWidth(
            self.checkBox.sizePolicy().hasHeightForWidth())
        self.checkBox.setSizePolicy(sizePolicy)
        self.hLayout.addWidget(self.checkBox)
        self.checkBox.setChecked(True)
        self.checkBox.clicked.connect(self.clicked)
    def __init__(self, parent, title, valueList=None):
        QDialog.__init__(self, parent)

        self.resize(100, 70)
        self.setWindowTitle(title)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.frameBasic = Frame(self)
        verticalLayoutDlg.addWidget(self.frameBasic)

        self.pnlName = TextBoxPanel(self.frameBasic)
        self.pnlName.Caption = "Name"
        self.pnlName.LabelWidth = 120
        self.frameBasic.Add = self.pnlName

        self.btnBoxOkCancel = QDialogButtonBox(self)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)
        self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject)

        verticalLayoutDlg.addWidget(self.btnBoxOkCancel)

        self.name = ""

        if valueList != None:
            self.pnlName.Value = valueList[0]
    def __init__(self, values):
        figure = Figure()
        FigureCanvasQTAgg.__init__(self, figure)
        prop = font_manager.FontProperties(fname='resources/fonts/FUTURA_LT_LIGHT.TTF')
        
        sizePolicy = QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Preferred)
        sizePolicy.setHeightForWidth(True)
        self.setSizePolicy(sizePolicy)
        
        self.subplot = Axes3D(figure)
        self.figure = figure
        
        xs, ys, zs = zip(*values)
        self.subplot.scatter(xs, ys, zs)

        self.xlabel = self.subplot.set_xlabel('COORDENADA X')
        self.ylabel = self.subplot.set_ylabel('COORDENADA Y')
        self.zlabel = self.subplot.set_zlabel('COORDENADA Z')
        
        for label in [self.xlabel, self.ylabel, self.zlabel]:
            label.set_color(Color.matplotlib('DARK_DARK_GRAY'))
            label.set_fontproperties(prop)
            label.set_fontsize(12)
        
        for axis in [self.subplot.w_xaxis, self.subplot.w_yaxis, self.subplot.w_zaxis]:
            axis.set_pane_color(Color.matplotlib('SOFT_SOFT_GRAY'))
            for tick in axis.get_major_ticks():
                tick.label1.set_color(Color.matplotlib('DARK_DARK_GRAY'))
                tick.label1.set_fontproperties(prop)
                tick.label1.set_fontsize(9)
Exemple #8
0
 def initui(self):
     self.setObjectName("Snapshot%d" % self.num)
     self.screenshot.setText("Snapshot %d" % self.num)
     sizePolicy = QSizePolicy(QSizePolicy.MinimumExpanding,
                              QSizePolicy.MinimumExpanding)
     sizePolicy.setHeightForWidth(True)
     self.setSizePolicy(sizePolicy)
Exemple #9
0
 def __init__(self, game, parent = None):
     QWidget.__init__(self, parent)
     self.game = game
     self.currentTerritory = None
     self.coloredMaskCache = ColoredMaskCache()
     self.animations = []
     self.source = None
     self.sourceAnimation = None
     self.scaleFactor = 1.0
     self.showRegionMap = False
     policy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
     policy.setHeightForWidth(True)
     self.setSizePolicy(policy)
     self.setMouseTracking(True)
     self.setFocusPolicy(Qt.StrongFocus)
     self.setEnabled(False)
     self.loadImages()
     toggleRegionMap = QAction(self,
                               shortcutContext=Qt.ApplicationShortcut,
                               shortcut=Qt.Key_B,
                               triggered=self.toggleShowRegionMap)
     cancelSelection = QAction(self,
                               shortcutContext=Qt.ApplicationShortcut,
                               shortcut=Qt.Key_Escape,
                               triggered=self.cancelSelection)
     self.addAction(toggleRegionMap)
     self.addAction(cancelSelection)
Exemple #10
0
    def settings(self, parent):
        # CRIANDO LABEL PARA SELECIONAR O TEMPO DE AMOSTRAGEM
        self.lbTimeAmostragem = QLabel(parent)
        mensagem = "Digite o tempo de amostragem em segundos (Deve ser no mínimo 2 segundos): "
        self.lbTimeAmostragem.setText(mensagem)
        self.lbTimeAmostragem.setAlignment(Qt.AlignCenter)

        # CRIANDO O LINEEDIT PARA SELECIONAR O TEMPO DE AMOSTRAGEM
        self.LETimeAmostragem = QLineEdit(parent)
        sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.LETimeAmostragem.sizePolicy().hasHeightForWidth())
        self.LETimeAmostragem.setSizePolicy(sizePolicy)
        self.LETimeAmostragem.setMaximumSize(QSize(40, 16777215))
        self.LETimeAmostragem.setLayoutDirection(Qt.LeftToRight)
        self.validator = QIntValidator(0, 999999, self)
        self.LETimeAmostragem.setValidator(self.validator)

        # CRIANDO UM SPACER PARA ORGANIZAR DENTRO DO LAYOUT OS ITENS
        spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                 QSizePolicy.Minimum)

        # ADICIONANDO OS WIDGETS NO LAYOUT
        self.addWidget(self.lbTimeAmostragem)
        self.addWidget(self.LETimeAmostragem)
        self.addItem(spacerItem)
Exemple #11
0
    def __getTermGroupbox(self):
        " Creates the term groupbox "
        termGroupbox = QGroupBox(self)
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            termGroupbox.sizePolicy().hasHeightForWidth())
        termGroupbox.setSizePolicy(sizePolicy)

        layoutTerm = QVBoxLayout(termGroupbox)
        self.__redirectRButton = QRadioButton(termGroupbox)
        self.__redirectRButton.setText("&Redirect to IDE")
        self.__redirectRButton.toggled.connect(self.__redirectedChanged)
        layoutTerm.addWidget(self.__redirectRButton)
        self.__autoRButton = QRadioButton(termGroupbox)
        self.__autoRButton.setText("Aut&o detection")
        layoutTerm.addWidget(self.__autoRButton)
        self.__konsoleRButton = QRadioButton(termGroupbox)
        self.__konsoleRButton.setText("Default &KDE konsole")
        layoutTerm.addWidget(self.__konsoleRButton)
        self.__gnomeRButton = QRadioButton(termGroupbox)
        self.__gnomeRButton.setText("gnome-&terminal")
        layoutTerm.addWidget(self.__gnomeRButton)
        self.__xtermRButton = QRadioButton(termGroupbox)
        self.__xtermRButton.setText("&xterm")
        layoutTerm.addWidget(self.__xtermRButton)
        return termGroupbox
Exemple #12
0
    def __createLayout(self):
        """ Creates the dialog layout """

        self.resize(579, 297)
        self.setSizeGripEnabled(True)

        self.gridlayout = QGridLayout(self)

        self.descriptionLabel = QLabel(self)
        self.descriptionLabel.setText("Description:")
        self.gridlayout.addWidget(self.descriptionLabel, 0, 0, 1, 1)

        self.descriptionEdit = QLineEdit(self)
        self.gridlayout.addWidget(self.descriptionEdit, 0, 1, 1, 3)

        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)

        self.completedCheckBox = QCheckBox(self)
        self.completedCheckBox.setText("Completed")
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.completedCheckBox.sizePolicy().hasHeightForWidth())
        self.completedCheckBox.setSizePolicy(sizePolicy)
        self.gridlayout.addWidget(self.completedCheckBox, 3, 3, 1, 1)

        self.filenameLabel = QLabel(self)
        self.filenameLabel.setText("File name:")
        self.gridlayout.addWidget(self.filenameLabel, 4, 0, 1, 1)

        self.filenameEdit = QLineEdit(self)
        self.filenameEdit.setFocusPolicy(Qt.NoFocus)
        self.filenameEdit.setReadOnly(True)
        self.gridlayout.addWidget(self.filenameEdit, 4, 1, 1, 3)

        self.lineLabel = QLabel(self)
        self.lineLabel.setText("Line:")
        self.gridlayout.addWidget(self.lineLabel, 5, 0, 1, 1)

        self.linenoEdit = QLineEdit(self)
        self.linenoEdit.setFocusPolicy(Qt.NoFocus)
        self.linenoEdit.setReadOnly(True)
        self.gridlayout.addWidget(self.linenoEdit, 5, 1, 1, 3)

        self.buttonBox = QDialogButtonBox(self)
        self.buttonBox.setOrientation(Qt.Horizontal)
        self.buttonBox.setStandardButtons( QDialogButtonBox.Cancel | \
                                           QDialogButtonBox.Ok )
        self.gridlayout.addWidget(self.buttonBox, 6, 0, 1, 4)

        self.descriptionLabel.setBuddy(self.descriptionEdit)

        self.buttonBox.accepted.connect(self.accept)
        self.buttonBox.rejected.connect(self.reject)
        QMetaObject.connectSlotsByName(self)
        self.setTabOrder(self.completedCheckBox, self.buttonBox)
        return
Exemple #13
0
    def __getIDEWideGroupbox(self):
        " Creates the IDE wide groupbox "
        ideGroupbox = QGroupBox(self)
        ideGroupbox.setTitle("IDE Wide Settings")
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            ideGroupbox.sizePolicy().hasHeightForWidth())
        ideGroupbox.setSizePolicy(sizePolicy)

        layoutIDE = QHBoxLayout(ideGroupbox)

        termGroupbox = self.__getTermGroupbox()
        termGroupbox.setTitle("Terminal to run in")
        layoutIDE.addWidget(termGroupbox)

        if self.__action == "profile":
            # Profile version of the dialog
            limitsGroupbox = self.__getProfileLimitsGroupbox()
            layoutIDE.addWidget(limitsGroupbox)
        else:
            # Debug version of the dialog
            dbgGroupbox = self.__getDebugGroupbox()
            layoutIDE.addWidget(dbgGroupbox)
        return ideGroupbox
Exemple #14
0
    def __getDebugGroupbox( self ):
        " Creates the debug settings groupbox "
        dbgGroupbox = QGroupBox( self )
        dbgGroupbox.setTitle( "Debugger" )
        sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred )
        sizePolicy.setHorizontalStretch( 0 )
        sizePolicy.setVerticalStretch( 0 )
        sizePolicy.setHeightForWidth(
                    dbgGroupbox.sizePolicy().hasHeightForWidth() )
        dbgGroupbox.setSizePolicy( sizePolicy )

        dbgLayout = QVBoxLayout( dbgGroupbox )
        self.__reportExceptionCheckBox = QCheckBox( "Report &exceptions" )
        self.__reportExceptionCheckBox.stateChanged.connect(
                                            self.__onReportExceptionChanged )
        self.__traceInterpreterCheckBox = QCheckBox( "T&race interpreter libs" )
        self.__traceInterpreterCheckBox.stateChanged.connect(
                                            self.__onTraceInterpreterChanged )
        self.__stopAtFirstCheckBox = QCheckBox( "Stop at first &line" )
        self.__stopAtFirstCheckBox.stateChanged.connect(
                                            self.__onStopAtFirstChanged )
        self.__autoforkCheckBox = QCheckBox( "&Fork without asking" )
        self.__autoforkCheckBox.stateChanged.connect(self.__onAutoforkChanged )
        self.__debugChildCheckBox = QCheckBox( "Debu&g child process" )
        self.__debugChildCheckBox.stateChanged.connect( self.__onDebugChild )

        dbgLayout.addWidget( self.__reportExceptionCheckBox )
        dbgLayout.addWidget( self.__traceInterpreterCheckBox )
        dbgLayout.addWidget( self.__stopAtFirstCheckBox )
        dbgLayout.addWidget( self.__autoforkCheckBox )
        dbgLayout.addWidget( self.__debugChildCheckBox )
        return dbgGroupbox
Exemple #15
0
    def __getProfileLimitsGroupbox(self):
        " Creates the profile limits groupbox "
        limitsGroupbox = QGroupBox(self)
        limitsGroupbox.setTitle("Profiler diagram limits")
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            limitsGroupbox.sizePolicy().hasHeightForWidth())
        limitsGroupbox.setSizePolicy(sizePolicy)

        layoutLimits = QGridLayout(limitsGroupbox)
        self.__nodeLimitEdit = QLineEdit()
        self.__nodeLimitEdit.textEdited.connect(self.__setRunButtonProps)
        self.__nodeLimitValidator = QDoubleValidator(0.0, 100.0, 2, self)
        self.__nodeLimitValidator.setNotation(
            QDoubleValidator.StandardNotation)
        self.__nodeLimitEdit.setValidator(self.__nodeLimitValidator)
        nodeLimitLabel = QLabel("Hide nodes below")
        self.__edgeLimitEdit = QLineEdit()
        self.__edgeLimitEdit.textEdited.connect(self.__setRunButtonProps)
        self.__edgeLimitValidator = QDoubleValidator(0.0, 100.0, 2, self)
        self.__edgeLimitValidator.setNotation(
            QDoubleValidator.StandardNotation)
        self.__edgeLimitEdit.setValidator(self.__edgeLimitValidator)
        edgeLimitLabel = QLabel("Hide edges below")
        layoutLimits.addWidget(nodeLimitLabel, 0, 0)
        layoutLimits.addWidget(self.__nodeLimitEdit, 0, 1)
        layoutLimits.addWidget(QLabel("%"), 0, 2)
        layoutLimits.addWidget(edgeLimitLabel, 1, 0)
        layoutLimits.addWidget(self.__edgeLimitEdit, 1, 1)
        layoutLimits.addWidget(QLabel("%"), 1, 2)
        return limitsGroupbox
Exemple #16
0
    def __getIDEWideGroupbox( self ):
        " Creates the IDE wide groupbox "
        ideGroupbox = QGroupBox( self )
        ideGroupbox.setTitle( "IDE Wide Settings" )
        sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred )
        sizePolicy.setHorizontalStretch( 0 )
        sizePolicy.setVerticalStretch( 0 )
        sizePolicy.setHeightForWidth(
                        ideGroupbox.sizePolicy().hasHeightForWidth() )
        ideGroupbox.setSizePolicy( sizePolicy )

        layoutIDE = QHBoxLayout( ideGroupbox )

        termGroupbox = self.__getTermGroupbox()
        termGroupbox.setTitle( "Terminal to run in" )
        layoutIDE.addWidget( termGroupbox )

        if self.__action == "profile":
            # Profile version of the dialog
            limitsGroupbox = self.__getProfileLimitsGroupbox()
            layoutIDE.addWidget( limitsGroupbox )
        else:
            # Debug version of the dialog
            dbgGroupbox = self.__getDebugGroupbox()
            layoutIDE.addWidget( dbgGroupbox )
        return ideGroupbox
Exemple #17
0
    def __getProfileLimitsGroupbox( self ):
        " Creates the profile limits groupbox "
        limitsGroupbox = QGroupBox( self )
        limitsGroupbox.setTitle( "Profiler diagram limits" )
        sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred )
        sizePolicy.setHorizontalStretch( 0 )
        sizePolicy.setVerticalStretch( 0 )
        sizePolicy.setHeightForWidth(
                limitsGroupbox.sizePolicy().hasHeightForWidth() )
        limitsGroupbox.setSizePolicy( sizePolicy )

        layoutLimits = QGridLayout( limitsGroupbox )
        self.__nodeLimitEdit = QLineEdit()
        self.__nodeLimitEdit.textEdited.connect( self.__setRunButtonProps )
        self.__nodeLimitValidator = QDoubleValidator( 0.0, 100.0, 2, self )
        self.__nodeLimitValidator.setNotation( QDoubleValidator.StandardNotation )
        self.__nodeLimitEdit.setValidator( self.__nodeLimitValidator )
        nodeLimitLabel = QLabel( "Hide nodes below" )
        self.__edgeLimitEdit = QLineEdit()
        self.__edgeLimitEdit.textEdited.connect( self.__setRunButtonProps )
        self.__edgeLimitValidator = QDoubleValidator( 0.0, 100.0, 2, self )
        self.__edgeLimitValidator.setNotation( QDoubleValidator.StandardNotation )
        self.__edgeLimitEdit.setValidator( self.__edgeLimitValidator )
        edgeLimitLabel = QLabel( "Hide edges below" )
        layoutLimits.addWidget( nodeLimitLabel, 0, 0 )
        layoutLimits.addWidget( self.__nodeLimitEdit, 0, 1 )
        layoutLimits.addWidget( QLabel( "%" ), 0, 2 )
        layoutLimits.addWidget( edgeLimitLabel, 1, 0 )
        layoutLimits.addWidget( self.__edgeLimitEdit, 1, 1 )
        layoutLimits.addWidget( QLabel( "%" ), 1, 2 )
        return limitsGroupbox
Exemple #18
0
    def __getDebugGroupbox(self):
        " Creates the debug settings groupbox "
        dbgGroupbox = QGroupBox(self)
        dbgGroupbox.setTitle("Debugger")
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            dbgGroupbox.sizePolicy().hasHeightForWidth())
        dbgGroupbox.setSizePolicy(sizePolicy)

        dbgLayout = QVBoxLayout(dbgGroupbox)
        self.__reportExceptionCheckBox = QCheckBox("Report &exceptions")
        self.__reportExceptionCheckBox.stateChanged.connect(
            self.__onReportExceptionChanged)
        self.__traceInterpreterCheckBox = QCheckBox("T&race interpreter libs")
        self.__traceInterpreterCheckBox.stateChanged.connect(
            self.__onTraceInterpreterChanged)
        self.__stopAtFirstCheckBox = QCheckBox("Stop at first &line")
        self.__stopAtFirstCheckBox.stateChanged.connect(
            self.__onStopAtFirstChanged)
        self.__autoforkCheckBox = QCheckBox("&Fork without asking")
        self.__autoforkCheckBox.stateChanged.connect(self.__onAutoforkChanged)
        self.__debugChildCheckBox = QCheckBox("Debu&g child process")
        self.__debugChildCheckBox.stateChanged.connect(self.__onDebugChild)

        dbgLayout.addWidget(self.__reportExceptionCheckBox)
        dbgLayout.addWidget(self.__traceInterpreterCheckBox)
        dbgLayout.addWidget(self.__stopAtFirstCheckBox)
        dbgLayout.addWidget(self.__autoforkCheckBox)
        dbgLayout.addWidget(self.__debugChildCheckBox)
        return dbgGroupbox
Exemple #19
0
    def __getTermGroupbox( self ):
        " Creates the term groupbox "
        termGroupbox = QGroupBox( self )
        sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred )
        sizePolicy.setHorizontalStretch( 0 )
        sizePolicy.setVerticalStretch( 0 )
        sizePolicy.setHeightForWidth(
                        termGroupbox.sizePolicy().hasHeightForWidth() )
        termGroupbox.setSizePolicy( sizePolicy )

        layoutTerm = QVBoxLayout( termGroupbox )
        self.__redirectRButton = QRadioButton( termGroupbox )
        self.__redirectRButton.setText( "&Redirect to IDE" )
        self.__redirectRButton.toggled.connect( self.__redirectedChanged )
        layoutTerm.addWidget( self.__redirectRButton )
        self.__autoRButton = QRadioButton( termGroupbox )
        self.__autoRButton.setText( "Aut&o detection" )
        layoutTerm.addWidget( self.__autoRButton )
        self.__konsoleRButton = QRadioButton( termGroupbox )
        self.__konsoleRButton.setText( "Default &KDE konsole" )
        layoutTerm.addWidget( self.__konsoleRButton )
        self.__gnomeRButton = QRadioButton( termGroupbox )
        self.__gnomeRButton.setText( "gnome-&terminal" )
        layoutTerm.addWidget( self.__gnomeRButton )
        self.__xtermRButton = QRadioButton( termGroupbox )
        self.__xtermRButton.setText( "&xterm" )
        layoutTerm.addWidget( self.__xtermRButton )
        return termGroupbox
    def __init__(self, parent=None):
        QDialog.__init__(self, parent)

        self.resize(290, 136)
        self.setWindowTitle("Effective Date")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.groupBox = GroupBox(self)
        verticalLayoutDlg.addWidget(self.groupBox)

        self.dtpDate = QDateTimeEdit(self.groupBox)
        self.dtpDate.setObjectName(("dtpDate"))
        self.dtpDate.setDateTime(QDateTime.currentDateTime())
        self.groupBox.Add = self.dtpDate

        self.calendar = QCalendarWidget(self.groupBox)
        self.groupBox.Add = self.calendar
        self.calendar.clicked.connect(self.calendar_clicked)

        self.btnBoxOkCancel = QDialogButtonBox(self)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        # btnOK = self.btnBoxOkCancel.button(QDialogButtonBox.Ok)
        # btnOK.setText("Create")
        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)
        self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject)

        verticalLayoutDlg.addWidget(self.btnBoxOkCancel)
Exemple #21
0
    def __init__(self, parent=None):
        QDialog.__init__(self, parent)

        self.resize(290, 136)
        self.setWindowTitle("Surfaces")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.lstSurfaces = CheckedListBox(self)
        verticalLayoutDlg.addWidget(self.lstSurfaces)

        self.btnBoxOkCancel = QDialogButtonBox(self)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)

        self.btnOK = self.btnBoxOkCancel.button(QDialogButtonBox.Ok)

        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)
        self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject)

        verticalLayoutDlg.addWidget(self.btnBoxOkCancel)
 def _setupUi(self):
     if ISWINDOWS:
         self.resize(250, 140)
     else:
         self.resize(340, 165)
     self.setWindowTitle(tr("Re-assign Account"))
     self.verticalLayout = QVBoxLayout(self)
     self.label = QLabel(self)
     self.label.setWordWrap(True)
     self.label.setText(tr("You\'re about to delete a non-empty account. Select an account to re-assign its transactions to."))
     self.verticalLayout.addWidget(self.label)
     self.accountComboBoxView = QComboBox(self)
     sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.accountComboBoxView.sizePolicy().hasHeightForWidth())
     self.accountComboBoxView.setSizePolicy(sizePolicy)
     self.accountComboBoxView.setMinimumSize(QSize(200, 0))
     self.verticalLayout.addWidget(self.accountComboBoxView)
     spacerItem = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
     self.verticalLayout.addItem(spacerItem)
     self.horizontalLayout = QHBoxLayout()
     spacerItem1 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
     self.horizontalLayout.addItem(spacerItem1)
     self.cancelButton = QPushButton(self)
     self.cancelButton.setText(tr("Cancel"))
     self.cancelButton.setShortcut("Esc")
     self.horizontalLayout.addWidget(self.cancelButton)
     self.continueButton = QPushButton(self)
     self.continueButton.setDefault(True)
     self.continueButton.setText(tr("Continue"))
     self.horizontalLayout.addWidget(self.continueButton)
     self.verticalLayout.addLayout(self.horizontalLayout)
    def __createLayout( self ):
        """ Creates the dialog layout """

        self.resize( 579, 297 )
        self.setSizeGripEnabled( True )

        self.gridlayout = QGridLayout( self )

        self.descriptionLabel = QLabel( self )
        self.descriptionLabel.setText( "Description:" )
        self.gridlayout.addWidget( self.descriptionLabel, 0, 0, 1, 1 )

        self.descriptionEdit = QLineEdit( self )
        self.gridlayout.addWidget( self.descriptionEdit, 0, 1, 1, 3 )

        sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred )
        sizePolicy.setHorizontalStretch( 0 )
        sizePolicy.setVerticalStretch( 0 )

        self.completedCheckBox = QCheckBox( self )
        self.completedCheckBox.setText( "Completed" )
        sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Fixed )
        sizePolicy.setHorizontalStretch( 0 )
        sizePolicy.setVerticalStretch( 0 )
        sizePolicy.setHeightForWidth( self.completedCheckBox.sizePolicy().hasHeightForWidth() )
        self.completedCheckBox.setSizePolicy( sizePolicy )
        self.gridlayout.addWidget( self.completedCheckBox, 3, 3, 1, 1 )

        self.filenameLabel = QLabel( self )
        self.filenameLabel.setText( "File name:" )
        self.gridlayout.addWidget( self.filenameLabel, 4, 0, 1, 1 )

        self.filenameEdit = QLineEdit( self )
        self.filenameEdit.setFocusPolicy( Qt.NoFocus )
        self.filenameEdit.setReadOnly( True )
        self.gridlayout.addWidget( self.filenameEdit, 4, 1, 1, 3 )

        self.lineLabel = QLabel( self )
        self.lineLabel.setText( "Line:" )
        self.gridlayout.addWidget( self.lineLabel, 5, 0, 1, 1 )

        self.linenoEdit = QLineEdit( self )
        self.linenoEdit.setFocusPolicy( Qt.NoFocus )
        self.linenoEdit.setReadOnly( True )
        self.gridlayout.addWidget( self.linenoEdit, 5, 1, 1, 3 )

        self.buttonBox = QDialogButtonBox( self )
        self.buttonBox.setOrientation( Qt.Horizontal )
        self.buttonBox.setStandardButtons( QDialogButtonBox.Cancel | \
                                           QDialogButtonBox.Ok )
        self.gridlayout.addWidget( self.buttonBox, 6, 0, 1, 4 )

        self.descriptionLabel.setBuddy( self.descriptionEdit )

        self.buttonBox.accepted.connect( self.accept )
        self.buttonBox.rejected.connect( self.reject )
        QMetaObject.connectSlotsByName( self )
        self.setTabOrder( self.completedCheckBox, self.buttonBox )
        return
Exemple #24
0
    def __init__(self, parent, title, valueList=None):
        QDialog.__init__(self, parent)

        self.resize(100, 70)
        self.setWindowTitle(title)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.frameBasic = Frame(self)
        verticalLayoutDlg.addWidget(self.frameBasic)

        self.pnlName = TextBoxPanel(self.frameBasic)
        self.pnlName.Caption = "Name"
        self.pnlName.LabelWidth = 120
        self.frameBasic.Add = self.pnlName

        self.pnlLowerLimit = DistanceBoxPanel(self.frameBasic, DistanceUnits.M)
        self.pnlLowerLimit.Caption = "Lower Limit"
        self.pnlLowerLimit.Button = None
        self.pnlLowerLimit.LabelWidth = 120
        self.frameBasic.Add = self.pnlLowerLimit

        self.pnlUpperLimit = DistanceBoxPanel(self.frameBasic, DistanceUnits.M)
        self.pnlUpperLimit.Caption = "Upper Limit"
        self.pnlUpperLimit.Button = None
        self.pnlUpperLimit.LabelWidth = 120
        self.frameBasic.Add = self.pnlUpperLimit

        self.pnlRadius = DistanceBoxPanel(self.frameBasic, DistanceUnits.M)
        self.pnlRadius.Caption = "Radius"
        self.pnlRadius.Button = None
        self.pnlRadius.LabelWidth = 120
        self.frameBasic.Add = self.pnlRadius

        self.btnBoxOkCancel = QDialogButtonBox(self)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)
        self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject)

        verticalLayoutDlg.addWidget(self.btnBoxOkCancel)

        self.name = ""
        self.lowerLimit = ""
        self.upperLimit = ""
        self.radius = ""

        if valueList != None:
            self.pnlName.Value = valueList[0]
            self.pnlLowerLimit.Value = Distance(float(valueList[1]))
            self.pnlUpperLimit.Value = Distance(float(valueList[2]))
            if valueList[3] != None and valueList[3] != "":
                self.pnlRadius.Value = Distance(float(valueList[3]))
    def __init__(self, parent):
        QDialog.__init__(self, parent)
        self.resize(100, 70)
        self.setWindowTitle("Request Activation Code")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.groupBox1 = GroupBox(self)
        self.groupBox1.Caption = ""
        verticalLayoutDlg.addWidget(self.groupBox1)

        self.txtName = TextBoxPanel(self.groupBox1)
        self.txtName.Caption = "Name"
        self.txtName.LabelWidth = 80
        self.txtName.Width = 200
        self.groupBox1.Add = self.txtName

        self.txtCompany = TextBoxPanel(self.groupBox1)
        self.txtCompany.Caption = "Company"
        self.txtCompany.LabelWidth = 80
        self.txtCompany.Width = 200
        self.groupBox1.Add = self.txtCompany

        self.txtAddress = TextBoxPanel(self.groupBox1, True)
        self.txtAddress.Caption = "Address"
        self.txtAddress.LabelWidth = 80
        self.txtAddress.Width = 200
        self.groupBox1.Add = self.txtAddress

        self.txtPhoneNo = TextBoxPanel(self.groupBox1)
        self.txtPhoneNo.Caption = "Phone No."
        self.txtPhoneNo.LabelWidth = 80
        self.txtPhoneNo.Width = 200
        self.groupBox1.Add = self.txtPhoneNo

        self.txtEmail = TextBoxPanel(self.groupBox1)
        self.txtEmail.Caption = "Email"
        self.txtEmail.LabelWidth = 80
        self.txtEmail.Width = 200
        self.groupBox1.Add = self.txtEmail

        self.btnBoxOkCancel = QDialogButtonBox(self)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        btnSendRequest = self.btnBoxOkCancel.button(QDialogButtonBox.Ok)
        btnSendRequest.setText("Send Request")
        btnCancel = self.btnBoxOkCancel.button(QDialogButtonBox.Cancel)
        btnCancel.setVisible(False)

        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)

        verticalLayoutDlg.addWidget(self.btnBoxOkCancel)
Exemple #26
0
    def __init__(self, parent, rwFlag="r"):
        QDialog.__init__(self, parent)
        self.rwFlag = rwFlag
        self.resize(100, 70)
        if self.rwFlag == "r":
            self.setWindowTitle("CRC Reader")
        else:
            self.setWindowTitle("CRC Writer")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.groupBox1 = GroupBox(self)
        self.groupBox1.Caption = ""
        verticalLayoutDlg.addWidget(self.groupBox1)

        self.pnlFile = TextBoxPanel(self.groupBox1)
        self.pnlFile.Caption = "File"
        self.pnlFile.LabelWidth = 120
        self.pnlFile.textBox.setMaximumWidth(200)
        self.pnlFile.textBox.setMinimumWidth(200)
        self.pnlFile.Button = "openData.png"
        self.groupBox1.Add = self.pnlFile

        self.pnlSuppliedCrcValue = TextBoxPanel(self.groupBox1)
        self.pnlSuppliedCrcValue.Caption = "Supplied CRC Value"
        self.pnlSuppliedCrcValue.LabelWidth = 120
        self.pnlSuppliedCrcValue.Enabled = False
        self.groupBox1.Add = self.pnlSuppliedCrcValue

        if self.rwFlag == "w":
            self.pnlSuppliedCrcValue.Visible = False

        self.pnlCalculatedCrcValue = TextBoxPanel(self.groupBox1)
        self.pnlCalculatedCrcValue.Caption = "Calculated CRC Value"
        self.pnlCalculatedCrcValue.LabelWidth = 120
        self.pnlCalculatedCrcValue.Enabled = False
        self.groupBox1.Add = self.pnlCalculatedCrcValue

        self.btnBoxOkCancel = QDialogButtonBox(self)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        btnQuit = self.btnBoxOkCancel.button(QDialogButtonBox.Ok)
        btnQuit.setText("Quit")
        btnCancel = self.btnBoxOkCancel.button(QDialogButtonBox.Cancel)
        btnCancel.setVisible(False)

        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)

        self.connect(self.pnlFile, SIGNAL("Event_1"), self.pnlFileEvent_1)

        verticalLayoutDlg.addWidget(self.btnBoxOkCancel)
Exemple #27
0
    def setupUi (self, MainWindow):
        '''sets up the Maya UI.
        
        @param MainWindow
        '''
        MainWindow.setObjectName ('MainWindow')
        MainWindow.resize (800, 1396)
        sizePolicy = QSizePolicy (QSizePolicy.Preferred, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch (0)
        sizePolicy.setVerticalStretch (0)
        sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
        MainWindow.setSizePolicy(sizePolicy)
        font = QFont ()
        font.setPointSize (11)
        MainWindow.setFont (font)
        MainWindow.setWindowTitle (QApplication.translate("MainWindow", "Location Tool", None, QApplication.UnicodeUTF8))
        MainWindow.setTabShape (QTabWidget.Rounded)
        MainWindow.setDockOptions (QMainWindow.AllowTabbedDocks|QMainWindow.AnimatedDocks)
        
        self.scrollAreaWidgetContents_3 = QWidget (MainWindow)
        self.scrollAreaWidgetContents_3.setGeometry (QRect(10, 10, 900, 940))
        self.scrollAreaWidgetContents_3.setObjectName ('scrollAreaWidgetContents_3')
        self._view = View0.View ("JADEview", self.graph_view, self.scene, self.scrollAreaWidgetContents_3)
        self._view.setObjectName ('JADEview')  # real ui name
        self._view.graphicsView.setObjectName ('JADEInnerView')
        self.connect (self.scene, SIGNAL("selectionChanged()"), self._view.selectionChanged)
        
        self._view.wireViewItemsUp ()
        self._view.getGraphicsView().setScene (self.scene)
        self._view.setToolboxCSSColorScheme ('background-color: rgb(68,68,68);color: rgb(200,200,200)') # this needs to be done since the toolbox's background didn't have a uniform colour otherwise.
        #self._view.setGraphicsViewCSSBackground () # the CSS background doesn't seem to work in Maya as there seems to be a problem with cleaning QGraphicsLineItems when they move, that doesn't happen when there's no CSS applied to the background.

        self.graphicsView = self._view.getGraphicsView ()
        self.node_coords = QPoint (0,0)
        
        layout = QHBoxLayout (self.scrollAreaWidgetContents_3)
        layout.setContentsMargins (QMargins(0,0,0,0));
        layout.addWidget (self._view)
        
        QMetaObject.connectSlotsByName (MainWindow)
        
        """
        cmds.control('JADEInnerView', edit=True, ebg=True, bgc=[.5,.5,.9])
        print cmds.control('JADEInnerView', query=True, p=True)
        """
        
        # wiring the Maya Contextual pop-up Menus - yes, in Maya we've split the pop-up menu definition in three pop-up menus although only one will be present at any time.
        self.menu        = cmds.popupMenu ('JADEmenu',        parent='JADEInnerView', button=3, pmc = 'ClientMaya.ui.ctxMenu()',        aob=True)
        self.menuAddOuts = cmds.popupMenu ('JADEmenuAddOuts', parent='JADEInnerView', button=3, pmc = 'ClientMaya.ui.ctxMenuAddOuts()', aob=True, alt=True)
        self.menuAddIns  = cmds.popupMenu ('JADEmenuAddIns',  parent='JADEInnerView', button=3, pmc = 'ClientMaya.ui.ctxMenuAddIns()',  aob=True, ctl=True)
        
        # this class property is used to keep track of the mouse position.
        self._mouse = QCursor
        
        # self._view's zoom slider (we need this to correct the bias added to sort the mouse position when the zoom changes - ONLY in Maya)
        self._zoom_slider = self._view.getZoomSlider()
 def _setupUi(self):
     self.setWindowTitle(tr("Enter your registration key"))
     self.resize(365, 126)
     self.verticalLayout = QVBoxLayout(self)
     self.promptLabel = QLabel(self)
     appname = str(QCoreApplication.instance().applicationName())
     prompt = tr("Type the key you received when you contributed to $appname, as well as the "
         "e-mail used as a reference for the purchase.").replace('$appname', appname)
     self.promptLabel.setText(prompt)
     self.promptLabel.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop)
     self.promptLabel.setWordWrap(True)
     self.verticalLayout.addWidget(self.promptLabel)
     self.formLayout = QFormLayout()
     self.formLayout.setSizeConstraint(QLayout.SetNoConstraint)
     self.formLayout.setFieldGrowthPolicy(QFormLayout.ExpandingFieldsGrow)
     self.formLayout.setLabelAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
     self.formLayout.setFormAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop)
     self.label2 = QLabel(self)
     self.label2.setText(tr("Registration key:"))
     self.formLayout.setWidget(0, QFormLayout.LabelRole, self.label2)
     self.label3 = QLabel(self)
     self.label3.setText(tr("Registered e-mail:"))
     self.formLayout.setWidget(1, QFormLayout.LabelRole, self.label3)
     self.codeEdit = QLineEdit(self)
     self.formLayout.setWidget(0, QFormLayout.FieldRole, self.codeEdit)
     self.emailEdit = QLineEdit(self)
     self.formLayout.setWidget(1, QFormLayout.FieldRole, self.emailEdit)
     self.verticalLayout.addLayout(self.formLayout)
     self.horizontalLayout = QHBoxLayout()
     self.contributeButton = QPushButton(self)
     self.contributeButton.setText(tr("Contribute"))
     self.contributeButton.setAutoDefault(False)
     self.horizontalLayout.addWidget(self.contributeButton)
     spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
     self.horizontalLayout.addItem(spacerItem)
     self.cancelButton = QPushButton(self)
     sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.cancelButton.sizePolicy().hasHeightForWidth())
     self.cancelButton.setSizePolicy(sizePolicy)
     self.cancelButton.setText(tr("Cancel"))
     self.cancelButton.setAutoDefault(False)
     self.horizontalLayout.addWidget(self.cancelButton)
     self.submitButton = QPushButton(self)
     sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.submitButton.sizePolicy().hasHeightForWidth())
     self.submitButton.setSizePolicy(sizePolicy)
     self.submitButton.setText(tr("Submit"))
     self.submitButton.setAutoDefault(False)
     self.submitButton.setDefault(True)
     self.horizontalLayout.addWidget(self.submitButton)
     self.verticalLayout.addLayout(self.horizontalLayout)
 def _setupUi(self):
     self.setWindowTitle(tr("Enter your registration key"))
     self.resize(365, 126)
     self.verticalLayout = QVBoxLayout(self)
     self.promptLabel = QLabel(self)
     appname = str(QCoreApplication.instance().applicationName())
     prompt = tr("Type the key you received when you contributed to $appname, as well as the "
         "e-mail used as a reference for the purchase.").replace('$appname', appname)
     self.promptLabel.setText(prompt)
     self.promptLabel.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop)
     self.promptLabel.setWordWrap(True)
     self.verticalLayout.addWidget(self.promptLabel)
     self.formLayout = QFormLayout()
     self.formLayout.setSizeConstraint(QLayout.SetNoConstraint)
     self.formLayout.setFieldGrowthPolicy(QFormLayout.ExpandingFieldsGrow)
     self.formLayout.setLabelAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
     self.formLayout.setFormAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop)
     self.label2 = QLabel(self)
     self.label2.setText(tr("Registration key:"))
     self.formLayout.setWidget(0, QFormLayout.LabelRole, self.label2)
     self.label3 = QLabel(self)
     self.label3.setText(tr("Registered e-mail:"))
     self.formLayout.setWidget(1, QFormLayout.LabelRole, self.label3)
     self.codeEdit = QLineEdit(self)
     self.formLayout.setWidget(0, QFormLayout.FieldRole, self.codeEdit)
     self.emailEdit = QLineEdit(self)
     self.formLayout.setWidget(1, QFormLayout.FieldRole, self.emailEdit)
     self.verticalLayout.addLayout(self.formLayout)
     self.horizontalLayout = QHBoxLayout()
     self.contributeButton = QPushButton(self)
     self.contributeButton.setText(tr("Contribute"))
     self.contributeButton.setAutoDefault(False)
     self.horizontalLayout.addWidget(self.contributeButton)
     spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
     self.horizontalLayout.addItem(spacerItem)
     self.cancelButton = QPushButton(self)
     sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.cancelButton.sizePolicy().hasHeightForWidth())
     self.cancelButton.setSizePolicy(sizePolicy)
     self.cancelButton.setText(tr("Cancel"))
     self.cancelButton.setAutoDefault(False)
     self.horizontalLayout.addWidget(self.cancelButton)
     self.submitButton = QPushButton(self)
     sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.submitButton.sizePolicy().hasHeightForWidth())
     self.submitButton.setSizePolicy(sizePolicy)
     self.submitButton.setText(tr("Submit"))
     self.submitButton.setAutoDefault(False)
     self.submitButton.setDefault(True)
     self.horizontalLayout.addWidget(self.submitButton)
     self.verticalLayout.addLayout(self.horizontalLayout)
    def __init__(self, parent, altitudeUnit=AltitudeUnits.FT):
        QWidget.__init__(self, parent)
        while not isinstance(parent, QDialog):
            parent = parent.parent()
        self.setObjectName("MCAHPanel" +
                           str(len(parent.findChildren(MCAHPanel))))

        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)

        self.hLayout = QHBoxLayout(self)
        self.hLayout.setSpacing(0)
        self.hLayout.setMargin(0)
        self.hLayout.setObjectName("hLayout")

        self.basicFrame = Frame(self, "HL")
        self.basicFrame.Spacing = 0
        self.hLayout.addWidget(self.basicFrame)

        self.lblMCAH = QLabel(self.basicFrame)
        self.lblMCAH.setMinimumSize(QSize(250, 0))
        font = QFont()
        font.setWeight(50)
        font.setBold(False)
        self.lblMCAH.setFont(font)
        self.lblMCAH.setObjectName(("lblMCAH"))
        self.basicFrame.Add = self.lblMCAH
        self.cmbMCAH = QComboBox(self.basicFrame)
        font = QFont()
        font.setWeight(50)
        font.setBold(False)
        self.cmbMCAH.setFont(font)
        self.cmbMCAH.setObjectName(self.objectName() + "_cmbMCAH")
        self.basicFrame.Add = self.cmbMCAH
        self.txtMCAH = QLineEdit(self.basicFrame)
        font = QFont()
        font.setWeight(50)
        font.setBold(False)
        self.txtMCAH.setFont(font)
        self.txtMCAH.setObjectName(self.objectName() + "_txtMCAH")
        self.txtMCAH.setMinimumWidth(70)
        self.txtMCAH.setMaximumWidth(70)
        self.basicFrame.Add = self.txtMCAH
        self.setLayout(self.hLayout)

        spacerItem = QSpacerItem(0, 10, QSizePolicy.Minimum,
                                 QSizePolicy.Minimum)
        self.hLayout.addItem(spacerItem)
        self.cmbMCAH.addItems([MCAHType.MCA, MCAHType.MCH])
        #         self.txtMCAH.textChanged.connect(self.txtAltitude_TextChanged)
        self.altitudeUnit = altitudeUnit
Exemple #31
0
 def __tuneCombo(comboBox):
     " Sets the common settings for a combo box "
     sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(comboBox.sizePolicy().hasHeightForWidth())
     comboBox.setSizePolicy(sizePolicy)
     comboBox.setEditable(True)
     comboBox.setInsertPolicy(QComboBox.InsertAtTop)
     comboBox.setAutoCompletion(False)
     comboBox.setDuplicatesEnabled(False)
     return
    def __init__(self, parent=None):
        QDialog.__init__(self, parent)

        self.resize(290, 136)
        self.setWindowTitle("Reference Positions")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.groupBox = GroupBox(self)
        self.groupBox.Caption = "Output Data"
        verticalLayoutDlg.addWidget(self.groupBox)

        self.txtDataBlock = TextBoxPanel(self.groupBox, True)
        self.txtDataBlock.Caption = "Data Block"
        self.txtDataBlock.Value = "10 20 10 07 05 8C 20 02 01 36 30 05 54 9D AA 18 7C E8 D5 FC 72 16 A0 F5 00 94 96 02 2C 81 2C 01 64 01 C8 FA 6A E4 AF 51"
        self.groupBox.Add = self.txtDataBlock

        self.pnlSuppliedCRC = TextBoxPanel(self.groupBox)
        self.pnlSuppliedCRC.Caption = "Supplied CRC Value"
        self.pnlSuppliedCRC.ReadOnly = True
        self.groupBox.Add = self.pnlSuppliedCRC

        self.pnlCalculatedCRC = TextBoxPanel(self.groupBox)
        self.pnlCalculatedCRC.Caption = "Calculated CRC Value"
        self.pnlCalculatedCRC.ReadOnly = True
        self.groupBox.Add = self.pnlCalculatedCRC

        self.frameBtn = Frame(self, "HL")
        verticalLayoutDlg.addWidget(self.frameBtn)

        self.btnFile = QPushButton(self.frameBtn)
        self.btnFile.setObjectName(("btnFile"))
        self.btnFile.setText("File...")
        self.frameBtn.Add = self.btnFile

        self.btnBoxOkCancel = QDialogButtonBox(self.frameBtn)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)
        self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject)

        self.btnFile.clicked.connect(self.btnFile_clicked)

        self.frameBtn.Add = self.btnBoxOkCancel

        self.txtDataBlock.textBox.textChanged.connect(
            self.txtDataBlock_TextChanged)
    def __init__(self, parent=None):
        QDialog.__init__(self, parent)

        self.resize(290, 136)
        self.setWindowTitle("Instrument Approach Procedure (IAP)")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.groupBox = GroupBox(self)
        verticalLayoutDlg.addWidget(self.groupBox)

        self.pnlBasedOn = ComboBoxPanel(self.groupBox)
        self.pnlBasedOn.Caption = "Based On"
        self.pnlBasedOn.Button = "coordinate_capture.png"
        self.groupBox.Add = self.pnlBasedOn

        self.pnlType = ComboBoxPanel(self.groupBox)
        self.pnlType.Caption = "Type"
        self.groupBox.Add = self.pnlType

        self.txtDescription = TextBoxPanel(self.groupBox, True)
        self.txtDescription.Caption = "Description"
        self.groupBox.Add = self.txtDescription

        self.txtRemarks = TextBoxPanel(self.groupBox, True)
        self.txtRemarks.Caption = "Remarks"
        self.groupBox.Add = self.txtRemarks

        self.btnBoxOkCancel = QDialogButtonBox(self)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)
        self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject)

        self.connect(self.pnlBasedOn, SIGNAL("Event_3"),
                     self.pnlBasedOn_Event_3)

        verticalLayoutDlg.addWidget(self.btnBoxOkCancel)

        self.data = None
        self.table = None
        self.selected = None

        self.CaptureCoordTool = CaptureCoordinateToolUpdate(define._canvas)
        self.connect(self.CaptureCoordTool, SIGNAL("resultPointValueList"),
                     self.resultPointValueListMethod)
Exemple #34
0
 def __tuneCombo( comboBox ):
     " Sets the common settings for a combo box "
     sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Fixed )
     sizePolicy.setHorizontalStretch( 0 )
     sizePolicy.setVerticalStretch( 0 )
     sizePolicy.setHeightForWidth(
                         comboBox.sizePolicy().hasHeightForWidth() )
     comboBox.setSizePolicy( sizePolicy )
     comboBox.setEditable( True )
     comboBox.setInsertPolicy( QComboBox.InsertAtTop )
     comboBox.setAutoCompletion( False )
     comboBox.setDuplicatesEnabled( False )
     return
Exemple #35
0
    def __init__( self, parent = None ):
        QComboBox.__init__( self, parent )
        self.setSizeAdjustPolicy( QComboBox.AdjustToMinimumContentsLength )
        sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Fixed )
        sizePolicy.setHeightForWidth(
                self.sizePolicy().hasHeightForWidth() )
        self.setSizePolicy( sizePolicy )
        self.activated.connect( self.onActivated )

        self.view().installEventFilter( self )

        self.pathIndex = None
        return
Exemple #36
0
    def __init__( self, editorsManager, parent = None ):

        QWidget.__init__( self, parent )
        self.editorsManager = editorsManager

        self.__gotoHistory = []

        # Common graphics items
        closeButton = QToolButton( self )
        closeButton.setToolTip( "Click to close the dialog (ESC)" )
        closeButton.setIcon( PixmapCache().getIcon( "close.png" ) )
        closeButton.clicked.connect( self.hide )

        lineLabel = QLabel( self )
        lineLabel.setText( "Goto line:" )

        self.linenumberEdit = QComboBox( self )
        self.linenumberEdit.setEditable( True )
        self.linenumberEdit.setInsertPolicy( QComboBox.InsertAtTop )
        self.linenumberEdit.setAutoCompletion( False )
        self.linenumberEdit.setDuplicatesEnabled( False )
        sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Fixed )
        sizePolicy.setHorizontalStretch( 0 )
        sizePolicy.setVerticalStretch( 0 )
        sizePolicy.setHeightForWidth(
                self.linenumberEdit.sizePolicy().hasHeightForWidth() )
        self.linenumberEdit.setSizePolicy( sizePolicy )
        self.validator = QIntValidator( 1, 100000, self )
        self.linenumberEdit.setValidator( self.validator )
        self.linenumberEdit.editTextChanged.connect( self.__onEditTextChanged )
        self.linenumberEdit.lineEdit().returnPressed.connect( self.__onEnter )

        self.goButton = QToolButton( self )
        self.goButton.setToolTip( "Click to jump to the line (ENTER)" )
        self.goButton.setIcon( PixmapCache().getIcon( "gotoline.png" ) )
        self.goButton.setFocusPolicy( Qt.NoFocus )
        self.goButton.setEnabled( False )
        self.goButton.clicked.connect( self.__onGo )

        spacer = QWidget()
        spacer.setFixedWidth( 1 )

        horizontalLayout = QHBoxLayout( self )
        horizontalLayout.setMargin( 0 )

        horizontalLayout.addWidget( closeButton )
        horizontalLayout.addWidget( lineLabel )
        horizontalLayout.addWidget( self.linenumberEdit )
        horizontalLayout.addWidget( self.goButton )
        horizontalLayout.addWidget( spacer )
        return
Exemple #37
0
    def __createLayout( self ):
        """ Creates the dialog layout """

        self.resize( 450, 220 )
        self.setSizeGripEnabled( True )

        self.verticalLayout = QVBoxLayout( self )

        # Info label
        self.infoLabel = FitPathLabel( self )
        #sizePolicy = QSizePolicy( QSizePolicy.Expanding,
        #                          QSizePolicy.Preferred )
        sizePolicy = QSizePolicy( QSizePolicy.Minimum,
                                  QSizePolicy.Preferred )
        sizePolicy.setHorizontalStretch( 0 )
        sizePolicy.setVerticalStretch( 0 )
        sizePolicy.setHeightForWidth(
                    self.infoLabel.sizePolicy().hasHeightForWidth() )
        self.infoLabel.setSizePolicy( sizePolicy )
        self.verticalLayout.addWidget( self.infoLabel )

        # Progress bar
        self.progressBar = QProgressBar( self )
        self.progressBar.setValue( 0 )
        self.progressBar.setOrientation( Qt.Horizontal )
        self.verticalLayout.addWidget( self.progressBar )

        # Result window
        self.resultEdit = QTextEdit( self )
        self.resultEdit.setTabChangesFocus( False )
        self.resultEdit.setAcceptRichText( False )
        self.resultEdit.setReadOnly( True )
        self.resultEdit.setFontFamily( GlobalData().skin.baseMonoFontFace )
        font = self.resultEdit.font()

        # Calculate the vertical size
        fontMetrics = QFontMetrics( font )
        rect = fontMetrics.boundingRect( "W" )
        # 6 lines, 5 line spacings, 2 frames
        self.resultEdit.setMinimumHeight( rect.height() * 7 + 4 * 5 +
                                          self.resultEdit.frameWidth() * 2 )
        self.verticalLayout.addWidget( self.resultEdit )

        # Buttons
        self.buttonBox = QDialogButtonBox( self )
        self.buttonBox.setOrientation( Qt.Horizontal )
        self.buttonBox.setStandardButtons( QDialogButtonBox.Close )
        self.verticalLayout.addWidget( self.buttonBox )

        self.buttonBox.rejected.connect( self.__onClose )
        return
Exemple #38
0
    def __init__(self, parent, thrPos, rwyPos=None, track=None):
        QDialog.__init__(self, parent)
        self.baseTrack = track
        self.resize(290, 136)
        self.setWindowTitle("Calculate FAP")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.groupBox = GroupBox(self)
        verticalLayoutDlg.addWidget(self.groupBox)

        self.pnlThrPosition = PositionPanel(self.groupBox)
        self.pnlThrPosition.Point3d = thrPos
        self.groupBox.Add = self.pnlThrPosition
        self.pnlThrPosition.Visible = False

        self.pnlRwyEndPosition = PositionPanel(self.groupBox)
        self.pnlRwyEndPosition.Point3d = rwyPos
        self.groupBox.Add = self.pnlRwyEndPosition
        self.pnlRwyEndPosition.Visible = False

        self.pnlTrack = TrackRadialBoxPanel(self.groupBox)
        self.pnlTrack.Caption = "Track"
        if rwyPos == None:
            self.pnlTrack.Value = track
        else:
            self.pnlTrack.Value = MathHelper.getBearing(thrPos, rwyPos)
        self.pnlTrack.LabelWidth = 100
        self.groupBox.Add = self.pnlTrack

        self.pnlDist = DistanceBoxPanel(self.groupBox, DistanceUnits.M,
                                        DistanceUnits.NM)
        self.pnlDist.Caption = "Distance"
        self.pnlDist.Value = Distance(5, DistanceUnits.NM)
        self.pnlDist.LabelWidth = 100
        self.groupBox.Add = self.pnlDist

        self.btnBoxOkCancel = QDialogButtonBox(self)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)
        self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject)

        verticalLayoutDlg.addWidget(self.btnBoxOkCancel)
Exemple #39
0
def main():
    app = QtGui.QApplication(sys.argv)
    cam = Camera(None, 1)
    cam.show()
    sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
    sizePolicy.setHeightForWidth(True)
    sizePolicy.setHorizontalStretch(10)
    sizePolicy.setVerticalStretch(10)
    cam.cam.setSizePolicy(sizePolicy)
    cam.cam.resize(700, 700)
    cam.cam.updateGeometry()


    sys.exit(app.exec_())
Exemple #40
0
 def _setupUi(self):
     self.resize(483, 423)
     self.verticalLayout = QVBoxLayout(self)
     self.verticalLayout.setSpacing(0)
     self.verticalLayout.setMargin(0)
     self.horizontalLayout = QHBoxLayout()
     self.horizontalLayout.setSpacing(0)
     self.filterBar = RadioBox(self)
     sizePolicy = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.filterBar.sizePolicy().hasHeightForWidth())
     self.filterBar.setSizePolicy(sizePolicy)
     self.horizontalLayout.addWidget(self.filterBar)
     self.horizontalLayout.addItem(horizontalSpacer())
     self.reconciliationButton = QPushButton(tr("Reconciliation"))
     self.reconciliationButton.setCheckable(True)
     self.horizontalLayout.addWidget(self.reconciliationButton)
     self.verticalLayout.addLayout(self.horizontalLayout)
     self.splitterView = QSplitter()
     self.splitterView.setOrientation(Qt.Vertical)
     self.splitterView.setChildrenCollapsible(False)
     self.tableView = TableView(self)
     self.tableView.setAcceptDrops(True)
     self.tableView.setEditTriggers(QAbstractItemView.DoubleClicked|QAbstractItemView.EditKeyPressed)
     self.tableView.setDragEnabled(True)
     self.tableView.setDragDropMode(QAbstractItemView.InternalMove)
     self.tableView.setSelectionBehavior(QAbstractItemView.SelectRows)
     self.tableView.setSortingEnabled(True)
     self.tableView.horizontalHeader().setHighlightSections(False)
     self.tableView.horizontalHeader().setMinimumSectionSize(18)
     self.tableView.verticalHeader().setVisible(False)
     self.tableView.verticalHeader().setDefaultSectionSize(18)
     self.splitterView.addWidget(self.tableView)
     self.graphView = QStackedWidget(self)
     sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.graphView.sizePolicy().hasHeightForWidth())
     self.graphView.setSizePolicy(sizePolicy)
     self.graphView.setMinimumSize(0, 200)
     self.lineGraphView = LineGraphView()
     self.graphView.addWidget(self.lineGraphView)
     self.barGraphView = BarGraphView()
     self.graphView.addWidget(self.barGraphView)
     self.splitterView.addWidget(self.graphView)
     self.graphView.setCurrentIndex(1)
     self.splitterView.setStretchFactor(0, 1)
     self.splitterView.setStretchFactor(1, 0)
     self.verticalLayout.addWidget(self.splitterView)
Exemple #41
0
 def _setupUi(self):
     self.setWindowTitle(
         tr("About {}").format(
             QCoreApplication.instance().applicationName()))
     self.resize(400, 190)
     sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
     self.setSizePolicy(sizePolicy)
     self.horizontalLayout = QHBoxLayout(self)
     self.logoLabel = QLabel(self)
     self.logoLabel.setPixmap(QPixmap(':/%s_big' % self.app.LOGO_NAME))
     self.horizontalLayout.addWidget(self.logoLabel)
     self.verticalLayout = QVBoxLayout()
     self.nameLabel = QLabel(self)
     font = QFont()
     font.setWeight(75)
     font.setBold(True)
     self.nameLabel.setFont(font)
     self.nameLabel.setText(QCoreApplication.instance().applicationName())
     self.verticalLayout.addWidget(self.nameLabel)
     self.versionLabel = QLabel(self)
     self.versionLabel.setText(
         tr("Version {}").format(
             QCoreApplication.instance().applicationVersion()))
     self.verticalLayout.addWidget(self.versionLabel)
     self.label_3 = QLabel(self)
     self.verticalLayout.addWidget(self.label_3)
     self.label_3.setText(tr("Copyright Hardcoded Software 2013"))
     self.label = QLabel(self)
     font = QFont()
     font.setWeight(75)
     font.setBold(True)
     self.label.setFont(font)
     self.verticalLayout.addWidget(self.label)
     self.registeredEmailLabel = QLabel(self)
     if self.withreg:
         self.registeredEmailLabel.setText(tr("UNREGISTERED"))
     self.verticalLayout.addWidget(self.registeredEmailLabel)
     self.buttonBox = QDialogButtonBox(self)
     self.buttonBox.setOrientation(Qt.Horizontal)
     self.buttonBox.setStandardButtons(QDialogButtonBox.Ok)
     if self.withreg:
         self.registerButton = self.buttonBox.addButton(
             tr("Register"), QDialogButtonBox.ActionRole)
     self.verticalLayout.addWidget(self.buttonBox)
     self.horizontalLayout.addLayout(self.verticalLayout)
    def creatTextBrowser(self):
        # DEFININDO O TAMANHO DA FONTE
        font = QFont()
        font.setPointSize(11)

        # CRIANDO O TEXTO DE LOG
        self.TextLog = QTextEdit(self.groupBoxInfos)
        sizePolicy = QSizePolicy(QSizePolicy.Minimum,  QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.TextLog.sizePolicy().hasHeightForWidth())
        self.TextLog.setReadOnly(True)
        # self.TextLog.setEnabled(False)
        self.TextLog.setFont(font)
        self.TextLog.setSizePolicy(sizePolicy)
        self.TextLog.setMaximumSize(QSize(600, 100))
Exemple #43
0
    def __init__(self, parent=None):
        QDialog.__init__(self, parent)

        self.resize(100, 70)
        self.setWindowTitle("Template Properties")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.groupBox1 = GroupBox(self)
        self.groupBox1.Caption = ""
        verticalLayoutDlg.addWidget(self.groupBox1)

        self.pnlSpace = ComboBoxPanel(self.groupBox1)
        self.pnlSpace.Caption = "Target Space"
        self.pnlSpace.LabelWidth = 120
        self.groupBox1.Add = self.pnlSpace

        self.pnlDwg = TextBoxPanel(self.groupBox1)
        self.pnlDwg.Caption = "Drawing File"
        self.pnlDwg.LabelWidth = 120
        self.groupBox1.Add = self.pnlDwg

        self.pnlTitle = TextBoxPanel(self.groupBox1)
        self.pnlTitle.Caption = "Titlee"
        self.pnlTitle.LabelWidth = 120
        self.groupBox1.Add = self.pnlTitle

        self.btnBoxOkCancel = QDialogButtonBox(self)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        # btnOK = self.btnBoxOkCancel.button(QDialogButtonBox.Ok)
        # btnOK.setText("Create")
        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)
        self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject)

        verticalLayoutDlg.addWidget(self.btnBoxOkCancel)

        self.pnlSpace.Add(DrawingSpace.ModelSpace)
        self.pnlSpace.Add(DrawingSpace.PaperSpace)
        self.pnlSpace.SelectedIndex = 1
Exemple #44
0
    def __init__(self, parent=None):
        QDialog.__init__(self, parent)

        self.resize(290, 136)
        self.setWindowTitle("New DPN DB Entry")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.groupBox = GroupBox(self)
        self.groupBox.Caption = "Existing DB Entries"
        verticalLayoutDlg.addWidget(self.groupBox)

        self.lstItems = ListBox(self.groupBox)
        self.groupBox.Add = self.lstItems

        frame = Frame(self, "HL")
        verticalLayoutDlg.addWidget(frame)

        self.btnNewDPN = QPushButton(frame)
        self.btnNewDPN.setObjectName("btnNewDPN")
        self.btnNewDPN.setText("New DPN...")
        frame.Add = self.btnNewDPN

        self.btnNewPCP = QPushButton(frame)
        self.btnNewPCP.setObjectName("btnNewPCP")
        self.btnNewPCP.setText("New PCP...")
        frame.Add = self.btnNewPCP

        self.btnBoxOkCancel = QDialogButtonBox(frame)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)
        self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject)

        self.btnNewDPN.clicked.connect(self.btnNewDPN_Click)
        self.btnNewPCP.clicked.connect(self.btnNewPCP_Click)

        frame.Add = self.btnBoxOkCancel

        self.newTypeSelected = None
Exemple #45
0
    def __init__(self, parent=None):
        QDialog.__init__(self, parent)

        self.resize(290, 136)
        self.setWindowTitle("New PCP DB Entry")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        verticalLayoutDlg = QVBoxLayout(self)
        verticalLayoutDlg.setObjectName(("verticalLayoutDlg"))

        self.groupBox1 = GroupBox(self)
        verticalLayoutDlg.addWidget(self.groupBox1)

        self.pnlDesig = TextBoxPanel(self.groupBox1)
        self.pnlDesig.Caption = "Designator"
        self.groupBox1.Add = self.pnlDesig

        self.pnlType = TextBoxPanel(self.groupBox1)
        self.pnlType.Caption = "Type / Description"
        self.groupBox1.Add = self.pnlType

        self.pnlPosition = PositionPanel(self.groupBox1, None, None, "Degree")
        self.pnlPosition.hideframe_Altitude()
        self.pnlPosition.btnCalculater.hide()
        self.groupBox1.Add = self.pnlPosition

        self.txtRemarks = TextBoxPanel(self.groupBox1, True)
        self.txtRemarks.Caption = "Remarks"
        self.groupBox1.Add = self.txtRemarks

        self.btnBoxOkCancel = QDialogButtonBox(self)
        self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel"))
        self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel
                                               | QDialogButtonBox.Ok)
        btnOK = self.btnBoxOkCancel.button(QDialogButtonBox.Ok)
        btnOK.setText("Create")
        self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg)
        self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject)

        verticalLayoutDlg.addWidget(self.btnBoxOkCancel)

        self.data = None
        self.dbEntry = None
    def startUI(self):        
        
#        self.stackedWidget.setCurrentIndex(0)
        self.dtPicker.setAlignment(Qt.AlignHCenter)
        
    
        self.btnAdd = QPushButton(self.groupBox)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.btnAdd.sizePolicy().hasHeightForWidth())
        self.btnAdd.setSizePolicy(sizePolicy)
        self.btnAdd.setMaximumSize(QSize(22, 16777215))
        icon = QIcon()
        icon.addPixmap(QPixmap(":/icons/res/list-add.png"), QIcon.Normal, QIcon.Off)
        self.btnAdd.setIcon(icon)
        self.btnAdd.clicked.connect(self.addRow)
        
        self.btnRemove = QPushButton(self)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.btnRemove.sizePolicy().hasHeightForWidth())
        self.btnRemove.setSizePolicy(sizePolicy)
        self.btnRemove.setMaximumSize(QSize(22, 16777215))
        icon1 = QIcon()
        icon1.addPixmap(QPixmap(":/icons/res/list-remove.png"), QIcon.Normal, QIcon.Off)
        self.btnRemove.setIcon(icon1)
        self.btnRemove.clicked.connect(self.removeRow)
        
        
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.addWidget(self.dtPicker)
        self.horizontalLayout.addWidget(self.btnAdd)
        self.horizontalLayout.addWidget(self.btnRemove)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.verticalLayout.addWidget(self.tableDetails)
#        self.verticalLayout.addWidget(self.stackedWidget)
    
        self.tableDetails.setEditTriggers( QTableView.AllEditTriggers)
        self.tableNavigation.setVisible(False)
        self.txtSearch.setVisible(False)
        self.label_4.setVisible(False)
        self.groupBox.setVisible(False)
        self.setWindowModality(Qt.WindowModal)
        self.setWindowTitle("Balance Inicial")
 def _setupPreferenceWidgets(self):
     scanTypeLabels = [
         tr("Filename"),
         tr("Contents"),
         tr("Folders"),
     ]
     self._setupScanTypeBox(scanTypeLabels)
     self._setupFilterHardnessBox()
     self.widgetsVLayout.addLayout(self.filterHardnessHLayout)
     self.widget = QWidget(self)
     self.widget.setMinimumSize(QSize(0, 136))
     self.verticalLayout_4 = QVBoxLayout(self.widget)
     self._setupAddCheckbox('wordWeightingBox', tr("Word weighting"), self.widget)
     self.verticalLayout_4.addWidget(self.wordWeightingBox)
     self._setupAddCheckbox('matchSimilarBox', tr("Match similar words"), self.widget)
     self.verticalLayout_4.addWidget(self.matchSimilarBox)
     self._setupAddCheckbox('mixFileKindBox', tr("Can mix file kind"), self.widget)
     self.verticalLayout_4.addWidget(self.mixFileKindBox)
     self._setupAddCheckbox('useRegexpBox', tr("Use regular expressions when filtering"), self.widget)
     self.verticalLayout_4.addWidget(self.useRegexpBox)
     self._setupAddCheckbox('removeEmptyFoldersBox', tr("Remove empty folders on delete or move"), self.widget)
     self.verticalLayout_4.addWidget(self.removeEmptyFoldersBox)
     self.horizontalLayout_2 = QHBoxLayout()
     self._setupAddCheckbox('ignoreSmallFilesBox', tr("Ignore files smaller than"), self.widget)
     self.horizontalLayout_2.addWidget(self.ignoreSmallFilesBox)
     self.sizeThresholdEdit = QLineEdit(self.widget)
     sizePolicy = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.sizeThresholdEdit.sizePolicy().hasHeightForWidth())
     self.sizeThresholdEdit.setSizePolicy(sizePolicy)
     self.sizeThresholdEdit.setMaximumSize(QSize(50, 16777215))
     self.horizontalLayout_2.addWidget(self.sizeThresholdEdit)
     self.label_6 = QLabel(self.widget)
     self.label_6.setText(tr("KB"))
     self.horizontalLayout_2.addWidget(self.label_6)
     spacerItem1 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
     self.horizontalLayout_2.addItem(spacerItem1)
     self.verticalLayout_4.addLayout(self.horizontalLayout_2)
     self._setupAddCheckbox('ignoreHardlinkMatches', tr("Ignore duplicates hardlinking to the same file"), self.widget)
     self.verticalLayout_4.addWidget(self.ignoreHardlinkMatches)
     self._setupAddCheckbox('debugModeBox', tr("Debug mode (restart required)"), self.widget)
     self.verticalLayout_4.addWidget(self.debugModeBox)
     self.widgetsVLayout.addWidget(self.widget)
     self._setupBottomPart()
Exemple #48
0
 def __init__(self, axisModel, parent = None):
     super(AxisWidgetContainer, self).__init__(["_Axis", "_Value_", "_X(24)", "_Y(24)"], parent)
     self.axisModel = axisModel
     self.xGroup = QButtonGroup()
     self.yGroup = QButtonGroup()
     self.xGroup.buttonClicked.connect(self.showXAxisButtonClicked)
     self.yGroup.buttonClicked.connect(self.showYAxisButtonClicked)
     axis = 0
     for axis in range(axisModel.currentJoystickNumAxes()):
         self.__createTextWidgetForAxis__(axis)
     if axis > 0:
         self.graphWidget = AxisGraphWidget(self)
         self.addWidget(self.graphWidget, 3, 0, 1, 2)
     sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.scrollArea.sizePolicy().hasHeightForWidth())
     self.scrollArea.setSizePolicy(sizePolicy)
Exemple #49
0
 def _setupUi(self):
     self.setWindowTitle(tr("Account Info"))
     self.resize(274, 121)
     self.setModal(True)
     self.verticalLayout = QVBoxLayout(self)
     self.formLayout = QFormLayout()
     self.formLayout.setFieldGrowthPolicy(QFormLayout.ExpandingFieldsGrow)
     self.label = QLabel(tr("Name"))
     self.formLayout.setWidget(0, QFormLayout.LabelRole, self.label)
     self.nameEdit = QLineEdit()
     self.formLayout.setWidget(0, QFormLayout.FieldRole, self.nameEdit)
     self.label_2 = QLabel(tr("Type"))
     self.formLayout.setWidget(1, QFormLayout.LabelRole, self.label_2)
     self.typeComboBoxView = QComboBox()
     self.formLayout.setWidget(1, QFormLayout.FieldRole, self.typeComboBoxView)
     self.label_3 = QLabel(tr("Currency"))
     self.formLayout.setWidget(2, QFormLayout.LabelRole, self.label_3)
     self.currencyComboBoxView = QComboBox()
     sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.currencyComboBoxView.sizePolicy().hasHeightForWidth())
     self.currencyComboBoxView.setSizePolicy(sizePolicy)
     self.currencyComboBoxView.setEditable(True)
     self.currencyComboBoxView.setInsertPolicy(QComboBox.NoInsert)
     self.formLayout.setWidget(2, QFormLayout.FieldRole, self.currencyComboBoxView)
     self.accountNumberLabel = QLabel(tr("Account #"))
     self.formLayout.setWidget(3, QFormLayout.LabelRole, self.accountNumberLabel)
     self.accountNumberEdit = QLineEdit()
     self.accountNumberEdit.setMaximumSize(QSize(80, 16777215))
     self.formLayout.setWidget(3, QFormLayout.FieldRole, self.accountNumberEdit)
     self.notesEdit = QPlainTextEdit()
     self.formLayout.setWidget(4, QFormLayout.FieldRole, self.notesEdit)
     self.label1 = QLabel(tr("Notes:"))
     self.formLayout.setWidget(4, QFormLayout.LabelRole, self.label1)
     self.verticalLayout.addLayout(self.formLayout)
     self.buttonBox = QDialogButtonBox()
     self.buttonBox.setOrientation(Qt.Horizontal)
     self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel|QDialogButtonBox.Save)
     self.verticalLayout.addWidget(self.buttonBox)
     self.label.setBuddy(self.nameEdit)
     self.label_2.setBuddy(self.typeComboBoxView)
     self.label_3.setBuddy(self.currencyComboBoxView)
Exemple #50
0
 def _setupUi(self):
     self.setWindowTitle(tr("About {}").format(QCoreApplication.instance().applicationName()))
     self.resize(400, 190)
     sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
     self.setSizePolicy(sizePolicy)
     self.horizontalLayout = QHBoxLayout(self)
     self.logoLabel = QLabel(self)
     self.logoLabel.setPixmap(QPixmap(':/%s_big' % self.app.LOGO_NAME))
     self.horizontalLayout.addWidget(self.logoLabel)
     self.verticalLayout = QVBoxLayout()
     self.nameLabel = QLabel(self)
     font = QFont()
     font.setWeight(75)
     font.setBold(True)
     self.nameLabel.setFont(font)
     self.nameLabel.setText(QCoreApplication.instance().applicationName())
     self.verticalLayout.addWidget(self.nameLabel)
     self.versionLabel = QLabel(self)
     self.versionLabel.setText(tr("Version {}").format(QCoreApplication.instance().applicationVersion()))
     self.verticalLayout.addWidget(self.versionLabel)
     self.label_3 = QLabel(self)
     self.verticalLayout.addWidget(self.label_3)
     self.label_3.setText(tr("Copyright Hardcoded Software 2013"))
     self.label = QLabel(self)
     font = QFont()
     font.setWeight(75)
     font.setBold(True)
     self.label.setFont(font)
     self.verticalLayout.addWidget(self.label)
     self.registeredEmailLabel = QLabel(self)
     if self.withreg:
         self.registeredEmailLabel.setText(tr("UNREGISTERED"))
     self.verticalLayout.addWidget(self.registeredEmailLabel)
     self.buttonBox = QDialogButtonBox(self)
     self.buttonBox.setOrientation(Qt.Horizontal)
     self.buttonBox.setStandardButtons(QDialogButtonBox.Ok)
     if self.withreg:
         self.registerButton = self.buttonBox.addButton(tr("Register"), QDialogButtonBox.ActionRole)
     self.verticalLayout.addWidget(self.buttonBox)
     self.horizontalLayout.addLayout(self.verticalLayout)
Exemple #51
0
    def __createLayout( self, fileName, info ):
        """ Creates the dialog layout """

        self.resize( 600, 220 )
        self.setSizeGripEnabled( True )

        verticalLayout = QVBoxLayout( self )

        # Info label
        infoLabel = FitLabel( self )
        sizePolicy = QSizePolicy( QSizePolicy.Minimum, QSizePolicy.Preferred )
        sizePolicy.setHorizontalStretch( 0 )
        sizePolicy.setVerticalStretch( 0 )
        sizePolicy.setHeightForWidth(infoLabel.sizePolicy().hasHeightForWidth())
        infoLabel.setSizePolicy( sizePolicy )
        infoLabel.setText( "Lexer/parser errors for " + fileName )
        verticalLayout.addWidget( infoLabel )

        # Result window
        resultEdit = QTextEdit( self )
        resultEdit.setTabChangesFocus( False )
        resultEdit.setAcceptRichText( False )
        resultEdit.setReadOnly( True )
        resultEdit.setFontFamily( GlobalData().skin.baseMonoFontFace )
        if info is not None:
            modInfo = info
        else:
            modInfo = GlobalData().briefModinfoCache.get( fileName )
        if modInfo.isOK:
            resultEdit.setText( "No errors found" )
        else:
            resultEdit.setText( "\n".join( modInfo.lexerErrors +
                                           modInfo.errors ) )
        verticalLayout.addWidget( resultEdit )

        # Buttons
        buttonBox = QDialogButtonBox( self )
        buttonBox.setOrientation( Qt.Horizontal )
        buttonBox.setStandardButtons( QDialogButtonBox.Close )
        verticalLayout.addWidget( buttonBox )

        buttonBox.rejected.connect( self.close )
        return
    def __init__(self,parent=None):
        QWidget.__init__(self,parent)
        self.ui=uic.loadUi("Beamshutter.ui",self)
        self.control = QAxContainer.QAxWidget(self)
        self.control.setControl('{3CE35BF3-1E13-4D2C-8C0B-DEF6314420B3}')
        self.control.setProperty("HWSerialNum",85845031)
        self.control.setGeometry(0,0,600,400)
        self.mutex=QMutex(mode =QMutex.Recursive)
        self.shutterReplied=False


        self.shut=Beamshutter(self)
        self.worker=WorkerThread()

        self.ui.mainLayout.addWidget(self.control)

        self.layout().setAlignment(Qt.AlignCenter)
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        sizePolicy.setHeightForWidth(True)
        self.setSizePolicy(sizePolicy)
Exemple #53
0
    def setupUi(self):
        self.connectLayout = QHBoxLayout(self)
        self.connectLayout.setSizeConstraint(QLayout.SetDefaultConstraint)
        self.avatarLB = QLabel(self)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.avatarLB.sizePolicy().hasHeightForWidth())
        self.avatarLB.setSizePolicy(sizePolicy)
        self.avatarLB.setFixedSize(24, 24)
        self.avatarLB.hide()

        self.nameLB = QLabel(self)
        self.nameLB.setFocusPolicy(Qt.ClickFocus)
        self.nameLB.setTextFormat(Qt.RichText)
        self.nameLB.setText("<html><head/><body><p><span style=\"text-decoration: underline; color:#00557f;\">Add Connection</span></p></body></html>")

        self.setCursor(QCursor(Qt.PointingHandCursor))
        self.connectLayout.addWidget(self.avatarLB)
        self.connectLayout.addWidget(self.nameLB)
Exemple #54
0
    def _initEditor(self):
        self.ui.sqlEditor = QsciScintilla(self)
        self.ui.sqlEditor.textChanged.connect(self.setValidQuery)
        # Don't want to see the horizontal scrollbar at all
        self.ui.sqlEditor.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)

        self.ui.sqlEditor.setMarginLineNumbers(0, True)
        self.ui.sqlEditor.setMarginWidth(0, "000")
        self.ui.sqlEditor.setMarginsForegroundColor(QColor("#2468A7"))

        # Brace matching: enable for a brace immediately before or after
        # the current position.
        self.ui.sqlEditor.setBraceMatching(QsciScintilla.SloppyBraceMatch)

        # Current line visible with special background color
        self.ui.sqlEditor.setCaretLineVisible(True)
        self.ui.sqlEditor.setCaretLineBackgroundColor(QColor("#E4EEFF"))

        lexer = QsciLexerSQL()
        self.ui.sqlEditor.setLexer(lexer)

        ''' TODO autocomplete.
        api = QsciAPIs(lexer)
        api.add('aLongString')
        api.add('aLongerString')
        api.add('aDifferentString')
        api.add('sOmethingElse')
        api.prepare()

        self.ui.sqlEditor.setAutoCompletionThreshold(1)
        self.ui.sqlEditor.setAutoCompletionSource(QsciScintilla.AcsAPIs)
        '''

        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ui.sqlEditor.sizePolicy().hasHeightForWidth())
        self.ui.sqlEditor.setSizePolicy(sizePolicy)

        self.ui.splitter.setSizes([self.size().width() * 0.6, self.size().height() * 0.4])
        self.ui.leftContainer.insertWidget(1, self.ui.sqlEditor)
Exemple #55
0
    def __createLayout( self ):
        """ Creates the dialog layout """

        self.resize( 450, 150 )
        self.setSizeGripEnabled( True )

        verticalLayout = QVBoxLayout( self )

        whereGroupbox = QGroupBox( self )
        whereGroupbox.setTitle( "Garbage collector message destination" )
        sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred )
        sizePolicy.setHorizontalStretch( 0 )
        sizePolicy.setVerticalStretch( 0 )
        sizePolicy.setHeightForWidth(
                        whereGroupbox.sizePolicy().hasHeightForWidth() )
        whereGroupbox.setSizePolicy( sizePolicy )

        layoutWhere = QVBoxLayout( whereGroupbox )
        self.__silentRButton = QRadioButton( whereGroupbox )
        self.__silentRButton.setText( "Silent" )
        layoutWhere.addWidget( self.__silentRButton )
        self.__statusbarRButton = QRadioButton( whereGroupbox )
        self.__statusbarRButton.setText( "Status bar" )
        layoutWhere.addWidget( self.__statusbarRButton )
        self.__logtabRButton = QRadioButton( whereGroupbox )
        self.__logtabRButton.setText( "Log tab" )
        layoutWhere.addWidget( self.__logtabRButton )

        verticalLayout.addWidget( whereGroupbox )

        buttonBox = QDialogButtonBox( self )
        buttonBox.setOrientation( Qt.Horizontal )
        buttonBox.setStandardButtons( QDialogButtonBox.Ok |
                                      QDialogButtonBox.Cancel )
        self.__OKButton = buttonBox.button( QDialogButtonBox.Ok )
        self.__OKButton.setDefault( True )
        buttonBox.accepted.connect( self.accept )
        buttonBox.rejected.connect( self.close )
        verticalLayout.addWidget( buttonBox )
        return
 def _setupFilterHardnessBox(self):
     self.filterHardnessHLayout = QHBoxLayout()
     self.filterHardnessLabel = QLabel(self)
     self.filterHardnessLabel.setText(tr("Filter Hardness:"))
     self.filterHardnessLabel.setMinimumSize(QSize(0, 0))
     self.filterHardnessHLayout.addWidget(self.filterHardnessLabel)
     self.filterHardnessVLayout = QVBoxLayout()
     self.filterHardnessVLayout.setSpacing(0)
     self.filterHardnessHLayoutSub1 = QHBoxLayout()
     self.filterHardnessHLayoutSub1.setSpacing(12)
     self.filterHardnessSlider = QSlider(self)
     sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.filterHardnessSlider.sizePolicy().hasHeightForWidth())
     self.filterHardnessSlider.setSizePolicy(sizePolicy)
     self.filterHardnessSlider.setMinimum(1)
     self.filterHardnessSlider.setMaximum(100)
     self.filterHardnessSlider.setTracking(True)
     self.filterHardnessSlider.setOrientation(Qt.Horizontal)
     self.filterHardnessHLayoutSub1.addWidget(self.filterHardnessSlider)
     self.filterHardnessLabel = QLabel(self)
     self.filterHardnessLabel.setText("100")
     self.filterHardnessLabel.setMinimumSize(QSize(21, 0))
     self.filterHardnessHLayoutSub1.addWidget(self.filterHardnessLabel)
     self.filterHardnessVLayout.addLayout(self.filterHardnessHLayoutSub1)
     self.filterHardnessHLayoutSub2 = QHBoxLayout()
     self.filterHardnessHLayoutSub2.setContentsMargins(-1, 0, -1, -1)
     self.moreResultsLabel = QLabel(self)
     self.moreResultsLabel.setText(tr("More Results"))
     self.filterHardnessHLayoutSub2.addWidget(self.moreResultsLabel)
     spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
     self.filterHardnessHLayoutSub2.addItem(spacerItem)
     self.fewerResultsLabel = QLabel(self)
     self.fewerResultsLabel.setText(tr("Fewer Results"))
     self.filterHardnessHLayoutSub2.addWidget(self.fewerResultsLabel)
     self.filterHardnessVLayout.addLayout(self.filterHardnessHLayoutSub2)
     self.filterHardnessHLayout.addLayout(self.filterHardnessVLayout)
Exemple #57
0
    def __init__(self, char, parent=None):
        super(CharWidget, self).__init__(parent)
        self.char = char
        self.charButton = QPushButton(char.name)
        self.healthLabel = QLabel("{0}/{1}".format(self.char.hp,
                                                   self.char.max_hp))

        # Button dimensions
        button_policy = QSizePolicy(QSizePolicy.Preferred,
                                    QSizePolicy.Preferred)
        button_policy.setHeightForWidth(True)
        self.charButton.setSizePolicy(button_policy)
        # dimensions
        policy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        self.setSizePolicy(policy)

        # layout
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.addWidget(self.charButton)
        self.horizontalLayout.addWidget(self.healthLabel)
        self.setLayout(self.horizontalLayout)

        self.show()
Exemple #58
0
    def __init__(self, dice, parent=None):
        super(DiceWidget, self).__init__(parent)
        self.dice = dice

        # dimensions
        policy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        policy.setHeightForWidth(True)
        self.setSizePolicy(policy)
        self.resize(70, 70)

        # text and font
        self.font = QFont()
        self.font.setBold(True)
        self.font.setPixelSize(self.height() * 0.4)

        # set behavior
        self.setToolTip("Game Dice")
        QObject.connect(self, SIGNAL("clicked()"), self.dice_click)

        # default color/text
        self.setText("{0}\nAll".format(self.dice.num()))
        self.setStyleSheet("background-color: rgb(135, 5, 45);")

        self.show()