Ejemplo n.º 1
0
 def __init__(self, parent, sensorgroup):
     QWizardPage.__init__(self, parent)
     self.setTitle(QCoreApplication.translate('DataStorageBrowser', 'Adjust chart properties'))
     self.mainLayout = QVBoxLayout()
     self.setLayout(self.mainLayout)
     self.propertyWidget = None
     self.sensorgroup = sensorgroup
Ejemplo n.º 2
0
 def __init__(self, model, ui, parent=None):
     QWizardPage.__init__(self, parent)
     self.ui = ui
     self.model = model
     # this one is a little difference since it has background work logic
     self.workerThread = QThread()
     self.workerThread.start()
     self.driver = SimpleDriver()
     self.driver.moveToThread(self.workerThread)
     self.isDone = False
     QObject.connect(
             self,
             QtCore.SIGNAL("startProcessing"),
             self.driver.process,
             Qt.QueuedConnection)
     QObject.connect(
             self.driver,
             QtCore.SIGNAL("progress"),
             self.updateProgress,
             Qt.QueuedConnection)
     QObject.connect(
             self.driver,
             QtCore.SIGNAL("done"),
             self.workerDone,
             Qt.QueuedConnection)
Ejemplo n.º 3
0
        def __init__(self, parent):
            QWizardPage.__init__(self)
            self.parent = parent

            self.setLayout(QGridLayout())
            self.setTitle('Components')
            self.setSubTitle('Please select components which will be extracted to your destination folder.')

            self.status_label = QLabel()
            self.layout().addWidget(self.status_label, 1, 0)

            self.components_list = QListWidget()
            self.progress = QProgressBar()
            self.layout().addWidget(self.progress, 2, 0, 1, 4)
            self.layout().addWidget(self.components_list, 3, 0, 1, 4)

            addcomponent_button = QPushButton(u'Add component')
            addcomponent_button.setEnabled(False)
            self.layout().addWidget(addcomponent_button, 4, 0)

            self.is_done = False

            self.addComponentItem.connect(self.addListItem)
            self.setProgress.connect(self.progress.setValue)

            self.components_list.itemChanged.connect(self.completeChanged.emit)
            self.components_list.itemClicked.connect(self.completeChanged.emit)

            self.registerField('components', self, 'getComponents', self.components_list.itemClicked)
Ejemplo n.º 4
0
  def __init__( self, wizard, title, fields ):

    ## construct a new QWizardPage
    QWizardPage.__init__( self, wizard )
    self.wizard = wizard

    ## this will store widgets created from fields
    self.widgets = {}

    self.setTitle( title )

    layout = QGridLayout( self )
    self.setLayout( layout )

    ## create and add widget for each field at this page
    ## for each field we add a label with it's name and the widget 
    ## describing the field
    ## @sa Field
    i = 0
    for field in fields:
      item = Field( self, field.name, field.value, field.extra )
      self.widgets[field.name] = item
      self.widgets[field.name].id = i

      if not callable( field.value ):
        label = QLabel( field.name.replace( '_', ' ' ) )
        layout.addWidget( label, i , 0 )

      layout.addWidget( self.widgets[field.name].widget, i, 1 )
      i+=1
Ejemplo n.º 5
0
    def __init__(self, locator):
        QWizardPage.__init__(self)
        # service locator
        self.locator = locator
        # grid
        grid = QGridLayout(self)
        grid.addWidget(QLabel('Ocr Data Folder:'), 0, 0)
        self.txtOcrLangFolder = QLineEdit()
        grid.addWidget(self.txtOcrLangFolder, 0, 1)
        self.registerField('ocrLangFolder*', self.txtOcrLangFolder)
        self.btnExamineOcrFolder = QPushButton(self.tr("Browse..."))
        grid.addWidget(self.btnExamineOcrFolder, 0, 2)

        grid.addWidget(QLabel('Log Folder:'), 1, 0)
        self.txtLogFolder = QLineEdit()
        grid.addWidget(self.txtLogFolder, 1, 1)
        self.registerField('txtLogFolder*', self.txtLogFolder)
        self.btnExamineLogFolder = QPushButton(self.tr("Browse..."))
        grid.addWidget(self.btnExamineLogFolder, 1, 2)

        grid.addWidget(QLabel('Author(s):'), 2, 0)
        self.txtAuthors = QLineEdit()
        grid.addWidget(self.txtAuthors, 2, 1)
        self.registerField('txtAuthors', self.txtAuthors)

        grid.addWidget(QLabel('Website:'), 3, 0)
        self.txtUrl = QLineEdit()
        grid.addWidget(self.txtUrl, 3, 1)

        self.connect(self.btnExamineOcrFolder, SIGNAL('clicked()'),
                     self.load_ocrLangFolder)
        self.connect(self.btnExamineLogFolder, SIGNAL('clicked()'),
                     self.load_LogFolder)
Ejemplo n.º 6
0
    def __init__(self, field='check', parent=None):
        QWizardPage.__init__(self, parent)

        self.check = QCheckBox()
        self.check.setVisible(False)
        self.registerField(field + '*', self.check)
        self.check.setChecked(False)
