#include <ExtensibleFileDialog.h>
This is a simple hack on top of QFileDialog that allows a custom extension widget to be added to the bottom of the dialog. A button is provided for toggling display of this widget on/off.
For the placement of button and extension widget, it is assumed that QFileDialog uses a QGridLayout as its top-level layout. Other layouts will probably lead to a strange outlook, although the functionality should stay intact.
Public Member Functions | |
| ExtensibleFileDialog (QWidget *parent=0, bool extended=true, Qt::WFlags flags=0) | |
| Constructor. | |
| bool | isExtendable () |
| Tells weather the dialog has a valid extension widget. | |
| bool | isExtended () |
| void | setExtended (bool extended) |
| Toggle extension widget on/off. | |
| void | setExtensionWidget (QWidget *extension) |
| Set the extension widget to be displayed when the user presses the toggle button. | |
| void | setExtentionToggleButtonText (const QString &text) |
| Sets the text to be displayed in the toggle button. | |
Protected Attributes | |
| QPushButton * | d_extension_toggle |
| Button for toggling display of extension on/off. | |
Private Attributes | |
| QWidget * | d_extension |
| The extension widget. | |
| int | d_extension_row |
| The layout row (of the assumed QGridLayout) used for extensions. | |
|
||||||||||||||||
|
Constructor.
|
|
|
Tells weather the dialog has a valid extension widget.
|
|
|
|
|
|
Toggle extension widget on/off.
|
|
|
Set the extension widget to be displayed when the user presses the toggle button.
|
|
|
Sets the text to be displayed in the toggle button.
|
|
|
The extension widget.
|
|
|
The layout row (of the assumed QGridLayout) used for extensions.
|
|
|
Button for toggling display of extension on/off.
|
1.4.6