Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many changes to gui #17

Open
wants to merge 69 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
be37189
Source code is now python3 compatible. Needs to build test the gui now.
Nov 21, 2016
8d19a75
Tab and spaces mixing is now removed.
Nov 21, 2016
cf5ec63
Test on ghevar.
Nov 21, 2016
770b45b
Launching but not populating canvas.
Nov 21, 2016
39fd774
This is almost compelte. Just need to tweak here and there.
Nov 21, 2016
f70c44c
ready of a first pull request.
Nov 21, 2016
42954b2
Needs to fix few bugs on drag and connect.
Nov 21, 2016
3d1c1fa
Various typos in buidkkit plugin are fixed.
Nov 21, 2016
5538bb4
Fixed a commet error in kkit.py file,
Nov 21, 2016
0bd51ab
For python3.
Nov 22, 2016
2e8969f
Launch is fine with python3.
Nov 22, 2016
7ec0fcd
I just need paper-2015 examples
Nov 22, 2016
50f3764
Just examples from paper.
Nov 22, 2016
70ebf93
Examples only from paper.
Nov 22, 2016
d90ed56
Merge branch 'master' into python3
Nov 22, 2016
2be3668
Fixed syntax.
Nov 22, 2016
311706e
Cleanup in qsettings.
Nov 22, 2016
cde7c04
String/float comparision fixes.
Nov 22, 2016
11f5906
Runs fine. In run view, I can see some buttons.
Nov 22, 2016
5218bdb
Well. Icon issue is fixed. Using absolute paths rather than relative
Nov 22, 2016
0038b39
reorganized modules.
Nov 22, 2016
586a391
Fixed the plugin import scheme in MWindow so class comparison is
Nov 22, 2016
468dde4
Fixed squid demo for python3.
Nov 22, 2016
e6a69b7
Removed .gitignore.
Nov 22, 2016
e238e13
Removed popup for now.
Nov 22, 2016
a79074c
Okie dok. This looks fine. Now layout engine.
Nov 22, 2016
83b0d89
This is the current branch.
Nov 22, 2016
d4e4173
Some restructuring ...
Nov 23, 2016
c57ecdc
A lot of renaming. Problem installing suds in proper place.
Nov 23, 2016
e161b52
Now time to fix the icon paths.
Nov 23, 2016
0bfb2d3
Working fine on ubuntu-14.04.
Nov 23, 2016
eff51f8
Merge branch 'master' into python2
Nov 23, 2016
6749997
New travis script to test gui as module.
Dec 1, 2016
8df933a
Fixed some issues with python3 compileall, python2 compileall
Dec 1, 2016
1ab2a9b
python3-matplotlib is not available on Travis.
Dec 1, 2016
fd2b639
Icons are in one place. Fixed their paths.
Dec 1, 2016
b58a3a8
Removed unneccsary files.
Dec 1, 2016
984b754
Demofiles are collected by a function now.
Dec 1, 2016
80f0026
build is successful.
Jun 12, 2019
02856bc
Merge branch 'master' of https://github.com/BhallaLab/moose-gui into …
Jun 12, 2019
7d202a9
Compiles with python3. Now port to qt5.
Jun 12, 2019
eeb3445
replaced all instance of PyQt4 with PyQt5 [skip ci]
Jun 12, 2019
3253d57
Remove Upi and Harsha email from build notifications.
Jun 12, 2019
276cb03
[skip ci] temp commit.
Jun 12, 2019
859998f
segv finally ;-)
Jun 12, 2019
5f91378
added __main__.py. python -m moosegui will launch the gui.
Jun 12, 2019
885768c
Should test on ubuntu.
Jun 12, 2019
2b85ce0
small tweaks. Test with python3.6
Jun 12, 2019
6efba1d
Updated travis.
Jun 12, 2019
e634ca1
Some more pyqt5 related tweaks.
Jun 12, 2019
7be19ae
fixes in one more file.
Jun 12, 2019
1c8cdfc
Fixed QWidget import error.
Jun 12, 2019
fc56fea
Some more fixes.
Jun 12, 2019
5d71222
cyclic imports.
Jun 13, 2019
d18631b
mtree is fixed.
Jun 13, 2019
cf27207
Added a test script and fixed mtree.
Jun 13, 2019
29efc1b
Plugin windows always stays on top.
Jun 13, 2019
df75d1e
more import related fixes.
Jun 13, 2019
dc15342
major cleanup.
Jun 13, 2019
80fe09a
Some more refactoring.
Jun 13, 2019
793500c
Some more changes.
Jun 13, 2019
12b44ae
Refactoring is almost over. Now make it work. Phew!
Jun 13, 2019
25f2f74
more refactoring. Seg-V while loading.
Jun 13, 2019
27a687c
Icons are back.
Jun 13, 2019
1855a50
now drag and drop.
Jun 13, 2019
c596104
Drag and drop not working. Screw the old code, rewrite.
Jun 13, 2019
45e4bed
Some cleanup.
Jun 13, 2019
0e8c6cc
So very stupid. This GUI is one horrible mess of work.
Jun 13, 2019
9867223
Merged devel branch.
Jun 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "drawsbml"]
path = drawsbml
url = git@github.com:dilawar/drawsbml
16 changes: 5 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@ notifications:
email:
recipients:
- dilawar.s.rajput@gmail.com
- upi.bhalla@gmail.com
- hrani@ncbs.res.in


