Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

QY2FloppyMountDialog Class Reference

#include <QY2FloppyMountDialog.h>

List of all members.

Public Slots

bool mount ()
void unmount (bool verbose=false)

Public Member Functions

 QY2FloppyMountDialog (QWidget *parent, const QString &startWith, const QString &filter, const QString &headline, const QString &floppyDevice=QString::null, const QString &floppyMountPoint=QString::null, bool startWithFloppy=false)
virtual ~QY2FloppyMountDialog ()
QString askForSaveFileName ()
QString askForExistingFile ()

Protected Slots

void browse ()
void enableWidgets ()

Protected Member Functions

QString askForFile (bool wantExistingFile)
void error (const QString &msg)

Protected Attributes

QRadioButton * _useHardDisk
QRadioButton * _useFloppy
QFrame * _floppyParams
QComboBox * _floppyDeviceField
QComboBox * _floppyMountPointField
QLineEdit * _pathField
QString _startWith
QString _filter
QString _floppyDevice
QString _floppyMountPoint
bool _floppyMounted
bool _wantExistingFile


Detailed Description

Extended file selection box that allows floppy access ( mount/unmount floppy ) as well as simply opening a standard file selection box.


Constructor & Destructor Documentation

QY2FloppyMountDialog::QY2FloppyMountDialog QWidget *  parent,
const QString &  startWith,
const QString &  filter,
const QString &  headline,
const QString &  floppyDevice = QString::null,
const QString &  floppyMountPoint = QString::null,
bool  startWithFloppy = false
 

Constructor: Creates an extended file selection box that allows floppy access.

If the user selects a file on floppy, this dialog takes care of mounting and unmounting ( the floppy remains mounted as long as the dialog exists ).

Parameters:

'parent' the parent widget.

'startWith' is the initial directory or file.

'filter' is one or more blank-separated file patterns, e.g. "*.png *.jpg"

'headline' is an explanatory text for the file selection box. Graphical UIs may omit that if no window manager is running.

'floppyDevice' ( default: "/dev/fd0" ) is the device name for the floppy.

'floppyMountPoint' ( default: "/media/floppy" ) is the mount point for the floppy.

'startWithFloppy' indicates if the default should be the floppy or the hard disk.

QY2FloppyMountDialog::~QY2FloppyMountDialog  )  [virtual]
 

Destructor.


Member Function Documentation

QString QY2FloppyMountDialog::askForExistingFile  ) 
 

Execute the dialog and ask for an existing file to load data from.

Returns the selected file name or an empty string if the user canceled the operation.

QString QY2FloppyMountDialog::askForFile bool  wantExistingFile  )  [protected]
 

Execute the dialog and ask for a file to save data to.

QString QY2FloppyMountDialog::askForSaveFileName  ) 
 

Execute the dialog and ask for a file to save data to. Automatically asks for confirmation if the user selects an existing file.

Returns the selected file name or an empty string if the user canceled the operation.

void QY2FloppyMountDialog::browse  )  [protected, slot]
 

Open a ( normal ) file selection box upon pressing the "Browse..." button. Selects an existing or a new file depending on _wantExistingFile.

void QY2FloppyMountDialog::enableWidgets  )  [protected, slot]
 

Enable / disable widgets depending on current settings.

void QY2FloppyMountDialog::error const QString &  msg  )  [protected]
 

Show an error message

bool QY2FloppyMountDialog::mount  )  [slot]
 

Mount floppy if floppy is selected. Does nothing if hard disk is selected. Handles failed mount attempts with its own "Retry" / "Cancel" popup.

Returns 'true' on success, 'false' on error if the user chose not to retry.

void QY2FloppyMountDialog::unmount bool  verbose = false  )  [slot]
 

Unmount floppy if it is mounted. Does nothing if it is not mounted. Pops up a message box in verbose mode if unmounting was successful.


Member Data Documentation

QString QY2FloppyMountDialog::_filter [protected]
 

QString QY2FloppyMountDialog::_floppyDevice [protected]
 

QComboBox* QY2FloppyMountDialog::_floppyDeviceField [protected]
 

bool QY2FloppyMountDialog::_floppyMounted [protected]
 

QString QY2FloppyMountDialog::_floppyMountPoint [protected]
 

QComboBox* QY2FloppyMountDialog::_floppyMountPointField [protected]
 

QFrame* QY2FloppyMountDialog::_floppyParams [protected]
 

QLineEdit* QY2FloppyMountDialog::_pathField [protected]
 

QString QY2FloppyMountDialog::_startWith [protected]
 

QRadioButton* QY2FloppyMountDialog::_useFloppy [protected]
 

QRadioButton* QY2FloppyMountDialog::_useHardDisk [protected]
 

bool QY2FloppyMountDialog::_wantExistingFile [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Oct 14 19:03:47 2005 for yast2-qt by doxygen 1.3.6