Exemplo n.º 1
0
	def __init__(self):
		QTabWidget.__init__(self, None)
		self.ui = uic.loadUi ("./ui/chatWindow.ui", self)
		self.currentChanged.connect (self.resetTitle)
		self.connect(self, QtCore.SIGNAL('triggered()'), self.closeEvent)
		# user ID -> tab number
		self.tabs = {}
Exemplo n.º 2
0
 def __init__(self, parent):
     QTabWidget.__init__(self, parent)
     self.setTabsClosable(True)
     self.setMovable(True)
     self.setAcceptDrops(True)
     self.notOpening = True
     self.__lastOpened = []
     self._resyntax = []
     self.navigator = TabNavigator()
     self.setCornerWidget(self.navigator, Qt.TopRightCorner)
     self._parent = parent
     self.follow_mode = False
     self._change_map = {}
     #On some plataforms there are problem with focusInEvent
     self.question_already_open = False
     #Keep track of the tab titles
     self.titles = []
     self.dontLoopInExpandTitle = False
     self.connect(NinjaFileSystemWatcher,
         SIGNAL("fileChanged(int, QString)"), self._file_changed)
     self.connect(self, SIGNAL("tabCloseRequested(int)"), self.removeTab)
     self.connect(self.navigator.btnPrevious, SIGNAL("clicked()"),
         lambda: self._navigate_code(False))
     self.connect(self.navigator.btnNext, SIGNAL("clicked()"),
         lambda: self._navigate_code(True))
Exemplo n.º 3
0
    def __init__(self, parent=None, iface=None):
        QTabWidget.__init__(self, parent)
        self.setupUi(self)

        self._notif_bar = None
        self._ol_loaded = False
        self._overlay_layer = None
        self.sel_highlight = None
        self.memory_layer = None
        self._db_session = STDMDb.instance().session

        self.set_iface(iface)

        #Web config
        self._web_spatial_loader = WebSpatialLoader(self.spatial_web_view, self)

        #Connect signals
        self._web_spatial_loader.loadError.connect(self.on_spatial_browser_error)
        self._web_spatial_loader.loadProgress.connect(self.on_spatial_browser_loading)
        self._web_spatial_loader.loadFinished.connect(self.on_spatial_browser_finished)
        self._web_spatial_loader.zoomChanged.connect(self.on_map_zoom_level_changed)
        self.rbGMaps.toggled.connect(self.on_load_GMaps)
        self.rbOSM.toggled.connect(self.on_load_OSM)
        self.zoomSlider.sliderReleased.connect(self.on_zoom_changed)
        self.btnResetMap.clicked.connect(self.on_reset_web_map)
        self.btnSync.clicked.connect(self.on_sync_extents)
        QgsMapLayerRegistry.instance().layersWillBeRemoved.connect(self._on_overlay_to_be_removed)
Exemplo n.º 4
0
    def __init__(self, parent):
        QTabWidget.__init__(self, parent)
        self.setTabsClosable(True)
        self.setMovable(True)
        self.setAcceptDrops(True)
        self.notOpening = True
        self.__lastOpened = []
        self._resyntax = []
        self.navigator = TabNavigator()
        self.setCornerWidget(self.navigator, Qt.TopRightCorner)
        self._parent = parent
        self.follow_mode = False
        # Configure tabs size behavior
#        self.setElideMode(Qt.ElideRight)
#        self.tabBar().setExpanding(True)
#        self.tabBar().setUsesScrollButtons(False)
        #On some plataforms there are problem with focusInEvent
        self.question_already_open = False
        #Keep track of the tab titles
        self.titles = []
        self.dontLoopInExpandTitle = False

        self.connect(self, SIGNAL("tabCloseRequested(int)"), self.removeTab)
        self.connect(self.navigator.btnPrevious, SIGNAL("clicked()"),
            lambda: self._navigate_code(False))
        self.connect(self.navigator.btnNext, SIGNAL("clicked()"),
            lambda: self._navigate_code(True))
Exemplo n.º 5
0
    def __init__(self, parent):
        ##self.parent = parent
        QTabWidget.__init__(self, parent)
        self.addTab(PaveNumerique(parent), u" Pavé numérique ")
        self.addTab(Options(parent), u"Options")
        self.setTabPosition(QTabWidget.South)
        self.setStyleSheet(
            """
QTabBar::tab:selected {
background: white;
border: 1px solid #C4C4C3;
border-top-color: white; /* same as the pane color */
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
min-width: 8ex;
padding: 7px;
}
QStackedWidget {background:white}
QTabBar QToolButton {
background:white;
border: 1px solid #C4C4C3;
border-top-color: white; /* same as the pane color */
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
}
"""
        )
Exemplo n.º 6
0
 def __init__(self, parent):
     QTabWidget.__init__(self)
     self.stacked = parent.stacked
     self.browser = parent
     self.tags = Utils.getSetTags()
     self.itemWidgets = []
     self.fillToolBox()