Ejemplo n.º 7
0
    def __init__(self, locator):
        QWizardPage.__init__(self)
        # service locator
        self.locator = locator
        # grid
        grid = QGridLayout(self)
        grid.addWidget(QLabel('Ocr Data Folder:'), 0, 0)
        self.txtOcrLangFolder = QLineEdit()
        grid.addWidget(self.txtOcrLangFolder, 0, 1)
        self.registerField('ocrLangFolder*', self.txtOcrLangFolder)
        self.btnExamineOcrFolder = QPushButton(self.tr("Browse..."))
        grid.addWidget(self.btnExamineOcrFolder, 0, 2)

        grid.addWidget(QLabel('Log Folder:'), 1, 0)
        self.txtLogFolder = QLineEdit()
        grid.addWidget(self.txtLogFolder, 1, 1)
        self.registerField('txtLogFolder*', self.txtLogFolder)
        self.btnExamineLogFolder = QPushButton(self.tr("Browse..."))
        grid.addWidget(self.btnExamineLogFolder, 1, 2)

        grid.addWidget(QLabel('Author(s):'), 2, 0)
        self.txtAuthors = QLineEdit()
        grid.addWidget(self.txtAuthors, 2, 1)
        self.registerField('txtAuthors', self.txtAuthors)

        grid.addWidget(QLabel('Website:'), 3, 0)
        self.txtUrl = QLineEdit()
        grid.addWidget(self.txtUrl, 3, 1)

        self.connect(self.btnExamineOcrFolder, SIGNAL('clicked()'), self.load_ocrLangFolder)
        self.connect(self.btnExamineLogFolder, SIGNAL('clicked()'), self.load_LogFolder)
Ejemplo n.º 8
0
    def __init__(self, parent=None):
        QWizardPage.__init__(self, parent)
        self.parent = parent
        self.setTitle(self.tr("Add dumps"))

        label = QLabel(
            self.
            tr("What do you want to analyse? "
               "The first step is to choose some dumps for analysis. "
               "You could load a local file, a dump or choose to mount connected devices"
               ))
        label.setWordWrap(True)
        layout = QGridLayout()
        layout.addWidget(label, 0, 0)

        groupBox = QGroupBox(self.tr("Dumps"))
        self.localFilesRadioButton = QRadioButton(self.tr("Add a local file"))
        self.deviceRadioButton = QRadioButton(self.tr("Add a device"))
        self.localFilesRadioButton.setChecked(True)
        groupBoxLayout = QVBoxLayout()
        groupBoxLayout.addWidget(self.localFilesRadioButton)
        groupBoxLayout.addWidget(self.deviceRadioButton)
        groupBox.setLayout(groupBoxLayout)
        layout.addWidget(groupBox, 1, 0)
        self.setLayout(layout)
Ejemplo n.º 9
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.setTitle(self.TITLE)
     self.setSubTitle(self.SUBTITLE)
     self.ui = self.UI_CLASS()
     self.ui.setupUi(self)
     for name, widget_name in self.FIELDS.iteritems():
         self.registerField(name, resolve_obj_name(self.ui, widget_name))
Ejemplo n.º 10
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.setTitle(self.TITLE)
     self.setSubTitle(self.SUBTITLE)
     self.ui = self.UI_CLASS()
     self.ui.setupUi(self)
     for name, widget_name in self.FIELDS.iteritems():
         self.registerField(name, resolve_obj_name(self.ui, widget_name))
Ejemplo n.º 11
0
    def __init__(self, data, ip_version=4, parent=None):
        QWizardPage.__init__(self, parent)

        self.__editing_default_state = _strdefault(unicode(data[DESTINATION]))

        self.qnetobject = QNetObject.getInstance()
        self.buildGui()
        self.fillView(data)
Ejemplo n.º 12
0
    def __init__(self, editor, parent=None):
        QWizardPage.__init__(self, parent)

        self.editor = editor

        self.setTitle(tr("Network Editor"))
        self.setSubTitle(tr("Set network parameters below"))
        box = QVBoxLayout(self)
        box.addWidget(self.editor)
Ejemplo n.º 13
0
    def __init__(self):
        QWizardPage.__init__(self)
        self.setTitle('New Project Data')
        self.setSubTitle(
            'Complete the following fields to create the Project Structure')

        g_box = QGridLayout(self)
        #Names of the blanks to complete
        self.lbl_Name = QLabel('New Project Name:')
        self.lbl_Place = QLabel('Project Location:')
        self.lbl_Folder = QLabel('Projet Folder:')
        self.lbl_Description = QLabel('Project Description:')
        self.lbl_License = QLabel('Project License:')
        g_box.addWidget(self.lbl_Name, 0, 0, Qt.AlignRight)
        g_box.addWidget(self.lbl_Place, 1, 0, Qt.AlignRight)
        g_box.addWidget(self.lbl_Folder, 2, 0, Qt.AlignRight)
        g_box.addWidget(self.lbl_Description, 3, 0, Qt.AlignTop)
        g_box.addWidget(self.lbl_License, 4, 0, Qt.AlignRight)

        #Blanks on de right of the grid
        self.txtName = QLineEdit()
        self.registerField('projectName*', self.txtName)
        #Here comes a LineEdit and a PushButton in a HBoxLayout
        h_Place = QHBoxLayout()
        self.txtPlace = QLineEdit()
        self.txtPlace.setReadOnly(True)
        self.registerField('place*', self.txtPlace)
        self.btnExamine = QPushButton('Examine...')
        h_Place.addWidget(self.txtPlace)
        h_Place.addWidget(self.btnExamine)
        #Now lets continue with the rest
        self.txtFolder = QLineEdit()
        self.txtDescription = QPlainTextEdit()
        self.cboLicense = QComboBox()
        self.cboLicense.setFixedWidth(250)
        self.cboLicense.addItem('Apache License 2.0')
        self.cboLicense.addItem('Artistic License/GPL')
        self.cboLicense.addItem('Eclipse Public License 1.0')
        self.cboLicense.addItem('GNU General Public License v2')
        self.cboLicense.addItem('GNU General Public License v3')
        self.cboLicense.addItem('GNU Lesser General Public License')
        self.cboLicense.addItem('MIT License')
        self.cboLicense.addItem('Mozilla Public License 1.1')
        self.cboLicense.addItem('New BSD License')
        self.cboLicense.addItem('Other Open Source')
        self.cboLicense.addItem('Other')
        self.cboLicense.setCurrentIndex(4)
        g_box.addWidget(self.txtName, 0, 1)
        g_box.addLayout(h_Place, 1, 1)
        g_box.addWidget(self.txtFolder, 2, 1)
        g_box.addWidget(self.txtDescription, 3, 1)
        g_box.addWidget(self.cboLicense, 4, 1)

        #Signal
        self.connect(self.btnExamine, SIGNAL('clicked()'), self.load_folder)
