Exemplo n.º 1
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
Exemplo n.º 2
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
    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)
Exemplo n.º 4
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
    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)
Exemplo n.º 6
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
Exemplo n.º 7
0
 def __init__(self, filtertable, fname=None, query=None):
     super(QDialog, self).__init__(filtertable)
     self.filtertable = filtertable
     self.setupUi(self)
     self.editable = False
     self.defaultquery = None
     self.fname = None
     sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
     sizePolicy.setHorizontalStretch(1)
     sizePolicy.setVerticalStretch(1)
     self.setSizePolicy(sizePolicy)
     self.requestLayout.setSpacing(6)
     self.requestLayout.setSizeConstraint(QLayout.SetMinimumSize)
     self.requestLayout.setMargin(0)
     self.__splitter = QSplitter(Qt.Vertical)
     self.__splitter.setHandleWidth(12)
     self.requestLayout.addWidget(self.__splitter)
     self.__query = QTextEdit()
     self.__query.setReadOnly(True)
     if (fname == None) and (query == None):
         self.editable = True
         self.filterRequest = FilterRequests(self)
         self.connect(self.filterRequest, SIGNAL("queryUpdated"),
                      self.updateQuery)
         self.__splitter.addWidget(self.filterRequest)
         self.__splitter.addWidget(self.__query)
         self.__splitter.setStretchFactor(0, 80)
         self.__splitter.setStretchFactor(1, 20)
     else:
         self.defaultquery = query
         self.fname = fname
Exemplo n.º 8
0
 def __init__(self, parent):
     # initialize the super class
     super(XViewPanel,self).__init__( parent )
     
     # create custom properties
     self._locked = False
     
     # set the size policy for this widget to always maximize space
     sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
     sizePolicy.setHorizontalStretch(1)
     sizePolicy.setVerticalStretch(1)
     
     self.setSizePolicy(sizePolicy)
     self.setTabsClosable(True)
     self.setMovable(True)
     self.setAcceptDrops(True)
     
     # update the tab bar
     self.tabBar().installEventFilter(self)
     self.tabBar().setAcceptDrops(True)
     
     # create connections
     self.tabCloseRequested.connect( self.closeView )
     self.addRequested.connect( self.showAddMenu )
     self.currentChanged.connect( self.markCurrentChanged )
     self.optionsRequested.connect( self.showOptionsMenu )
     
     self.tabBar().customContextMenuRequested.connect( self.showTabMenu )
Exemplo n.º 9
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)
    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]
Exemplo n.º 11
0
 def __init__(self, app, debug=False):
     super(MainWindow, self).__init__()
     # Tab management private attributes, modify at own risk
     self.__tabMoved = False
     self.__tabAreaInformation = (-1, -1, [])
     self.__tabConnections = set()
     self.app = app
     self.debug = debug
     self.sched = scheduler.sched
     self.vfs = vfs.vfs()
     self.createRootNodes()
     self.dialog = Dialog(self)
     self.initCallback()
     self.setupUi(self)
     self.translation()
     self.setWindowModality(QtCore.Qt.ApplicationModal)
     self.resize(
         QtCore.QSize(QtCore.QRect(0, 0, 1014, 693).size()).expandedTo(
             self.minimumSizeHint()))
     self.shellActions = ShellActions(self)
     self.interpreterActions = InterpreterActions(self)
     self.setCentralWidget(None)
     self.setDockNestingEnabled(True)
     self.init()
     self.status = QStackedWidget()
     sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
     sizePolicy.setHorizontalStretch(1)
     sizePolicy.setVerticalStretch(1)
     self.status.setSizePolicy(sizePolicy)
     self.statusBar().addWidget(self.status)
Exemplo n.º 12
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
Exemplo n.º 13
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
Exemplo n.º 14
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)
Exemplo n.º 15
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
Exemplo n.º 16
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)
Exemplo n.º 18
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
Exemplo n.º 19
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)
Exemplo n.º 20
0
    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)
Exemplo n.º 21
0
 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)
