Optika GUI Toolik  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Optika::FileNameWidget Class Reference

A small widget consisting of a button and label that allows the user to select a file through a QFileDialog. The label displays the currently selected file. More...

#include <Optika_FileNameWidget.hpp>

Inherits QWidget.

Constructors

 FileNameWidget (QString currentFileName=QString(), bool mustAlreadyExist=false, QWidget *parent=0)
 Constructs a FileNameWidget. More...
 

Attribute/Query Methods

QString getCurrentFileName ()
 Gets the current filename in the widget. More...
 

Setter Functions

void setCurrentFileName (QString newName)
 Sets the current filename in the widget. More...
 

Public Slots

void getNewFileName ()
 Opens a QFileDialog allowing the user to select a new filename. More...
 

Private Members

QString currentFileName
 The current file name stored in the list. More...
 
QLabel * pathLabel
 The label describing the file path. More...
 
bool mustAlreadyExist
 Whether or not the file name specified must already exist. More...
 

Detailed Description

A small widget consisting of a button and label that allows the user to select a file through a QFileDialog. The label displays the currently selected file.

Definition at line 57 of file Optika_FileNameWidget.hpp.

Constructor & Destructor Documentation

Optika::FileNameWidget::FileNameWidget ( QString  currentFileName = QString(),
bool  mustAlreadyExist = false,
QWidget *  parent = 0 
)

Constructs a FileNameWidget.

Parameters
currentFileNameThe Filename with which the widget should be initialized.
parentThe parent widget.

Definition at line 51 of file Optika_FileNameWidget.cpp.

Member Function Documentation

QString Optika::FileNameWidget::getCurrentFileName ( )

Gets the current filename in the widget.

Returns
The current filename in the widget.

Definition at line 65 of file Optika_FileNameWidget.cpp.

void Optika::FileNameWidget::setCurrentFileName ( QString  newName)

Sets the current filename in the widget.

Parameters
Thename to which the widget should be set.

Definition at line 69 of file Optika_FileNameWidget.cpp.

void Optika::FileNameWidget::getNewFileName ( )
slot

Opens a QFileDialog allowing the user to select a new filename.

Definition at line 74 of file Optika_FileNameWidget.cpp.

Member Data Documentation

QString Optika::FileNameWidget::currentFileName
private

The current file name stored in the list.

Definition at line 116 of file Optika_FileNameWidget.hpp.

QLabel* Optika::FileNameWidget::pathLabel
private

The label describing the file path.

Definition at line 121 of file Optika_FileNameWidget.hpp.

bool Optika::FileNameWidget::mustAlreadyExist
private

Whether or not the file name specified must already exist.

Definition at line 126 of file Optika_FileNameWidget.hpp.


The documentation for this class was generated from the following files: