'''
Created on Apr 3, 2014

@author: mandy
'''
import sys
from PyQt4.QtGui import QApplication, QDialog
from PyQt4.QtCore import QCoreApplication, Qt
from MainWindow import MainWindow
from RBACForCommandLine import RBACForCommandLine
from Ui_Greeting import Ui_Greeting

class GreetingWindow(QDialog):
    def __init__(self):
        QDialog.__init__(self)
        self.ui = Ui_Greeting()
        self.ui.setupUi(self)
        flags = Qt.Dialog | Qt.WindowStaysOnTopHint
        self.setWindowFlags(flags)
        self.ui.pushButton.clicked.connect(self.close)
        
def main():
    app = QApplication(sys.argv)
    QCoreApplication.setApplicationName('RBACvisual')
    QCoreApplication.setApplicationVersion('1.0')
    
    QApplication.setStyle('plastique')
    app.setStyleSheet("""QToolTip {
                        background-color:white;
                        color:black;
    }""")
    greetWin = GreetingWindow()
    greetWin.show()
    
    mainw = MainWindow()
    mainw.show()
    exitcode = app.exec_()
    sys.exit(exitcode)

if __name__ == '__main__':
#     rbac = RBACForCommandLine()
    main()
    
    