Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

QFileSelectWidget Class Reference

Simple widget for selecting filename. More...

#include <qfileselectwidget.h>

Class diagram for QFileSelectWidget:

QWidget

List of all members.

Public Members

 QFileSelectWidget (QWidget* parent=0, const char* name=0, WFlags f=0 )
virtual ~QFileSelectWidget ()
const char* fileName () const

Public Slots

void setFileName ( const char* )
void browseFileName ()
void setEnabled ( bool e )

Signals

void fileNameChanged ( const char* )

Protected Members

QLineEdit* file_name
QPushButton* browse_button

Protected Slots

void emitChange ()

Detailed Description

Simple widget for selecting filename.

This widget allows selecting the filename through browse function or by typing its name in the line edit. It consists therefore from two sub-widgets: a pushbutton and a line edit. The children are placed in QHBoxLayout with line edit being able to stretch horizontally.


Member Function Documentation

QFileSelectWidget::QFileSelectWidget (QWidget * parent = 0, const char * name = 0, WFlags f = 0)

Constructor.

Constructs the widget and puts its children into the layout (with 5px layout border.) It also connects all the internal signals/slots.

virtual QFileSelectWidget::~QFileSelectWidget () [virtual]

Destructor.

Does nothing.

const char * QFileSelectWidget::fileName () const

Returns file name.

Returns the current value contained in the line edit widget.

void QFileSelectWidget::setFileName (const char * new_name) [slot]

Allows setting the file name.

Sets the given text as a file name in the line edit.

Parameters:
new_name   the name to be set.

void QFileSelectWidget::browseFileName () [slot]

Pops up the file open dialog.

Activates the file open dialog and updates the line edit widget if the file was selected.

void QFileSelectWidget::setEnabled (bool e) [slot]

Overloaded from QWidget.

Overloaded function dispatches enabling signal to both children so that enabling/disabling this widget enables/disables also the browse button and the line edit.

void QFileSelectWidget::fileNameChanged (const char *) [signal]

A signal emited when the file name has changed.

void QFileSelectWidget::emitChange () [protected, slot]

A protected slot used to emit fileNameChanged( const char* ) signal.

This method is used to allow for example emiting the signal as a reaction to pressing <ENTER> in file_name widget.


Member Data Documentation

QLineEdit* QFileSelectWidget::file_name [protected]

The line edit widget with selected file name in it.

QPushButton* QFileSelectWidget::browse_button [protected]

The push button that activates brosing through files.


The documentation for this class was generated from the following files:
Generated at Thu Jul 13 15:38:11 2000 for Prompt Show by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999