Ejemplo n.º 14
0
    def __init__(self, editor, parent=None):
        QWizardPage.__init__(self, parent)

        self.vlan_editor = editor
        self.buildGUI()

        for item in (
            self.vlan_editor.vlan_id,
            self.vlan_editor.name
            ):
            self.connect(item, SIGNAL('textChanged(QString)'), self._completeChanged)
Ejemplo n.º 15
0
    def __init__(self, iface, parent=None):
        QWizardPage.__init__(self, parent)
        self.setTitle("Introduction")
#        self.setPixmap(QWizard.WatermarkPixmap, QPixmap(":/images/watermark1.png"))

        label = QLabel(self.tr("This wizard will configure a network for your interface <b>%s</b>.",  iface.user_label))
        label.setWordWrap(True)

        layout = QVBoxLayout()
        layout.addWidget(label)
        self.setLayout(layout)
Ejemplo n.º 16
0
    def __init__(self, q_netobject, parent=None):
        QWizardPage.__init__(self, parent)
        self.q_netobject = q_netobject

        self.setTitle(self.tr("Bonding interface configuration"))
        self.setSubTitle(self.tr("Please select the ethernet interfaces to aggregate"))
        box = QVBoxLayout(self)
        self.frame = BondingEditor()
        box.addWidget(self.frame)
        self.registerField('user label', self.frame.user_label)
        self.registerField('selected', self.frame.selected)
Ejemplo n.º 17
0
    def __init__(self):
        QWizardPage.__init__(self)
        self.setTitle('New Project Data')
        self.setSubTitle('Complete the following fields to create the Project Structure')

        g_box = QGridLayout(self)
        #Names of the blanks to complete
        self.lbl_Name = QLabel('New Project Name:')
        self.lbl_Place = QLabel('Project Location:')
        self.lbl_Folder = QLabel('Projet Folder:')
        self.lbl_Description = QLabel('Project Description:')
        self.lbl_License = QLabel('Project License:')
        g_box.addWidget(self.lbl_Name, 0, 0,Qt.AlignRight)
        g_box.addWidget(self.lbl_Place, 1, 0,Qt.AlignRight)
        g_box.addWidget(self.lbl_Folder, 2, 0,Qt.AlignRight)
        g_box.addWidget(self.lbl_Description, 3, 0,Qt.AlignTop)
        g_box.addWidget(self.lbl_License, 4, 0,Qt.AlignRight)

        #Blanks on de right of the grid
        self.txtName = QLineEdit()
        self.registerField('projectName*', self.txtName)
        #Here comes a LineEdit and a PushButton in a HBoxLayout
        h_Place = QHBoxLayout()
        self.txtPlace = QLineEdit()
        self.txtPlace.setReadOnly(True)
        self.registerField('place*', self.txtPlace)
        self.btnExamine = QPushButton('Examine...')
        h_Place.addWidget(self.txtPlace)
        h_Place.addWidget(self.btnExamine)
        #Now lets continue with the rest
        self.txtFolder = QLineEdit()
        self.txtDescription = QPlainTextEdit()
        self.cboLicense = QComboBox()
        self.cboLicense.setFixedWidth(250)
        self.cboLicense.addItem('Apache License 2.0')
        self.cboLicense.addItem('Artistic License/GPL')
        self.cboLicense.addItem('Eclipse Public License 1.0')
        self.cboLicense.addItem('GNU General Public License v2')
        self.cboLicense.addItem('GNU General Public License v3')
        self.cboLicense.addItem('GNU Lesser General Public License')
        self.cboLicense.addItem('MIT License')
        self.cboLicense.addItem('Mozilla Public License 1.1')
        self.cboLicense.addItem('New BSD License')
        self.cboLicense.addItem('Other Open Source')
        self.cboLicense.addItem('Other')
        self.cboLicense.setCurrentIndex(4)
        g_box.addWidget(self.txtName, 0,1)
        g_box.addLayout(h_Place, 1, 1)
        g_box.addWidget(self.txtFolder, 2,1)
        g_box.addWidget(self.txtDescription, 3,1)
        g_box.addWidget(self.cboLicense, 4,1)

        #Signal
        self.connect(self.btnExamine, SIGNAL('clicked()'), self.load_folder)
Ejemplo n.º 18
0
 def __init__(self, parent=None):
     QWizardPage.__init__(self, parent)
     self.parent = parent
     self.setTitle(self.tr("Modules"))
     label = QLabel(
         self.tr("Choose modules that will be automatically applied."))
     label.setWordWrap(True)
     layout = QVBoxLayout()
     layout.addWidget(label)
     self.widget = PostProcessConfigWidget()
     layout.addWidget(self.widget)
     self.setLayout(layout)
Ejemplo n.º 19
0
    def __init__(self, parent=None):
        QWizardPage.__init__(self, parent)
        self.setTitle("Network name and IP Version")
#        self.setPixmap(QWizard.WatermarkPixmap, QPixmap(":/images/watermark1.png"))

        layout = QFormLayout()

        self.net_label = QLineEdit()
        layout.addRow("Network name", self.net_label)

        self.choice = IPVersionInput()
        layout.addRow("Protocol version", self.choice)

        self.setLayout(layout)
Ejemplo n.º 20
0
    def __init__(self, ip_version_page, parent=None):
        QWizardPage.__init__(self, parent)
        self.setTitle("Network specification")
#        self.setPixmap(QWizard.WatermarkPixmap, QPixmap(":/images/watermark1.png"))

        label = QLabel("Please enter network definition below")
        self.ip_mask = AddressAndMaskInput(4)
        self.ip_mask.prefix.setValue(24)
        self.connect(ip_version_page.choice, SIGNAL('ip_version_changed'), self.ip_mask.setVersion)
        layout = QFormLayout()
        layout.addRow(label)
        layout.addRow("Base address / prefix", self.ip_mask)
        self.msg = QLabel("")
        layout.addRow(self.msg)
        self.setLayout(layout)