Exemplo n.º 7
0
    def __init__(self, parent, actions=None, menu=None,
                 corner_widgets=None, menu_use_tooltips=False):
        QTabWidget.__init__(self, parent)
        
        self.setUsesScrollButtons(True)
        
        self.corner_widgets = {}
        self.menu_use_tooltips = menu_use_tooltips
        
        if menu is None:
            self.menu = QMenu(self)
            if actions:
                add_actions(self.menu, actions)
        else:
            self.menu = menu
            
        # Corner widgets
        if corner_widgets is None:
            corner_widgets = {}
        corner_widgets.setdefault(Qt.TopLeftCorner, [])
        corner_widgets.setdefault(Qt.TopRightCorner, [])
        self.browse_button = create_toolbutton(self,
                                          icon=get_icon("browse_tab.png"),
                                          tip=_("Browse tabs"))
        self.browse_tabs_menu = QMenu(self)
        self.browse_button.setMenu(self.browse_tabs_menu)
        self.browse_button.setPopupMode(self.browse_button.InstantPopup)
        self.connect(self.browse_tabs_menu, SIGNAL("aboutToShow()"),
                     self.update_browse_tabs_menu)
        corner_widgets[Qt.TopLeftCorner] += [self.browse_button]

        self.set_corner_widgets(corner_widgets)
Exemplo n.º 8
0
    def __init__(self, connection):
        QTabWidget.__init__(self)

        self.connection = connection

        self.setupUi(self)
        self.tableProcessList.verticalHeader().hide()

        cur = self.connection.cursor()
        cur.execute("SHOW TABLES IN information_schema LIKE 'PROCESSLIST'")
        self.processListInInfoSchema = cur.rowcount

        if self.processListInInfoSchema:
            self.processListColumns = []
            cur.execute("SHOW COLUMNS IN information_schema.PROCESSLIST")
            for column in cur.fetchall():
                self.processListColumns.append(column[0])

            try:
                self.processListColumns.remove("TIME_MS")
                idx_time = self.processListColumns.index("TIME")
                self.processListColumns[idx_time] = "TIME + TIME_MS/1000 AS TIME"
            except ValueError:
                pass

        else:
            self.chkShowIdle.hide()

        self.refresh()

        self.timer = QTimer(self)
        self.timer.timeout.connect(self.on_timer_timeout)
        self.on_spinSeconds_valueChanged(self.spinSeconds.value())
        self.on_chkAutoRefresh_stateChanged()
Exemplo n.º 9
0
 def __init__(self, parent):
     QTabWidget.__init__(self, parent)
     self.addTab(APropos(parent), u"À propos")
     self.addTab(Licence(parent), u"Licence")
     self.addTab(Notes(parent), u"Notes de version")
     self.addTab(Credits(parent), u"Crédits")
     self.setTabPosition(QTabWidget.South)
     self.setStyleSheet(
         """
     QTabBar::tab:selected {
     background: white;
     border: 1px solid #C4C4C3;
     border-top-color: white; /* same as the pane color */
     border-bottom-left-radius: 4px;
     border-bottom-right-radius: 4px;
     border-top-left-radius: 0px;
     border-top-right-radius: 0px;
     min-width: 8ex;
     padding: 7px;
     }
     QStackedWidget {background:white}
     QTabBar QToolButton {
     background:white;
     border: 1px solid #C4C4C3;
     border-top-color: white; /* same as the pane color */
     border-bottom-left-radius: 4px;
     border-bottom-right-radius: 4px;
     border-top-left-radius: 0px;
     border-top-right-radius: 0px;
     }
     """
     )
Exemplo n.º 10
0
    def __init__(self, parent=None):
        QTabWidget.__init__(self, parent)
        self.setTabPosition(QTabWidget.East)
        self.__ide = parent
        self._workingDirectory = ''

        #Searching the Preferences
        self._treeProjects = None
        if settings.SHOW_PROJECT_EXPLORER:
            self.add_tab_projects()
        self._treeSymbols = None
        if settings.SHOW_SYMBOLS_LIST:
            self.add_tab_symbols()
        self._inspector = None
        if settings.SHOW_WEB_INSPECTOR and settings.WEBINSPECTOR_SUPPORTED:
            self.add_tab_inspector()
        self._listErrors = None
        if settings.SHOW_ERRORS_LIST:
            self.add_tab_errors()

        #Now we see if there is any tab, if there is not, we hide the widget
        if self.count() == 0:
            self.hide()

        key = Qt.Key_1
        for i in xrange(10):
            if sys.platform == "darwin":
                short = TabShortcuts(
                    QKeySequence(Qt.CTRL + Qt.ALT + key), self, i)
            else:
                short = TabShortcuts(QKeySequence(Qt.ALT + key), self, i)
            key += 1
            self.connect(short, SIGNAL("activated()"), self._change_tab_index)
        short = TabShortcuts(QKeySequence(Qt.ALT + Qt.Key_0), self, 10)
        self.connect(short, SIGNAL("activated()"), self._change_tab_index)
