Exemplo n.º 1
0
    def __init__(self, parent=None):
        super(PluginsStore, self).__init__(parent, Qt.Dialog)
        self.setWindowTitle(translations.TR_MANAGE_PLUGINS)
        vbox = QVBoxLayout(self)
        vbox.setContentsMargins(0, 0, 0, 0)
        vbox.setSpacing(0)
        self.view = QDeclarativeView()
        self.view.setMinimumWidth(800)
        self.view.setMinimumHeight(600)
        self.view.setResizeMode(QDeclarativeView.SizeRootObjectToView)
        self.view.setSource(ui_tools.get_qml_resource("PluginsStore.qml"))
        self.root = self.view.rootObject()
        vbox.addWidget(self.view)
        self._plugins = {}
        self._plugins_inflate = []
        self._plugins_by_tag = collections.defaultdict(list)
        self._plugins_by_author = collections.defaultdict(list)
        self._base_color = QColor("white")
        self._counter = 0
        self._counter_callback = None
        self._inflating_plugins = []
        self._categoryTags = True
        self._search = []
        self.status = None

        self.connect(self.root, SIGNAL("loadPluginsGrid()"),
                     self._load_by_name)
        self.connect(self.root, SIGNAL("close()"), self.close)
        self.connect(self.root, SIGNAL("showPluginDetails(int)"),
                     self.show_plugin_details)
        self.connect(self.root, SIGNAL("loadTagsGrid()"), self._load_tags_grid)
        self.connect(self.root, SIGNAL("loadAuthorGrid()"),
                     self._load_author_grid)
        self.connect(self.root, SIGNAL("search(QString)"),
                     self._load_search_results)
        self.connect(self.root, SIGNAL("loadPluginsForCategory(QString)"),
                     self._load_plugins_for_category)
        self.connect(self, SIGNAL("processCompleted(PyQt_PyObject)"),
                     self._process_complete)

        self.nenv = nenvironment.NenvEggSearcher()
        self.connect(self.nenv, SIGNAL("searchCompleted(PyQt_PyObject)"),
                     self.callback)
        self.status = self.nenv.do_search()
Exemplo n.º 2
0
    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()
Exemplo n.º 3
0
    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)