install:
- wget http://download.opensuse.org/repositories/home:moose/xUbuntu_14.04/Release.key
- sudo apt-key add - < Release.key
- sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/moose/xUbuntu_14.04/ /' >> /etc/apt/sources.list.d/moose.list"
- sudo apt-get -y update
- sudo apt-get -y --force-yes install python3 python-pip
- sudo apt-get -y --force-yes install moose
- sudo -H pip install python-libsbml
- sudo pip install python-libsbml

script:
- # Making sure no python incompatible file is added.
- python -m compileall -q .
- python -c 'import moose'
- #python -c 'import moogli'
- # More tests here for gui.
- python3 -m pip install pymoose --user --pre
- python3 -m compileall -q .
- python3 -c 'import moose'
- python3 setup.py install --user
4 changes: 4 additions & 0 deletions AUTHOR
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Harsha Rani
Subhasis Ray
Aviral Goel
Dilawar Singh
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
PY := $(shell which python3)

all : check build

check :
$(PY) -m compileall -q .

build :
$(PY) setup.py sdist bdist

install : uninstall
git clean -fxd .
$(PY) -m pip install . --upgrade --user

test: install
( cd /tmp && moosegui )

uninstall :
$(PY) -m pip uninstall moosegui -y

lint:
find . -type f -name *.py -print0 | xargs -0 -I file pyflakes file

.PHONY : lint uninstall test install build check
189 changes: 0 additions & 189 deletions PlotWidgetContainer.py

This file was deleted.

1 change: 0 additions & 1 deletion __init__.py

This file was deleted.

36 changes: 0 additions & 36 deletions about.html

This file was deleted.

104 changes: 104 additions & 0 deletions build/lib/moosegui/MooseCanvas.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
"""MooseCanvas.py:


Here is my Canvas.

"""

__author__ = "Dilawar Singh"
__copyright__ = "Copyright 2016, Dilawar Singh"
__credits__ = ["NCBS Bangalore"]
__license__ = "GNU GPL"
__version__ = "1.0.0"
__maintainer__ = "Dilawar Singh"
__email__ = "dilawars@ncbs.res.in"
__status__ = "Development"

import sys
import random
import os

try:
import Tkinter as tk
except ImportError as e:
import tkinter as tk

import logging

class MooseCanvas( tk.Frame ):

def __init__(self, root = None):


self.canvas = tk.Canvas( root , width=800, height=800 )
self.canvas.create_line( 0, 0, 200, 200 );

'''
self.xsb = tk.Scrollbar( self.canvas,
orient="horizontal", command=self.canvas.xview
)

self.ysb = tk.Scrollbar( self.canvas, orient="vertical",
command=self.canvas.yview
)
self.canvas.configure(
yscrollcommand=self.ysb.set,
xscrollcommand=self.xsb.set
)

self.xsb.grid(row=1, column=0, sticky="ew")
self.ysb.grid(row=0, column=1, sticky="ns")
# self.grid_rowconfigure(0, weight=1)
# self.grid_columnconfigure(0, weight=1)
'''

# This is what enables using the mouse:
self.canvas.bind("<ButtonPress-1>", self.move_start)
self.canvas.bind("<B1-Motion>", self.move_move)
# linux scroll
self.canvas.bind("<Button-4>", self.zoomerP)
self.canvas.bind("<Button-5>", self.zoomerM)
# windows scroll
self.canvas.bind("<MouseWheel>", self.zoomer)
# self.canvas.bind( "<Key>", self.keyboard )
self.canvas.bind( "Move", self.keyboard )
self.canvas.bind( "<Button-1>", self.mouseCallback )
self.canvas.grid( row = 0, column = 0, sticky = 'news' )
# self.canvas.pack( )

# move
def move_start(self, event):
self.canvas.scan_mark(event.x, event.y)

def move_move(self, event):
self.canvas.scan_dragto(event.x, event.y, gain=1)

# windows zoom
def zoomer(self, event):
if (event.delta > 0):
self.canvas.scale("all", event.x, event.y, 1.1, 1.1)
elif (event.delta < 0):
self.canvas.scale("all", event.x, event.y, 0.9, 0.9)
self.canvas.configure(scrollregion=self.canvas.bbox("all"))

# linux zoom
def zoomerP(self, event):
self.canvas.scale("all", event.x, event.y, 1.1, 1.1)
self.canvas.configure(scrollregion=self.canvas.bbox("all"))

def zoomerM(self, event):
self.canvas.scale("all", event.x, event.y, 0.9, 0.9)
self.canvas.configure(scrollregion=self.canvas.bbox("all"))

def mouseCallback(self, event ):
logging.info( 'Button pressed %s %s' % ( event.x, event.y ) )

def keyboard(self, event ):
logging.info( 'Key pressed %s' % ( event.char ) )

if __name__ == "__main__":
root = tk.Tk()
a = MooseCanvas( root )
# a.plot_random_rects( )
a.pack(fill="both", expand=True)
root.mainloop()
Loading