Commit 100359e9 authored by Daalen, Tim van's avatar Daalen, Tim van
Browse files

modified GUI imports to work with .py instead of .ui files

parent 5460e7eb
......@@ -11,17 +11,19 @@ from irods.keywords import NO_PARA_OP_KW
from utils.utils import getSize
import os
from gui.ui_files.dataTransferState import Ui_dataTransferState
# Loading symbol generator
# http://www.ajaxload.info/#preview
class dataTransfer(QDialog):
class dataTransfer(QDialog, Ui_dataTransferState):
finished = pyqtSignal(bool, object)
def __init__(self, ic, upload, localFsPath, irodsColl, irodsTreeIdx = None, resource = None):
super(dataTransfer, self).__init__()
loadUi("gui/ui-files/dataTransferState.ui", self)
super(dataTransfer, self).setupUi(self)
#loadUi("gui/ui-files/dataTransferState.ui", self)
self.ic = ic
self.localFsPath = localFsPath
......
from utils.elabConnector import elabConnector
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QMessageBox, QTableWidgetItem, QFileSystemModel
from PyQt5.QtWidgets import QMessageBox, QTableWidgetItem, QFileSystemModel, QWidget
from PyQt5.QtCore import QObject, QThread, pyqtSignal
from gui.checkableFsTree import checkableFsTreeModel
......@@ -9,30 +9,34 @@ from utils.utils import getSize, walkToDict
from irods.exception import CATALOG_ALREADY_HAS_ITEM_BY_THAT_NAME
import logging
class elabUpload():
def __init__(self, widget, ic):
self.widget = widget
from gui.ui_files.tabELNData import Ui_tabELNData
class elabUpload(QWidget, Ui_tabELNData):
def __init__(self, ic):
super(elabUpload, self).__init__()
super(elabUpload, self).setupUi(self)
self.elab = None
self.coll = None
self.ic = ic
# Return errors to:
self.errorLabel = widget.errorLabel
self.errorLabel = self.errorLabel
#Gathering Eln configuration
self.elnTokenInput = widget.elnTokenInput
self.elnGroupTable = widget.elnGroupTable
self.elnExperimentTable = widget.elnExperimentTable
self.elnTokenInput = self.elnTokenInput
self.elnGroupTable = self.elnGroupTable
self.elnExperimentTable = self.elnExperimentTable
#Config ok check
self.groupIdLabel = widget.groupIdLabel
self.experimentIdLabel = widget.experimentIdLabel
self.groupIdLabel = self.groupIdLabel
self.experimentIdLabel = self.experimentIdLabel
#Selecting and uploading local files and folders
self.dirmodel = checkableFsTreeModel(widget.localFsTable)
widget.localFsTable.setModel(self.dirmodel)
self.localFsTable = widget.localFsTable
self.dirmodel = checkableFsTreeModel(self.localFsTable)
self.localFsTable.setModel(self.dirmodel)
self.localFsTable = self.localFsTable
self.elnUploadButton = widget.elnUploadButton
self.elnUploadButton = self.elnUploadButton
#Showing result
self.elnPreviewBrowser = widget.elnPreviewBrowser
self.elnIrodsPath = widget.elnIrodsPath
self.elnPreviewBrowser = self.elnPreviewBrowser
self.elnIrodsPath = self.elnIrodsPath
#defining events and listeners
self.elnTokenInput.returnPressed.connect(self.connectElab)
......@@ -57,12 +61,12 @@ class elabUpload():
row = row + 1
self.elnGroupTable.resizeColumnsToContents()
self.loadLocalFileView()
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
except Exception as e:
logging.info("elabUpload: "+repr(e))
self.errorLabel.setText(
"ELN ERROR: "+repr(e)+"\n Your permissions for your current active group might be blocked.")
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
return
def selectExperiment(self, expId):
......@@ -77,7 +81,7 @@ class elabUpload():
def loadExperiments(self):
self.errorLabel.clear()
self.elnExperimentTable.setRowCount(0)
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
self.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
row = self.elnGroupTable.currentRow()
if row > -1:
groupId = self.elnGroupTable.item(row, 0).text()
......@@ -104,11 +108,11 @@ class elabUpload():
logging.info("ElabUpload groupId "+str(groupId)+": "+repr(error))
self.errorLabel.setText(
"ELN ERROR: "+repr(e)+"\n You might not have permissions for that group.")
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
return
self.elnExperimentTable.resizeColumnsToContents()
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
def loadLocalFileView(self):
......
This diff is collapsed.
from PyQt5 import QtGui, QtCore
from PyQt5.QtWidgets import QWidget
from gui.irodsTreeView import IrodsModel
from gui.ui_files.tabTicketCreate import Ui_tabticketCreate
class irodsCreateTicket():
def __init__(self, widget, ic, ienv):
self.ic = ic
self.widget = widget
class irodsCreateTicket(QWidget, Ui_tabticketCreate):
def __init__(self, ic, ienv):
super(irodsCreateTicket, self).__init__()
super(irodsCreateTicket, self).setupUi(self)
self.irodsmodel = IrodsModel(ic, self.widget.irodsFsTreeView)
self.widget.irodsFsTreeView.setModel(self.irodsmodel)
self.ic = ic
self.irodsmodel = IrodsModel(ic, self.irodsFsTreeView)
self.irodsFsTreeView.setModel(self.irodsmodel)
self.irodsRootColl = '/'+ic.session.zone
self.irodsmodel.setHorizontalHeaderLabels([self.irodsRootColl,
'Level', 'iRODS ID',
'parent ID', 'type'])
self.widget.irodsFsTreeView.expanded.connect(self.irodsmodel.refreshSubTree)
self.widget.irodsFsTreeView.clicked.connect(self.irodsmodel.refreshSubTree)
self.irodsFsTreeView.expanded.connect(self.irodsmodel.refreshSubTree)
self.irodsFsTreeView.clicked.connect(self.irodsmodel.refreshSubTree)
self.irodsmodel.initTree()
self.widget.irodsFsTreeView.setHeaderHidden(True)
self.widget.irodsFsTreeView.header().setDefaultSectionSize(180)
self.widget.irodsFsTreeView.setColumnHidden(1, True)
self.widget.irodsFsTreeView.setColumnHidden(2, True)
self.widget.irodsFsTreeView.setColumnHidden(3, True)
self.widget.irodsFsTreeView.setColumnHidden(4, True)
self.irodsFsTreeView.setHeaderHidden(True)
self.irodsFsTreeView.header().setDefaultSectionSize(180)
self.irodsFsTreeView.setColumnHidden(1, True)
self.irodsFsTreeView.setColumnHidden(2, True)
self.irodsFsTreeView.setColumnHidden(3, True)
self.irodsFsTreeView.setColumnHidden(4, True)
self.widget.createTicketButton.clicked.connect(self.createTicket)
self.createTicketButton.clicked.connect(self.createTicket)
def createTicket(self):
self.widget.infoLabel.clear()
self.widget.ticketInfoBrowser.clear()
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
self.widget.createTicketButton.setEnabled(False)
self.infoLabel.clear()
self.ticketInfoBrowser.clear()
self.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
self.createTicketButton.setEnabled(False)
#gather info
idx, path = self.irodsmodel.get_checked()
if path == None or self.ic.session.data_objects.exists(path):
self.widget.infoLabel.setText("ERROR: Please select a collection.")
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.widget.createTicketButton.setEnabled(True)
self.infoLabel.setText("ERROR: Please select a collection.")
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.createTicketButton.setEnabled(True)
return
acls = [(acl.user_name, acl.access_name) for acl in self.ic.getPermissions(path)]
if (self.ic.session.username, "own") in acls:
date = self.widget.calendar.selectedDate()
date = self.calendar.selectedDate()
#format of time string for irods: 2012-05-07.23:00:00
expiryString = str(date.toPyDate())+'.23:59:59'
ticket, expiryDate = self.ic.createTicket(path, expiryString)
self.widget.ticketInfoBrowser.append("iRODS server: \t"+self.ic.session.host)
self.widget.ticketInfoBrowser.append("iRODS path:\t"+path)
self.widget.ticketInfoBrowser.append("iRODS Ticket:\t"+ticket)
self.ticketInfoBrowser.append("iRODS server: \t"+self.ic.session.host)
self.ticketInfoBrowser.append("iRODS path:\t"+path)
self.ticketInfoBrowser.append("iRODS Ticket:\t"+ticket)
if self.ic.__name__ == "irodsConnector":
self.widget.ticketInfoBrowser.append("Expiry date:\tNot set (linux only)")
self.ticketInfoBrowser.append("Expiry date:\tNot set (linux only)")
else:
self.widget.ticketInfoBrowser.append("Expiry date:\t"+expiryDate)
self.ticketInfoBrowser.append("Expiry date:\t"+expiryDate)
else:
self.widget.infoLabel.setText("ERROR: Insufficient rights, you need to be owner.")
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.widget.createTicketButton.setEnabled(True)
self.infoLabel.setText("ERROR: Insufficient rights, you need to be owner.")
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.createTicketButton.setEnabled(True)
return
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.widget.createTicketButton.setEnabled(True)
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.createTicketButton.setEnabled(True)
from gui.irodsTreeView import IrodsModel
from gui.popupWidgets import irodsIndexPopup
from PyQt5.QtWidgets import QMessageBox
from PyQt5.uic import loadUi
from PyQt5.QtWidgets import QMessageBox, QWidget
from PyQt5.QtCore import QObject, QThread, pyqtSlot, pyqtSignal
from PyQt5 import QtGui, QtCore
from os import path, getcwd
import json
class irodsDataCompression():
def __init__(self, widget, ic, ienv):
from gui.irodsTreeView import IrodsModel
from gui.popupWidgets import irodsIndexPopup
from gui.ui_files.tabDataCompression import Ui_tabDataCompression
class irodsDataCompression(QWidget, Ui_tabDataCompression):
def __init__(self, ic, ienv):
super(irodsDataCompression, self).__init__()
super(irodsDataCompression, self).setupUi(self)
self.ic = ic
self.widget = widget
self.ienv = ienv
rescs = self.ic.listResources()
if ic.defaultResc not in rescs:
......@@ -30,28 +30,28 @@ class irodsDataCompression():
+'\nDataCompression view not setup.')
return
self.widget.irodsZoneLabel1.setText("/"+self.ic.session.zone+":")
self.widget.irodsZoneLabel2.setText("/"+self.ic.session.zone+":")
self.irodsZoneLabel1.setText("/"+self.ic.session.zone+":")
self.irodsZoneLabel2.setText("/"+self.ic.session.zone+":")
self.irodsRootColl = '/'+ic.session.zone
index = self.widget.decompressRescButton.findText(ic.defaultResc)
self.widget.decompressRescButton.setCurrentIndex(index)
index = self.decompressRescButton.findText(ic.defaultResc)
self.decompressRescButton.setCurrentIndex(index)
#irodsCollectionTree
self.collectionTreeModel = self.setupFsTree(self.widget.irodsCollectionTree)
self.widget.irodsCollectionTree.expanded.connect(self.collectionTreeModel.refreshSubTree)
#self.widget.irodsCollectionTree.clicked.connect(self.collectionTreeModel.refreshSubTree)
self.collectionTreeModel = self.setupFsTree(self.irodsCollectionTree)
self.irodsCollectionTree.expanded.connect(self.collectionTreeModel.refreshSubTree)
#self.irodsCollectionTree.clicked.connect(self.collectionTreeModel.refreshSubTree)
#irodsCompressionTree
self.compressionTreeModel = self.setupFsTree(self.widget.irodsCompressionTree)
self.widget.irodsCompressionTree.expanded.connect(self.compressionTreeModel.refreshSubTree)
#self.widget.irodsCompressionTree.clicked.connect(self.compressionTreeModel.refreshSubTree)
self.compressionTreeModel = self.setupFsTree(self.irodsCompressionTree)
self.irodsCompressionTree.expanded.connect(self.compressionTreeModel.refreshSubTree)
#self.irodsCompressionTree.clicked.connect(self.compressionTreeModel.refreshSubTree)
#resource buttons
self.setupResourceButton(self.widget.compressRescButton)
self.setupResourceButton(self.widget.decompressRescButton)
self.setupResourceButton(self.compressRescButton)
self.setupResourceButton(self.decompressRescButton)
#Create/Unpack/Index buttons
self.widget.createButton.clicked.connect(self.createDataBundle)
self.widget.unpackButton.clicked.connect(self.unpackDataBundle)
self.widget.indexButton.clicked.connect(self.getIndex)
self.createButton.clicked.connect(self.createDataBundle)
self.unpackButton.clicked.connect(self.unpackDataBundle)
self.indexButton.clicked.connect(self.getIndex)
def infoPopup(self, message):
......@@ -87,39 +87,39 @@ class irodsDataCompression():
button.setCurrentIndex(index)
def enableButtons(self, enable):
self.widget.compressRescButton.setEnabled(enable)
self.widget.decompressRescButton.setEnabled(enable)
self.compressRescButton.setEnabled(enable)
self.decompressRescButton.setEnabled(enable)
#Create/Unpack/Index buttons
self.widget.createButton.setEnabled(enable)
self.widget.unpackButton.setEnabled(enable)
self.widget.indexButton.setEnabled(enable)
self.createButton.setEnabled(enable)
self.unpackButton.setEnabled(enable)
self.indexButton.setEnabled(enable)
def createDataBundle(self):
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
self.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
self.enableButtons(False)
self.widget.createStatusLabel.clear()
self.createStatusLabel.clear()
ruleFile = path.join(getcwd(),'rules/tarCollection.r')
idx, source = self.collectionTreeModel.get_checked()
if not self.ic.session.collections.exists(source):
self.widget.createStatusLabel.setText("ERROR: No collection selected.")
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.createStatusLabel.setText("ERROR: No collection selected.")
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.enableButtons(True)
return
#data bundling only allowed for collections in home/user
if len(source.split('/')) < 5:
self.widget.createStatusLabel.setText(
self.createStatusLabel.setText(
"ERROR: Selected collection is not a user collection.")
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.enableButtons(True)
return
compress = self.widget.compressCheckBox.isChecked()
remove = self.widget.removeCheckBox.isChecked()
migrateResc = self.widget.compressRescButton.currentText()
compress = self.compressCheckBox.isChecked()
remove = self.removeCheckBox.isChecked()
migrateResc = self.compressRescButton.currentText()
params = {
'*coll': '"'+source+'"',
'*resource': '"'+migrateResc+'"',
......@@ -128,7 +128,7 @@ class irodsDataCompression():
}
self.threadCreate = QThread()
self.widget.createStatusLabel.setText("STATUS: compressing "+source)
self.createStatusLabel.setText("STATUS: compressing "+source)
self.worker = dataBundleCreateExtract(self.ic, ruleFile, params, "create")
self.worker.moveToThread(self.threadCreate)
self.threadCreate.started.connect(self.worker.run)
......@@ -140,55 +140,55 @@ class irodsDataCompression():
def dataCreateExtractFinished(self, success, message, operation):
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.enableButtons(True)
if success and operation == "create":
idx, source = self.collectionTreeModel.get_checked()
stdout, stderr = message
self.widget.createStatusLabel.setText("STATUS: Created " + str(stdout))
self.createStatusLabel.setText("STATUS: Created " + str(stdout))
parentIdx = self.collectionTreeModel.getParentIdx(idx)
self.collectionTreeModel.refreshSubTree(parentIdx)
elif not success and operation == "create":
self.widget.createStatusLabel.setText("ERROR: Create failed: " + str(stderr))
self.createStatusLabel.setText("ERROR: Create failed: " + str(stderr))
elif success and operation == "extract":
idx, source = self.compressionTreeModel.get_checked()
stdout, stderr = message
self.widget.unpackStatusLabel.setText("STATUS: Extracted " + str(stdout))
self.unpackStatusLabel.setText("STATUS: Extracted " + str(stdout))
parentIdx = self.compressionTreeModel.getParentIdx(idx)
self.compressionTreeModel.refreshSubTree(parentIdx)
elif not success and operation == "extract":
self.widget.unpackStatusLabel.setText("ERROR: Create failed: " + str(stderr))
self.unpackStatusLabel.setText("ERROR: Create failed: " + str(stderr))
def unpackDataBundle(self):
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
self.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
idx, source = self.compressionTreeModel.get_checked()
if not idx or (not source.endswith(".irods.tar") and not source.endswith(".irods.zip")):
self.widget.unpackStatusLabel.setText("ERROR: No *.irods.tar or *.irods.zip selected")
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.unpackStatusLabel.setText("ERROR: No *.irods.tar or *.irods.zip selected")
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
return
extractPath = path.dirname(source)+'/'+path.basename(source).split('.irods')[0]
if self.ic.session.collections.exists(extractPath):
extractColl = self.ic.session.collections.get(extractPath)
if extractColl.subcollections != [] or extractColl.data_objects != []:
self.widget.unpackStatusLabel.setText("ERROR: Destination not empty: "+extractPath)
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.unpackStatusLabel.setText("ERROR: Destination not empty: "+extractPath)
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
return
self.enableButtons(False)
self.widget.unpackStatusLabel.clear()
self.unpackStatusLabel.clear()
ruleFile = path.join(getcwd(),'rules/tarExtract.r')
migrateResc = self.widget.decompressRescButton.currentText()
migrateResc = self.decompressRescButton.currentText()
params = {
'*obj': '"'+source+'"',
'*resource': '"'+migrateResc+'"',
}
self.threadExtract = QThread()
self.widget.unpackStatusLabel.setText("STATUS: extracting "+source)
self.unpackStatusLabel.setText("STATUS: extracting "+source)
self.worker = dataBundleCreateExtract(self.ic, ruleFile, params, "extract")
self.worker.moveToThread(self.threadExtract)
self.threadExtract.started.connect(self.worker.run)
......@@ -200,23 +200,23 @@ class irodsDataCompression():
def getIndex(self):
self.widget.unpackStatusLabel.clear()
self.unpackStatusLabel.clear()
ruleFile = path.join(getcwd(),'rules/tarReadIndex.r')
idx, source = self.compressionTreeModel.get_checked()
if source == None:
self.widget.unpackStatusLabel.setText("ERROR: No *.irods.tar or *.irods.zip selected")
self.unpackStatusLabel.setText("ERROR: No *.irods.tar or *.irods.zip selected")
return
if not source.endswith(".irods.tar") and not source.endswith(".irods.zip"):
self.widget.unpackStatusLabel.setText("ERROR: No *.irods.tar or *.irods.zip selected")
self.unpackStatusLabel.setText("ERROR: No *.irods.tar or *.irods.zip selected")
return
params = {
'*path': '"'+source+'"'
}
stdout, stderr = self.ic.executeRule(ruleFile, params)
self.widget.unpackStatusLabel.setText("INFO: Loaded Index of "+source)
indexPopup = irodsIndexPopup(self.ic, stdout[1:], source, self.widget.unpackStatusLabel)
self.unpackStatusLabel.setText("INFO: Loaded Index of "+source)
indexPopup = irodsIndexPopup(self.ic, stdout[1:], source, self.unpackStatusLabel)
indexPopup.exec_()
......
......@@ -2,36 +2,36 @@ from PyQt5 import QtWidgets
from PyQt5 import QtCore
from PyQt5 import QtGui
class irodsInfo():
def __init__(self, widget, ic):
from gui.ui_files.tabInfo import Ui_tabInfo
class irodsInfo(QtWidgets.QWidget, Ui_tabInfo):
def __init__(self, ic):
super(irodsInfo, self).__init__()
super(irodsInfo, self).setupUi(self)
self.ic = ic
self.widget = widget
self.widget.refreshButton.clicked.connect(self.refreshInfo)
self.refreshButton.clicked.connect(self.refreshInfo)
self.refreshInfo()
def refreshInfo(self):
self.widget.rescTable.setRowCount(0)
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
self.rescTable.setRowCount(0)
self.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
#irods Zone
self.widget.zoneLabel.setText(self.ic.session.zone)
self.zoneLabel.setText(self.ic.session.zone)
#irods user
self.widget.userLabel.setText(self.ic.session.username)
self.userLabel.setText(self.ic.session.username)
#irods user type and groups
userType, userGroups = self.ic.getUserInfo()
groupNames = [x for x in userGroups if not isinstance(x, int)]
self.widget.typeLabel.setText(userType[0])
self.widget.groupsLabel.setText('\n'.join(groupNames))
self.typeLabel.setText(userType[0])
self.groupsLabel.setText('\n'.join(groupNames))
#defaul resource
self.widget.rescLabel.setText(self.ic.defaultResc)
self.rescLabel.setText(self.ic.defaultResc)
#irods server and version
self.widget.serverLabel.setText(self.ic.session.host)
self.widget.versionLabel.setText(
self.serverLabel.setText(self.ic.session.host)
self.versionLabel.setText(
'.'.join(str(num) for num in self.ic.session.server_version))
#irods resources
resourceNames = self.ic.listResources()
......@@ -43,13 +43,13 @@ class irodsInfo():
else:
resources.append((name, "no information"))
self.widget.rescTable.setRowCount(len(resources))
self.rescTable.setRowCount(len(resources))
row = 0
for rescName, rescSize in resources:
resc = self.ic.getResource(rescName)
self.widget.rescTable.setItem(row, 0, QtWidgets.QTableWidgetItem(rescName))
self.widget.rescTable.setItem(row, 1, QtWidgets.QTableWidgetItem(rescSize))
self.widget.rescTable.setItem(row, 2, QtWidgets.QTableWidgetItem(resc.status))
self.rescTable.setItem(row, 0, QtWidgets.QTableWidgetItem(rescName))
self.rescTable.setItem(row, 1, QtWidgets.QTableWidgetItem(rescSize))
self.rescTable.setItem(row, 2, QtWidgets.QTableWidgetItem(resc.status))
row = row + 1
self.widget.rescTable.resizeColumnsToContents()
self.widget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.rescTable.resizeColumnsToContents()
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
......@@ -2,12 +2,15 @@ from PyQt5 import QtWidgets, QtGui, QtCore
from PyQt5.QtWidgets import QDialog, QMessageBox
from PyQt5.uic import loadUi
import os
from utils.utils import getDownloadDir
from gui.ui_files.searchDialog import Ui_searchDialog
class irodsSearch(QDialog):
class irodsSearch(QDialog, Ui_searchDialog):
def __init__(self, ic, collTable):
super(irodsSearch, self).__init__()
loadUi("gui/ui-files/searchDialog.ui", self)
super(irodsSearch, self).setupUi(self)
#loadUi("gui/ui-files/searchDialog.ui", self)
self.ic = ic
self.keys = [self.key1, self.key2, self.key3, self.key4, self.key5]
self.vals = [self.val1, self.val2, self.val3, self.val4, self.val5]
......
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QMainWindow, QHeaderView, QMessageBox
from PyQt5.QtWidgets import QMainWindow, QHeaderView, QMessageBox, QWidget
from PyQt5 import QtCore
from PyQt5.uic import loadUi
import os
from utils.irodsConnectorAnonymous import irodsConnectorAnonymous
from gui.checkableFsTree import checkableFsTreeModel
from gui.popupWidgets import createDirectory
from gui.dataTransfer import dataTransfer
from gui.ui_files.tabTicketAccess import Ui_tabTicketAccess
import os
class irodsTicketLogin():
def __init__(self, widget):
class irodsTicketLogin(QWidget, Ui_tabTicketAccess):
def __init__(self):
super(irodsTicketLogin, self).__init__()
super(irodsTicketLogin, self).setupUi(self)
self.ic = None
self.coll = None
self.widget = widget
# QTreeViews
self.dirmodel = checkableFsTreeModel(self.widget.localFsTreeView)
self.widget.localFsTreeView.setModel(self.dirmodel)
self.dirmodel = checkableFsTreeModel(self.localFsTreeView)
self.localFsTreeView.setModel(self.dirmodel)
# Hide all columns except the Name
self.widget.localFsTreeView.setColumnHidden(1, True)
self.widget.localFsTreeView.setColumnHidden(2, True)
self.widget.localFsTreeView.setColumnHidden(3, True)
self.widget.localFsTreeView.header().setSectionResizeMode(QHeaderView.ResizeToContents)
self.localFsTreeView.setColumnHidden(1, True)
self.localFsTreeView.setColumnHidden(2, True)
self.localFsTreeView.setColumnHidden(3, True)
self.localFsTreeView.header().setSectionResizeMode(QHeaderView.ResizeToContents)
home_location = QtCore.QStandardPaths.standardLocations(
QtCore.QStandardPaths.HomeLocation)[0]