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
Пример #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)
Пример #3
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)
Пример #4
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)
Пример #5
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
Пример #6
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)
Пример #7
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)
Пример #8
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)
Пример #9
0
    def runConfigWizard(self):
        try:
            api = InstagramAPI(
                client_id=self.options_string['hidden_client_id'],
                client_secret=self.options_string['hidden_client_secret'],
                redirect_uri=self.options_string['redirect_uri'])
            url = api.get_authorize_login_url()

            self.wizard.setWindowTitle('Instagram plugin configuration wizard')
            page1 = QWizardPage()
            layout1 = QVBoxLayout()
            txtArea = QLabel()
            txtArea.setText(
                'Please copy the following link to your browser window. \n ' +
                'Once you authenticate with Instagram you will be redirected to '
                +
                'www.geocreepy.com and get your token. Copy the token to the input field below:'
            )
            urlArea = QLineEdit()
            urlArea.setObjectName('urlArea')
            urlArea.setText(url)
            inputLink = QLineEdit()
            inputLink.setObjectName('inputLink')
            labelLink = QLabel('Your token value:')
            openInBrowserButton = QPushButton('Open in browser')
            openInBrowserButton.clicked.connect(
                functools.partial(self.openLinkInBrowser, url))
            layout1.addWidget(txtArea)
            layout1.addWidget(urlArea)
            layout1.addWidget(openInBrowserButton)
            layout1.addWidget(labelLink)
            layout1.addWidget(inputLink)
            page1.setLayout(layout1)
            self.wizard.addPage(page1)
            self.wizard.resize(600, 400)
            if self.wizard.exec_():
                c = str(inputLink.text())
                if c:
                    try:
                        access_token = api.exchange_code_for_access_token(
                            code=c)
                        self.options_string[
                            'hidden_access_token'] = access_token[0]
                        self.saveConfiguration(self.config)
                    except Exception, err:
                        logger.error(err)
                        self.showWarning(
                            'Error Getting Access Token',
                            'Please verify that the link you pasted was correct. '
                            'Try running the wizard again.')
                else:
                    self.showWarning(
                        'Error Getting Access Token',
                        'Please verify that the link you pasted was correct. Try running the wizard again.'
                    )

        except Exception, err:
            logger.error(err)
            self.showWarning('Error', 'Error was {0}'.format(err))
Пример #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))
Пример #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)
Пример #12
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))
Пример #13
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)
Пример #14
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)
Пример #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)
Пример #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)
Пример #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)
Пример #18
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)
Пример #19
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)
Пример #20
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)
Пример #21
0
    def introPage(self):
        intro = QWizardPage()

        intro.setTitle('Hello and welcome')
        label = QLabel('''This is a wizard.
Now you're ready to forecast some time series!
        ''')

        label.setWordWrap(True)
        layout = QVBoxLayout()
        layout.addWidget(label)
        intro.setLayout(layout)

        return intro
Пример #22
0
    def runConfigWizard(self):
        try:
            api = InstagramAPI(client_id=self.options_string['hidden_client_id'],
                               client_secret=self.options_string['hidden_client_secret'],
                               redirect_uri=self.options_string['redirect_uri'])
            url = api.get_authorize_login_url()

            self.wizard.setWindowTitle('Instagram plugin configuration wizard')
            page1 = QWizardPage()
            layout1 = QVBoxLayout()
            txtArea = QLabel()
            txtArea.setText('Please copy the following link to your browser window. \n ' +
                            'Once you authenticate with Instagram you will be redirected to ' +
                            'www.geocreepy.com and get your token. Copy the token to the input field below:')
            urlArea = QLineEdit()
            urlArea.setObjectName('urlArea')
            urlArea.setText(url)
            inputLink = QLineEdit()
            inputLink.setObjectName('inputLink')
            labelLink = QLabel('Your token value:')
            openInBrowserButton = QPushButton('Open in browser')
            openInBrowserButton.clicked.connect(functools.partial(self.openLinkInBrowser, url))
            layout1.addWidget(txtArea)
            layout1.addWidget(urlArea)
            layout1.addWidget(openInBrowserButton)
            layout1.addWidget(labelLink)
            layout1.addWidget(inputLink)
            page1.setLayout(layout1)
            self.wizard.addPage(page1)
            self.wizard.resize(600, 400)
            if self.wizard.exec_():
                c = str(inputLink.text())
                if c:
                    try:
                        access_token = api.exchange_code_for_access_token(code=c)
                        self.options_string['hidden_access_token'] = access_token[0]
                        self.saveConfiguration(self.config)
                    except Exception, err:
                        logger.error(err)
                        self.showWarning('Error Getting Access Token',
                                         'Please verify that the link you pasted was correct. '
                                         'Try running the wizard again.')
                else:
                    self.showWarning('Error Getting Access Token',
                                     'Please verify that the link you pasted was correct. Try running the wizard again.')

        except Exception, err:
            logger.error(err)
            self.showWarning('Error', 'Error was {0}'.format(err))