Ejemplo n.º 21
0
    def __init__(self, wizard):
        QWizardPage.__init__(self)
        self.setTitle(self.tr("Project Type"))
        self.setSubTitle(self.tr("Choose the Project Type"))
        self._wizard = wizard

        vbox = QVBoxLayout(self)
        self.listWidget = QListWidget()
        vbox.addWidget(self.listWidget)
        types = settings.get_all_project_types()
        types.sort()
        index = types.index('Python')
        types.insert(0, types.pop(index))
        self.listWidget.addItems(types)
        self.listWidget.setCurrentRow(0)
Ejemplo n.º 22
0
    def __init__(self, wizard):
        QWizardPage.__init__(self)
        self.setTitle('Project Type')
        self.setSubTitle('Choose the Project Type')
        self._wizard = wizard
        vbox = QVBoxLayout(self)
        self.listWidget = QListWidget()
        vbox.addWidget(self.listWidget)
        types = self._wizard.types.keys()
        types.sort()
        self.listWidget.addItems(types)
        index = types.index('Python')
        self.listWidget.setCurrentRow(index)

        self.connect(self.listWidget, SIGNAL("itemSelectionChanged()"), self.item_changed)
Ejemplo n.º 23
0
    def __init__(self, wizard):
        QWizardPage.__init__(self)
        self.setTitle('Project Type')
        self.setSubTitle('Choose the Project Type')
        self._wizard = wizard
        vbox = QVBoxLayout(self)
        self.listWidget = QListWidget()
        vbox.addWidget(self.listWidget)
        types = self._wizard.types.keys()
        types.sort()
        self.listWidget.addItems(types)
        index = types.index('Python')
        self.listWidget.setCurrentRow(index)

        self.connect(self.listWidget, SIGNAL("itemSelectionChanged()"), self.item_changed)
Ejemplo n.º 24
0
 def __init__(self, parent=None):
     QWizardPage.__init__(self, parent)
     self.parent = parent
     self.setTitle(self.tr("Finish"))
     label = QLabel(
         self.
         tr("The wizard is finished and all your choice will be applied when clicking the 'finish' button. "
            "You can also click previous to check and change your options. "
            "Once clicked, a Scanner tab will be created to show you the overall progression of the analysis. At the end the analysis some results will be poped-up and some will be automatically added to the report. "
            "Think to look at the taskmanager and start browsing if you want."
            ))
     label.setWordWrap(True)
     layout = QVBoxLayout()
     layout.addWidget(label)
     self.setLayout(layout)
Ejemplo n.º 25
0
 def __init__(self, parent=None):
     QWizardPage.__init__(self, parent)
     self.parent = parent
     self.setTitle(self.tr("Analyse"))
     label = QLabel(
         self.
         tr("You can choose some analyzis tasks which will autoconfigure modules to automaticallty apply during processing."
            ))
     label.setWordWrap(True)
     layout = QVBoxLayout()
     layout.addWidget(label)
     self.widget = PostProcessAnalyseWidget(
     )  #XXX asks to auto-fill from analyse !
     layout.addWidget(self.widget)
     self.setLayout(layout)
Ejemplo n.º 26
0
    def __init__(self, wizard):
        QWizardPage.__init__(self)
        self.setTitle(self.tr("Project Type"))
        self.setSubTitle(self.tr("Choose the Project Type"))
        self._wizard = wizard

        vbox = QVBoxLayout(self)
        self.listWidget = QListWidget()
        vbox.addWidget(self.listWidget)
        types = settings.get_all_project_types()
        types.sort()
        index = types.index('Python')
        types.insert(0, types.pop(index))
        self.listWidget.addItems(types)
        self.listWidget.setCurrentRow(0)
Ejemplo n.º 27
0
    def __init__(self, locator):
        QWizardPage.__init__(self)
        # service locator
        self.locator = locator
        # grid
        grid = QGridLayout(self)
        grid.addWidget(QLabel('Main Module:'), 0, 0)
        self.txtModule = QLineEdit()
        grid.addWidget(self.txtModule, 0, 1)
        self.registerField('moduleName*', self.txtModule)

        grid.addWidget(QLabel('Class name:'), 1, 0)
        self.txtClass = QLineEdit()
        grid.addWidget(self.txtClass, 1, 1)
        self.registerField('txtClass*', self.txtClass)

        grid.addWidget(QLabel('Author(s):'), 2, 0)
        self.txtAuthors = QLineEdit()
        grid.addWidget(self.txtAuthors, 2, 1)
        self.registerField('txtAuthors*', self.txtAuthors)

        grid.addWidget(QLabel('Url:'), 3, 0)
        self.txtUrl = QLineEdit()
        grid.addWidget(self.txtUrl, 3, 1)

        grid.addWidget(QLabel('Version:'), 4, 0)
        self.txtVersion = QLineEdit("0.1")
        grid.addWidget(self.txtVersion, 4, 1)

        # Plugin services
        grid.addWidget(QLabel('Services:'), 5, 0)

        self.checkEditorS = QCheckBox('Editor')
        grid.addWidget(self.checkEditorS, 6, 0)

        self.checkToolbarS = QCheckBox('Toolbar')
        grid.addWidget(self.checkToolbarS, 6, 1)

        self.checkMenuPluginS = QCheckBox('Menu Plugin')
        grid.addWidget(self.checkMenuPluginS, 6, 2)

        self.checkMiscS = QCheckBox('Misc Container')
        grid.addWidget(self.checkMiscS, 7, 0)

        self.checkExplorerS = QCheckBox('Explorer')
        grid.addWidget(self.checkExplorerS, 7, 1)
