ExtensibleFileDialog Class Reference

QFileDialog plus generic extension support. More...

`#include <ExtensibleFileDialog.h>`

Inheritance diagram for ExtensibleFileDialog:

## Public Member Functions

| ExtensibleFileDialog (QWidget *parent=0, bool extended=true, Qt::WFlags flags=0)
| Constructor. More...
bool | isExtendable ()
| Tells weather the dialog has a valid extension widget. More...
bool | isExtended ()
void | setEditableFilter (bool on=true)
| Enables/Disables editing of the file type filter. More...
void | setExtended (bool extended)
| Toggle extension widget on/off. More...
void | setExtensionWidget (QWidget *extension)
| Set the extension widget to be displayed when the user presses the toggle button. More...
void | setExtentionToggleButtonText (const QString &text)
| Sets the text to be displayed in the toggle button. More...

## Protected Attributes

QPushButton * | d_extension_toggle
| Button for toggling display of extension on/off. More...

## Private Slots

void | updateToggleButtonText (bool)

## Private Attributes

QWidget * | d_extension
| The extension widget. More...
int | d_extension_row
| The layout row (of the assumed QGridLayout) used for extensions. More...

## Detailed Description

QFileDialog plus generic extension support.

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.

## Constructor & Destructor Documentation

ExtensibleFileDialog::ExtensibleFileDialog | ( | QWidget * | parent = `0`,
|  | bool | extended = `true`,
|  | Qt::WFlags | flags = `0`
| ) |  |

Constructor.

Parameters

  parent | parent widget (only affects placement of the dialog)
  extended | flag: show/hide the advanced options on start-up
  flags | window flags

References d_extension, d_extension_row, d_extension_toggle, and setExtended().

## Member Function Documentation

bool ExtensibleFileDialog::isExtendable | ( |  | ) |

inline

Tells weather the dialog has a valid extension widget.

References d_extension.

Referenced by OpenProjectDialog::closeEvent().

bool ExtensibleFileDialog::isExtended | ( |  | ) |

inline

References d_extension_toggle.

Referenced by ImageExportDialog::closeEvent(), and ImportASCIIDialog::closeEvent().

void ExtensibleFileDialog::setEditableFilter | ( | bool | on = `true` | ) |

Enables/Disables editing of the file type filter.

Referenced by ImportASCIIDialog::ImportASCIIDialog().

void ExtensibleFileDialog::setExtended | ( | bool | extended | ) |

Toggle extension widget on/off.

References d_extension_toggle, and updateToggleButtonText().

Referenced by ColorMapPreviewDialog::ColorMapPreviewDialog(), and ExtensibleFileDialog().

void ExtensibleFileDialog::setExtensionWidget | ( | QWidget * | extension | ) |

Set the extension widget to be displayed when the user presses the toggle button.

References d_extension, d_extension_row, d_extension_toggle, and updateToggleButtonText().

Referenced by ApplicationWindow::appendProject(), ColorMapPreviewDialog::ColorMapPreviewDialog(), ExportDialog::ExportDialog(), ImageExportDialog::ImageExportDialog(), ImportASCIIDialog::ImportASCIIDialog(), and OpenProjectDialog::OpenProjectDialog().

void ExtensibleFileDialog::setExtentionToggleButtonText | ( | const QString & | text | ) |

inline

Sets the text to be displayed in the toggle button.

References d_extension_toggle.

Referenced by ColorMapPreviewDialog::ColorMapPreviewDialog().

void ExtensibleFileDialog::updateToggleButtonText | ( | bool | toggled | ) |

private slot

References d_extension_toggle.

Referenced by setExtended(), and setExtensionWidget().

## Member Data Documentation

QWidget* ExtensibleFileDialog::d_extension

private

The extension widget.

Referenced by ExtensibleFileDialog(), isExtendable(), and setExtensionWidget().

int ExtensibleFileDialog::d_extension_row

private

The layout row (of the assumed QGridLayout) used for extensions.

Referenced by ExtensibleFileDialog(), and setExtensionWidget().

QPushButton* ExtensibleFileDialog::d_extension_toggle

protected

Button for toggling display of extension on/off.

Referenced by ExtensibleFileDialog(), isExtended(), setExtended(), setExtensionWidget(), setExtentionToggleButtonText(), OpenProjectDialog::updateAdvancedOptions(), ImageExportDialog::updateAdvancedOptions(), and updateToggleButtonText().

The documentation for this class was generated from the following files:

- qtiplot/src/lib/include/ExtensibleFileDialog.h
- qtiplot/src/lib/src/ExtensibleFileDialog.cpp