Implement QueryDialog for creating shared queries