Exemplo n.º 22
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
Exemplo n.º 23
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]))
Exemplo n.º 24
0
    def __changePlotWidget(self):
        """
        When plot widget is change (qwt <-> matplotlib)
        """
        self.__activateMouseTracking(False)
        while self.__frameLayout.count():
            child = self.__frameLayout.takeAt(0)
            child.widget().deleteLater()
        self.__plotWdg = None

        if self.__lib == 'Qwt5':
            self.__plotWdg = QwtPlot(self.__plotFrame)
            sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
            sizePolicy.setHorizontalStretch(10)
            sizePolicy.setVerticalStretch(0)
            self.__plotWdg.setSizePolicy(sizePolicy)
            self.__plotWdg.setAutoFillBackground(False)
            # Decoration
            self.__plotWdg.setCanvasBackground(Qt.white)
            self.__plotWdg.plotLayout().setAlignCanvasToScales(False)
            self.__plotWdg.plotLayout().setSpacing(100)
            self.__plotWdg.plotLayout().setCanvasMargin(10, QwtPlot.xBottom)
            self.__plotWdg.plotLayout().setCanvasMargin(10, QwtPlot.yLeft)
            title = QwtText(QCoreApplication.translate("VDLTools", "Distance [m]"))
            title.setFont(QFont("Helvetica", 10))
            self.__plotWdg.setAxisTitle(QwtPlot.xBottom, title)
            title.setText(QCoreApplication.translate("VDLTools", "Elevation [m]"))
            title.setFont(QFont("Helvetica", 10))
            self.__plotWdg.setAxisTitle(QwtPlot.yLeft, title)
            self.__zoomer = QwtPlotZoomer(QwtPlot.xBottom, QwtPlot.yLeft, QwtPicker.DragSelection, QwtPicker.AlwaysOff,
                                          self.__plotWdg.canvas())
            self.__zoomer.setRubberBandPen(QPen(Qt.blue))
            grid = QwtPlotGrid()
            grid.setPen(QPen(QColor('grey'), 0, Qt.DotLine))
            grid.attach(self.__plotWdg)
            self.__frameLayout.addWidget(self.__plotWdg)

        elif self.__lib == 'Matplotlib':
            # __plotWdg.figure : matplotlib.figure.Figure
            fig = Figure((1.0, 1.0), linewidth=0.0, subplotpars=SubplotParams(left=0, bottom=0, right=1, top=1,
                                                                              wspace=0, hspace=0))

            font = {'family': 'arial', 'weight': 'normal', 'size': 12}
            rc('font', **font)

            rect = fig.patch
            rect.set_facecolor((0.9, 0.9, 0.9))

            self.__axes = fig.add_axes((0.07, 0.16, 0.92, 0.82))
            self.__axes.set_xbound(0, 1000)
            self.__axes.set_ybound(0, 1000)
            self.__manageMatplotlibAxe(self.__axes)
            self.__plotWdg = FigureCanvasQTAgg(fig)
            sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
            sizePolicy.setHorizontalStretch(0)
            sizePolicy.setVerticalStretch(0)
            self.__plotWdg.setSizePolicy(sizePolicy)
            self.__frameLayout.addWidget(self.__plotWdg)
    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)
