.. link: .. description: .. tags: .. date: 2013/08/18 00:00:00 .. title: NINJA-IDE .. slug: wizard_new_project .. class:: alert alert-info pull-top .. contents:: *Module:* `wizard_new_project.py `_ API ===================================================================================================== No description. *Imports:* ------------ - `os `_ - `sys `_ - `ninja_ide.tools.logger.NinjaLogger `_ - `PyQt4.QtGui.QComboBox `_ - `PyQt4.QtGui.QCompleter `_ - `PyQt4.QtGui.QDirModel `_ - `PyQt4.QtGui.QFileDialog `_ - `PyQt4.QtGui.QGridLayout `_ - `PyQt4.QtGui.QHBoxLayout `_ - `PyQt4.QtGui.QLabel `_ - `PyQt4.QtGui.QLineEdit `_ - `PyQt4.QtGui.QListWidget `_ - `PyQt4.QtGui.QMessageBox `_ - `PyQt4.QtGui.QPixmap `_ - `PyQt4.QtGui.QPlainTextEdit `_ - `PyQt4.QtGui.QPushButton `_ - `PyQt4.QtGui.QVBoxLayout `_ - `PyQt4.QtGui.QWizard `_ - `PyQt4.QtGui.QWizardPage `_ - `PyQt4.QtCore.Qt `_ - `PyQt4.QtCore.SIGNAL `_ - `__future__.absolute_import `_ - `ninja_ide.core.file_handling.file_manager `_ - `ninja_ide.tools.json_manager `_ - `ninja_ide.core.plugin_interfaces `_ - `ninja_ide.resources `_ - `ninja_ide.core.settings `_ *Global Attributes:* ---------------------- - `DEBUG [at ln:52] `_ - `logger [at ln:50] `_ ---- *Class:* `WizardNewProject(QWizard) `_ ------------------------------------------------------------------------------------------------------------------------------------------------------- .. code:: python class WizardNewProject(QWizard): | Wizard to create a new project (of any kind), it implements the base | behavior. Also, it set two special projects type handler | (PythonProjectHandler, ImportFromSourcesProjectHandler) *Attributes* ~~~~~~~~~~~~~~ - `__explorer [at ln:67] `_ - `option [at ln:91] `_ - `projectTypePage [at ln:79] `_ *Function:* `__init__(parent) [at ln:65] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def __init__(parent): No description. ---- *Function:* `_load_project(path) [at ln:131] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def _load_project(path): | Open Project based on path into Explorer ---- *Function:* `_load_project_with_extensions(path, extensions) [at ln:137] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def _load_project_with_extensions(path, extensions): | Open Project based on path into Explorer with extensions ---- *Function:* `add_project_pages(option=str) [at ln:89] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def add_project_pages(option=str): No description. ---- *Function:* `done(result) [at ln:102] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def done(result): No description. ---- *Class:* `PythonProjectHandler(plugin_interfaces.IProjectTypeHandler) `_ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ .. code:: python class PythonProjectHandler(plugin_interfaces.IProjectTypeHandler): | Handler for Python projects *Attributes* ~~~~~~~~~~~~~~ - `__explorer [at ln:154] `_ *Function:* `__init__(explorer) [at ln:153] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def __init__(explorer): No description. ---- *Function:* `get_context_menus() [at ln:162] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def get_context_menus(): | Get a special menu for new Python projects ---- *Function:* `get_pages() [at ln:156] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def get_pages(): | Get extra pages for new Python projects ---- *Function:* `on_wizard_finish(wizard) [at ln:168] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def on_wizard_finish(wizard): | Create the ninja\_porject (.nja file), create the main \_\_init\_\_.py | and open the project ---- *Class:* `PageProjectType(QWizardPage) `_ ----------------------------------------------------------------------------------------------------------------------------------------------------------- .. code:: python class PageProjectType(QWizardPage): No description. *Attributes* ~~~~~~~~~~~~~~ - `_wizard [at ln:253] `_ - `listWidget [at ln:256] `_ - `option [at ln:270] `_ *Function:* `__init__(wizard) [at ln:249] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def __init__(wizard): No description. ---- *Function:* `load_pages() [at ln:273] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def load_pages(): No description. ---- *Function:* `validatePage() [at ln:269] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def validatePage(): No description. ---- *Class:* `ImportFromSourcesProjectHandler(plugin_interfaces.IProjectTypeHandler) `_ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- .. code:: python class ImportFromSourcesProjectHandler(plugin_interfaces.IProjectTypeHandler): | Handler for Import from existing sources project *Attributes* ~~~~~~~~~~~~~~ - `__explorer [at ln:206] `_ *Function:* `__init__(explorer) [at ln:205] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def __init__(explorer): No description. ---- *Function:* `get_context_menus() [at ln:214] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def get_context_menus(): | Get a special menu for Import from sources projects ---- *Function:* `get_pages() [at ln:208] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def get_pages(): | Get extra pages for Import from sources projects ---- *Function:* `on_wizard_finish(wizard) [at ln:220] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def on_wizard_finish(wizard): | Create the ninja\_porject (.nja file) and open the project ---- *Class:* `PageProjectProperties(QWizardPage) `_ ----------------------------------------------------------------------------------------------------------------------------------------------------------------- .. code:: python class PageProjectProperties(QWizardPage): No description. *Attributes* ~~~~~~~~~~~~~~ - `_dir_completer [at ln:316] `_ - `btnExamine [at ln:310] `_ - `cboLicense [at ln:325] `_ - `lblDescription [at ln:294] `_ - `lblLicense [at ln:295] `_ - `lblName [at ln:292] `_ - `lblPlace [at ln:293] `_ - `lblVenvFolder [at ln:296] `_ - `txtDescription [at ln:323] `_ - `txtName [at ln:305] `_ - `txtPlace [at ln:308] `_ - `vbtnExamine [at ln:319] `_ - `vtxtPlace [at ln:315] `_ *Function:* `__init__() [at ln:284] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def __init__(): No description. ---- *Function:* `isComplete() [at ln:353] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def isComplete(): No description. ---- *Function:* `load_folder() [at ln:358] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def load_folder(): No description. ---- *Function:* `load_folder_venv() [at ln:363] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def load_folder_venv(): No description.