NINJA-IDE

Contents

Module: plugin_services.py API

No description.

Class: ToolbarService(QObject)

class ToolbarService(QObject):
Interact with the Toolbar

Function: __init__(toolbar) [at ln:287]

def __init__(toolbar):

No description.


Function: add_action(action) [at ln:291]

def add_action(action):
Add an action to the Toolbar
@action: Should be an instance(or subclass) of QAction

Class: MainService(QObject)

class MainService(QObject):
Main Interact whith NINJA-IDE

Function: __init__() [at ln:51]

def __init__():

No description.


Function: _beforeFileSaved(fileName) [at ln:251]

def _beforeFileSaved(fileName):
Signal emitted before save a file

Function: _currentTabChanged(fileName) [at ln:264]

def _currentTabChanged(fileName):
Signal emitted when the current tab changes

Function: _fileExecuted(fileName) [at ln:270]

def _fileExecuted(fileName):
Signal emitted when the file is executed

Function: _fileOpened(fileName) [at ln:276]

def _fileOpened(fileName):
Signal emitted when the file is opened

Function: _fileSaved(fileName) [at ln:257]

def _fileSaved(fileName):
Signal emitted after save a file

Function: _keyPressEvent(qEvent) [at ln:244]

def _keyPressEvent(qEvent):
Emit the signal when a key is pressed
@event: QEvent

Function: add_editor(fileName=str, content=None, syntax=None) [at ln:130]

def add_editor(fileName=str, content=None, syntax=None):
Create a new editor

Function: add_menu(menu, lang=str) [at ln:85]

def add_menu(menu, lang=str):
Add an *extra context menu* to the editor context menu

Function: get_actual_tab() [at ln:237]

def get_actual_tab():
Returns the actual widget

Function: get_editor() [at ln:139]

def get_editor():
Returns the actual editor (instance of ninja_ide.gui.editor.Editor)
This method could return None

Function: get_editor_encoding(editorWidget=None) [at ln:156]

def get_editor_encoding(editorWidget=None):
Returns the editor encoding

Function: get_editor_path() [at ln:146]

def get_editor_path():
Returns the actual editor path
This method could return None if there is not an editor

Function: get_file_syntax(editorWidget=None) [at ln:118]

def get_file_syntax(editorWidget=None):
Return the syntax for this file -> {}.

Function: get_lines_count() [at ln:202]

def get_lines_count():
Returns the count of lines in the current editor

Function: get_opened_documents() [at ln:91]

def get_opened_documents():
Returns the opened documents

Function: get_project_owner(editorWidget=None) [at ln:100]

def get_project_owner(editorWidget=None):
Return the project where this file belongs, or an empty string.

Function: get_selected_text() [at ln:177]

def get_selected_text():
Returns the selected text of and editor.
This method could return None

Function: get_tab_manager() [at ln:74]

def get_tab_manager():
Returns the TabWidget (ninja_ide.gui.main_panel.tab_widget.TabWidget)
subclass of QTabWidget

Function: get_text() [at ln:167]

def get_text():
Returns the plain text of the current editor
or None if thre is not an editor.

Function: insert_text(text) [at ln:187]

def insert_text(text):
Insert text in the current cursor position
@text: string

Function: jump_to_line(lineno) [at ln:196]

def jump_to_line(lineno):
Jump to a specific line in the current editor

Function: open_file(fileName=str, cursorPosition=int, positionIsLineNumber=False) [at ln:223]

def open_file(fileName=str, cursorPosition=int, positionIsLineNumber=False):
Open a single file, if the file is already open it get focus

Function: open_files(files, mainTab=True) [at ln:217]

def open_files(files, mainTab=True):
Open many files

Function: open_image(filename) [at ln:231]

def open_image(filename):
Open a single image

Function: save_file() [at ln:211]

def save_file():
Save the actual file

Class: MenuAppService(QObject)

class MenuAppService(QObject):
Interact with the Plugins Menu

Function: __init__(plugins_menu) [at ln:304]

def __init__(plugins_menu):

No description.


Function: add_action(action) [at ln:314]

def add_action(action):
Add an action to the Plugin Menu of NINJA

Function: add_menu(menu) [at ln:308]

def add_menu(menu):
Add an extra menu to the Plugin Menu of NINJA

Class: ExplorerService(QObject)

class ExplorerService(QObject):

No description.

Function: __init__() [at ln:369]

def __init__():

No description.


Function: _projectExecuted(projectPath) [at ln:489]

def _projectExecuted(projectPath):
Signal emitted when the project is executed

Function: _projectOpened(projectPath) [at ln:483]

def _projectOpened(projectPath):
Signal emitted when the project is opened

Function: add_project_menu(menu, lang=str) [at ln:461]

def add_project_menu(menu, lang=str):
Add an extra menu to the project explorer for the files
with the given extension.
@lang: String with file extension format (py, php, json)

Function: add_project_menu_by_scope(menu, scope=None) [at ln:470]

def add_project_menu_by_scope(menu, scope=None):
Add an extra menu to the project explorer to the specific scope
@scope: String with the menu scope (all, project, folder, file)

Function: add_tab(tab, title) [at ln:439]

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

Function: get_actual_project() [at ln:447]

def get_actual_project():
Returns the path of the opened projects

Function: get_current_project_item() [at ln:388]

def get_current_project_item():
Returns the current item of the tree projects
this method is a shortcut of self.get_tree_projects().currentItem()

Function: get_item(path) [at ln:384]

def get_item(path):

No description.


Function: get_opened_projects() [at ln:453]

def get_opened_projects():
Return the opened projects in the Tree Project Explorer.
list of <ninja_ide.gui.explorer.tree_projects_widget.ProjectTree>

Function: get_project_item_by_name(projectName) [at ln:397]

def get_project_item_by_name(projectName):
Return a ProjectItem that has the name provided.

Function: get_tree_projects() [at ln:378]

def get_tree_projects():
Returns the projects tree

Function: get_tree_symbols() [at ln:406]

def get_tree_symbols():
Returns the symbols tree

Function: set_project_type_handler(project_type, project_type_handler) [at ln:425]

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

Function: set_symbols_handler(file_extension, symbols_handler) [at ln:412]

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
Contents © 2013 NINJA-IDE - Powered by Nikola and Documentor