Exemplo n.º 11
0
    def __init__(self, parent=None, iface=None):
        QTabWidget.__init__(self, parent)
        self.setupUi(self)

        self._notif_bar = None
        self._ol_loaded = False
        self._overlay_layer = None
        self.sel_highlight = None
        self.memory_layer = None
        self._db_session = STDMDb.instance().session

        self.set_iface(iface)

        #Web config
        self._web_spatial_loader = WebSpatialLoader(self.spatial_web_view,
                                                    self)

        #Connect signals
        self._web_spatial_loader.loadError.connect(
            self.on_spatial_browser_error)
        self._web_spatial_loader.loadProgress.connect(
            self.on_spatial_browser_loading)
        self._web_spatial_loader.loadFinished.connect(
            self.on_spatial_browser_finished)
        self._web_spatial_loader.zoomChanged.connect(
            self.on_map_zoom_level_changed)
        self.rbGMaps.toggled.connect(self.on_load_GMaps)
        self.rbOSM.toggled.connect(self.on_load_OSM)
        self.zoomSlider.sliderReleased.connect(self.on_zoom_changed)
        self.btnResetMap.clicked.connect(self.on_reset_web_map)
        self.btnSync.clicked.connect(self.on_sync_extents)
        QgsMapLayerRegistry.instance().layersWillBeRemoved.connect(
            self._on_overlay_to_be_removed)
Exemplo n.º 12
0
    def __init__(self, connection):
        QTabWidget.__init__(self)

        self.connection = connection

        self.setupUi(self)
        self.tableProcessList.verticalHeader().hide()

        cur = self.connection.cursor()
        cur.execute("SHOW TABLES IN information_schema LIKE 'PROCESSLIST'")
        self.processListInInfoSchema = cur.rowcount

        if self.processListInInfoSchema:
            self.processListColumns = []
            cur.execute("SHOW COLUMNS IN information_schema.PROCESSLIST")
            for column in cur.fetchall():
                self.processListColumns.append(column[0])

            try:
                self.processListColumns.remove("TIME_MS")
                idx_time = self.processListColumns.index("TIME")
                self.processListColumns[
                    idx_time] = "TIME + TIME_MS/1000 AS TIME"
            except ValueError:
                pass

        else:
            self.chkShowIdle.hide()

        self.refresh()

        self.timer = QTimer(self)
        self.timer.timeout.connect(self.on_timer_timeout)
        self.on_spinSeconds_valueChanged(self.spinSeconds.value())
        self.on_chkAutoRefresh_stateChanged()
Exemplo n.º 13
0
    def __init__(self, parent):
        QTabWidget.__init__(self, parent)
        self.setTabsClosable(True)
        self.setMovable(True)
        self.setAcceptDrops(True)
        self.notOpening = True
        self.__lastOpened = []
        self._resyntax = []
        self.navigator = TabNavigator()
        self.setCornerWidget(self.navigator, Qt.TopRightCorner)
        self._parent = parent
        # Configure tabs size behavior
#        self.setElideMode(Qt.ElideRight)
#        self.tabBar().setExpanding(True)
#        self.tabBar().setUsesScrollButtons(False)
        #On some plataforms there are problem with focusInEvent
        self.question_already_open = False
        #Keep track of the tab titles
        self.titles = []
        self.dontLoopInExpandTitle = False

        self.connect(self, SIGNAL("tabCloseRequested(int)"), self.removeTab)
        self.connect(self.navigator.btnPrevious, SIGNAL("clicked()"),
            lambda: self._navigate_code(False))
        self.connect(self.navigator.btnNext, SIGNAL("clicked()"),
            lambda: self._navigate_code(True))
Exemplo n.º 14
0
 def __init__(self, parent = None, dnd = False):
     """
     Constructor
     
     @param parent reference to the parent widget (QWidget)
     @keyparam dnd flag indicating the support for Drag & Drop (boolean)
     """
     QTabWidget.__init__(self, parent)
     
     if dnd:
         if not hasattr(self, 'setMovable'):
             self.__tabBar = E4DnDTabBar(self)
             self.connect(self.__tabBar, SIGNAL("tabMoveRequested(int, int)"), 
                          self.moveTab)
             self.setTabBar(self.__tabBar)
         else:
             self.__tabBar = E4WheelTabBar(self)
             self.setTabBar(self.__tabBar)
             self.setMovable(True)
     else:
         self.__tabBar = E4WheelTabBar(self)
         self.setTabBar(self.__tabBar)
     
     self.__lastCurrentIndex = -1
     self.__currentIndex = -1
     self.connect(self, SIGNAL("currentChanged(int)"), self.__currentChanged)
