[KLF Backend][KLF Tools][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
 

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::KLFPathChooser ( QWidget *  parent)

Definition at line 36 of file klfpathchooser.cpp.

References requestBrowse().

◆ ~KLFPathChooser()

KLFPathChooser::~KLFPathChooser ( )
virtual

Definition at line 67 of file klfpathchooser.cpp.

References path().

Member Function Documentation

◆ caption()

virtual QString KLFPathChooser::caption ( ) const
inlinevirtual

Definition at line 61 of file klfpathchooser.h.

Referenced by setCaption().

◆ dialogConfirmOverwrite()

virtual bool KLFPathChooser::dialogConfirmOverwrite ( ) const
inlinevirtual

Returns the current dialogConfirmOverwrite setting. See setDialogConfirmOverwrite()

Definition at line 66 of file klfpathchooser.h.

◆ fileDialogPathChosen

void KLFPathChooser::fileDialogPathChosen ( const QString fname)
signal

Referenced by requestBrowse().

◆ filter()

virtual QString KLFPathChooser::filter ( ) const
inlinevirtual

Definition at line 62 of file klfpathchooser.h.

Referenced by setFilter().

◆ mode()

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().

◆ path()

virtual QString KLFPathChooser::path ( ) const
virtual

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

◆ possibleOverwriteWasConfirmed()

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.

◆ requestBrowse

void KLFPathChooser::requestBrowse ( )
virtualslot

◆ setCaption

void KLFPathChooser::setCaption ( const QString caption)
virtualslot

Definition at line 120 of file klfpathchooser.cpp.

References caption().

◆ setDialogConfirmOverwrite

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.

◆ setFilter

void KLFPathChooser::setFilter ( const QString filter)
virtualslot

Definition at line 131 of file klfpathchooser.cpp.

References filter().

◆ setMode

void KLFPathChooser::setMode ( int  mode)
virtualslot

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

Definition at line 125 of file klfpathchooser.cpp.

References mode().

◆ setPath

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

◆ caption

QString KLFPathChooser::caption
readwrite

Definition at line 45 of file klfpathchooser.h.

◆ dialogConfirmOverwrite

bool KLFPathChooser::dialogConfirmOverwrite
readwrite

Definition at line 44 of file klfpathchooser.h.

◆ filter

QString KLFPathChooser::filter
readwrite

Definition at line 46 of file klfpathchooser.h.

◆ mode

int KLFPathChooser::mode
readwrite

Definition at line 43 of file klfpathchooser.h.

◆ path

QString KLFPathChooser::path
readwrite

Definition at line 47 of file klfpathchooser.h.

◆ possibleOverwriteWasConfirmed

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.13