diff options
Diffstat (limited to 'src/frontEnd')
-rwxr-xr-x | src/frontEnd/Application.py | 12 | ||||
-rw-r--r-- | src/frontEnd/DockArea.py | 24 | ||||
-rw-r--r-- | src/frontEnd/ProjectExplorer.py | 16 |
3 files changed, 48 insertions, 4 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index ca9471c6..10ee598f 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -30,7 +30,7 @@ import os import sys import time import shutil - +from PyQt4.Qt import QSize class Application(QtGui.QMainWindow): """ @@ -119,6 +119,8 @@ class Application(QtGui.QMainWindow): self.lefttoolbar.addAction(self.pcb) self.lefttoolbar.addAction(self.model) self.lefttoolbar.setOrientation(QtCore.Qt.Vertical) + self.lefttoolbar.setIconSize(QSize(40,40)) + def new_project(self): """ @@ -235,7 +237,13 @@ class MainView(QtGui.QWidget): #Area to be included in MainView self.noteArea = QtGui.QTextEdit() - self.obj_dockarea = DockArea.DockArea() + #CSS + + self.noteArea.setStyleSheet(" \ + QWidget { border-radius: 15px; border: 1px solid gray; padding: 5px; } \ + ") + + self.obj_dockarea = DockArea.DockArea() self.obj_projectExplorer = ProjectExplorer.ProjectExplorer() #Adding content to vertical middle Split. diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py index 76216aa6..4e4f038c 100644 --- a/src/frontEnd/DockArea.py +++ b/src/frontEnd/DockArea.py @@ -19,7 +19,10 @@ class DockArea(QtGui.QMainWindow): for dockName in dockList: dock[dockName] = QtGui.QDockWidget(dockName) dock[dockName].setWidget(QtGui.QTextEdit()) - + #CSS + dock[dockName].setStyleSheet(" \ + QWidget { border-radius: 15px; border: 1px solid gray; padding: 5px; width: 200px; height: 150px; } \ + ") self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock[dockName]) #self.tabifyDockWidget(dock['Notes'],dock['Blank']) @@ -44,6 +47,13 @@ class DockArea(QtGui.QMainWindow): self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock['Tips-'+str(count)]) self.tabifyDockWidget(dock['Welcome'],dock['Tips-'+str(count)]) + """ + #CSS + dock['Tips-'+str(count)].setStyleSheet(" \ + QWidget { border-radius: 15px; border: 1px solid gray; padding: 5px; width: 200px; height: 150px; } \ + ") + """ + dock['Tips-'+str(count)].setVisible(True) dock['Tips-'+str(count)].setFocus() dock['Tips-'+str(count)].raise_() @@ -72,6 +82,12 @@ class DockArea(QtGui.QMainWindow): self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock['Plotting-'+str(count)]) self.tabifyDockWidget(dock['Welcome'],dock['Plotting-'+str(count)]) + """ + #CSS + dock['Plotting-'+str(count)].setStyleSheet(" \ + QWidget { border-radius: 15px; border: 1px solid gray; padding: 5px; width: 200px; height: 150px; } \ + ") + """ dock['Plotting-'+str(count)].setVisible(True) dock['Plotting-'+str(count)].setFocus() dock['Plotting-'+str(count)].raise_() @@ -103,6 +119,12 @@ class DockArea(QtGui.QMainWindow): self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock['NgSpice-'+str(count)]) self.tabifyDockWidget(dock['Welcome'],dock['NgSpice-'+str(count)]) + """ + #CSS + dock['NgSpice-'+str(count)].setStyleSheet(" \ + QWidget { border-radius: 15px; border: 1px solid gray; padding: 0px; width: 200px; height: 150px; } \ + ") + """ dock['NgSpice-'+str(count)].setVisible(True) dock['NgSpice-'+str(count)].setFocus() dock['NgSpice-'+str(count)].raise_() diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index 8d91dc6c..d98c5d15 100644 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -14,6 +14,18 @@ class ProjectExplorer(QtGui.QWidget): self.treewidget.setHeaderItem(header) self.treewidget.setColumnHidden(1,True) + #CSS + self.treewidget.setStyleSheet(" \ + QTreeView { border-radius: 15px; border: 1px solid gray; padding: 5px; width: 200px; height: 150px; } \ + QTreeView::branch:has-siblings:!adjoins-item { border-image: url(../images/vline.png) 0; } \ + QTreeView::branch:has-siblings:adjoins-item { border-image: url(../images/branch-more.png) 0; } \ + QTreeView::branch:!has-children:!has-siblings:adjoins-item { border-image: url(../images/branch-end.png) 0; } \ + QTreeView::branch:has-children:!has-siblings:closed, \ + QTreeView::branch:closed:has-children:has-siblings { border-image: none; image: url(../images/branch-closed.png); } \ + QTreeView::branch:open:has-children:!has-siblings, \ + QTreeView::branch:open:has-children:has-siblings { border-image: none; image: url(../images/branch-open.png); } \ + ") + for parents, children in self.obj_appconfig.project_explorer.items(): os.path.join(parents) if os.path.exists(parents): @@ -96,7 +108,9 @@ class ProjectExplorer(QtGui.QWidget): def save_data(self): self.fopen=open(self.filePath, 'w') - self.fopen.write(self.text.toPlainText()) + lines = str(self.text.toPlainText()).split('\n') + lines=[i+'\r' for i in lines] + self.fopen.writelines(lines) self.fopen.close() self.textwindow.close() |