Exemplo n.º 15
0
 def __init__(self, parent):
     QTabWidget.__init__(self, parent)
     self.setTabsClosable(True)
     self.setMovable(True)
     self.setAcceptDrops(True)
     self.notOpening = True
     self.__lastOpened = []
     self._resyntax = []
     self.navigator = TabNavigator()
     self.setCornerWidget(self.navigator, Qt.TopRightCorner)
     self._parent = parent
     self.follow_mode = False
     self._change_map = {}
     #On some platforms there are problem with focusInEvent
     self.question_already_open = False
     #Keep track of the tab titles
     self.titles = []
     self.dontLoopInExpandTitle = False
     self.connect(NinjaFileSystemWatcher,
         SIGNAL("fileChanged(int, QString)"), self._file_changed)
     self.connect(self, SIGNAL("tabCloseRequested(int)"), self.removeTab)
     self.connect(self.navigator.btnPrevious, SIGNAL("clicked()"),
         lambda: self._navigate_code(False))
     self.connect(self.navigator.btnNext, SIGNAL("clicked()"),
         lambda: self._navigate_code(True))
Exemplo n.º 16
0
    def __init__(self, parent=None):
        QTabWidget.__init__(self, parent)
        self.setTabPosition(QTabWidget.East)
        self.__ide = parent
        self._workingDirectory = ''

        #Searching the Preferences
        self._treeProjects = None
        if settings.SHOW_PROJECT_EXPLORER:
            self.add_tab_projects()
        self._treeSymbols = None
        if settings.SHOW_SYMBOLS_LIST:
            self.add_tab_symbols()
        self._inspector = None
        if settings.SHOW_WEB_INSPECTOR and settings.WEBINSPECTOR_SUPPORTED:
            self.add_tab_inspector()
        self._listErrors = None
        if settings.SHOW_ERRORS_LIST:
            self.add_tab_errors()

        key = Qt.Key_1
        for i in xrange(10):
            if sys.platform == "darwin":
                short = TabShortcuts(
                    QKeySequence(Qt.CTRL + Qt.ALT + key), self, i)
            else:
                short = TabShortcuts(QKeySequence(Qt.ALT + key), self, i)
            key += 1
            self.connect(short, SIGNAL("activated()"), self._change_tab_index)
        short = TabShortcuts(QKeySequence(Qt.ALT + Qt.Key_0), self, 10)
        self.connect(short, SIGNAL("activated()"), self._change_tab_index)
Exemplo n.º 17
0
    def __init__(self, connection, dbName):
        QTabWidget.__init__(self)

        self.connection = connection
        self.dbName = dbName

        self.setupUi(self)
        self.groupProgress.setVisible(False)
Exemplo n.º 18
0
 def __init__(self, parent):
     self.parent = parent
     self.feuille = parent.feuille
     QTabWidget.__init__(self, parent)
     self.description = ProprietesDescription(self)
     self.addTab(self.description, u"Description")
     self.statistiques = ProprietesStatistiques(self)
     self.addTab(self.statistiques, u"Statistiques")
Exemplo n.º 19
0
 def __init__(self, maxTabCount=250):
     QTabWidget.__init__(self)
     self.closeTabShortcut = QShortcut(QKeySequence("Ctrl+W"), self,
                                       self.closeCurrentTab)
     self.maxTabCount = maxTabCount
     self.setTabsClosable(True)
     self.tabCloseRequested.connect(self.onTabClosed)
     self.log = getLoggerPassFilters(LOGGER_NAMES.LIVEPLAYER)
Exemplo n.º 20
0
 def __init__(self, run_data_dir, parent=None):
     QTabWidget.__init__(self, parent)
     self.run_data_dir = run_data_dir
     self.grid_layout = QGridLayout()
     lFuncs.setPadding(self.grid_layout)
     self.setLayout(self.grid_layout)
     self.pages = []
     self.setup_tabs()
Exemplo n.º 21
0
    def __init__(self, parent=None):
        QTabWidget.__init__(self, parent)

        self.setDocumentMode(True)
        self.setTabsClosable(True)
        self.setupActions()

        self.connect(self, SIGNAL('tabCloseRequested(int)'), self.slotClose)
Exemplo n.º 22
0
    def __init__( self, parent = None ):
        QTabWidget.__init__( self, parent )

        self.setDocumentMode( True )
        self.setTabsClosable( True )
        self.setupActions()

        self.connect( self, SIGNAL( 'tabCloseRequested(int)' ), self.slotClose )
Exemplo n.º 23
0
    def __init__(self, connection, dbName):
        QTabWidget.__init__(self)

        self.connection = connection
        self.dbName = dbName

        self.setupUi(self)
        self.groupProgress.setVisible(False)
Exemplo n.º 24
0
 def __init__(self, parent, actions=None, menu=None):
     QTabWidget.__init__(self, parent)
     if menu is None:
         self.menu = QMenu(self)
         if actions:
             add_actions(self.menu, actions)
     else:
         self.menu = menu
Exemplo n.º 25
0
 def __init__(self, parent, result):
     QTabWidget.__init__(self)
     self.general_tab = GeneralTab(self, result.model, result)
     self.addTab(self.general_tab, "General")
     self.tabs = []
     for task in result.model.task_list:
         tab = JobsList(self, result, task)
         self.addTab(tab, task.name)
         self.tabs.append(tab)
