No description.
class MainService(QObject):
Main Interact whith NINJA-IDE
def __init__():
No description.
def _beforeFileSaved(fileName):
Signal emitted before save a file
def _currentTabChanged(fileName):
Signal emitted when the current tab changes
def _fileExecuted(fileName):
Signal emitted when the file is executed
def _fileOpened(fileName):
Signal emitted when the file is opened
def _fileSaved(fileName):
Signal emitted after save a file
def _keyPressEvent(qEvent):
Emit the signal when a key is pressed
@event: QEvent
def add_editor(fileName=str, content=None, syntax=None):
def get_actual_tab():
Returns the actual widget
def get_editor():
Returns the actual editor (instance of ninja_ide.gui.editor.Editor)
This method could return None
def get_editor_path():
Returns the actual editor path
This method could return None if there is not an editor
def get_lines_count():
Returns the count of lines in the current editor
def get_opened_documents():
Returns the opened documents
def get_selected_text():
Returns the selected text of and editor.
This method could return None
def get_tab_manager():
Returns the TabWidget (ninja_ide.gui.main_panel.tab_widget.TabWidget)
subclass of QTabWidget
def get_text():
Returns the plain text of the current editor
or None if thre is not an editor.
def insert_text(text):
Insert text in the current cursor position
@text: string
def jump_to_line(lineno):
Jump to a specific line in the current editor
def open_file(fileName=str, cursorPosition=int, positionIsLineNumber=False):
Open a single file, if the file is already open it get focus
def open_files(files, mainTab=True):
def open_image(filename):
class ExplorerService(QObject):
No description.
def __init__():
No description.
def _projectExecuted(projectPath):
Signal emitted when the project is executed
def _projectOpened(projectPath):
Signal emitted when the project is opened
def add_tab(tab, title):
Add a tab with the given title
@tab: Should be an instance (or subclass )of QTabWidget
@title: Name of the tab string
def get_actual_project():
Returns the path of the opened projects
def get_current_project_item():
Returns the current item of the tree projects
this method is a shortcut of self.get_tree_projects().currentItem()
def get_item(path):
No description.
def get_opened_projects():
Return the opened projects in the Tree Project Explorer.
list of <ninja_ide.gui.explorer.tree_projects_widget.ProjectTree>
def get_project_item_by_name(projectName):
Return a ProjectItem that has the name provided.
def get_tree_projects():
Returns the projects tree
def set_project_type_handler(project_type, project_type_handler):
Add a new Project Type and the handler for it
example:
foo_project_handler = FooProjectHandler(...)
set_project_type_handler('Foo Project', foo_project_handler)
Then 'Foo Project' will appear in the New Project wizard
and foo_project_handler instance controls the wizard
Note: project_type_handler SHOULD have a special interface see
ninja_ide.core.plugin_interfaces
def set_symbols_handler(file_extension, symbols_handler):
Add a new Symbol's handler for the given file extension
example:
cpp_symbols_handler = CppSymbolHandler(...)
set_symbols_handler('cpp', cpp_symbols_handler)
Then all symbols in .cpp files will be handle by cpp_symbols_handler
Note: symbols_handler SHOULD have a special interface see
ninja_ide.core.plugin_interfaces