Ejemplo n.º 28
0
    def __init__(self, wizard):
        QWizardPage.__init__(self)
        self.setTitle(self.tr("Project Type"))
        self.setSubTitle(self.tr("Choose the Project Type"))
        self._wizard = wizard

        vbox = QVBoxLayout(self)
        self.listWidget = QListWidget()
        vbox.addWidget(self.listWidget)
        types = settings.get_all_project_types()
        types.sort()
        index = types.index("Python")
        types.insert(0, types.pop(index))
        self.listWidget.addItems(types)
        self.listWidget.setCurrentRow(0)

        self.connect(self.listWidget, SIGNAL("itemClicked(QListWidgetItem *)"), self.load_pages)
Ejemplo n.º 29
0
    def __init__(self, locator):
        QWizardPage.__init__(self)
        # service locator
        self.locator = locator
        # grid
        grid = QGridLayout(self)
        grid.addWidget(QLabel('Main Module:'), 0, 0)
        self.txtModule = QLineEdit()
        grid.addWidget(self.txtModule, 0, 1)
        self.registerField('moduleName*', self.txtModule)

        grid.addWidget(QLabel('Class name:'), 1, 0)
        self.txtClass = QLineEdit()
        grid.addWidget(self.txtClass, 1, 1)
        self.registerField('txtClass*', self.txtClass)

        grid.addWidget(QLabel('Author(s):'), 2, 0)
        self.txtAuthors = QLineEdit()
        grid.addWidget(self.txtAuthors, 2, 1)
        self.registerField('txtAuthors*', self.txtAuthors)

        grid.addWidget(QLabel('Url:'), 3, 0)
        self.txtUrl = QLineEdit()
        grid.addWidget(self.txtUrl, 3, 1)

        grid.addWidget(QLabel('Version:'), 4, 0)
        self.txtVersion = QLineEdit("0.1")
        grid.addWidget(self.txtVersion, 4, 1)

        # Plugin services
        grid.addWidget(QLabel('Services:'), 5, 0)

        self.checkEditorS = QCheckBox('Editor')
        grid.addWidget(self.checkEditorS, 6, 0)

        self.checkToolbarS = QCheckBox('Toolbar')
        grid.addWidget(self.checkToolbarS, 6, 1)

        self.checkMenuPluginS = QCheckBox('Menu Plugin')
        grid.addWidget(self.checkMenuPluginS, 6, 2)

        self.checkMiscS = QCheckBox('Misc Container')
        grid.addWidget(self.checkMiscS, 7, 0)

        self.checkExplorerS = QCheckBox('Explorer')
        grid.addWidget(self.checkExplorerS, 7, 1)
Ejemplo n.º 30
0
        def __init__(self, parent):
            QWizardPage.__init__(self)
            self.parent = parent

            self.setLayout(QGridLayout())
            self.setTitle('Uninstallation')
            self.setSubTitle('All selected components will be removed.')

            self.layout().addWidget(QLabel(u'Uninstallation progress'), 0, 0)
            self.progress = QProgressBar()
            self.progress.setMaximum(0)
            self.layout().addWidget(self.progress, 1, 0, 1, 2)

            self.log = QTextBrowser()
            self.layout().addWidget(self.log, 2, 0, 1, 2)

            self.setProgress.connect(self.progress.setValue)
            self.message.connect(self.log.append)
            self.is_done = False
Ejemplo n.º 31
0
    def __init__(self, iface, parent=None):
        QWizardPage.__init__(self, parent)

        self.setTitle(tr("Edit interface parameters"))
        self.setSubTitle(tr("Interface name"))

        self.q_netobject = QNetObject.getInstance()

        layout = QVBoxLayout(self)
        if isinstance(iface, Vlan):
            self.editor = VlanEditor(vlan=iface)
            self.setPixmap(QWizard.LogoPixmap, QPixmap(":/icons/vlan"))
        elif isinstance(iface, Bonding):
            self.editor = BondingEditor(bonding=iface)
        elif isinstance(iface, Ethernet):
            self.editor = EthernetEditor(iface)
        self.validatePage = self.editor.accept
        layout.addWidget(self.editor)

        self.connect(self.editor, SIGNAL("modified"), self.resendModified)
Ejemplo n.º 32
0
 def __init__(self, parent, sensorgroup):
     QWizardPage.__init__(self, parent)
     self.setTitle(QCoreApplication.translate('DataStorageBrowser', 'Select type/template of chart'))
     self.setFinalPage(True)
     self.sensorgroup = sensorgroup
     self.mainLayout = QVBoxLayout()
     self.setLayout(self.mainLayout)
     layout0 = QHBoxLayout()
     self.templateSelect = QListWidget(self)
     self.templateSelect.setSelectionMode(QAbstractItemView.SingleSelection)
     layout0.addWidget(self.templateSelect)
     self.templatePreview = QLabel(self)
     self.templatePreview.setScaledContents(True)
     self.templatePreview.setMinimumSize(200, 200)
     self.templatePreview.setMaximumSize(200, 200)
     self.templatePreview.setFrameStyle(QFrame.Panel|QFrame.Sunken)
     layout0.addWidget(self.templatePreview)
     self.mainLayout.addLayout(layout0)
     self.templateInfo = QTextEdit(self)
     self.templateInfo.setReadOnly(True)
     self.templateInfo.setMinimumSize(400, 80)
     self.mainLayout.addWidget(self.templateInfo)
     layout1 = QHBoxLayout()
     nameLabel = QLabel(self)
     nameLabel.setText(QCoreApplication.translate('DataStorageBrowser', 'Chart name:'))
     layout1.addWidget(nameLabel)
     self.nameInput = QLineEdit(self)
     layout1.addWidget(self.nameInput)
     self.mainLayout.addLayout(layout1)
     openChartButton = QCheckBox(self)
     openChartButton.setChecked(True)
     openChartButton.setText(QCoreApplication.translate('DataStorageBrowser', 'Open chart window after creation'))
     self.mainLayout.addWidget(openChartButton)
     for t in chartTemplates:
         self.templateSelect.addItem(t.name)
     self.registerField('templateNumber', self.templateSelect, 'currentRow')
     self.registerField('chartName', self.nameInput, 'text')
     self.registerField('openChart', openChartButton, 'checked')
     self.ownPlugIn = SimuVis4.Globals.plugInManager['DataStorageBrowser']
     self.connect(self.templateSelect, SIGNAL("currentRowChanged(int)"), self.templateChanged)
     self.templateSelect.setCurrentRow(0)
