Esempio n. 1
0
def command_base():
    config.TESTING = True
    dpath = utils.get_data_path('')

    if os.path.exists(dpath):
        utils.rmtree(dpath)

    base = CommandBase()
    base._project_name = 'Test'
    return base
Esempio n. 2
0
    def __init__(self, width, height, parent=None):
        super(MainWindow, self).__init__(parent)
        CommandBase.__init__(self)
        self.output_package_json = True
        self.setWindowIcon(
            QtGui.QIcon(os.path.join(CWD, 'files', 'images', 'icon.png')))
        self.update_json = False

        self.setup_nw_versions()

        self.thread = None
        self.original_packagejson = {}

        self.resize(width, height)

        self.extract_error = None

        self.create_application_layout()

        self.option_settings_enabled(False)

        self.setWindowTitle("Web2Executable {}".format(__gui_version__))
        self.update_nw_versions(None)
Esempio n. 3
0
    def __init__(self, width, height, parent=None):
        super(MainWindow, self).__init__(parent)
        CommandBase.__init__(self)
        self.output_package_json = True
        self.setWindowIcon(QtGui.QIcon(os.path.join(CWD, 'files',
                                                    'images', 'icon.png')))
        self.update_json = False

        self.setup_nw_versions()

        self.thread = None
        self.original_packagejson = {}

        self.resize(width, height)

        self.extract_error = None

        self.create_application_layout()

        self.option_settings_enabled(False)

        self.setWindowTitle("Web2Executable {}".format(__gui_version__))
        self.update_nw_versions(None)
Esempio n. 4
0
    def __init__(self, width, height, app, parent=None):
        super(MainWindow, self).__init__(parent)
        CommandBase.__init__(self)

        self.icon_style = (
            "width:48px;height:48px;background-color:white;border-radius:5px;border:1px solid rgb(50,50,50);"
        )

        self.last_project_dir = self.load_last_project_path()

        status_bar = QtGui.QStatusBar()
        self.setStatusBar(status_bar)

        self.project_path = ""
        # if platform.system() == 'Darwin':
        #    self.menuBar().setNativeMenuBar(False)
        self.project_menu = self.menuBar().addMenu("File")
        browse_action = QtGui.QAction(
            "Open Project",
            self.project_menu,
            shortcut=QtGui.QKeySequence.Open,
            statusTip="Open an existing or new project.",
            triggered=self.browse_dir,
        )
        self.project_menu.addAction(browse_action)
        self.project_menu.addSeparator()

        self.recent_file_actions = []

        for i in xrange(MAX_RECENT):
            if i == 9:
                key = 0
            else:
                key = i + 1
            action = QtGui.QAction(
                self, visible=False, triggered=self.open_recent_file, shortcut=QtGui.QKeySequence("Ctrl+{}".format(key))
            )
            self.recent_file_actions.append(action)
            self.project_menu.addAction(action)

        self.recent_separator = self.project_menu.addSeparator()

        self.update_recent_files()

        exit_action = QtGui.QAction("Exit", self.project_menu)
        exit_action.triggered.connect(QtGui.qApp.closeAllWindows)
        self.project_menu.addAction(exit_action)

        self.logger = logger

        self.gui_app = app
        self.desktop_width = app.desktop().screenGeometry().width()
        self.desktop_height = app.desktop().screenGeometry().height()

        self.options_enabled = False
        self.output_package_json = True
        self.setWindowIcon(QtGui.QIcon(get_file("files/images/icon.png")))
        self.update_json = False

        self.setup_nw_versions()

        self.thread = None
        self.original_packagejson = {}

        self.resize(width, height)

        self.extract_error = None

        self.create_application_layout()

        self.option_settings_enabled(False)

        self.setWindowTitle(u"Web2Executable {}".format(__gui_version__))
        self.update_nw_versions(None)
Esempio n. 5
0
    def __init__(self, width, height, app, parent=None):
        super(MainWindow, self).__init__(parent)
        CommandBase.__init__(self)

        self.icon_style = 'width:48px;height:48px;background-color:white;border-radius:5px;border:1px solid rgb(50,50,50);'

        self.last_project_dir = self.load_last_project_path()

        status_bar = QtGui.QStatusBar()
        self.setStatusBar(status_bar)

        self.project_path = ''
        #if platform.system() == 'Darwin':
        #    self.menuBar().setNativeMenuBar(False)
        self.project_menu = self.menuBar().addMenu('File')
        browse_action = QtGui.QAction(
            'Open Project',
            self.project_menu,
            shortcut=QtGui.QKeySequence.Open,
            statusTip='Open an existing or new project.',
            triggered=self.browse_dir)
        self.project_menu.addAction(browse_action)
        self.project_menu.addSeparator()

        self.recent_file_actions = []

        for i in xrange(MAX_RECENT):
            if i == 9:
                key = 0
            else:
                key = i + 1
            action = QtGui.QAction(self,
                                   visible=False,
                                   triggered=self.open_recent_file,
                                   shortcut=QtGui.QKeySequence(
                                       'Ctrl+{}'.format(key)))
            self.recent_file_actions.append(action)
            self.project_menu.addAction(action)

        self.recent_separator = self.project_menu.addSeparator()

        self.update_recent_files()

        exit_action = QtGui.QAction('Exit', self.project_menu)
        exit_action.triggered.connect(QtGui.qApp.closeAllWindows)
        self.project_menu.addAction(exit_action)

        self.logger = logger

        self.gui_app = app
        self.desktop_width = app.desktop().screenGeometry().width()
        self.desktop_height = app.desktop().screenGeometry().height()

        self.options_enabled = False
        self.output_package_json = True
        self.setWindowIcon(QtGui.QIcon(get_file('files/images/icon.png')))
        self.update_json = False

        self.setup_nw_versions()

        self.thread = None
        self.original_packagejson = {}

        self.resize(width, height)

        self.extract_error = None

        self.create_application_layout()

        self.option_settings_enabled(False)

        self.setWindowTitle(u"Web2Executable {}".format(__gui_version__))
        self.update_nw_versions(None)
Esempio n. 6
0
def command_base():
    base = CommandBase()
    base._project_name = 'Test'
    return base