Exemplo n.º 26
0
    def __init__(self):
        QTabWidget.__init__(self)
        TabCentralGeneric.__init__(self)
        self.setTabsClosable(True)
        self.setMovable(True)
        self.setAcceptDrops(True)
        self.notOpening = True

        self.connect(self, SIGNAL("tabCloseRequested(int)"), self._close_tab)
Exemplo n.º 27
0
    def __init__(self, main):
        QTabWidget.__init__(self)
        PropertiesGeneric.__init__(self)
        self.setTabPosition(QTabWidget.East)

        self._treeProjects = TreeProjectsWidget(main)
        self._treeSymbols = TreeSymbolsWidget()
        self.addTab(self._treeProjects, 'Projects')
        self.addTab(self._treeSymbols, 'Symbols')
Exemplo n.º 28
0
    def __init__(self):
        QTabWidget.__init__(self)
        self.setWindowTitle("Case Management")
        self.setMinimumWidth(600)

        self.addCreateNewCaseTab()
        self.addInitializeFromScratchTab()
        self.addInitializeFromExistingTab()
        self.addShowCaseInfo()
Exemplo n.º 29
0
    def __init__(self, main):
        QTabWidget.__init__(self)
        PropertiesGeneric.__init__(self)
        self.setTabPosition(QTabWidget.East)

        self._treeProjects = TreeProjectsWidget(main)
        self._treeSymbols = TreeSymbolsWidget()
        self.addTab(self._treeProjects, 'Projects')
        self.addTab(self._treeSymbols, 'Symbols')
Exemplo n.º 30
0
    def __init__(self):
        QTabWidget.__init__(self)
        TabCentralGeneric.__init__(self)
        self.setTabsClosable(True)
        self.setMovable(True)
        self.setAcceptDrops(True)
        self.notOpening = True

        self.connect(self, SIGNAL("tabCloseRequested(int)"), self._close_tab)
Exemplo n.º 31
0
    def __init__(self):
        QTabWidget.__init__(self)
        self.setWindowTitle("Case Management")
        self.setMinimumWidth(600)

        self.addCreateNewCaseTab()
        self.addInitializeFromScratchTab()
        self.addInitializeFromExistingTab()
        self.addShowCaseInfo()
Exemplo n.º 32
0
    def __init__(self, parent=None):
        QTabWidget.__init__(self, parent)

        self.mDisplayer = QLabel("显控 控件");
        self.mRadioWidget = QLabel("频综 控件");
        self.mServoWidget = QLabel("伺服 控件");

        self.addTab(self.mDisplayer, "显控")
        self.addTab(self.mRadioWidget, "频综")
        self.addTab(self.mServoWidget, "伺服")
Exemplo n.º 33
0
 def __init__(self, parent):
     self.parent = parent
     self.objets = parent.objets
     QTabWidget.__init__(self, parent)
     self.affichage = ProprietesAffichage(self)
     self.addTab(self.affichage, u"Affichage")
     self.infos = ProprietesInfos(self)
     self.addTab(self.infos, u"Informations")
     self.avance = ProprietesAvance(self)
     self.addTab(self.avance, u"Avancé")
Exemplo n.º 34
0
 def __init__(self, run_data_dir, parent=None):
     QTabWidget.__init__(self, parent)
     print 'run-data-dir set to:', run_data_dir
     self.IV_directory = '/calib/velo/dqm/IVScan'
     #self.IV_directory = '/afs/cern.ch/user/d/dsaunder/IV_test'
     print 'IV_directory set to:', self.IV_directory
     self.run_data_dir = run_data_dir
     self.grid_layout = QGridLayout()
     lFuncs.setPadding(self.grid_layout)
     self.setLayout(self.grid_layout)
     self.pages = []
     self.setup_tabs()
Exemplo n.º 35
0
    def __init__(self, parent=None):
        """ Initializer.

        @param parent ancestor of this widget
        """
        QTabWidget.__init__(self, parent)
        self.closeTabButton = CloseTabButton(self)
        self.detachTabButton = DetachTabButton(self)
        self.setCornerWidget(self.closeTabButton, Qt.TopRightCorner)
        self.setCornerWidget(self.detachTabButton, Qt.TopLeftCorner)
        connect = self.connect
        connect(self.closeTabButton, Signals.clicked, self.closeTab)
        connect(self.detachTabButton, Signals.clicked, self.detachTab)
Exemplo n.º 36
0
    def __init__(self, parent):
        self.parent = parent
        QTabWidget.__init__(self, parent)
        self.setStyleSheet("QTabBar {background:white}, QStackedWidget {background:white}")
        self.setTabsClosable(True)
        self.setMovable(True)
        self.tabCloseRequested.connect(self.fermer_onglet)
