diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-01-25 01:13:04 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-01-25 01:13:04 +0000 |
commit | 9a14284b5b09da5e404916ceabc40ea2a9688048 (patch) | |
tree | d88a3820ef60bdba6acb0a7aa150fdc71d9c058b /ui/qt/capture_file_dialog.h | |
parent | 377322404ff8caadd6ea9e12d43c5e51fd3e79d5 (diff) |
Add a comment discussing what it will take to have native file dialogs
on Windows and OS X.
svn path=/trunk/; revision=40709
Diffstat (limited to 'ui/qt/capture_file_dialog.h')
-rw-r--r-- | ui/qt/capture_file_dialog.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/ui/qt/capture_file_dialog.h b/ui/qt/capture_file_dialog.h index d4daae1b02..bb6a350e80 100644 --- a/ui/qt/capture_file_dialog.h +++ b/ui/qt/capture_file_dialog.h @@ -28,9 +28,33 @@ class CaptureFileDialog : public QFileDialog { + // The GTK+ Open Capture File dialog has the following elements and features: + // - The ability to select a capture file from a list of known extensions + // - A display filter entry + // - Name resolution checkboxes + // - Capture file preview information + // Ideally we should provide similar functionality here. + // + // You can subclass QFileDialog (which we've done here) and add widgets as + // described at + // http://developer.qt.nokia.com/faq/answer/how_can_i_add_widgets_to_my_qfiledialog_instance + // However, Qt's idea of what a file dialog looks like isn't what Microsoft + // and Apple think a file dialog looks like. + // + // On Windows Vista and later we should probably use IFileOpenDialog. On earlier + // versions of Windows (including XP) we should use GetOpenFileName, which is + // what we do in ui/win32/file_dlg_win32.c. On OS X we should use NSOpenPanel. On + // other platforms we should fall back to QFileDialog. + // + // Yes, that's four implementations of the same window. + // + // If a plain native open file dialog is good enough we can just the static + // version of QFileDialog::getOpenFileName. (Commenting out Q_OBJECT below + // has the same effect.) + Q_OBJECT public: - explicit CaptureFileDialog(QWidget *parent = 0); + CaptureFileDialog(QWidget *parent = 0); signals: |