Ejemplo n.º 1
0
    def __init__(self, parent, agup, settings=None):
        self.parent = parent
        self.agup = agup
        self.settings = settings
        self.keyword_dict = self.agup.email.keyword_dict
        self.current_key = None
        self.signals = signals.CustomSignals()

        QtGui.QWidget.__init__(self, parent)
        resources.loadUi(UI_FILE, self)
        self.restoreWindowGeometry()
        self.restoreSplitterDetails()

        self.listWidget.addItems(sorted(self.keyword_dict.keys()))
        self.listWidget.addItems(sorted(email_template.REVIEWER_FIELDS.keys()))
        self.template.setPlainText(self.agup.email.email_template)

        self.selectFirstKeyword()

        self.pb_add.clicked.connect(self.onAdd)
        self.pb_delete.clicked.connect(self.onDelete)

        self.listWidget.currentItemChanged.connect(self.doCurrentItemChanged)
        self.template.textChanged.connect(self.doTemplateTextChanged)
        self.plainTextEdit.textChanged.connect(self.doKeywordTextChanged)
        self.plainTextEdit.setLineWrapMode(QtGui.QPlainTextEdit.NoWrap)
        self.disabled_style = DISABLED_STYLE
        self.enabled_style = self.plainTextEdit.styleSheet()

        self.doMerge()
        self.show()
Ejemplo n.º 2
0
    def __init__(self, parent, agup):
        self.parent = parent
        self.agup = agup
        self.proposal = None
        self.reviewers = None

        QtGui.QGridLayout.__init__(self, parent)
        self.custom_signals = signals.CustomSignals()

        self._init_basics()
Ejemplo n.º 3
0
    def __init__(self, parent=None, settings=None):
        '''
        :param parent: owner (QtGui object)
        '''
        self.parent = parent
        self.settings = settings

        QtGui.QWidget.__init__(self, parent)
        resources.loadUi(UI_FILE, self)
        self.restoreSplitterDetails()

        self.modified = False
        self.topic_list = []
        self.topic_widgets = {}

        self.custom_signals = signals.CustomSignals()
Ejemplo n.º 4
0
    def __init__(self, parent, layout, reviewer, proposal):
        '''
        :param obj parent: owner (a QWidget subclass)
        :param obj layout: layout in which to place these widgets
        :param obj reviewer: instance of reviewer.AGUP_Reviewer_Data
        :param obj proposal: instance of proposal.AGUP_Proposal_Data
        '''
        self.parent = parent
        self.layout = layout
        self.reviewer = reviewer
        self.proposal = proposal
        self.enabled = False

        QtCore.QObject.__init__(self, parent)
        QtCore.qInstallMsgHandler(self._handler_)

        self.comfort = ""
        self.custom_signals = signals.CustomSignals()
        self._init_controls_()
        self.dotProduct()
Ejemplo n.º 5
0
    def __init__(self, parent=None, agup=None, settings=None):
        self.parent = parent
        self.topics = agup.topics
        self.settings = settings

        QtGui.QWidget.__init__(self)
        resources.loadUi(UI_FILE, self)
        self.restoreWindowGeometry()
        
        self.setWindowTitle('Assign_GUP - Reviewers')
        self.listview_gb.setTitle('Reviewers')
        self.details_gb.setTitle('Reviewer Details')

        self.details_panel = reviewer_details.AGUP_ReviewerDetails(self, self.settings)
        layout = self.details_gb.layout()
        layout.addWidget(self.details_panel)

        self._init_topic_widgets(self.topics)

        if agup.reviewers is not None:
            self.setModel(agup.reviewers)
            if len(agup.reviewers) > 0:
                sort_name = agup.reviewers.keyOrder()[0]
                self.editReviewer(sort_name, None)
                self.selectFirstListItem()

        self.listView.clicked.connect(self.on_item_clicked)
        self.listView.entered.connect(self.on_item_clicked)
        self.details_panel.custom_signals.topicValueChanged.connect(self.onTopicValueChanged)
        self.details_panel.full_name.textEdited.connect(self.onDetailsModified)
        self.details_panel.sort_name.textEdited.connect(self.onDetailsModified)
        self.details_panel.phone.textEdited.connect(self.onDetailsModified)
        self.details_panel.email.textEdited.connect(self.onDetailsModified)
        self.details_panel.joined.textEdited.connect(self.onDetailsModified)
        self.details_panel.url.textEdited.connect(self.onDetailsModified)
        self.details_panel.notes.textChanged.connect(self.onDetailsModified)

        self.arrowKeysEventFilter = event_filters.ArrowKeysEventFilter()
        self.listView.installEventFilter(self.arrowKeysEventFilter)
        
        self.custom_signals = signals.CustomSignals()
Ejemplo n.º 6
0
    def __init__(self, parent=None, topics_list=None, settings=None):
        self.parent = parent
        self.topics = topics.Topics()
        self.topics.addTopics(topics_list)
        self.settings = settings

        QtGui.QDialog.__init__(self)
        resources.loadUi(UI_FILE, self)
        self.restoreWindowGeometry()

        self.setWindowTitle('AGUP List of Topics')
        self.listWidget.addItems(self.topics.getTopicList())

        self.add_pb.clicked.connect(self.onAdd)
        self.delete_pb.clicked.connect(self.onDelete)

        # select the first item in the list
        idx = self.listWidget.indexAt(QtCore.QPoint(0, 0))
        self.listWidget.setCurrentIndex(idx)

        self.custom_signals = signals.CustomSignals()
Ejemplo n.º 7
0
    def __init__(self, parent=None, settings=None, agup=None):
        '''
        '''
        self.parent = parent
        self.settings = settings
        self.agup = agup

        QtGui.QWidget.__init__(self, parent)
        resources.loadUi(UI_FILE, self)
        self.restoreSplitterDetails()

        self.modified = False
        self.topic_list = []
        self.topic_widgets = {}
        self.reviewer_list = []
        # self.reviewer_widgets = {}    # not used

        layout = prop_revu_grid.ReviewerAssignmentGridLayout(None, self.agup)
        self.reviewers_gb.setLayout(layout)
        layout.custom_signals.checkBoxGridChanged.connect(self.onAssignmentsChanged)

        self.custom_signals = signals.CustomSignals()
Ejemplo n.º 8
0
    def __init__(self):
        self.settings = settings.ApplicationQSettings()
        self.agup = agup_data.AGUP_Data(self, self.settings)

        QtGui.QMainWindow.__init__(self)
        resources.loadUi(UI_FILE, baseinstance=self)
        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        self.main_window_title = self.windowTitle()
        self.restoreWindowGeometry()

        self.modified = False
        self.forced_exit = False

        # keep these objects in a dictionary to simplify admin
        self.windows = {}
        self.windows[ANALYSISGRID_REPORT] = None
        self.windows[ASSIGNMENT_REPORT] = None
        self.windows[EMAIL_REPORT] = None
        self.windows[EMAIL_TEMPLATE_EDITOR] = None
        self.windows[PROPOSAL_VIEW] = None
        self.windows[REVIEWER_VIEW] = None
        self.windows[SUMMARY_REPORT] = None

        self._init_history_()
        history.addLog('loaded "' + UI_FILE + '"', False)

        self.custom_signals = signals.CustomSignals()

        self._init_mainwindow_widget_values_()
        self._init_connections_()
        
        filename = self.settings.getPrpFile()
        if os.path.exists(filename):
            self.openPrpFile(filename)

        self.modified = False
        self.adjustMainWindowTitle()