Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Qt 3 Support Members for QDir

The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.

Public Functions

  • QString absFilePath ( const QString & fileName, bool acceptAbsPath = true ) const
  • QString absPath () const
  • void convertToAbs ()
  • QFileInfoList entryInfoList ( const QString & nameFilter, Filters filters = NoFilter, SortFlags sort = NoSort ) const
  • QStringList entryList ( const QString & nameFilter, Filters filters = NoFilter, SortFlags sort = NoSort ) const
  • bool matchAllDirs () const
  • bool mkdir ( const QString & dirName, bool acceptAbsPath ) const
  • QString nameFilter () const
  • bool rmdir ( const QString & dirName, bool acceptAbsPath ) const
  • void setMatchAllDirs ( bool on )
  • void setNameFilter ( const QString & nameFilter )

Static Public Members


Member Function Documentation

QString QDir::absFilePath ( const QString & fileName, bool acceptAbsPath = true ) const

Use absoluteFilePath(fileName) instead.

The acceptAbsPath parameter is ignored.

QString QDir::absPath () const

Use absolutePath() instead.

QString QDir::cleanDirPath ( const QString & name )   [static]

Use cleanPath() instead.

void QDir::convertToAbs ()

Use makeAbsolute() instead.

QString QDir::currentDirPath ()   [static]

Returns the current working directory or "/" if the current directory cannot be determined.

See also homeDirPath() and rootDirPath().

QFileInfoList QDir::entryInfoList ( const QString & nameFilter, Filters filters = NoFilter, SortFlags sort = NoSort ) const

Use the overload that takes a name filter string list as first argument instead.

QStringList QDir::entryList ( const QString & nameFilter, Filters filters = NoFilter, SortFlags sort = NoSort ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use the overload that takes a name filter string list as first argument instead.

QString QDir::homeDirPath ()   [static]

Returns the user's home directory or an empty string if it cannot be determined.

See also currentDirPath() and rootDirPath().

bool QDir::matchAllDirs () const

Use filter() & AllDirs instead.

See also setMatchAllDirs().

bool QDir::mkdir ( const QString & dirName, bool acceptAbsPath ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use mkdir(dirName) instead.

The acceptAbsPath parameter is ignored.

QString QDir::nameFilter () const

Use nameFilters() instead.

See also setNameFilter().

bool QDir::rmdir ( const QString & dirName, bool acceptAbsPath ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use rmdir(dirName) instead.

The acceptAbsPath parameter is ignored.

QString QDir::rootDirPath ()   [static]

Returns "/".

See also homeDirPath() and currentDirPath().

void QDir::setMatchAllDirs ( bool on )

Use setFilter() instead.

See also matchAllDirs().

void QDir::setNameFilter ( const QString & nameFilter )

Use setNameFilters() instead.

The nameFilter is a wildcard (globbing) filter that understands "*" and "?" wildcards. (See QRegExp wildcard matching.) You may specify several filter entries, each separated by spaces or by semicolons.

For example, if you want entryList() and entryInfoList() to list all files ending with either ".cpp" or ".h", you would use either dir.setNameFilters("*.cpp *.h") or dir.setNameFilters("*.cpp;*.h").

For example, if you have code like

    QString filter = "*.cpp *.cxx *.cc";
    dir.setNameFilter(filter);

you can rewrite it as

    QString filter = "*.cpp *.cxx *.cc";
    dir.setNameFilters(filter.split(' '));

See also nameFilter().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.0
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web