Ejemplo n.º 33
0
        def __init__(self, parent):
            QWizardPage.__init__(self)
            self.parent = parent

            self.setLayout(QGridLayout())
            self.setTitle('Options')
            self.setSubTitle('Please select destination folder and folder which contains downloaded files.')

            self.path = PathPanel(default=self.parent.options.install_path)
            self.layout().addWidget(QLabel('Installation path:'), 1, 0)
            self.layout().addWidget(self.path, 1, 1)

            self.distrib_path = PathPanel(default=self.parent.options.distrib_path)
            self.layout().addWidget(QLabel('Downloaded files:'), 2, 0)
            self.layout().addWidget(self.distrib_path, 2, 1)

            self.registerField('path', self.path, 'getPath', self.path.path_input.textChanged)
            self.registerField('distrib_path', self.distrib_path, 'getPath', self.distrib_path.path_input.textChanged)

            self.path.updated.connect(self.changed)
            self.distrib_path.updated.connect(self.changed)
Ejemplo n.º 34
0
        def __init__(self, parent):
            QWizardPage.__init__(self)
            self.parent = parent

            self.setLayout(QGridLayout())
            self.setTitle('Components')
            self.setSubTitle('This page cant handle manually installed components')

            self.components_list = QListWidget()
            self.progress = QProgressBar()
            self.layout().addWidget(self.progress, 2, 0, 1, 4)
            self.layout().addWidget(self.components_list, 3, 0, 1, 4)

            self.setProgress.connect(self.progress.setValue)

            self.is_done = False

            self.addComponentItem.connect(self.addListItem)
            self.setProgress.connect(self.progress.setValue)

            self.components_list.itemChanged.connect(self.completeChanged.emit)
            self.components_list.itemClicked.connect(self.completeChanged.emit)
Ejemplo n.º 35
0
    def __init__(self, parent, project):
        QWizardPage.__init__(self, parent)
        self.setTitle(QCoreApplication.translate('DataStorageBrowser',
            'Select name, title and data type'))
        self.project = project
        self.mainLayout = QGridLayout()
        self.setLayout(self.mainLayout)

        nameLabel = QLabel(self)
        nameLabel.setText(QCoreApplication.translate('DataStorageBrowser', 'Name'))
        self.mainLayout.addWidget(nameLabel, 0, 0)
        self.nameInput = QLineEdit(self)
        self.nameInput.setText(uniqueName('unnamed', project.keys()))
        self.registerField('name', self.nameInput, 'text')
        self.mainLayout.addWidget(self.nameInput, 0, 1)

        titleLabel = QLabel(self)
        titleLabel.setText(QCoreApplication.translate('DataStorageBrowser', 'Title'))
        self.mainLayout.addWidget(titleLabel, 1, 0)
        self.titleInput = QLineEdit(self)
        self.titleInput.setText('...')
        self.registerField('title', self.titleInput, 'text')
        self.mainLayout.addWidget(self.titleInput, 1, 1)

        typeLabel = QLabel(self)
        typeLabel.setText(QCoreApplication.translate('DataStorageBrowser', 'Data type'))
        self.mainLayout.addWidget(typeLabel, 2, 0)
        self.typeSelect = QComboBox(self)
        self.typeSelect.addItem('CSV')
        self.typeSelect.addItem('Remus')
        self.registerField('type', self.typeSelect, 'currentText')
        self.mainLayout.addWidget(self.typeSelect, 2, 1)

        self.importFilesButton = QCheckBox(self)
        self.importFilesButton.setChecked(True)
        self.importFilesButton.setText(QCoreApplication.translate('DataStorageBrowser',
            'Import files after creation'))
        self.registerField('importFiles', self.importFilesButton, 'checked')
        self.mainLayout.addWidget(self.importFilesButton, 3, 0, 3, 2)
Ejemplo n.º 36
0
 def __init__(self, parent=None):
     QWizardPage.__init__(self, parent)
     self.parent = parent
     self.setTitle(self.tr("Processing mode"))
     label = QLabel(
         self.
         tr("You can choose between a fully automated mode, and semi-automatic mode. "
            "Full mode means all compatible modules will be applied without prompting you. "
            "Semi-auto mode means that for each applied module and for each scan you will be asked to continue or to cancel. "
            "If you don't know what to choose, select Full-automatic"))
     label.setWordWrap(True)
     layout = QGridLayout()
     layout.addWidget(label, 0, 0)
     groupBox = QGroupBox("Mode")
     self.fullBoxRadioButton = QRadioButton("F&ull Auto")
     self.semiBoxRadioButton = QRadioButton("S&emi Auto")
     self.fullBoxRadioButton.setChecked(True)
     groupBoxLayout = QVBoxLayout()
     groupBoxLayout.addWidget(self.fullBoxRadioButton)
     groupBoxLayout.addWidget(self.semiBoxRadioButton)
     groupBox.setLayout(groupBoxLayout)
     layout.addWidget(groupBox, 1, 0)
     self.setLayout(layout)
