New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement to Open File Script Interface - File Filter #606

Closed
aaronlyons opened this Issue Oct 18, 2017 · 0 comments

Comments

Projects
None yet
3 participants
@aaronlyons
Collaborator

aaronlyons commented Oct 18, 2017

A quick enhancement to Script Module to add the file filter as an optional parameter to the script module. This will allow for further customization of the dialog by the end user.

QT File Dialog Class - getOpenFileName

filter parameter added to code from script_module_gui.rb

    def save_file_dialog(directory = Cosmos::USERPATH, message = "Save File", filter = "All Files (*.*)")
      _get_main_thread_gui {|window| Qt::FileDialog.getSaveFileName(window, message, directory, filter) }
    end

    def open_file_dialog(directory = Cosmos::USERPATH, message = "Open File", filter = "All Files (*.*)")
      _get_main_thread_gui {|window| Qt::FileDialog.getOpenFileName(window, message, directory, filter) }
    end

    def open_files_dialog(directory = Cosmos::USERPATH, message = "Open File(s)", filter = "All Files (*.*)")
      _get_main_thread_gui {|window| Qt::FileDialog.getOpenFileNames(window, message, directory, filter) }
    end

@jasonatball jasonatball self-assigned this Oct 25, 2017

@jasonatball jasonatball added the feature label Oct 25, 2017

@ryanmelt ryanmelt added this to the v4.1.0 milestone Nov 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment