inst/examples/gui.r

# qsetClass('drawp1', Qt$QWidget, function(parent = NULL){
#   super(parent)
#   loadLabel <- Qt$QLabel('File or Dir:')
#   this$loadLine <- Qt$QLineEdit('chromatoplotsgui/data')
#   this$loadButton <- Qt$QPushButton('&Load')
#   loadButton$show()
# 
#   iconSize <- qsize(30L, 30L)
# #  this$allButton <- Qt$QPushButton('&All')
#   this$allButton <- Qt$QToolButton()
#   allButton$setIcon(style()$standardIcon(Qt$QStyle$SP_DirOpenIcon))
#   allButton$setIconSize(iconSize)
#   allButton$setToolTip('Open all files in dir')
# #  this$prevButton <- Qt$QPushButton('&Prev')
#   this$prevButton <- Qt$QToolButton()
#   prevButton$setIcon(style()$standardIcon(Qt$QStyle$SP_ArrowLeft))
#   prevButton$setIconSize(iconSize)
#   prevButton$setToolTip('View previous datafile (cyclic)')
# #  this$nextButton <- Qt$QPushButton('&Next')
#   this$nextButton <- Qt$QToolButton()
#   nextButton$setIcon(style()$standardIcon(Qt$QStyle$SP_ArrowRight))
#   nextButton$setIconSize(iconSize)
#   nextButton$setToolTip('View next datafile (cyclic)')
#  
# 
# 
#   buttonLay <- Qt$QHBoxLayout()
#   buttonLay$addStretch()
#   buttonLay$addWidget(allButton)
#   buttonLay$addWidget(prevButton)
#   buttonLay$addWidget(nextButton)
#   buttonLay$addStretch()
# 
# 
#   lay <- Qt$QGridLayout()
#   lay$addWidget(loadLabel, 0,0)
#   lay$addWidget(loadLine, 0,1)
#   lay$addWidget(loadButton, 0,2)
#   lay$addWidget(view, 1,0, 1,3)
#   lay$addLayout(buttonLay,2,0,1,3)
# 
#   setLayout(lay)
# 
# })
# 
# 
# qsetClass('chromgui', Qt$QWidget, function(parent = NULL){
# 
#   super(parent)
#   main <- Qt$QTabWidget()
#   loadLabel <- Qt$QLabel('Load:')
# 
#   p1 <- drawp1() 
#   p2 <- Qt$QWidget()
#   p3 <- Qt$QWidget()
# 
#   main$addTab(p1, 'View Raw')
#   main$addTab(p2, 'Baseline Subtraction')
#   main$addTab(p3, 'Find Peaks') 
#   
#   lay <- Qt$QVBoxLayout()
#   lay$addWidget(main)
#   
#   setLayout(lay)
# 
#   setWindowTitle('Chromatoplots')
# 
# 
# })
# 
# chr <- chromgui()
# chr$showMaximized()
mariev/chromatoplotsgui documentation built on May 21, 2019, 11:46 a.m.