Ejemplo n.º 37
0
    def __init__(self, parent):
        QWizardPage.__init__(self, parent)
        layout = QFormLayout(self)

        config = QHAObject.getInstance().hacfg

        self.setTitle(tr("High Availability Configuration"))

        self.ha_type = QComboBox() # primary / secondary
        self.ha_type.addItem(tr('Disabled'), QVariant(ENOHA))
        self.ha_type.addItem(tr('Primary'), QVariant(PENDING_PRIMARY))
        self.ha_type.addItem(tr('Secondary'), QVariant(PENDING_SECONDARY))
        index = self.ha_type.findData(QVariant(config.ha_type))
        self.ha_type.setCurrentIndex(index)

        layout.addRow(tr('Status of this cluster member:'), self.ha_type)
        self.registerField('type', self.ha_type)

        self.interface = InterfaceChoice(self.selectInterface, self)
        self.label_interface = QLabel(tr('Interface'))
        layout.addRow(self.label_interface, self.interface)
        self.registerField('interface', self.interface)

        self.connect(self.ha_type, SIGNAL('currentIndexChanged(int)'), self.toggleType)
        self.toggleType(index)

        if config.ha_type != ENOHA:
            message = tr("'%s' already configured as '%s'.") % (config.interface_id,
                config.ha_type)
            message += '<br />'
            message += tr("The configuration for this interface will be cleared.")

            warning_message = MessageArea()
            warning_message.setMessage(tr("Warning"), message,
                status=MessageArea.WARNING)
            layout.addRow(warning_message)
Ejemplo n.º 38
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.fullfilled = False
Ejemplo n.º 39
0
    def __init__(self, parent, project):
        QWizardPage.__init__(self, parent)
        self.setTitle(QCoreApplication.translate('DataStorageBrowser',
            'Select data import properties'))
        self.project = project
        self.mainLayout = QGridLayout()
        self.setLayout(self.mainLayout)

        tsLabel = QLabel(self)
        tsLabel.setText(QCoreApplication.translate('DataStorageBrowser', 'Time step'))
        self.mainLayout.addWidget(tsLabel, 0, 0)
        self.tsInput = QSpinBox(self)
        self.tsInput.setSuffix(' s')
        self.tsInput.setSpecialValueText('---')
        self.tsInput.setMinimum(0)
        self.tsInput.setMaximum(86400)
        self.tsInput.setValue(0)
        self.registerField('timestep', self.tsInput, 'value')
        self.mainLayout.addWidget(self.tsInput, 0, 1)

        tzLabel = QLabel(self)
        tzLabel.setText(QCoreApplication.translate('DataStorageBrowser', 'Time zone'))
        self.mainLayout.addWidget(tzLabel, 1, 0)
        self.tzInput = QSpinBox(self)
        self.tzInput.setMinimum(0)
        self.tzInput.setMaximum(23)
        self.tzInput.setSuffix(' h')
        self.tzInput.setValue(0)
        self.registerField('timezone', self.tzInput, 'value')
        self.mainLayout.addWidget(self.tzInput, 1, 1)

        tfLabel = QLabel(self)
        tfLabel.setText(QCoreApplication.translate('DataStorageBrowser', 'Time format'))
        self.mainLayout.addWidget(tfLabel, 2, 0)
        self.tfInput = QLineEdit(self)
        self.tfInput.setText('')
        self.registerField('timeformat', self.tfInput, 'text')
        self.mainLayout.addWidget(self.tfInput, 2, 1)

        self.delimLabel = QLabel(self)
        self.delimLabel.setText(QCoreApplication.translate('DataStorageBrowser',
            'CSV separator'))
        self.mainLayout.addWidget(self.delimLabel, 3, 0)
        self.delimInput = QLineEdit(self)
        self.delimInput.setMaxLength(1)
        self.delimInput.setText(';')
        self.registerField('delim', self.delimInput, 'text')
        self.mainLayout.addWidget(self.delimInput, 3, 1)

        self.tcolLabel = QLabel(self)
        self.tcolLabel.setText(QCoreApplication.translate('DataStorageBrowser',
            'CSV time column'))
        self.mainLayout.addWidget(self.tcolLabel, 4, 0)
        self.tcolInput = QSpinBox(self)
        self.tcolInput.setMinimum(1)
        self.tcolInput.setMaximum(500)
        self.tcolInput.setValue(2)
        self.registerField('timecol', self.tcolInput, 'value')
        self.mainLayout.addWidget(self.tcolInput, 4, 1)

        self.extraLabel = QLabel(self)
        self.extraLabel.setText(QCoreApplication.translate('DataStorageBrowser',
            'CSV extra headers'))
        self.mainLayout.addWidget(self.extraLabel, 5, 0)
        self.extraInput = QLineEdit(self)
        self.extraInput.setMaxLength(200)
        self.extraInput.setText('Device;Unit;SensorType')
        self.registerField('extra_headers', self.extraInput, 'text')
        self.mainLayout.addWidget(self.extraInput, 5, 1)
