Add the function of importing query file

Enable the user to import query file instead of typing it one by one
Merge branches 'gui-inputfile' and 'master'