#include <qfileselectwidget.h>
Class diagram for QFileSelectWidget:
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 () |
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.
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.
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.
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.