Exemplo n.º 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)
Exemplo n.º 27
0
    def __changePlotWidget(self):
        """
        When plot widget is change (qwt <-> matplotlib)
        """
        self.__activateMouseTracking(False)
        while self.__frameLayout.count():
            child = self.__frameLayout.takeAt(0)
            child.widget().deleteLater()
        self.__plotWdg = None

        if self.__lib == 'Qwt5':
            self.__plotWdg = QwtPlot(self.__plotFrame)
            sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
            sizePolicy.setHorizontalStretch(10)
            sizePolicy.setVerticalStretch(0)
            self.__plotWdg.setSizePolicy(sizePolicy)
            self.__plotWdg.setAutoFillBackground(False)
            # Decoration
            self.__plotWdg.setCanvasBackground(Qt.white)
            self.__plotWdg.plotLayout().setAlignCanvasToScales(False)
            self.__plotWdg.plotLayout().setSpacing(100)
            self.__plotWdg.plotLayout().setCanvasMargin(10, QwtPlot.xBottom)
            self.__plotWdg.plotLayout().setCanvasMargin(10, QwtPlot.yLeft)
            title = QwtText(QCoreApplication.translate("VDLTools", "Distance [m]"))
            title.setFont(QFont("Helvetica", 10))
            self.__plotWdg.setAxisTitle(QwtPlot.xBottom, title)
            title.setText(QCoreApplication.translate("VDLTools", "Elevation [m]"))
            title.setFont(QFont("Helvetica", 10))
            self.__plotWdg.setAxisTitle(QwtPlot.yLeft, title)
            self.__zoomer = QwtPlotZoomer(QwtPlot.xBottom, QwtPlot.yLeft, QwtPicker.DragSelection, QwtPicker.AlwaysOff,
                                          self.__plotWdg.canvas())
            self.__zoomer.setRubberBandPen(QPen(Qt.blue))
            grid = QwtPlotGrid()
            grid.setPen(QPen(QColor('grey'), 0, Qt.DotLine))
            grid.attach(self.__plotWdg)
            self.__frameLayout.addWidget(self.__plotWdg)

        elif self.__lib == 'Matplotlib':
            fig = Figure((1.0, 1.0), linewidth=0.0, subplotpars=SubplotParams(left=0, bottom=0, right=1, top=1,
                                                                              wspace=0, hspace=0))

            font = {'family': 'arial', 'weight': 'normal', 'size': 12}
            rc('font', **font)

            rect = fig.patch
            rect.set_facecolor((0.9, 0.9, 0.9))

            self.__axes = fig.add_axes((0.07, 0.16, 0.92, 0.82))
            self.__axes.set_xbound(0, 1000)
            self.__axes.set_ybound(0, 1000)
            self.__manageMatplotlibAxe(self.__axes)
            self.__plotWdg = FigureCanvasQTAgg(fig)
            sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
            sizePolicy.setHorizontalStretch(0)
            sizePolicy.setVerticalStretch(0)
            self.__plotWdg.setSizePolicy(sizePolicy)
            self.__frameLayout.addWidget(self.__plotWdg)
Exemplo n.º 28
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()
Exemplo n.º 29
0
 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)
Exemplo n.º 30
0
 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)
Exemplo n.º 31
0
 def __init__(self, parent, model):
     super(QLabel, self).__init__(parent)
     self.__model = model
     self.setTextInteractionFlags(Qt.LinksAccessibleByMouse
                                  | Qt.TextSelectableByMouse)
     self.connect(self.__model, SIGNAL("updateStatus"), self.updateLabel)
     sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     self.setSizePolicy(sizePolicy)
     self.setTextFormat(Qt.RichText)
Exemplo n.º 32
0
 def __init__(self, parent=None):
   QLabel.__init__(self, parent)
   self.setTextInteractionFlags(Qt.LinksAccessibleByMouse|Qt.TextSelectableByMouse)
   self.setAlignment(Qt.AlignLeft)
   sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
   sizePolicy.setHorizontalStretch(0)
   sizePolicy.setVerticalStretch(0)
   self.setSizePolicy(sizePolicy)
   self.setTextFormat(Qt.RichText)
   self.__node = VFS.Get().GetNode("/")
   self.connect(self, SIGNAL("linkActivated(QString)"), self.goto)
Exemplo n.º 33
0
    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
Exemplo n.º 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
    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)
Exemplo n.º 36
0
    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)
Exemplo n.º 37
0
 def __init__(self, parent=None):
     super(QWidget, self).__init__(parent)
     sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
     sizePolicy.setHorizontalStretch(1)
     sizePolicy.setVerticalStretch(1)
     self.setSizePolicy(sizePolicy)
     self.__hlayout = QHBoxLayout(self)
     self.__hlayout.setSpacing(6)
     self.__hlayout.setSizeConstraint(QLayout.SetMinimumSize)
     self.__hlayout.setMargin(0)
     self.__splitter = QSplitter(Qt.Horizontal, parent)
     self.__splitter.setHandleWidth(12)
     self.__hlayout.addWidget(self.__splitter)
Exemplo n.º 38
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
Exemplo n.º 39
0
 def __init__(self, parent=None):
     super(QWidget, self).__init__(parent)
     sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
     sizePolicy.setHorizontalStretch(1)
     sizePolicy.setVerticalStretch(0)
     self.setSizePolicy(sizePolicy)
     self.__hlayout = QHBoxLayout(self)
     self.__hlayout.setSpacing(6)
     self.__hlayout.setSizeConstraint(QLayout.SetMinimumSize)
     self.__hlayout.setMargin(0)
     self.__hlayout.setAlignment(Qt.AlignLeft)
     self.__labels = []
     self.__model = None
Exemplo n.º 40
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
Exemplo n.º 41
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
Exemplo n.º 42
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)
    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))