#        palette = QPalette()
#        white = QColor(Qt.white)
#        palette.setColor(QPalette.Window, white)
#        palette.setColor(QPalette.Button, white)
#        palette.setColor(QPalette.WindowText, white)
#        self.setPalette(palette)

        ###############################
        # Creation de fonctions associees aux entrees du menu "Creer"
        self.creer = {}
        DG = dialogues_geometrie.__dict__
        dialogues = [(nom[8:], DG[nom]) for nom in DG.keys() if nom.startswith("Dialogue")]
        for dialogue in dialogues:
            def f(event = None, self = self, dialogue = dialogue[1]):
                self.creer_objet(dialogue)
            self.creer[dialogue[0]] = f
        ###############################

        #TODO: Ajouter un bouton "New Tab"
        newTabButton = QToolButton(self)
        self.setCornerWidget(newTabButton, Qt.TopRightCorner)
        newTabButton.setCursor(Qt.ArrowCursor)
        newTabButton.setAutoRaise(True)
        newTabButton.setIcon(QIcon(path2("images/newtab3.png")))
        #newTabButton.clicked.connect(self.newTab)
        newTabButton.setToolTip(u"Add page")

        self.gestionnaire_de_mises_a_jour = Gestionnaire_mises_a_jour(self)

        self._liste = [] # liste des onglets

        # Ajoute les differentes composantes :
        self.actualiser_liste_onglets()


        # adaptation du titre de l'application et du menu.
        self.currentChanged.connect(self.changer)
#        self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.changer, self)
#        import fenetre_options
#        self.Bind(fenetre_options.EVT_OPTIONS_MODIFIED, self.OnOptionsModified)
        if self._liste:
            # affiche le titre et le menu du 1er onglet
            self.actualise_onglet(self._liste[0])
            self._liste[0].activer()
Exemplo n.º 37
0
    def __init__(self, parent):
        self.parent = parent
        QTabWidget.__init__(self, parent)
        self.tab_donnees = Donnees(self)
        self.tab_legende = Legende(self)
        self.tab_graduation = Graduation(self)
        self.tab_reglages = Autres(self)
        self.tab_quantiles = Autres_quantile(self)

        self.addTab(self.tab_donnees, u'Données')
        self.addTab(self.tab_legende, u'Légende')
        self.addTab(self.tab_graduation, u'Graduation')
        self.addTab(self.tab_reglages, u'Réglages')
        self.addTab(self.tab_quantiles, u'Quantiles')
Exemplo n.º 38
0
 def __init__(self, parent, actions=None):
     QTabWidget.__init__(self, parent)
     tab_bar = TabsBase(self, parent)
     self.connect(tab_bar, SIGNAL('move_tab(int,int)'), self.move_tab)
     self.connect(tab_bar, SIGNAL('move_tab(long,int,int)'),
                  self.move_tab_from_another_tabwidget)
     self.setTabBar(tab_bar)
     self.menu = QMenu(self)
     if actions:
         add_actions(self.menu, actions)
     self.index_history = []
     self.connect(self, SIGNAL('currentChanged(int)'),
                  self.__current_changed)
     tabsc = QShortcut(QKeySequence("Ctrl+Tab"), parent, self.tab_navigate)
     tabsc.setContext(Qt.WidgetWithChildrenShortcut)
Exemplo n.º 39
0
 def __init__(self, parent, actions=None):
     QTabWidget.__init__(self, parent)
     tab_bar = TabsBase(self, parent)
     self.connect(tab_bar, SIGNAL('move_tab(int,int)'), self.move_tab)
     self.connect(tab_bar, SIGNAL('move_tab(long,int,int)'),
                  self.move_tab_from_another_tabwidget)
     self.setTabBar(tab_bar)
     self.menu = QMenu(self)
     if actions:
         add_actions(self.menu, actions)
     self.index_history = []
     self.connect(self, SIGNAL('currentChanged(int)'),
                  self.__current_changed)
     tabsc = QShortcut(QKeySequence("Ctrl+Tab"), parent, self.tab_navigate)
     tabsc.setContext(Qt.WidgetWithChildrenShortcut)
Exemplo n.º 40
0
    def __init__(self, result):
        QTabWidget.__init__(self)
        self.setWindowTitle("Results")
        self.setMinimumSize(400, 300)

        self.general_tab = GeneralTab(self, result)
        self.logs_tab = Logs(self, result)
        self.tasks_tab = TasksTab(self, result)
        self.scheduler_tab = SchedulerTab(result)
        self.processors_tab = ProcessorsTab(result)

        self.addTab(self.general_tab, "General")
        self.addTab(self.logs_tab, "Logs")
        self.addTab(self.tasks_tab, "Tasks")
        self.addTab(self.scheduler_tab, "Scheduler")
        self.addTab(self.processors_tab, "Processors")
Exemplo n.º 41
0
    def __init__(self, result):
        QTabWidget.__init__(self)
        self.setWindowTitle("Results")
        self.setMinimumSize(400, 300)

        self.general_tab = GeneralTab(self, result)
        self.logs_tab = Logs(self, result)
        self.tasks_tab = TasksTab(self, result)
        self.scheduler_tab = SchedulerTab(result)
        self.processors_tab = ProcessorsTab(result)

        self.addTab(self.general_tab, "General")
        self.addTab(self.logs_tab, "Logs")
        self.addTab(self.tasks_tab, "Tasks")
        self.addTab(self.scheduler_tab, "Scheduler")
        self.addTab(self.processors_tab, "Processors")
