casa
$Rev:20696$
|
Class for saving region files. More...
#include <QtRegionShapeManager.qo.h>
Public Member Functions | |
QtRSFileSaver (String file="", String format="", String dir="") | |
Constructor. | |
~QtRSFileSaver () | |
Destructor. | |
Static Public Member Functions | |
static RSFileWriter * | getFileWriter (String *file=NULL, String *format=NULL, String *directory=NULL) |
Opens a new QtRegionFileSaver so that the user can input a filename, file format, and format options, and then returns a RegionFileWriter appropriate for writing that file. | |
Private Slots | |
void | browse () |
Show a file chooser dialog. | |
void | showHideOptions (bool show) |
Show/hide the region-specific options frame. | |
void | ok () |
Check that the entered file is valid, then accept(). | |
Private Member Functions | |
String | getFilename () |
Gets the current filename chosen by the user. | |
String | getDirectory () |
Gets the directory of the filename chosen by the user. | |
String | getFormat () |
Gets the current region file format chosen by the user. | |
QWidget * | getOptions () |
Gets the current options widget. | |
Private Attributes | |
QString | m_lastDir |
QStackedLayout * | m_formatOptions |
Layout holding widgets for specialized format options. |
Class for saving region files.
The main use is QtRSFileSaver::getFileWriter(), which prompts the user for a filename (with file chooser dialog), a file format, and options specific to the file format, and then returns a RSFileWriter appropriate for writing that file.
Definition at line 221 of file QtRegionShapeManager.qo.h.
casa::QtRSFileSaver::QtRSFileSaver | ( | String | file = "" , |
String | format = "" , |
||
String | dir = "" |
||
) |
Constructor.
The initial file and format will be set to the given, and if a filechooser is opened the starting directory will be set to the given.
Destructor.
void casa::QtRSFileSaver::browse | ( | ) | [private, slot] |
Show a file chooser dialog.
String casa::QtRSFileSaver::getDirectory | ( | ) | [private] |
Gets the directory of the filename chosen by the user.
String casa::QtRSFileSaver::getFilename | ( | ) | [private] |
Gets the current filename chosen by the user.
static RSFileWriter* casa::QtRSFileSaver::getFileWriter | ( | String * | file = NULL , |
String * | format = NULL , |
||
String * | directory = NULL |
||
) | [static] |
Opens a new QtRegionFileSaver so that the user can input a filename, file format, and format options, and then returns a RegionFileWriter appropriate for writing that file.
Returns NULL if the user cancels or an error occurs (shouldn't happen). If the String* arguments are given, they will be used for the initial settings and then updated to show the saved file, format, and directory, respectively.
String casa::QtRSFileSaver::getFormat | ( | ) | [private] |
Gets the current region file format chosen by the user.
Guaranteed to be one of the values in RegionFileReader::supportedTypesStrings().
QWidget* casa::QtRSFileSaver::getOptions | ( | ) | [private] |
Gets the current options widget.
void casa::QtRSFileSaver::ok | ( | ) | [private, slot] |
Check that the entered file is valid, then accept().
void casa::QtRSFileSaver::showHideOptions | ( | bool | show | ) | [private, slot] |
Show/hide the region-specific options frame.
QStackedLayout* casa::QtRSFileSaver::m_formatOptions [private] |
Layout holding widgets for specialized format options.
Definition at line 248 of file QtRegionShapeManager.qo.h.
QString casa::QtRSFileSaver::m_lastDir [private] |
Definition at line 245 of file QtRegionShapeManager.qo.h.