From a31c044d8d8307060664e2b0025054ca0584016d Mon Sep 17 00:00:00 2001 From: fahim Date: Wed, 13 May 2015 18:02:14 +0530 Subject: Subject: Added python plotting as dock widget Description: Added python plotting as dock widget --- src/frontEnd/Application.py | 3 +- src/frontEnd/DockArea.py | 83 +++++++++++++++++++++------------------ src/frontEnd/ProjectExplorer.pyc | Bin 5058 -> 5049 bytes src/frontEnd/ViewManagement.pyc | Bin 2847 -> 2841 bytes src/frontEnd/Workspace.pyc | Bin 3401 -> 3394 bytes src/frontEnd/__init__.pyc | Bin 139 -> 138 bytes 6 files changed, 47 insertions(+), 39 deletions(-) (limited to 'src/frontEnd') diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index dd2e2264..879c841f 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -59,6 +59,7 @@ class Application(QtGui.QMainWindow): self.obj_appconfig._app_width, self.obj_appconfig._app_heigth) self.setWindowTitle(self.obj_appconfig._APPLICATION) + self.showMaximized() self.show() @@ -170,7 +171,7 @@ class Application(QtGui.QMainWindow): def help_project(self): print "Help is called" print "Current Project : ",self.obj_appconfig.current_project - self.obj_Mainview.obj_dockarea.createTestEditor() + self.obj_Mainview.obj_dockarea.plottingEditor() def testing(self): diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py index a34d1cda..e9755302 100644 --- a/src/frontEnd/DockArea.py +++ b/src/frontEnd/DockArea.py @@ -1,11 +1,15 @@ from PyQt4 import QtGui,QtCore +from ngspiceSimulation.pythonPlotting import plotWindow #from configuration.Appconfig import Appconfig -dockList = ['Blank','Notes'] + +dockList = ['Blank'] +count = 1 dock = {} class DockArea(QtGui.QMainWindow): + def __init__(self): QtGui.QMainWindow.__init__(self) @@ -15,59 +19,62 @@ class DockArea(QtGui.QMainWindow): self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock[dockName]) - self.tabifyDockWidget(dock['Notes'],dock['Blank']) + #self.tabifyDockWidget(dock['Notes'],dock['Blank']) self.show() - def createDockArea(self): + + def createTestEditor(self): """ - This function creates Dock Area + This function create widget for Library Editor """ - self.mainWindow = QtGui.QMainWindow() + global count + + self.testWidget = QtGui.QWidget() + self.testArea = QtGui.QTextEdit() + self.testLayout = QtGui.QVBoxLayout() + self.testLayout.addWidget(self.testArea) - - for dockName in dockList: - dock[dockName] = QtGui.QDockWidget(dockName) - dock[dockName].setWidget(QtGui.QTextEdit()) - - self.mainWindow.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock[dockName]) - + #Adding to main Layout + self.testWidget.setLayout(self.testLayout) + dock['Tips-'+str(count)] = QtGui.QDockWidget('Tips-'+str(count)) + dock['Tips-'+str(count)].setWidget(self.testWidget) + self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock['Tips-'+str(count)]) + self.tabifyDockWidget(dock['Blank'],dock['Tips-'+str(count)]) - - self.mainWindow.tabifyDockWidget(dock['Notes'],dock['Blank']) - self.mainWindow.tabifyDockWidget(dock['Blank'],dock['Tips']) + dock['Tips-'+str(count)].setVisible(True) + dock['Tips-'+str(count)].setFocus() + dock['Tips-'+str(count)].raise_() + count = count + 1 + + def plottingEditor(self): """ - if len(dockList) > 1: - for index in range(0, len(dockList) - 1): - self.mainWindow.tabifiedDockWidgets(dockList[index]),dockList[index + 1]) + This function create widget for Library Editor """ + global count + self.plottingWidget = QtGui.QWidget() + #self.plottingArea = QtGui.QTextEdit() - - self.mainWindow.show() + self.plottingLayout = QtGui.QVBoxLayout() + #self.plottingLayout.addWidget(self.plottingArea) + self.plottingLayout.addWidget(plotWindow()) + #Adding to main Layout + self.plottingWidget.setLayout(self.plottingLayout) + dock['Plotting-'+str(count)] = QtGui.QDockWidget('Plotting-'+str(count)) + dock['Plotting-'+str(count)].setWidget(self.plottingWidget) + self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock['Plotting-'+str(count)]) + self.tabifyDockWidget(dock['Blank'],dock['Plotting-'+str(count)]) - return self.mainWindow - + dock['Plotting-'+str(count)].setVisible(True) + dock['Plotting-'+str(count)].setFocus() + dock['Plotting-'+str(count)].raise_() + + count = count + 1 - def createTestEditor(self): - """ - This function create widget for Library Editor - """ - self.testWidget = QtGui.QWidget() - self.testArea = QtGui.QTextEdit() - self.testLayout = QtGui.QVBoxLayout() - self.testLayout.addWidget(self.testArea) - - #Adding to main Layout - self.testWidget.setLayout(self.testLayout) - dock['Tips'] = QtGui.QDockWidget('Tips') - dock['Tips'].setWidget(self.testWidget) - - - self.tabifyDockWidget(dock['Blank'],dock['Tips']) diff --git a/src/frontEnd/ProjectExplorer.pyc b/src/frontEnd/ProjectExplorer.pyc index 7906f8b0..4be2d8b1 100644 Binary files a/src/frontEnd/ProjectExplorer.pyc and b/src/frontEnd/ProjectExplorer.pyc differ diff --git a/src/frontEnd/ViewManagement.pyc b/src/frontEnd/ViewManagement.pyc index eeef23a3..efc44372 100644 Binary files a/src/frontEnd/ViewManagement.pyc and b/src/frontEnd/ViewManagement.pyc differ diff --git a/src/frontEnd/Workspace.pyc b/src/frontEnd/Workspace.pyc index e1072b0e..b5484f93 100644 Binary files a/src/frontEnd/Workspace.pyc and b/src/frontEnd/Workspace.pyc differ diff --git a/src/frontEnd/__init__.pyc b/src/frontEnd/__init__.pyc index 5ea864ab..69f75f53 100644 Binary files a/src/frontEnd/__init__.pyc and b/src/frontEnd/__init__.pyc differ -- cgit