casa
$Rev:20696$
|
Class for loading region shape files. More...
#include <QtRegionShapeManager.qo.h>
Public Member Functions | |
QtRSFileLoader (String file="", String format="", String dir="") | |
Constructor. | |
~QtRSFileLoader () | |
Destructor. | |
Static Public Member Functions | |
static RSFileReader * | getFileReader (String *file=NULL, String *format=NULL, String *directory=NULL) |
Opens a new QtRSFileLoader so that the user can input a filename and file format, and then returns a RSFileReader appropriate for reading that file. | |
Private Slots | |
void | browse () |
Show a file chooser dialog. | |
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. | |
Private Attributes | |
QString | m_lastDir |
Class for loading region shape files.
The main use is QtRSFileLoader::getFileReader(), which prompts the user for a filename (with file chooser dialog) and a file format and then returns a RSFileReader appropriate for reading that file.
Definition at line 171 of file QtRegionShapeManager.qo.h.
casa::QtRSFileLoader::QtRSFileLoader | ( | 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::QtRSFileLoader::browse | ( | ) | [private, slot] |
Show a file chooser dialog.
String casa::QtRSFileLoader::getDirectory | ( | ) | [private] |
Gets the directory of the filename chosen by the user.
String casa::QtRSFileLoader::getFilename | ( | ) | [private] |
Gets the current filename chosen by the user.
static RSFileReader* casa::QtRSFileLoader::getFileReader | ( | String * | file = NULL , |
String * | format = NULL , |
||
String * | directory = NULL |
||
) | [static] |
Opens a new QtRSFileLoader so that the user can input a filename and file format, and then returns a RSFileReader appropriate for reading that file.
Returns NULL if the user cancels or if 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 opened file, format, and directory, respectively.
String casa::QtRSFileLoader::getFormat | ( | ) | [private] |
Gets the current region file format chosen by the user.
Guaranteed to be one of the values in RegionFileReader::supportedTypesStrings().
void casa::QtRSFileLoader::ok | ( | ) | [private, slot] |
Check that the entered file is valid, then accept().
QString casa::QtRSFileLoader::m_lastDir [private] |
Definition at line 195 of file QtRegionShapeManager.qo.h.