def __init__(self, parent): QWidget.__init__(self, parent) self._layout = QHBoxLayout(self) self._label = QLabel("Very important option", self) self._layout.addWidget(self._label) self.edit = QLineEdit(self) self._layout.addWidget(self.edit)
def __init__(self, parent=None, direction="ltr", rtf=False): """ Creates a new QPageWidget on given parent object. parent: QWidget parent direction: "ltr" -> Left To Right "ttb" -> Top To Bottom rtf: Return to first, if its True it flips to the first page when next page requested at the last page """ # First initialize, QPageWidget is based on QScrollArea QScrollArea.__init__(self, parent) # Properties for QScrollArea self.setFrameShape(QFrame.NoFrame) self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) self.setWidgetResizable(True) # Main widget, which stores all Pages in it self.widget = QWidget(self) # Layout based on QBoxLayout which supports Vertical or Horizontal layout if direction == "ltr": self.layout = QBoxLayout(QBoxLayout.LeftToRight, self.widget) self.__scrollBar = self.horizontalScrollBar() self.__base_value = self.width else: self.layout = QBoxLayout(QBoxLayout.TopToBottom, self.widget) self.__scrollBar = self.verticalScrollBar() self.__base_value = self.height self.layout.setSpacing(0) self.layout.setMargin(0) # Return to first self.__return_to_first = rtf # TMP_PAGE, its using as last page in stack # A workaround for a QScrollArea bug self.__tmp_page = Page(QWidget(self.widget)) self.__pages = [self.__tmp_page] self.__current = 0 self.__last = 0 # Set main widget self.setWidget(self.widget) # Animation TimeLine self.__timeline = QTimeLine() self.__timeline.setUpdateInterval(2) # Updates scrollbar position when frame changed self.__timeline.frameChanged.connect( lambda x: self.__scrollBar.setValue(x)) # End of the animation self.__timeline.finished.connect(self._animateFinished) # Initialize animation self.setAnimation() self.setDuration()
def __init__(self, page, parent = None): """ Constructor @param mainWindow reference to the main window (QMainWindow) @param parent parent widget of this dialog (QWidget) """ QWidget.__init__(self, parent) self.setupUi(self) self.__page = page self.wrapCheckBox.setChecked(True) self.closeButton.setIcon(QIcon(getPath('iconDir','heditor/close.png'))) self.findPrevButton.setIcon(QIcon(getPath('iconDir','heditor/pre.png'))) self.findNextButton.setIcon(QIcon(getPath('iconDir','heditor/next.png'))) self.__defaultBaseColor = \ self.input.palette().color(QPalette.Base) self.__defaultTextColor = \ self.input.palette().color(QPalette.Text) self.findHistory = [] self.havefound = False self.__findBackwards = False self.connect(self.input, SIGNAL("returnPressed()"), self.__findByReturnPressed)
def __init__(self, parent, prop, value): QPropertyWidget.__init__(self, parent) self.ui = Ui_PropertyWidget() self.ui.setupUi(self) self.ui.prop.setTextFormat(QtCore.Qt.RichText) self.ui.prop.setText("<b>%s:</b>" % prop) self.ui.value.setText(value)
def __init__(self, page, parent=None): """ Constructor @param mainWindow reference to the main window (QMainWindow) @param parent parent widget of this dialog (QWidget) """ QWidget.__init__(self, parent) self.setupUi(self) self.__page = page self.wrapCheckBox.setChecked(True) self.closeButton.setIcon(QIcon(getPath('iconDir', 'heditor/close.png'))) self.findPrevButton.setIcon( QIcon(getPath('iconDir', 'heditor/pre.png'))) self.findNextButton.setIcon( QIcon(getPath('iconDir', 'heditor/next.png'))) self.__defaultBaseColor = \ self.input.palette().color(QPalette.Base) self.__defaultTextColor = \ self.input.palette().color(QPalette.Text) self.findHistory = [] self.havefound = False self.__findBackwards = False self.connect(self.input, SIGNAL("returnPressed()"), self.__findByReturnPressed)
def __init__(self,dlg): """ Constructor """ QWidget.__init__(self) self.setupUi(self) #center this window screen = QDesktopWidget().screenGeometry() size = self.geometry() self.move((screen.width()-size.width())/2, (screen.height()-size.height())/2) self.shortcutsList.header().setResizeMode(0,QHeaderView.ResizeToContents) self.dlg = dlg self.shortcutDialog = ShortcutDialog() self.__setupActions(QApplication.translate("default","Global"),Seeking.new().getActions()) self.__setupPlugins() QObject.connect(self.shortcutsList,\ SIGNAL("itemDoubleClicked (QTreeWidgetItem *,int)"),\ self.__evt_dbclick) QObject.connect(self.shortcutsList, SIGNAL("itemChanged (QTreeWidgetItem *,int)"),self.__has_change) QObject.connect(self.searchEdit,SIGNAL("textChanged (const QString&)"),self.__search) QObject.connect(self.shortcutDialog,SIGNAL("shortcutChanged"),self.__shortcut)
def __init__(self, richaction,webview): QWidget.__init__(self) self.setMouseTracking(True) self.setCursor(QCursor(Qt.PointingHandCursor)) self.richaction = richaction self.webview = webview self.lastKey = "-1-1" self.squareSize = 24 self.basiccolors = { "00":"#000000","10":"#800000","20":"#8b4513","30":"#2f4f4f", "40":"#008080","50":"#000080","60":"#4b0082","70":"#696969", "01":"#b22222","11":"#a52a2a","21":"#daa520","31":"#006400", "41":"#40e0d0","51":"#0000cd","61":"#800080","71":"#808080", "02":"#ff0000","12":"#ff8c00","22":"#ffd700","32":"#008000", "42":"#00ffff","52":"#0000ff","62":"#ee82ee","72":"#a9a9a9", "03":"#ffa07a","13":"#ffa500","23":"#ffff00","33":"#00ff00", "43":"#afeeee","53":"#add8e6","63":"#dda0dd","73":"#d3d3d3", "04":"#fff0f5","14":"#faebd7","24":"#ffffe0","34":"#f0fff0", "44":"#f0ffff","54":"#f0f8ff","64":"#e6e6fa","74":"#ffffff"} self.setMinimumHeight(self.squareSize*5) self.setMaximumHeight(self.squareSize*5) self.setMinimumWidth(self.squareSize*8) self.setMaximumWidth(self.squareSize*8)
def __init__(self, parent, available): QWidget.__init__(self, parent) self._parent = parent self._available = available vbox = QVBoxLayout(self) self._table = ui_tools.CheckableHeaderTable(1, 2) self._table.setSelectionMode(QTableWidget.SingleSelection) self._table.removeRow(0) vbox.addWidget(self._table) ui_tools.load_table( self._table, (translations.TR_PROJECT_NAME, translations.TR_VERSION), _format_for_table(available)) self._table.setColumnWidth(0, 500) self._table.setSortingEnabled(True) self._table.setAlternatingRowColors(True) hbox = QHBoxLayout() btnInstall = QPushButton(translations.TR_INSTALL) btnInstall.setMaximumWidth(100) hbox.addWidget(btnInstall) hbox.addWidget(QLabel(translations.TR_NINJA_NEEDS_TO_BE_RESTARTED)) vbox.addLayout(hbox) self.connect(btnInstall, SIGNAL("clicked()"), self._install_plugins) self.connect(self._table, SIGNAL("itemSelectionChanged()"), self._show_item_description)
def __init__(self, actions, parent=None): QWidget.__init__(self, parent) itab_item.ITabItem.__init__(self) self.actions = actions self.graphicView = QGraphicsView(self) self.scene = QGraphicsScene() self.graphicView.setScene(self.scene) self.graphicView.setViewportUpdateMode( QGraphicsView.BoundingRectViewportUpdate) vLayout = QVBoxLayout(self) self.setLayout(vLayout) vLayout.addWidget(self.graphicView) self.scene.setItemIndexMethod(QGraphicsScene.NoIndex) self.scene.setSceneRect(-200, -200, 400, 400) self.graphicView.setMinimumSize(400, 400) actualProject = self.actions.ide.explorer.get_actual_project() arrClasses = self.actions._locator.get_classes_from_project( actualProject) #FIXME:dirty need to fix self.mX = -400 self.mY = -320 self.hightestY = self.mY filesList = [] for elem in arrClasses: #loking for paths filesList.append(elem[2]) for path in set(filesList): self.create_class(path)
def __init__(self, dlg): """ Constructor """ QWidget.__init__(self) self.setupUi(self) #center this window screen = QDesktopWidget().screenGeometry() size = self.geometry() self.move((screen.width() - size.width()) / 2, (screen.height() - size.height()) / 2) self.shortcutsList.header().setResizeMode(0, QHeaderView.ResizeToContents) self.dlg = dlg self.shortcutDialog = ShortcutDialog() self.__setupActions(QApplication.translate("default", "Global"), Seeking.new().getActions()) self.__setupPlugins() QObject.connect(self.shortcutsList,\ SIGNAL("itemDoubleClicked (QTreeWidgetItem *,int)"),\ self.__evt_dbclick) QObject.connect(self.shortcutsList, SIGNAL("itemChanged (QTreeWidgetItem *,int)"), self.__has_change) QObject.connect(self.searchEdit, SIGNAL("textChanged (const QString&)"), self.__search) QObject.connect(self.shortcutDialog, SIGNAL("shortcutChanged"), self.__shortcut)
def __init__(self, parent, color = None): QWidget.__init__(self, parent) self.angle = 0 self.timerId = -1 self.delay = 80 self.displayedWhenStopped = False self.color = self.palette().color(QPalette.Text) if not color else QColor(color)
def __init__(self): QWidget.__init__(self) self.plugin_manager = plugin_manager.PluginManager() vbox = QVBoxLayout(self) self._tabs = QTabWidget() vbox.addWidget(self._tabs) #load widgets self._load_widgets()
def __init__(self): QWidget.__init__(self) PluginBase.__init__(self) self.setKeepme("__portscan_scanner__") self.setupUi(self) self.execute("Port Scanner",QIcon(getPath('pluginsDir','webscan/port.png')))
def __init__(self, parent, label, default): QValueWidget.__init__(self, parent) self.ui = Ui_ValueWidget() self.ui.setupUi(self) self.ui.label.setText(label) self.ui.valueEdit.setText(default) self.validator = QtGui.QDoubleValidator(self) self.ui.valueEdit.setValidator(self.validator)
def __init__(self, parent=None): QWidget.__init__(self, parent) palette = QPalette(self.palette()) palette.setColor(palette.Background, Qt.transparent) self.setPalette(palette) self.MINCOUNTER = 10 self.minloopkeep = False
def __init__(self): QWidget.__init__(self) PluginBase.__init__(self) self.setKeepme("__portscan_scanner__") self.setupUi(self) self.execute("Port Scanner", QIcon(getPath('pluginsDir', 'webscan/port.png')))
def __init__(self, parent, color=None): QWidget.__init__(self, parent) self.angle = 0 self.timerId = -1 self.delay = 80 self.displayedWhenStopped = False self.color = self.palette().color( QPalette.Text) if not color else QColor(color)
def __init__(self, parent, label, default): QBoolWidget.__init__(self, parent) self.ui = Ui_BoolWidget() self.ui.setupUi(self) self.ui.checkBox.setText(label) if default == "True": self.ui.checkBox.setChecked(True) else: self.ui.checkBox.setChecked(False)
def __init__(self, parent = None): QWidget.__init__(self, parent) palette = QPalette(self.palette()) palette.setColor(palette.Background, Qt.transparent) self.setPalette(palette) self.MINCOUNTER = 10 self.minloopkeep = False
def keyPressEvent(self, event): taskList = { Qt.Key_Plus: lambda: self.scaleView(1.2), Qt.Key_Minus: lambda: self.scaleView(1 / 1.2)} if(event.key() in taskList): taskList[event.key()]() else: QWidget.keyPressEvent(self, event)
def __init__(self, richaction, webview): QWidget.__init__(self) self.setMouseTracking(True) self.setCursor(QCursor(Qt.PointingHandCursor)) self.richaction = richaction self.webview = webview self.lastKey = "-1-1" self.squareSize = 24 self.basiccolors = { "00": "#000000", "10": "#800000", "20": "#8b4513", "30": "#2f4f4f", "40": "#008080", "50": "#000080", "60": "#4b0082", "70": "#696969", "01": "#b22222", "11": "#a52a2a", "21": "#daa520", "31": "#006400", "41": "#40e0d0", "51": "#0000cd", "61": "#800080", "71": "#808080", "02": "#ff0000", "12": "#ff8c00", "22": "#ffd700", "32": "#008000", "42": "#00ffff", "52": "#0000ff", "62": "#ee82ee", "72": "#a9a9a9", "03": "#ffa07a", "13": "#ffa500", "23": "#ffff00", "33": "#00ff00", "43": "#afeeee", "53": "#add8e6", "63": "#dda0dd", "73": "#d3d3d3", "04": "#fff0f5", "14": "#faebd7", "24": "#ffffe0", "34": "#f0fff0", "44": "#f0ffff", "54": "#f0f8ff", "64": "#e6e6fa", "74": "#ffffff" } self.setMinimumHeight(self.squareSize * 5) self.setMaximumHeight(self.squareSize * 5) self.setMinimumWidth(self.squareSize * 8) self.setMaximumWidth(self.squareSize * 8)
def __init__(self, traceback_msg): QWidget.__init__(self) vbox = QVBoxLayout(self) self._editor = QPlainTextEdit() vbox.addWidget(QLabel(translations.TR_TRACEBACK)) vbox.addWidget(self._editor) self._editor.setReadOnly(True) self._editor.setLineWrapMode(0) self._editor.insertPlainText(traceback_msg) self._editor.selectAll()
def __init__(self, parent): QWidget.__init__(self, parent) vbox = QVBoxLayout(self) self._webInspector = QWebInspector(self) vbox.addWidget(self._webInspector) self.btnDock = QPushButton(translations.TR_UNDOCK) vbox.addWidget(self.btnDock) ExplorerContainer.register_tab(translations.TR_TAB_WEB_INSPECTOR, self) IDE.register_service('web_inspector', self)
def __init__(self, parent, label, keys, default): QTableIndexWidget.__init__(self, parent) self.ui = Ui_TableIndexWidget() self.ui.setupUi(self) self.ui.label.setText(label) for key, i in zip(keys, range(len(keys))): self.ui.comboBox.addItem(key) if key == default: self.ui.comboBox.setCurrentIndex(i)
def initUI(self): self.setGeometry(300, 300, 250, 150) self.setWindowTitle('pyv4l test') # top layout layout = QHBoxLayout() layout.addLayout(self.get_left_layout()) layout.addLayout(self.get_video_layout()) w = QWidget() w.setLayout(layout) self.setCentralWidget(w)
def __init__(self, sliderOrientation=None): super(QLabelSlider, self).__init__() self._slider = QSlider(sliderOrientation) self.setLayout(QVBoxLayout()) self._labelTicksWidget = QWidget(self) self._labelTicksWidget.setLayout(QHBoxLayout()) self._labelTicksWidget.layout().setContentsMargins(0, 0, 0, 0) self.layout().addWidget(self._slider) self.layout().setContentsMargins(0, 0, 0, 0) self.layout().setContentsMargins(0, 0, 0, 0) self.layout().addWidget(self._labelTicksWidget)
def __init__(self, parent=None): """ Constructor """ QWidget.__init__(self, parent) self.setupUi(self) self.th = Thread1() self.th.start() QtCore.QObject.connect(self.th, QtCore.SIGNAL("pressed()"), self.display) self.pushButton.clicked.connect(self.sendMsg) self.setBkground()
def __init__(self, richaction): QWidget.__init__(self) self.setMouseTracking(True) self.setCursor(QCursor(Qt.CrossCursor)) self.richaction = richaction self.squareSize = 25 self.lastKey = [0, 0] self.setMinimumWidth(250) self.setMaximumWidth(250) self.setMinimumHeight(200) self.setMaximumHeight(200)
def test1(self): class FT(QToolBar): def paintEvent(self, e): pass w = QMainWindow() ftt, ftb = FT(), FT() ftt.setFixedHeight(15) ftb.setFixedHeight(15) w.addToolBar(Qt.TopToolBarArea, ftt) w.addToolBar(Qt.BottomToolBarArea, ftb) f = dropshadow.DropShadowFrame() te = QTextEdit() c = QWidget() c.setLayout(QVBoxLayout()) c.layout().setContentsMargins(20, 0, 20, 0) c.layout().addWidget(te) w.setCentralWidget(c) f.setWidget(te) f.radius = 15 f.color = QColor(Qt.blue) w.show() self.singleShot(3000, lambda: f.setColor(Qt.red)) self.singleShot(4000, lambda: f.setRadius(30)) self.singleShot(5000, lambda: f.setRadius(40)) self.app.exec_()
def __init__(self, richaction): QWidget.__init__(self) self.setMouseTracking(True) self.setCursor(QCursor(Qt.CrossCursor)) self.richaction = richaction self.squareSize = 25 self.lastKey = [0,0] self.setMinimumWidth(250) self.setMaximumWidth(250) self.setMinimumHeight(200) self.setMaximumHeight(200)
def __init__(self, parent=None): QTabWidget.__init__(self, parent) self.setTabBar(TabBarSupport(self)) self.setMovable(False) self.setTabsClosable(True) self.setDocumentMode(False) self.navigationButton = QPushButton( QIcon(getPath('iconDir', 'navigation.png')), "", self) self.navigationButton.setFlat(True) self.closeButton = QPushButton( QIcon(getPath('iconDir', 'navclose.png')), "", self) self.closeButton.setFlat(True) self.rightCornerWidget = QWidget(self) self.rightCornerWidgetLayout = QHBoxLayout(self.rightCornerWidget) self.rightCornerWidgetLayout.setMargin(0) self.rightCornerWidgetLayout.setSpacing(0) self.rightCornerWidgetLayout.addWidget(self.navigationButton) self.rightCornerWidgetLayout.addWidget(self.closeButton) self.setCornerWidget(self.rightCornerWidget, Qt.TopRightCorner) QObject.connect(self.navigationButton, SIGNAL("pressed()"), self.__evt_navigation) QObject.connect( self.closeButton, SIGNAL("clicked(bool)"), lambda: self.emit( SIGNAL("tabCloseRequested (int)"), self.currentIndex())) QObject.connect(self, SIGNAL("tabCloseRequested (int)"), self.__evt_close_tab_click) QObject.connect(self.tabBar(), SIGNAL('customContextMenuRequested(const QPoint &)'), self.__evt_showContextMenu)
def initUI(self): cw = QWidget() self.setCentralWidget(cw) grid = QGridLayout() grid.setSpacing(15) # status bar self.statusBar().showMessage('Ready') font_label = QFont() font_label.setBold(True) ################ dicom reader rstart = 0 text_dcm = QLabel('DICOM reader') text_dcm.setFont(font_label) self.text_dcm_dir = QLabel('DICOM dir:') self.text_dcm_data = QLabel('DICOM data:') self.text_dcm_out = QLabel('output file:') grid.addWidget(text_dcm, rstart + 0, 1, 1, 4) grid.addWidget(self.text_dcm_dir, rstart + 1, 1, 1, 4) grid.addWidget(self.text_dcm_data, rstart + 2, 1, 1, 4) grid.addWidget(self.text_dcm_out, rstart + 3, 1, 1, 4) btn_dcmdir = QPushButton("Load DICOM", self) btn_dcmdir.clicked.connect(self.loadDcmDir) btn_dcmred = QPushButton("Organ Segmentation", self) btn_dcmred.clicked.connect(self.organSegmentation) btn_dcmcrop = QPushButton("Crop", self) btn_dcmcrop.clicked.connect(self.cropDcm) btn_dcmsave = QPushButton("Save DCM", self) btn_dcmsave.clicked.connect(self.saveDcm) grid.addWidget(btn_dcmdir, rstart + 4, 1) grid.addWidget(btn_dcmred, rstart + 4, 2) grid.addWidget(btn_dcmcrop, rstart + 4, 3) grid.addWidget(btn_dcmsave, rstart + 4, 4) hr = QFrame() hr.setFrameShape(QFrame.HLine) grid.addWidget(hr, rstart + 5, 0, 1, 6) # quit btn_quit = QPushButton("Quit", self) btn_quit.clicked.connect(self.quit) grid.addWidget(btn_quit, 24, 2, 1, 2) cw.setLayout(grid) self.setWindowTitle('liver-surgery') self.show()
def low_res_layout(): layout = QVBoxLayout() layout.addWidget(QLabel("Overview")) # Raw X-windows canvas self.video_container = QWidget() # Allows for convenient keyboard control by clicking on the video self.video_container.setFocusPolicy(Qt.ClickFocus) w, h = 3264 / 4, 2448 / 4 self.video_container.setMinimumSize(w, h) self.video_container.resize(w, h) policy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) self.video_container.setSizePolicy(policy) layout.addWidget(self.video_container) return layout
def __init__(self, parent, schemes): QWidget.__init__(self, parent) self._parent = parent self._schemes = schemes vbox = QVBoxLayout(self) self._table = ui_tools.CheckableHeaderTable(1, 2) self._table.removeRow(0) vbox.addWidget(self._table) ui_tools.load_table(self._table, [self.tr('Name'), self.tr('URL')], self._schemes) btnUninstall = QPushButton(self.tr('Download')) btnUninstall.setMaximumWidth(100) vbox.addWidget(btnUninstall) self._table.setColumnWidth(0, 200) self._table.setSortingEnabled(True) self._table.setAlternatingRowColors(True) self.connect(btnUninstall, SIGNAL("clicked()"), self._download_scheme)
def __init__(self, parent=None): """ Constructor """ QWidget.__init__(self, parent) self.setupUi(self) self.Host = "localhost" self.Port = 4959 self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # 新建socket self.s.connect((self.Host, self.Port)) self.th = Thread2(self.s) self.th.start() QtCore.QObject.connect(self.th, QtCore.SIGNAL("pressed()"), self.display) self.pushButton.clicked.connect(self.sendMsg) self.setBkground()
def __init__(self,dlg): """ Constructor """ QWidget.__init__(self) self.setupUi(self) self.dlg = dlg self.styleSelector.addItem("System") for style_item in QStyleFactory.keys(): self.styleSelector.addItem(style_item) for i in range(self.styleSelector.count()): if self.styleSelector.itemText(i)==Prefs.new().getStyle(): self.styleSelector.setCurrentIndex(i) break self.quitOnClose.setChecked(Prefs.new().getQuitOnClose()) QObject.connect(self.styleSelector, SIGNAL("currentIndexChanged (const QString&)"),self.__evt_style_change) QObject.connect(self.quitOnClose, SIGNAL("stateChanged (int)"),self.__evt_change)
def __init__(self,parent=None): QTabWidget.__init__(self,parent) #some default value is needed self.setTabPosition(QTabWidget.South) self.setTabShape(QTabWidget.Triangular) self.setDocumentMode(True) self.__toolBar = QToolBar(self) self.__toolBar.setIconSize(QSize(16,16)) self.__htmlEditorArea = HtmlEditView(self) #self.__htmlEditorArea.setBaseUrl(baseURL) self.__sourceView = SouceView(self) self.__searchBarForEditor = SearchWidget(self.__htmlEditorArea,self) self.__searchBarForEditor.setVisible(False) self.__inspector = None self.__inspectorSplitter = QSplitter(self) self.__inspectorSplitter.setOrientation(Qt.Vertical) self.__inspectorSplitter.addWidget(self.__htmlEditorArea) #tab1 layout=QVBoxLayout(self) layout.setSpacing(0) layout.setMargin(0) layout.addWidget(self.__toolBar) layout.addWidget(self.__searchBarForEditor) layout.addWidget(self.__inspectorSplitter) the_editor_tab=QWidget(self) the_editor_tab.setLayout(layout) the_editor_tab.setAutoFillBackground(True) self.addTab(the_editor_tab, "Edit") #tab2 self.addTab(self.__sourceView, "Source") QObject.connect(self, SIGNAL("currentChanged (int)"),self.__evt_currentTabChange) #actions self.__setupToolBarAction()
def __init__(self,parent=None): QWidget.__init__(self,parent) self.__toolBar = QToolBar(self) self.__toolBar.setIconSize(QSize(16,16)) self.__htmlBrowserView = HtmlBrowserView(self) self.__addressinput = QLineEdit(self) self.__loadlabel = QLabel(self) layout=QVBoxLayout(self) layout.setSpacing(0) layout.setMargin(0) layout.addWidget(self.__toolBar) layout.addWidget(self.__htmlBrowserView) self.__setupToolBarAction() QObject.connect(self.__addressinput, SIGNAL("returnPressed ()"),self.__evt_load) QObject.connect(self.__htmlBrowserView, SIGNAL("loadFinished (bool)"),lambda:self.__loadlabel.setMovie(None)) QObject.connect(self.__htmlBrowserView, SIGNAL("loadStarted ()"),self.__evt_loadstarted)
def __init__(self, plugin, modelRoot): super(NeuroKitEditor, self).__init__(plugin) self._centralWidget = None #default.DefaultEditorWidget(None) self.modelRoot = modelRoot # self._centralWidget = NeuroKitEditorWidget.NeuroKitEditorWidget(modelRoot) self._menus = [] # self._propertyTable = MorphologyProperyTable() self._propertyTable = QWidget() self.__initMenus() self.__initToolBars() self.setModelRoot(modelRoot)
def __init__(self): QWidget.__init__(self) PluginBase.__init__(self) self.setKeepme("__webadminscan_scanner__") self.setupUi(self) self.execute("Web Admin Scanner",QIcon(getPath('pluginsDir','webscan/admin.png'))) self.txts = os.listdir(getPath('pluginsDir','webscan/txt')) if len(self.txts) is 0: self.emit(SIGNAL("feedback"),0, 0, "You need supply some dictionary") else: self.emit(SIGNAL("feedback"),0, 0, "I'm ready ! Input a URL to Scan...") for txt in self.txts: lines = self.readlinenumber(getPath('pluginsDir','webscan/txt')+"/"+txt) qcb = QCheckBox(txt+"("+str(lines)+")") qcb.setChecked(True) qcb.setWindowTitle(txt) self.txtLayout.addWidget(qcb)