Exemplo n.º 44
0
    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")
Exemplo n.º 45
0
 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()
Exemplo n.º 46
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)
Exemplo n.º 47
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
Exemplo n.º 48
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)
Exemplo n.º 49
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)
Exemplo n.º 50
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)
Exemplo n.º 51
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)
Exemplo n.º 52
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
Exemplo n.º 53
0
 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)
Exemplo n.º 54
0
 def set_size(self):
     """
     Sets the size and size policy of the tables.
     :return:
     :rtype:
     """
     size_policy = QSizePolicy(
         QSizePolicy.Fixed, QSizePolicy.Fixed
     )
     size_policy.setHorizontalStretch(0)
     size_policy.setVerticalStretch(0)
     size_policy.setHeightForWidth(
         self.sizePolicy().hasHeightForWidth()
     )
     self.setSizePolicy(size_policy)
     self.setMinimumSize(QSize(55, 75))
     self.setMaximumSize(QSize(5550, 5555))
     self.SelectionMode(
         QAbstractItemView.SelectColumns
     )
     # set column width to fit contents
     self.frozen_table_view.resizeColumnsToContents()
     # set row height
     self.frozen_table_view.resizeRowsToContents()
Exemplo n.º 55
0
    def __init__(self, parent = None, config=None):
        """
        Constructor
        """
        QFrame.__init__(self, parent)
        self.layout = QHBoxLayout()
        self.setLayout(self.layout)
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(1)
        self.layout.setStretch(1,1)
        self.setAutoFillBackground(False)
        #self.setStyleSheet("    background-color: #0000FF;\n}")
        
        #sizePolicy.setHeightForWidth(self.ucTime.sizePolicy().hasHeightForWidth())
        pal = self.palette();
        br = QBrush(Qt.NoBrush)
        pal.setBrush(QPalette.Background, br);
        self.setPalette(pal);

        self.setSizePolicy(sizePolicy)

        self.clock = AnalogClock(self)
        self.addWidget(self.clock)
Exemplo n.º 56
0
 def _setupUi(self):
     self.setWindowTitle(tr("Details"))
     self.resize(502, 295)
     self.setMinimumSize(QSize(250, 250))
     self.verticalLayout = QVBoxLayout(self)
     self.verticalLayout.setSpacing(0)
     self.verticalLayout.setMargin(0)
     self.horizontalLayout = QHBoxLayout()
     self.horizontalLayout.setSpacing(4)
     self.selectedImage = QLabel(self)
     sizePolicy = QSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.selectedImage.sizePolicy().hasHeightForWidth())
     self.selectedImage.setSizePolicy(sizePolicy)
     self.selectedImage.setScaledContents(False)
     self.selectedImage.setAlignment(Qt.AlignCenter)
     self.horizontalLayout.addWidget(self.selectedImage)
     self.referenceImage = QLabel(self)
     sizePolicy = QSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.referenceImage.sizePolicy().hasHeightForWidth())
     self.referenceImage.setSizePolicy(sizePolicy)
     self.referenceImage.setAlignment(Qt.AlignCenter)
     self.horizontalLayout.addWidget(self.referenceImage)
     self.verticalLayout.addLayout(self.horizontalLayout)
     self.tableView = DetailsTable(self)
     sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.tableView.sizePolicy().hasHeightForWidth())
     self.tableView.setSizePolicy(sizePolicy)
     self.tableView.setMinimumSize(QSize(0, 188))
     self.tableView.setMaximumSize(QSize(16777215, 190))
     self.tableView.setAlternatingRowColors(True)
     self.tableView.setSelectionBehavior(QAbstractItemView.SelectRows)
     self.tableView.setShowGrid(False)
     self.verticalLayout.addWidget(self.tableView)
