示例#1
0
文件: main.py 项目: axelson/pomni
 def __init__(self, component_manager):
     MainWidget.__init__(self, component_manager)
     self.switcher = self.question_dialog = self.window = self.w_tree = \
         self.question_dialog_label = self.information_dialog = \
         self.information_dialog_label  = self.theme = \
         self.fullscreen = None
     self.htmlopener = urllib.FancyURLopener()
     self.widgets = {}
     self.soundplayer = SoundPlayer()
示例#2
0
 def __init__(self, component_manager):
     MainWidget.__init__(self, component_manager)
     QtGui.QMainWindow.__init__(self)
     self.setupUi(self)
     # Qt designer does not allow setting multiple shortcuts per action.
     self.actionDeleteCurrentCard.setShortcuts([QtCore.Qt.Key_Delete, QtCore.Qt.Key_Backspace])
     self.status_bar_widgets = []
     self.progress_bar = None
     self.progress_bar_update_interval = 1
     self.progress_bar_last_shown_value = 0
示例#3
0
 def __init__(self, component_manager):
     MainWidget.__init__(self, component_manager)
     QtGui.QMainWindow.__init__(self)
     self.setupUi(self)
     # Qt designer does not allow setting multiple shortcuts per action.
     self.actionDeleteCurrentCard.setShortcuts\
         ([QtCore.Qt.Key_Delete, QtCore.Qt.Key_Backspace])
     self.status_bar_widgets = []
     self.progress_bar = None
     self.progress_bar_update_interval = 1
     self.progress_bar_last_shown_value = 0
示例#4
0
 def activate(self):
     MainWidget.activate(self)
     state = self.config()["main_window_state"]
     if state:
         self.restoreGeometry(state)
     # Dynamically fill study mode menu.
     study_modes = [x for x in self.component_manager.all("study_mode")]
     study_modes.sort(key=lambda x: x.menu_weight)
     study_mode_group = QtWidgets.QActionGroup(self)
     self.study_mode_for_action = {}
     for study_mode in study_modes:
         action = QtWidgets.QAction(study_mode.name, self)
         action.setCheckable(True)
         if self.config()["study_mode"] == study_mode.id:
             action.setChecked(True)
         study_mode_group.addAction(action)
         self.menu_Study.addAction(action)
         self.study_mode_for_action[action] = study_mode
     study_mode_group.triggered.connect(self.change_study_mode)
     self.retranslateUi(self)
     self.timer = QtCore.QTimer()
     self.timer.timeout.connect(self.controller_heartbeat)
     self.timer.start(1000)  # 1 sec.
    def test_coverage_2(self):
        from mnemosyne.libmnemosyne.ui_components.main_widget import MainWidget
        w = MainWidget(self.mnemosyne.component_manager)
        w.show_information("")
        w.show_error("")
        w.set_status_bar_message("")

        self.controller().show_add_cards_dialog()
        self.controller().show_edit_card_dialog()
        self.controller().show_insert_sound_dialog("")
        self.controller().show_insert_video_dialog("")
        self.controller().show_insert_flash_dialog("")
        self.controller().show_download_source_dialog()
        self.controller().show_sync_dialog()
        self.controller().show_manage_plugins_dialog()
        self.controller().show_manage_card_types_dialog()
        self.controller().show_statistics_dialog()
        self.controller().show_configuration_dialog()
        self.controller().show_browse_cards_dialog()
        self.controller().show_activate_cards_dialog()
        self.controller().show_import_file_dialog()
        self.controller().show_export_file_dialog()
        self.controller().next_rollover = 0
        self.controller().heartbeat()
示例#6
0
 def __init__(self, component_manager):
     MainWidget.__init__(self, component_manager)
示例#7
0
 def __init__(self, component_manager):
     MainWidget.__init__(self, component_manager)
     self.is_progress_bar_showing = False
     self.progress_bar_current_value = 0
     self.progress_bar_update_interval = 1
     self.progress_bar_last_shown_value = 0		
示例#8
0
 def __init__(self, component_manager):
     MainWidget.__init__(self, component_manager)
     gui.CeFrame.__init__(self, title="Mnemosyne")
示例#9
0
文件: main.py 项目: bartosh/pomni
 def __init__(self, component_manager):
     MainWidget.__init__(self, component_manager)
     self.window = None
     self.switcher = None
     self.widgets = {}
     self._soundplayer = None
示例#10
0
 def __init__(self, component_manager):
     MainWidget.__init__(self, component_manager)
     gui.CeFrame.__init__(self, title="Mnemosyne")
示例#11
0
 def __init__(self, component_manager):
     MainWidget.__init__(self, component_manager)
示例#12
0
 def __init__(self, component_manager):
     MainWidget.__init__(self, component_manager)
     QtGui.QMainWindow.__init__(self)
     self.setupUi(self)
     self.status_bar_widgets = []
示例#13
0
 def __init__(self, component_manager):
     MainWidget.__init__(self, component_manager)
     self.is_progress_bar_showing = False
     self.progress_bar_maximum = 100
     self.progress_bar_update_interval = 1
     self.progress_bar_last_shown_value = 0