• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdefile
 

tdeio/tdefile

Public Member Functions | Static Public Member Functions | Protected Member Functions
KEncodingFileDialog Class Reference

#include <kencodingfiledialog.h>

Inheritance diagram for KEncodingFileDialog:
KFileDialog

List of all members.

Public Member Functions

 KEncodingFileDialog (const TQString &startDir=TQString::null, const TQString &encoding=TQString::null, const TQString &filter=TQString::null, const TQString &caption=TQString::null, KFileDialog::OperationMode type=KFileDialog::Opening, TQWidget *parent=0, const char *name="", bool modal=true)
 ~KEncodingFileDialog ()
TQString selectedEncoding () const

Static Public Member Functions

static Result getOpenFileNameAndEncoding (const TQString &encoding=TQString::null, const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null)
static Result getOpenFileNamesAndEncoding (const TQString &encoding=TQString::null, const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null)
static Result getOpenURLAndEncoding (const TQString &encoding=TQString::null, const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null)
static Result getOpenURLsAndEncoding (const TQString &encoding=TQString::null, const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null)
static Result getSaveFileNameAndEncoding (const TQString &encoding=TQString::null, const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null)
static Result getSaveURLAndEncoding (const TQString &encoding=TQString::null, const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null)

Protected Member Functions

virtual void virtual_hook (int id, void *data)

Detailed Description

Provides a user (and developer) friendly way to select files with support for choosing encoding.

The dialog has been designed to allow applications to customise it by subclassing. It uses geometry management to ensure that subclasses can easily add children that will be incorporated into the layout.

Definition at line 39 of file kencodingfiledialog.h.


Constructor & Destructor Documentation

KEncodingFileDialog::KEncodingFileDialog ( const TQString &  startDir = TQString::null,
const TQString &  encoding = TQString::null,
const TQString &  filter = TQString::null,
const TQString &  caption = TQString::null,
KFileDialog::OperationMode  type = KFileDialog::Opening,
TQWidget *  parent = 0,
const char *  name = "",
bool  modal = true 
)

Constructs a file dialog for text files with encoding selection possibility.

Parameters:
startDirThis can either be
  • The URL of the directory to start in.
  • TQString::null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '::<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
encodingThe encoding shown in the encoding combo. If it's TQString::null, the global default encoding will be shown.
filterThis is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this...
captionThe caption of the dialog
typeThis can either be
  • Opening (open dialog, the default setting)
  • Saving
parentThe parent widget of this dialog
nameThe name of this object
modalWhether to create a modal dialog or not
Since:
3.2

Definition at line 39 of file kencodingfiledialog.cpp.

KEncodingFileDialog::~KEncodingFileDialog ( )

Destructs the file dialog.

Definition at line 81 of file kencodingfiledialog.cpp.


Member Function Documentation

KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding ( const TQString &  encoding = TQString::null,
const TQString &  startDir = TQString::null,
const TQString &  filter = TQString::null,
TQWidget *  parent = 0,
const TQString &  caption = TQString::null 
) [static]

Creates a modal file dialog and return the selected filename or an empty string if none was chosen additionally a chosen encoding value is returned.

Note that with this method the user must select an existing filename.

Parameters:
startDirThis can either be
  • The URL of the directory to start in.
  • TQString::null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '::<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
encodingThe encoding shown in the encoding combo.
filterThis is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this...
parentThe widget the dialog will be centered on initially.
captionThe name of the dialog widget.

Definition at line 96 of file kencodingfiledialog.cpp.

KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNamesAndEncoding ( const TQString &  encoding = TQString::null,
const TQString &  startDir = TQString::null,
const TQString &  filter = TQString::null,
TQWidget *  parent = 0,
const TQString &  caption = TQString::null 
) [static]

Creates a modal file dialog and returns the selected encoding and the selected filenames or an empty list if none was chosen.

Note that with this method the user must select an existing filename.

Parameters:
startDirThis can either be
  • The URL of the directory to start in.
  • TQString::null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '::<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
encodingThe encoding shown in the encoding combo.
filterThis is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this.
parentThe widget the dialog will be centered on initially.
captionThe name of the dialog widget.

Definition at line 114 of file kencodingfiledialog.cpp.

KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLAndEncoding ( const TQString &  encoding = TQString::null,
const TQString &  startDir = TQString::null,
const TQString &  filter = TQString::null,
TQWidget *  parent = 0,
const TQString &  caption = TQString::null 
) [static]

Creates a modal file dialog and returns the selected encoding and URL or an empty string if none was chosen.

Note that with this method the user must select an existing URL.

Parameters:
startDirThis can either be
  • The URL of the directory to start in.
  • TQString::null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '::<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
encodingThe encoding shown in the encoding combo.
filterThis is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this...
parentThe widget the dialog will be centered on initially.
captionThe name of the dialog widget.

Definition at line 132 of file kencodingfiledialog.cpp.

KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLsAndEncoding ( const TQString &  encoding = TQString::null,
const TQString &  startDir = TQString::null,
const TQString &  filter = TQString::null,
TQWidget *  parent = 0,
const TQString &  caption = TQString::null 
) [static]

Creates a modal file dialog and returns the selected encoding URLs or an empty list if none was chosen.

Note that with this method the user must select an existing filename.

Parameters:
startDirThis can either be
  • The URL of the directory to start in.
  • TQString::null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '::<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
encodingThe encoding shown in the encoding combo.
filterThis is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this...
parentThe widget the dialog will be centered on initially.
captionThe name of the dialog widget.

Definition at line 148 of file kencodingfiledialog.cpp.

KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding ( const TQString &  encoding = TQString::null,
const TQString &  startDir = TQString::null,
const TQString &  filter = TQString::null,
TQWidget *  parent = 0,
const TQString &  caption = TQString::null 
) [static]

Creates a modal file dialog and returns the selected encoding and filename or an empty string if none was chosen.

Note that with this method the user need not select an existing filename.

Parameters:
startDirThis can either be
  • The URL of the directory to start in.
  • a relative path or a filename determining the directory to start in and the file to be selected.
  • TQString::null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '::<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
encodingThe encoding shown in the encoding combo.
filterThis is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this...
parentThe widget the dialog will be centered on initially.
captionThe name of the dialog widget.

Definition at line 167 of file kencodingfiledialog.cpp.

KEncodingFileDialog::Result KEncodingFileDialog::getSaveURLAndEncoding ( const TQString &  encoding = TQString::null,
const TQString &  startDir = TQString::null,
const TQString &  filter = TQString::null,
TQWidget *  parent = 0,
const TQString &  caption = TQString::null 
) [static]

Creates a modal file dialog and returns the selected encoding and filename or an empty string if none was chosen.

Note that with this method the user need not select an existing filename.

Parameters:
startDirThis can either be
  • The URL of the directory to start in.
  • a relative path or a filename determining the directory to start in and the file to be selected.
  • TQString::null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '::<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
encodingThe encoding shown in the encoding combo.
filterThis is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this...
parentThe widget the dialog will be centered on initially.
captionThe name of the dialog widget.

Definition at line 192 of file kencodingfiledialog.cpp.

TQString KEncodingFileDialog::selectedEncoding ( ) const
Returns:
The selected encoding if the constructor with the encoding parameter was used, otherwise TQString::null.

Definition at line 87 of file kencodingfiledialog.cpp.


The documentation for this class was generated from the following files:
  • kencodingfiledialog.h
  • kencodingfiledialog.cpp

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdefile by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.