#include <kencodingfiledialog.h>
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 |
Public Member Functions inherited from KFileDialog | |
KFileDialog (const TQString &startDir, const TQString &filter, TQWidget *parent, const char *name, bool modal) | |
KFileDialog (const TQString &startDir, const TQString &filter, TQWidget *parent, const char *name, bool modal, TQWidget *widget) | |
~KFileDialog () | |
KURL | selectedURL () const |
KURL::List | selectedURLs () const |
KURL | baseURL () const |
TQString | selectedFile () const |
TQStringList | selectedFiles () const |
void | setURL (const KURL &url, bool clearforward=true) |
void | setSelection (const TQString &name) |
void | setOperationMode (KFileDialog::OperationMode) |
OperationMode | operationMode () const |
void | setKeepLocation (bool keep) |
bool | keepsLocation () const |
void | setFilter (const TQString &filter) |
TQString | currentFilter () const |
void | setFilterMimeType (const TQString &label, const KMimeType::List &types, const KMimeType::Ptr &defaultType) TDE_DEPRECATED |
KMimeType::Ptr | currentFilterMimeType () |
void | setMimeFilter (const TQStringList &types, const TQString &defaultType=TQString::null) |
TQString | currentMimeFilter () const |
void | clearFilter () |
void | setPreviewWidget (const TQWidget *w) TDE_DEPRECATED |
void | setPreviewWidget (const KPreviewWidgetBase *w) |
virtual void | show () |
void | setMode (KFile::Mode m) |
void | setMode (unsigned int m) |
KFile::Mode | mode () const |
void | setLocationLabel (const TQString &text) |
TDEToolBar * | toolBar () const |
KPushButton * | okButton () const |
KPushButton * | cancelButton () const |
KURLBar * | speedBar () |
TDEActionCollection * | actionCollection () const |
int | pathComboIndex () |
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) |
Static Public Member Functions inherited from KFileDialog | |
static TQString | getOpenFileName (const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null) |
static TQString | getOpenFileNameWId (const TQString &startDir, const TQString &filter, WId parent_id, const TQString &caption) |
static TQStringList | getOpenFileNames (const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null) |
static KURL | getOpenURL (const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null) |
static KURL::List | getOpenURLs (const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null) |
static TQString | getSaveFileName (const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null) |
static TQString | getSaveFileNameWId (const TQString &dir, const TQString &filter, WId parent_id, const TQString &caption) |
static KURL | getSaveURL (const TQString &startDir=TQString::null, const TQString &filter=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null) |
static TQString | getExistingDirectory (const TQString &startDir=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null) |
static KURL | getExistingURL (const TQString &startDir=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null) |
static KURL | getImageOpenURL (const TQString &startDir=TQString::null, TQWidget *parent=0, const TQString &caption=TQString::null) |
static KURL | getStartURL (const TQString &startDir, TQString &recentDirClass) |
static void | setStartDir (const KURL &directory) |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Protected Member Functions inherited from KFileDialog | |
virtual void | keyPressEvent (TQKeyEvent *e) |
void | init (const TQString &startDir, const TQString &filter, TQWidget *widget) |
virtual void | initGUI () |
void | multiSelectionChanged () |
virtual void | readConfig (TDEConfig *, const TQString &group=TQString::null) |
virtual void | writeConfig (TDEConfig *, const TQString &group=TQString::null) |
virtual void | readRecentFiles (TDEConfig *) |
virtual void | saveRecentFiles (TDEConfig *) |
KURL::List | tokenize (const TQString &line) const |
KURL | getCompleteURL (const TQString &) |
TQString | currentFilterExtension () |
void | updateAutoSelectExtension () |
KURL::List & | parseSelectedURLs () const |
Additional Inherited Members | |
Public Types inherited from KFileDialog | |
enum | OperationMode { Other = 0 , Opening , Saving } |
Signals inherited from KFileDialog | |
void | fileSelected (const TQString &) |
void | fileHighlighted (const TQString &) |
void | selectionChanged () |
void | filterChanged (const TQString &filter) |
Protected Slots inherited from KFileDialog | |
void | urlEntered (const KURL &) |
void | enterURL (const KURL &url) |
void | enterURL (const TQString &url) |
void | locationActivated (const TQString &url) |
void | toolbarCallback (int) |
void | pathComboChanged (const TQString &) |
void | dirCompletion (const TQString &) |
void | slotFilterChanged () |
void | fileHighlighted (const KFileItem *i) |
void | fileSelected (const KFileItem *i) |
void | slotStatResult (TDEIO::Job *job) |
void | slotLoadingFinished () |
void | fileCompletion (const TQString &) |
void | toggleSpeedbar (bool) |
void | toggleBookmarks (bool show) |
virtual void | updateStatusLine (int dirs, int files) |
virtual void | slotOk () |
virtual void | accept () |
virtual void | slotCancel () |
void | slotAutoSelectExtClicked () |
void | addToRecentDocuments () |
void | initSpeedbar () |
Protected Attributes inherited from KFileDialog | |
TDEToolBar * | toolbar |
KURLComboBox * | locationEdit |
KFileFilterCombo * | filterWidget |
KDirOperator * | ops |
bool | autoDirectoryFollowing |
Static Protected Attributes inherited from KFileDialog | |
static KURL * | lastDirectory |
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 38 of file kencodingfiledialog.h.
Constructor & Destructor Documentation
◆ KEncodingFileDialog()
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
-
startDir This 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.
encoding The encoding shown in the encoding combo. If it's TQString::null, the global default encoding will be shown. filter This 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... caption The caption of the dialog type This can either be - Opening (open dialog, the default setting)
- Saving
parent The parent widget of this dialog name The name of this object modal Whether to create a modal dialog or not
- Since
- 3.2
Definition at line 38 of file kencodingfiledialog.cpp.
◆ ~KEncodingFileDialog()
KEncodingFileDialog::~KEncodingFileDialog | ( | ) |
Destructs the file dialog.
Definition at line 80 of file kencodingfiledialog.cpp.
Member Function Documentation
◆ getOpenFileNameAndEncoding()
|
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
-
startDir This 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.
encoding The encoding shown in the encoding combo. filter This 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... parent The widget the dialog will be centered on initially. caption The name of the dialog widget.
Definition at line 95 of file kencodingfiledialog.cpp.
◆ getOpenFileNamesAndEncoding()
|
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
-
startDir This 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.
encoding The encoding shown in the encoding combo. filter This 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. parent The widget the dialog will be centered on initially. caption The name of the dialog widget.
Definition at line 113 of file kencodingfiledialog.cpp.
◆ getOpenURLAndEncoding()
|
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
-
startDir This 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.
encoding The encoding shown in the encoding combo. filter This 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... parent The widget the dialog will be centered on initially. caption The name of the dialog widget.
Definition at line 131 of file kencodingfiledialog.cpp.
◆ getOpenURLsAndEncoding()
|
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
-
startDir This 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.
encoding The encoding shown in the encoding combo. filter This 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... parent The widget the dialog will be centered on initially. caption The name of the dialog widget.
Definition at line 147 of file kencodingfiledialog.cpp.
◆ getSaveFileNameAndEncoding()
|
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
-
startDir This 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.
encoding The encoding shown in the encoding combo. filter This 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... parent The widget the dialog will be centered on initially. caption The name of the dialog widget.
Definition at line 166 of file kencodingfiledialog.cpp.
◆ getSaveURLAndEncoding()
|
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
-
startDir This 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.
encoding The encoding shown in the encoding combo. filter This 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... parent The widget the dialog will be centered on initially. caption The name of the dialog widget.
Definition at line 191 of file kencodingfiledialog.cpp.
◆ selectedEncoding()
TQString KEncodingFileDialog::selectedEncoding | ( | ) | const |
- Returns
- The selected encoding if the constructor with the encoding parameter was used, otherwise TQString::null.
Definition at line 86 of file kencodingfiledialog.cpp.
The documentation for this class was generated from the following files: