Skip to content

Commit

Permalink
start to add loader for qtplot
Browse files Browse the repository at this point in the history
  • Loading branch information
sluofoss committed Jan 4, 2022
1 parent 4bfed0e commit 235a0a4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions QTVisual/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .PlotsHolder import PGFigureLayoutWrap
from .Plot import PlotPanel
def plotloader( *dfs, **kwargs):
for df in dfs:
pass
#for x in kwargs:
# print("k: ",x)
10 changes: 8 additions & 2 deletions newqt.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from QTVisual.PlotsHolder import PGFigureLayoutWrap
from QTVisual.Plot import PlotPanel
from utils import plotloader

def getOHLC_pickle(pklpath):
import pickle
Expand Down Expand Up @@ -37,15 +38,20 @@ def getOHLC_raw(to_pickle=False):

class MainWindow(QMainWindow):

def __init__(self):
def __init__(self, picklepath = None):
super(MainWindow, self).__init__()

self.setWindowTitle("My App")
self.layout = QHBoxLayout()

self.leftbar = QVBoxLayout()

self.plotpanels,self.data = Test2Plots()
if picklepath is None:
self.plotpanels,self.data = Test2Plots()
else:
self.dfs = getOHLC_pickle(picklepath)
self.data = self.dfs[0]
self.plotpanels = plotloader(self.dfs)
#print(self.data.tail(100))
self.rightmain = PGFigureLayoutWrap(self.plotpanels, len(self.data))
self.layout.addLayout(self.leftbar)
Expand Down

0 comments on commit 235a0a4

Please sign in to comment.