Exemplo n.º 57
0
    def setupUi (self, Form):
        
        font = QFont ()
        font.setPointSize (9)
        font.setBold (False)
        font.setWeight (50)
        
        sizePolicy = QSizePolicy (QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch (0)
        sizePolicy.setVerticalStretch (0)
        
        Form.setObjectName (_fromUtf8("Form"))
        Form.resize (971, 930)
        self.plainTextEdit = QPlainTextEdit (Form)
        self.plainTextEdit.setGeometry (QRect (740, 280, 221, 611))
        self.plainTextEdit.setObjectName (_fromUtf8 ("plainTextEdit"))
        self.plainTextEdit.setFont (font)
        
        self.widget = OGLViewer (Form)
        self.widget.setUi_Form (self)
        self.widget.setGeometry (QRect (10, 10, 720, 450))
        sizePolicy.setHeightForWidth (self.widget.sizePolicy().hasHeightForWidth())
        self.widget.setSizePolicy (sizePolicy)
        self.widget.setObjectName (_fromUtf8 ("widget"))
        
        self.wireOGLViewerUp ()
        self.wireEngineUp ()
        
        self.label_view = QLabel (Form)
        self.label_view.setGeometry  (QRect (10, 470, 720, 450))
        sizePolicy.setHeightForWidth (self.label_view.sizePolicy().hasHeightForWidth())
        self.label_view.setSizePolicy (sizePolicy)
        self.label_view.setObjectName (_fromUtf8 ("label_view"))
        self.initLabel ()          
        self.pixmap_item = self.label_view.setPixmap (QPixmap.fromImage (self.image))
        
        # buttons definitions
        
        self.renderBtn    = QPushButton (Form)
        self.pauseBtn     = QPushButton (Form)
        self.stopBtn      = QPushButton (Form)
        self.upBtn        = QPushButton (Form)
        self.downBtn      = QPushButton (Form)
        self.moreDownBtn  = QPushButton (Form)
        self.moreUpBtn    = QPushButton (Form)
        self.rightBtn     = QPushButton (Form)
        self.moreRightBtn = QPushButton (Form)
        self.leftBtn      = QPushButton (Form)
        self.furtherLeft  = QPushButton (Form)
        self.grid_switch  = QPushButton (Form)
        
        buttons_properties_list = [[self.renderBtn,    True,  QRect (740, 140, 61, 21), "render"],
                                   [self.pauseBtn,     False, QRect (740, 120, 61, 21), "pause"],
                                   [self.stopBtn,      False, QRect (740, 100, 61, 21), "stop"],
                                   [self.upBtn,        False, QRect (820, 120, 21, 21), "one_row_up"],
                                   [self.downBtn,      False, QRect (820, 140, 21, 21), "one_row_down"],
                                   [self.moreDownBtn,  False, QRect (820, 160, 21, 21), "ten_rows_down"],
                                   [self.moreUpBtn,    False, QRect (820, 100, 21, 21), "ten_rows_up"],
                                   [self.rightBtn,     False, QRect (780, 180, 21, 21), "one_column_right"],
                                   [self.moreRightBtn, False, QRect (800, 180, 21, 21), "ten_columns_right"],
                                   [self.leftBtn,      False, QRect (760, 180, 21, 21), "one_column_left"],
                                   [self.furtherLeft,  False, QRect (740, 180, 21, 21), "ten_columns_left"],
                                   [self.grid_switch,  False, QRect (870, 230, 91, 31), "grid_switch"]]
        
        for button in buttons_properties_list:
            button[0].setEnabled  (button[1])
            button[0].setGeometry (button[2])
            button[0].setFont (font)
            button[0].setObjectName (_fromUtf8 (button[3]))
        
        # other UI elements
        
        self.progressBar = QProgressBar (Form)
        self.progressBar.setGeometry (QRect (740, 901, 221, 20))
        self.progressBar.setProperty ("value", 0)
        self.progressBar.setObjectName (_fromUtf8("progressBar"))
        self.progressBar.setMinimum (0)
        self.progressBar.setMaximum (100)
        
        self.slider_label = QLabel (Form)
        self.slider_label.setGeometry (QRect(900, 260, 61, 16))
        self.slider_label.setFont(font)
        self.slider_label.setObjectName (_fromUtf8("slider_label"))
        self.slider_label.setEnabled (True)
        
        self.arrowSizeSlider = QSlider (Form)
        self.arrowSizeSlider.setGeometry (QRect (740, 258, 151, 22))
        self.arrowSizeSlider.setMinimum (2)
        self.arrowSizeSlider.setMaximum (40)
        self.arrowSizeSlider.setSingleStep (1)
        self.arrowSizeSlider.setProperty ("value", 4)
        self.arrowSizeSlider.setOrientation (Qt.Horizontal)
        self.arrowSizeSlider.setObjectName  (_fromUtf8("arrowSizeSlider"))

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