Exemplo n.º 42
0
	def __init__(self, parent):
		"""
		Initializes the class.

		:param parent: Parent object.
		:type parent: QObject
		"""

		LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__))

		QTabWidget.__init__(self, parent)

		self.setAcceptDrops(True)

		# --- Setting class attributes. ---
		self.__container = parent
Exemplo n.º 43
0
    def __init__(self, main):
        QTabWidget.__init__(self)
        PropertiesGeneric.__init__(self)
        self.setTabPosition(QTabWidget.East)
        self._main = main
        self._treeProjects = TreeProjectsWidget(main)
        self._treeSymbols = TreeSymbolsWidget(main)
        #Searching the Preferences
        settings = QSettings()
        if settings.value('preferences/interface/showProjectExplorer', Qt.Checked).toInt()[0] == Qt.Checked:
            self.addTab(self._treeProjects, 'Projects')
        if settings.value('preferences/interface/showSymbolsList', Qt.Checked).toInt()[0] == Qt.Checked:
            self.addTab(self._treeSymbols, 'Symbols')

        #Now we see if there is any tab, if there is not, we hide the widget
        if self.count() == 0:
            self.hide()
Exemplo n.º 44
0
    def __init__(self, parent=None):
        QTabWidget.__init__(self, parent)

        self.setDocumentMode(True)
        self.setTabsClosable(True)
        self.setMovable(True)

        self.setCurrentIndex(-1)

        self.tabCloseRequested.connect(self.hideTab)
        self.currentChanged.connect(self.__changedTab)

        # set by calling init()
        self.distributedObjects = None
        self.act = None

        self.openedFiles = {}
Exemplo n.º 45
0
    def __init__(self, parent=None):
        QTabWidget.__init__(self, parent)

        self.setDocumentMode(True)
        self.setTabsClosable(True)
        self.setMovable(True)

        self.setCurrentIndex(-1)

        self.tabCloseRequested.connect(self.hideTab)
        self.currentChanged.connect(self.__changedTab)

        # set by calling init()
        self.distributedObjects = None
        self.act = None

        self.openedFiles = {}
Exemplo n.º 46
0
    def __init__(self, parent=None):
        QTabWidget.__init__(self, parent)
        self.setTabPosition(QTabWidget.East)
        self.__ide = parent

        #Searching the Preferences
        self._treeProjects = None
        if settings.SHOW_PROJECT_EXPLORER:
            self.add_tab_projects()
        self._treeSymbols = None
        if settings.SHOW_SYMBOLS_LIST:
            self.add_tab_symbols()
        self._inspector = None
        if settings.SHOW_WEB_INSPECTOR and settings.WEBINSPECTOR_SUPPORTED:
            self.add_tab_inspector()
        self._listErrors = None
        if settings.SHOW_ERRORS_LIST:
            self.add_tab_errors()
Exemplo n.º 47
0
    def __init__(self, parent=None):
        QTabWidget.__init__(self, parent)
        self.setTabPosition(QTabWidget.East)
        self.__ide = parent
        self._thread_execution = {}

        #Searching the Preferences
        self._treeProjects = None
        if settings.SHOW_PROJECT_EXPLORER:
            self.add_tab_projects()
        self._treeSymbols = None
        if settings.SHOW_SYMBOLS_LIST:
            self.add_tab_symbols()
        self._inspector = None
        if settings.SHOW_WEB_INSPECTOR and settings.WEBINSPECTOR_SUPPORTED:
            self.add_tab_inspector()
        self._listErrors = None
        if settings.SHOW_ERRORS_LIST:
            self.add_tab_errors()
Exemplo n.º 48
0
    def __init__(self, main):
        QTabWidget.__init__(self)
        PropertiesGeneric.__init__(self)
        self.setTabPosition(QTabWidget.East)
        self._main = main
        self._treeProjects = TreeProjectsWidget(main)
        self._treeSymbols = TreeSymbolsWidget(main)
        #Searching the Preferences
        settings = QSettings()
        if settings.value('preferences/interface/showProjectExplorer',
                          Qt.Checked).toInt()[0] == Qt.Checked:
            self.addTab(self._treeProjects, 'Projects')
        if settings.value('preferences/interface/showSymbolsList',
                          Qt.Checked).toInt()[0] == Qt.Checked:
            self.addTab(self._treeSymbols, 'Symbols')

        #Now we see if there is any tab, if there is not, we hide the widget
        if self.count() == 0:
            self.hide()
