def __init__(self): QWidget.__init__(self) IDEGeneric.__init__(self) self.setWindowTitle('NINJA-IDE {Ninja Is Not Just Another IDE}') self.setWindowIcon(QIcon(resources.images['icon'])) self.setWindowState(Qt.WindowMaximized) self.setMinimumSize(700, 500) #Opactity self.opacity = 1 #ToolBar self._toolbar = QToolBar() self._toolbar.setToolTip('Press and Drag to Move') styles.set_style(self._toolbar, 'toolbar-default') self.addToolBar(Qt.LeftToolBarArea, self._toolbar) self._toolbar.setToolButtonStyle(Qt.ToolButtonIconOnly) #StatusBar self._status = StatusBar() self._status.hide() self.setStatusBar(self._status) #Main Widgets self.main = MainWindow(self) self.setCentralWidget(self.main) #Menu menubar = self.menuBar() styles.apply(menubar, 'menu') file_ = menubar.addMenu('&File') edit = menubar.addMenu('&Edit') view = menubar.addMenu('&View') project = menubar.addMenu('&Project') self.pluginsMenu = menubar.addMenu('P&lugins') about = menubar.addMenu('&About') #The order of the icons in the toolbar is defined by this calls self._menuFile = MenuFile(file_, self._toolbar, self.main) self._menuView = MenuView(view, self, self.main) self._menuEdit = MenuEdit(edit, self._toolbar, self.main, self._status) self._menuProject = MenuProject(project, self._toolbar, self.main) self._menuPlugins = MenuPlugins(self.pluginsMenu, self) self._menuAbout = MenuAbout(about, self.main) self.main.container.load_toolbar(self._toolbar) self.main._central.actual_tab().obtain_editor().setFocus() filenames, projects_path = core.cliparser.parse() for filename in filenames: self.main.open_document(filename) for project_path in projects_path: self.main.open_project_folder(project_path) self.connect(self.main, SIGNAL("fileSaved(QString)"), self.show_status_message)
def __init__(self): QTreeWidget.__init__(self) styles.apply(self, 'tree')