Diffstat (limited to 'libopie2/opieui/fileselector/ofileselector.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.cpp | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index 71d765c..600daff 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp @@ -812,4 +812,33 @@ void OFileViewFileSystem::activate( const QString& str) /* Selector */ +/** + * @short new and complete c'tor + * + * Create a OFileSelector to let the user select a file. It can + * either be used to open a file, select a save name in a dir or + * as a dropin for the FileSelector. + * + * <pre> + * QMap<QString, QStringList> mimeTypes; + * QStringList types; + * types << "text@slash* "; + * types << "audio@slash*"; + * mimeTypes.insert( tr("Audio and Text"), types ); + * mimeTypes.insert( tr("All"), "*@slash*); + * + * now you could create your fileselector + * </pre> + * + * + * @param parent the parent of this widget + * @param mode The mode from the enum Mode (Open,Save,FILESELECTOR) + * @param sel The selector to be used + * @param dirName The name of the dir to start int + * @param fileName The fileName placed in the fileselector lineedit + * @param mimetypes The MimeType map of used mimetypes + * @param showNew Show a New Button. Most likely to be used in the FileSelector view. + * @param showClose Show a Close Button. Most likely to be used in FileSelector view. + * + */ OFileSelector::OFileSelector( QWidget* parent, int mode, int sel, const QString& dirName, const QString& fileName, @@ -853,4 +882,8 @@ OFileSelector::OFileSelector( QWidget* parent, int mode, int sel, } + +/** + * This a convience c'tor to just substitute the use of FileSelector + */ OFileSelector::OFileSelector( const QString& mimeFilter, QWidget* parent, const char* name, bool showNew, bool showClose ) @@ -959,8 +992,20 @@ void OFileSelector::initViews() } +/** + * d'tor + */ OFileSelector::~OFileSelector() { } + + +/** + * Convience function for the fileselector + * make sure to delete the DocLnk + * + * @see DocLnk + * @todo remove in ODP + */ const DocLnk* OFileSelector::selected() { @@ -969,4 +1014,8 @@ const DocLnk* OFileSelector::selected() } +/** + * + * @return the name of the selected file + */ QString OFileSelector::selectedName()const { @@ -974,4 +1023,8 @@ QString OFileSelector::selectedName()const } + +/** + * @return the selected path + */ QString OFileSelector::selectedPath()const { @@ -979,4 +1032,7 @@ QString OFileSelector::selectedPath()const } +/** + * @return the directory name + */ QString OFileSelector::directory()const { @@ -984,4 +1040,7 @@ QString OFileSelector::directory()const } +/** + * @return a DocLnk for the selected document + */ DocLnk OFileSelector::selectedDocument()const { @@ -989,4 +1048,7 @@ DocLnk OFileSelector::selectedDocument()const } +/** + * @return the number of items for the current view + */ int OFileSelector::fileCount()const { @@ -994,4 +1056,7 @@ int OFileSelector::fileCount()const } +/** + * @return reparse the file content + */ void OFileSelector::reread() { @@ -1019,4 +1084,7 @@ MimeTypes OFileSelector::mimeTypes()const } +/** + * @return the Mode of the OFileSelector + */ int OFileSelector::mode()const { @@ -1024,4 +1092,8 @@ int OFileSelector::mode()const } + +/** + * @return the Selector of the OFileSelector + */ int OFileSelector::selector()const { |