[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project
Public Slots | Signals | Public Member Functions | Properties | List of all members
KLFPathChooser Class Reference

A widget comprising of a line edit and a "browse" button. More...

#include <klfpathchooser.h>

Inheritance diagram for KLFPathChooser:
Inheritance graph
[legend]
Collaboration diagram for KLFPathChooser:
Collaboration graph
[legend]

Public Slots

virtual void setMode (int mode)
 
virtual void setCaption (const QString &caption)
 
virtual void setFilter (const QString &filter)
 
virtual void setPath (const QString &path)
 
virtual void setDialogConfirmOverwrite (bool confirm)
 
virtual void requestBrowse ()
 

Signals

void fileDialogPathChosen (const QString &fname)
 

Public Member Functions

 KLFPathChooser (QWidget *parent)
 
virtual ~KLFPathChooser ()
 
virtual int mode () const
 
virtual QString caption () const
 
virtual QString filter () const
 
virtual QString path () const
 
virtual bool dialogConfirmOverwrite () const
 
virtual bool possibleOverwriteWasConfirmed () const
 
- Public Member Functions inherited from QFrame
 QFrame (QWidget *parent=0, Qt::WindowFlags f=0)
 
 frameStyle ()
 
 setFrameStyle (int style)
 
 QFrame (QWidget *parent, const char *name, Qt::WindowFlags f=0)
 

Properties

int mode
 
bool dialogConfirmOverwrite
 
QString caption
 
QString filter
 
QString path
 
bool possibleOverwriteWasConfirmed
 

Detailed Description

A widget comprising of a line edit and a "browse" button.

This widget can be used to open existing files, save files, and open existing directories.

Definition at line 38 of file klfpathchooser.h.

Constructor & Destructor Documentation

KLFPathChooser::KLFPathChooser ( QWidget parent)
KLFPathChooser::~KLFPathChooser ( )
virtual

Definition at line 67 of file klfpathchooser.cpp.

References path().

Member Function Documentation

virtual QString KLFPathChooser::caption ( ) const
inlinevirtual

Definition at line 61 of file klfpathchooser.h.

Referenced by setCaption().

virtual bool KLFPathChooser::dialogConfirmOverwrite ( ) const
inlinevirtual

Returns the current dialogConfirmOverwrite setting. See setDialogConfirmOverwrite()

Definition at line 66 of file klfpathchooser.h.

void KLFPathChooser::fileDialogPathChosen ( const QString fname)
signal

Referenced by requestBrowse().

virtual QString KLFPathChooser::filter ( ) const
inlinevirtual

Definition at line 62 of file klfpathchooser.h.

Referenced by setFilter().

virtual int KLFPathChooser::mode ( ) const
inlinevirtual

The path chooser's mode.

  • 0 : choose an existing file for opening
  • 1 : choose a (most likely non-existant) file for saving
  • 2 : choose an existing directory

Definition at line 60 of file klfpathchooser.h.

Referenced by setMode().

virtual QString KLFPathChooser::path ( ) const
virtual

Referenced by requestBrowse(), and ~KLFPathChooser().

virtual bool KLFPathChooser::possibleOverwriteWasConfirmed ( ) const
inlinevirtual

Whether the user has already been asked confirmation for overwrite or not

This function returns TRUE if the path was obtained by the file dialog, and the option dialogConfirmOverwrite is enabled. In other words, if the file were to exist, then the dialog would have asked confirmation already.

If this function returns FALSE, and the file exists, and the dialogConfirmOverwrite setting is enabled, that means that the user entered the path manually and was NOT prompted for overwrite confirmation.

This value is only relevant in "save" mode. (see mode())

Bug:
WARNING: THIS FEATURE UNTESTED

Definition at line 82 of file klfpathchooser.h.

void KLFPathChooser::requestBrowse ( )
virtualslot
void KLFPathChooser::setCaption ( const QString caption)
virtualslot

Definition at line 114 of file klfpathchooser.cpp.

References caption().

virtual void KLFPathChooser::setDialogConfirmOverwrite ( bool  confirm)
inlinevirtualslot

If this setting is set to TRUE, then the file dialog will ask to confirm before selecting an existing file.

Note that if the user entered manually the path, no overwrite confirmation will have been required. see possibleOverwriteWasConfirmed().

This option is only relevant in "save" mode (mode()==1). It has no effect in the other modes.

Definition at line 109 of file klfpathchooser.h.

void KLFPathChooser::setFilter ( const QString filter)
virtualslot

Definition at line 125 of file klfpathchooser.cpp.

References filter().

void KLFPathChooser::setMode ( int  mode)
virtualslot

Set the path chooser's mode. See mode()

Definition at line 119 of file klfpathchooser.cpp.

References mode().

void KLFPathChooser::setPath ( const QString path)
virtualslot

Displays the path path in the widget.

Note that if mode is save mode (mode()==1), the new path is flagged as not overwrite-confirmed, ie. possibleOverwriteWasConfirmed() will return FALSE.

Definition at line 77 of file klfpathchooser.cpp.

Referenced by requestBrowse().

Property Documentation

QString KLFPathChooser::caption
readwrite

Definition at line 45 of file klfpathchooser.h.

bool KLFPathChooser::dialogConfirmOverwrite
readwrite

Definition at line 44 of file klfpathchooser.h.

QString KLFPathChooser::filter
readwrite

Definition at line 46 of file klfpathchooser.h.

int KLFPathChooser::mode
readwrite

Definition at line 43 of file klfpathchooser.h.

QString KLFPathChooser::path
readwrite

Definition at line 47 of file klfpathchooser.h.

bool KLFPathChooser::possibleOverwriteWasConfirmed
read

Definition at line 49 of file klfpathchooser.h.


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

Generated by doxygen 1.8.11