Subversion Repositories ExamClock

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 ron.wellst 1
#-----------------------------------------------------------------------------
2
# Name:        mainwindow.py
3
# Purpose:
4
#
5
# Author:      Ron Wellsted
6
#
7
# Created:     2015-10-13
8
# Copyright:   (c) 2015
9
# Licence:     GPL 3.0
10
#-----------------------------------------------------------------------------
11
# Date      Author          Modification
12
#-----------------------------------------------------------------------------
13
# -*- coding: utf-8 -*-
14
from PyQt4 import uic, QtGui
15
from PyQt4.QtCore import pyqtSlot
16
 
17
(Ui_MainWindow, QMainWindow) = uic.loadUiType('mainwindow.ui')
18
 
19
class MainWindow (QMainWindow):
20
    """MainWindow inherits QMainWindow"""
21
    _ini = None
22
 
23
    def __init__ (self, parent = None):
24
        QMainWindow.__init__(self, parent)
25
        self.ui = Ui_MainWindow()
26
        self.ui.setupUi(self)
27
 
28
    def closeEvent(self, event):
29
        if QtGui.QMessageBox.question(self, 'Confirmation', 'Close application ?', \
30
                QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) != QtGui.QMessageBox.Yes:
31
            event.ignore()
32
        else:
33
            event.accept()
34
 
35
    @pyqtSlot()
36
    def slotHelpAbout(self):
37
        from HelpAbout import HelpAbout
38
        dlg = HelpAbout(self)
39
        dlg.exec_()
40