Пример #23
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)
Пример #24
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)
Пример #25
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)
Пример #26
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)
Пример #27
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)
Пример #28
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)
Пример #29
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)
Пример #30
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)
Пример #31
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)
Пример #32
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)
Пример #33
0
    def runConfigWizard(self):
        try:
            oAuthHandler = tweepy.OAuthHandler(self.options_string['hidden_application_key'],
                                               self.options_string['hidden_application_secret'])
            authorizationURL = oAuthHandler.get_authorization_url(True)

            self.wizard.setWindowTitle('Twitter plugin configuration wizard')
            page1 = QWizardPage()
            page2 = QWizardPage()
            layout1 = QVBoxLayout()
            layout2 = QVBoxLayout()
            layoutInputPin = QHBoxLayout()

            label1a = QLabel(
                'Click next to connect to twitter.com . Please login with your account and follow the instructions in '
                'order to authorize creepy')
            label2a = QLabel(
                'Copy the PIN that you will receive once you authorize cree.py in the field below and click finish')
            pinLabel = QLabel('PIN')
            inputPin = QLineEdit()
            inputPin.setObjectName('inputPin')

            analysisHtml = QWebView()
            analysisHtml.load(QUrl(authorizationURL))

            layout1.addWidget(label1a)
            layout2.addWidget(analysisHtml)
            layout2.addWidget(label2a)
            layoutInputPin.addWidget(pinLabel)
            layoutInputPin.addWidget(inputPin)
            layout2.addLayout(layoutInputPin)

            page1.setLayout(layout1)
            page2.setLayout(layout2)
            page2.registerField('inputPin*', inputPin)
            self.wizard.addPage(page1)
            self.wizard.addPage(page2)
            self.wizard.resize(800, 600)

            if self.wizard.exec_():
                try:
                    oAuthHandler.get_access_token(str(self.wizard.field('inputPin').toString()).strip())
                    self.options_string['hidden_access_token'] = oAuthHandler.access_token
                    self.options_string['hidden_access_token_secret'] = oAuthHandler.access_token_secret
                    self.saveConfiguration(self.config)
                except Exception, err:
                    logger.error(err)
                    self.showWarning('Error completing the wizard',
                                     'We were unable to obtain the access token for your account, please try to run '
                                     'the wizard again. Error was {0}'.format(err.message))

        except Exception, err:
            logger.error(err)
            self.showWarning('Error completing the wizard', 'Error was: {0}'.format(err.message))
Пример #34
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
Пример #35
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)
Пример #36
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)
Пример #37
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)
Пример #38
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)
Пример #39
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)
Пример #40
0
 def _create_page_id_files(self):
     """Creates a page for selecting student id files."""
     page = QWizardPage(self)
     page.setTitle(_('Student id files'))
     page.setSubTitle(_('You can select zero, one or more files with the '
                        'list of student ids. Go to the user manual '
                        'if you don\'t know the format of the files.'))
     self.files_w = widgets.MultipleFilesWidget(
                           _('Select student list files'),
                           file_name_filter=FileNameFilters.student_list,
                           check_file_function=self._check_student_ids_file)
     layout = QVBoxLayout()
     page.setLayout(layout)
     layout.addWidget(self.files_w)
     return page
Пример #41
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)
Пример #42
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)
Пример #43
0
 def _create_page_id_files(self):
     """Creates a page for selecting student id files."""
     page = QWizardPage(self)
     page.setTitle(_('Student id files'))
     page.setSubTitle(_('You can select zero, one or more files with the '
                        'list of student ids. Go to the user manual '
                        'if you don\'t know the format of the files.'))
     self.files_w = widgets.MultipleFilesWidget(
                           _('Select student list files'),
                           file_name_filter=FileNameFilters.student_list,
                           check_file_function=self._check_student_ids_file)
     layout = QVBoxLayout()
     page.setLayout(layout)
     layout.addWidget(self.files_w)
     return page
Пример #44
0
    def __init__(self):
        """ Constructor. """

        QWizardPage.__init__(self)
        self.errorHandler = None
Пример #45
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.fullfilled = False
Пример #46
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()")))
Пример #47
0
    def runConfigWizard(self):
        try:
            oAuthHandler = tweepy.OAuthHandler(
                self.options_string['hidden_application_key'],
                self.options_string['hidden_application_secret'])
            authorizationURL = oAuthHandler.get_authorization_url(True)

            self.wizard.setWindowTitle("Twitter plugin configuration wizard")
            page1 = QWizardPage()
            page2 = QWizardPage()
            layout1 = QVBoxLayout()
            layout2 = QVBoxLayout()
            layoutInputPin = QHBoxLayout()

            label1a = QLabel(
                "Click next to connect to twitter.com . Please login with your account and follow the instructions in order to authorize creepy"
            )
            label2a = QLabel(
                "Copy the PIN that you will receive once you authorize cree.py in the field below and click finish"
            )
            pinLabel = QLabel("PIN")
            inputPin = QLineEdit()
            inputPin.setObjectName("inputPin")

            html = QWebView()
            html.load(QUrl(authorizationURL))

            layout1.addWidget(label1a)
            layout2.addWidget(html)
            layout2.addWidget(label2a)
            layoutInputPin.addWidget(pinLabel)
            layoutInputPin.addWidget(inputPin)
            layout2.addLayout(layoutInputPin)

            page1.setLayout(layout1)
            page2.setLayout(layout2)
            page2.registerField("inputPin*", inputPin)
            self.wizard.addPage(page1)
            self.wizard.addPage(page2)
            self.wizard.resize(800, 600)

            if self.wizard.exec_():
                try:
                    oAuthHandler.get_access_token(
                        str(self.wizard.field("inputPin").toString()).strip())
                    self.options_string[
                        'hidden_access_token'] = oAuthHandler.access_token
                    self.options_string[
                        'hidden_access_token_secret'] = oAuthHandler.access_token_secret
                    self.config.write()
                except Exception, err:
                    logger.error(err)
                    self.showWarning(
                        "Error completing the wizard",
                        "We were unable to obtain the access token for your account, please try to run the wizard again. Error was {0}"
                        .format(err.message))

        except Exception, err:
            logger.error(err)
            self.showWarning('Error completing the wizard',
                             'Error was: {0}'.format(err.message))