示例#1
0
    def _btn_login_clicked(self):
        access_key_id = self.ui.le_access_key_id.text()
        secret_key_id = self.ui.le_secret_key_id.text()

        # note: for us select: eu-central-1
        region = self.ui.cbx_region.itemText(self.ui.cbx_region.currentIndex())

        print("access_key_id:", access_key_id)
        print("secret_key_id:", secret_key_id)
        print("region:", region)

        try:
            conn = boto.ec2.connect_to_region(region,
                                              aws_access_key_id=access_key_id,
                                              aws_secret_access_key=secret_key_id)

            mv = MainWindow(conn)
            mv.setWindowModality(Qt.ApplicationModal)
            mv.show()
            # self.close()

        except boto.exception.EC2ResponseError:
            msg = "Impossible to log in using these credentials.\n" \
                  "Please check your credentials and regions"

            QMessageBox.critical(self, "Cannot login!", msg)
示例#2
0
def main():

    # Initialize application
    app = QApplication(sys.argv)
    app.setWindowIcon(QIcon(PATH_ICONS + "icon.png"))

    # Localization (will fallback to English)
    translator = QTranslator()
    translator.load(PATH_TRANSLATIONS + str(QLocale.system().name()) + '.qm')
    app.installTranslator(translator)

    # Show main window
    main_window = MainWindow()
    main_window.show()

    # Bind application to system exit
    sys.exit(app.exec_())
示例#3
0
#!/usr/bin/env python3

from PyQt4.QtGui import *

from views.MainWindow import MainWindow

if __name__ == "__main__":
    app = QApplication([])

    main_widget = MainWindow()

    main_widget.show()
    app.exec_()
示例#4
0
from views.MainWindow.MainWindow import *

if __name__ == "__main__":

    mainWindow = MainWindow()
    mainWindow.run()
    pass
示例#5
0
def startMainApplication():
    mainWindow = MainWindow()
    mainWindow.showMainWindow()
 def __init__(self):
     self.window = MainWindow()
     self.connectUI()
     self.openFile = None
     self.openImage: Optional[ColorImage] = None
示例#7
0
 def new_window(self, *args):
     MainWindow(self)
示例#8
0
import sys
from PyQt5.QtWidgets import QApplication

from views.MainWindow import MainWindow

if __name__ == '__main__':

    app = QApplication(sys.argv)
    main = MainWindow()
    main.showMaximized()
    sys.exit(app.exec_())
示例#9
0
 def __init__(self, sys_argv):
     super(App, self).__init__(sys_argv)
     self.MainWindow = MainWindow()
     self.MainWindow.show()
示例#10
0
class App(QApplication):
    def __init__(self, sys_argv):
        super(App, self).__init__(sys_argv)
        self.MainWindow = MainWindow()
        self.MainWindow.show()
示例#11
0
from PyQt5.QtWidgets import QApplication
from views.MainWindow import MainWindow
import sys

# inicio de instancia da janela inicial da aplicação
root = QApplication(sys.argv)

app = MainWindow()
app.show()

sys.exit(root.exec_())