Ejemplo n.º 40
0
    def __init__(self):
        QWizardPage.__init__(self)
        self.setTitle(self.tr("New Project Data"))
        self.setSubTitle(self.tr(
            "Complete the following fields to create the Project Structure"))

        gbox = QGridLayout(self)
        #Names of the fields to complete
        self.lblName = QLabel(self.tr("New Project Name (*):"))
        self.lblPlace = QLabel(self.tr("Project Location (*):"))
        self.lblDescription = QLabel(self.tr("Project Description:"))
        self.lblLicense = QLabel(self.tr("Project License:"))
        self.lblVenvFolder = QLabel(self.tr("Virtualenv Folder:"))
        gbox.addWidget(self.lblName, 0, 0, Qt.AlignRight)
        gbox.addWidget(self.lblPlace, 1, 0, Qt.AlignRight)
        gbox.addWidget(self.lblDescription, 2, 0, Qt.AlignTop)
        gbox.addWidget(self.lblLicense, 3, 0, Qt.AlignRight)
        gbox.addWidget(self.lblVenvFolder, 4, 0, Qt.AlignRight)

        #Fields on de right of the grid
        #Name
        self.txtName = QLineEdit()
        #Location
        hPlace = QHBoxLayout()
        self.txtPlace = QLineEdit()
        self.txtPlace.setReadOnly(True)
        self.btnExamine = QPushButton(self.tr("Examine..."))
        hPlace.addWidget(self.txtPlace)
        hPlace.addWidget(self.btnExamine)
        #Virtualenv
        vPlace = QHBoxLayout()
        self.vtxtPlace = QLineEdit()
        self.vtxtPlace.setReadOnly(True)
        self.vbtnExamine = QPushButton(self.tr("Examine..."))
        vPlace.addWidget(self.vtxtPlace)
        vPlace.addWidget(self.vbtnExamine)
        #Project Description
        self.txtDescription = QPlainTextEdit()
        #Project License
        self.cboLicense = QComboBox()
        self.cboLicense.setFixedWidth(250)
        self.cboLicense.addItem('Apache License 2.0')
        self.cboLicense.addItem('Artistic License/GPL')
        self.cboLicense.addItem('Eclipse Public License 1.0')
        self.cboLicense.addItem('GNU General Public License v2')
        self.cboLicense.addItem('GNU General Public License v3')
        self.cboLicense.addItem('GNU Lesser General Public License')
        self.cboLicense.addItem('MIT License')
        self.cboLicense.addItem('Mozilla Public License 1.1')
        self.cboLicense.addItem('New BSD License')
        self.cboLicense.addItem('Other Open Source')
        self.cboLicense.addItem('Other')
        self.cboLicense.setCurrentIndex(4)
        #Add to Grid
        gbox.addWidget(self.txtName, 0, 1)
        gbox.addLayout(hPlace, 1, 1)
        gbox.addWidget(self.txtDescription, 2, 1)
        gbox.addWidget(self.cboLicense, 3, 1)
        gbox.addLayout(vPlace, 4, 1)
        #Signal
        self.connect(self.btnExamine, SIGNAL('clicked()'), self.load_folder)
        self.connect(self.vbtnExamine, SIGNAL('clicked()'),
            self.load_folder_venv)
        self.connect(self.txtName, SIGNAL('textChanged(const QString&)'),
            lambda: self.emit(SIGNAL("completeChanged()")))
Ejemplo n.º 41
0
 def __init__(self, ifaces_list, parent=None):
     QWizardPage.__init__(self, parent)
     self.setTitle("Network interface configuration")
Ejemplo n.º 42
0
    def __init__(self):
        QWizardPage.__init__(self)
        self.setTitle(self.tr("New Project Data"))
        self.setSubTitle(self.tr(
            "Complete the following fields to create the Project Structure"))

        gbox = QGridLayout(self)
        #Names of the fields to complete
        self.lblName = QLabel(self.tr("New Project Name (*):"))
        self.lblPlace = QLabel(self.tr("Project Location (*):"))
        self.lblDescription = QLabel(self.tr("Project Description:"))
        self.lblLicense = QLabel(self.tr("Project License:"))
        self.lblVenvFolder = QLabel(self.tr("Virtualenv Folder:"))
        gbox.addWidget(self.lblName, 0, 0, Qt.AlignRight)
        gbox.addWidget(self.lblPlace, 1, 0, Qt.AlignRight)
        gbox.addWidget(self.lblDescription, 2, 0, Qt.AlignTop)
        gbox.addWidget(self.lblLicense, 3, 0, Qt.AlignRight)
        gbox.addWidget(self.lblVenvFolder, 4, 0, Qt.AlignRight)

        #Fields on de right of the grid
        #Name
        self.txtName = QLineEdit()
        #Location
        hPlace = QHBoxLayout()
        self.txtPlace = QLineEdit()
        self.txtPlace.setReadOnly(True)
        self.btnExamine = QPushButton(self.tr("Browse..."))
        hPlace.addWidget(self.txtPlace)
        hPlace.addWidget(self.btnExamine)
        #Virtualenv
        vPlace = QHBoxLayout()
        self.vtxtPlace = QLineEdit()
        self._dir_completer = QCompleter()
        self._dir_completer.setModel(QDirModel(self._dir_completer))
        self.vtxtPlace.setCompleter(self._dir_completer)
        self.vbtnExamine = QPushButton(self.tr("Browse..."))
        vPlace.addWidget(self.vtxtPlace)
        vPlace.addWidget(self.vbtnExamine)
        #Project Description
        self.txtDescription = QPlainTextEdit()
        #Project License
        self.cboLicense = QComboBox()
        self.cboLicense.setFixedWidth(250)
        self.cboLicense.addItem('Apache License 2.0')
        self.cboLicense.addItem('Artistic License/GPL')
        self.cboLicense.addItem('Eclipse Public License 1.0')
        self.cboLicense.addItem('GNU General Public License v2')
        self.cboLicense.addItem('GNU General Public License v3')
        self.cboLicense.addItem('GNU Lesser General Public License')
        self.cboLicense.addItem('MIT License')
        self.cboLicense.addItem('Mozilla Public License 1.1')
        self.cboLicense.addItem('Mozilla Public License 2.0')
        self.cboLicense.addItem('New BSD License')
        self.cboLicense.addItem('Other Open Source')
        self.cboLicense.addItem('Other')
        self.cboLicense.setCurrentIndex(4)
        #Add to Grid
        gbox.addWidget(self.txtName, 0, 1)
        gbox.addLayout(hPlace, 1, 1)
        gbox.addWidget(self.txtDescription, 2, 1)
        gbox.addWidget(self.cboLicense, 3, 1)
        gbox.addLayout(vPlace, 4, 1)
        #Signal
        self.connect(self.btnExamine, SIGNAL('clicked()'), self.load_folder)
        self.connect(self.vbtnExamine, SIGNAL('clicked()'),
            self.load_folder_venv)
        self.connect(self.txtName, SIGNAL('textChanged(const QString&)'),
            lambda: self.emit(SIGNAL("completeChanged()")))
Ejemplo n.º 43
0
 def __init__(self):
     """ Constructor. """
     
     QWizardPage.__init__(self)
     self.errorHandler = None
Ejemplo n.º 44
0
    def __init__(self):
        """ Constructor. """

        QWizardPage.__init__(self)
        self.errorHandler = None