Exemplo n.º 49
0
    def __init__(self, db, dbName, query="SHOW TABLES"):
        QTabWidget.__init__(self)

        self.db = db
        self.dbName = dbName
        self.queryThread = None

        self.setupUi(self)
        self.tableQueryResult.verticalHeader().hide()

        # toolbar
        self.toolbar = QToolBar(self)
        self.toolbar.addAction(self.actionLoadQuery)
        self.toolbar.addAction(self.actionSaveQuery)
        self.toolbar.addAction(self.actionSaveQueryAs)
        self.toolbarLayout.insertWidget(0, self.toolbar)

        self.txtQuery.setText(query)

        self.btnKillQuery.setVisible(False)
Exemplo n.º 50
0
    def __init__(self, db, dbName, query="SHOW TABLES"):
        QTabWidget.__init__(self)

        self.db = db
        self.dbName = dbName
        self.queryThread = None

        self.setupUi(self)
        self.tableQueryResult.verticalHeader().hide()

        # toolbar
        self.toolbar = QToolBar(self)
        self.toolbar.addAction(self.actionLoadQuery)
        self.toolbar.addAction(self.actionSaveQuery)
        self.toolbar.addAction(self.actionSaveQueryAs)
        self.toolbarLayout.insertWidget(0, self.toolbar)

        self.txtQuery.setText(query)

        self.btnKillQuery.setVisible(False)
Exemplo n.º 51
0
    def __init__(self, parent, result):
        QTabWidget.__init__(self, parent)
        self.result = result
        self.parent = parent

        obs_box = QGroupBox("Observation Window:", self)

        obs = QHBoxLayout()
        self.obs_label = QLabel()
        obs.addWidget(self.obs_label)
        obs_conf = QPushButton("Configure...")
        obs_conf.clicked.connect(self.setObservationWindow)
        obs.addWidget(obs_conf)

        obs_box.setLayout(obs)

        self.setLayout(QVBoxLayout())
        self.layout().addWidget(obs_box)
        self.load_table = LoadTable(self, result)
        self.layout().addWidget(self.load_table)
        self.update()
Exemplo n.º 52
0
    def __init__(self, parent, result):
        QTabWidget.__init__(self, parent)
        self.result = result
        self.parent = parent

        obs_box = QGroupBox("Observation Window:", self)

        obs = QHBoxLayout()
        self.obs_label = QLabel()
        obs.addWidget(self.obs_label)
        obs_conf = QPushButton("Configure...")
        obs_conf.clicked.connect(self.setObservationWindow)
        obs.addWidget(obs_conf)

        obs_box.setLayout(obs)

        self.setLayout(QVBoxLayout())
        self.layout().addWidget(obs_box)
        self.load_table = LoadTable(self, result)
        self.layout().addWidget(self.load_table)
        self.update()
Exemplo n.º 53
0
    def __init__(self, configuration, simulation_tab):
        QTabWidget.__init__(self)

        self._configuration = configuration
        self.setWindowTitle("Model data")
        self._general_tab = GeneralTab(self, configuration)
        self.addTab(self._general_tab, "General")
        self._scheduler_tab = SchedulerTab(self, configuration, simulation_tab)
        self.addTab(self._scheduler_tab, "Scheduler")
        self._processors_tab = ProcessorsTab(self, configuration)
        self.addTab(self._processors_tab, "Processors")
        self._tasks_tab = TasksTab(self, configuration)
        self.addTab(self._tasks_tab, "Tasks")
        self._caches_tab = CachesTab(self, configuration)
        self.addTab(self._caches_tab, "Caches")

        self._prev_etm = None
        self.configuration_changed()

        self.currentChanged.connect(self.current_changed)
        configuration.configurationChanged.connect(self.configuration_changed)
        configuration.configurationSaved.connect(self.configuration_saved)
Exemplo n.º 54
0
 def __init__(self, parent=None):
     """
     Constructor
     初始化
     
     @param parent reference to the parent widget
     @type QWidget
     """
     QTabWidget.__init__(self, parent)
     self.setupUi(self)
     self.test = 0
     self.tabBar().setStyleSheet("QTabBar{font-size:20px;height:40;border:none}")
     self.tab_2.setStyleSheet("QTabWidget{color:#ffffff;font-size:20px;}")
     # 初始化背景图片选择
     self.background_color_flag = 1
     #self.printColor()
     # 图片加载
     self.sina_pic.setPixmap(QPixmap('sina.png').scaled(self.label.width(), self.label.height()))
     self.ghtt_pic.setPixmap(QPixmap('ghtt.png').scaled(self.label.width(), self.label.height()))
     # 初始化省份
     self.BSTree = BSTree()
     for i in self.BSTree.findProvince():
         self.fz_sheng.addItem(i)
Exemplo n.º 55
0
 def __init__( self, parent = None ):
     QTabWidget.__init__( self, parent )
     self.setTabBar( self.RenamableTabBar( self ) )
Exemplo n.º 56
0
 def __init__(self, parent):
     QTabWidget.__init__(self, parent)
Exemplo n.º 57
0
 def __init__(self, parent):
     QTabWidget.__init__(self)
     self.init(parent)
     self.initShape()