|
virtual QString | baseName (const QString ¤tPath, const QString &filename, QVariant *counter, QVariant *intermediateCounter) override |
| Analyzes the given file name.
|
|
virtual QString | directory (const QString ¤tPath, const QString &filename) override |
| For a loaded file in directory path and with file name filename, returns the directory in which a new version (a new intermediate version, resp.) shall be stored.
|
|
virtual QVariant | incrementedCounter (const QVariant &counter) override |
| Returns the given counter "incremented", that is, changed in a steady, repeatable fashion.
|
|
virtual QVariant | initialCounter () override |
| Returns an initial counter value for version and intermediate number counters.
|
|
virtual QString | intermediateDirectory (const QString ¤tPath, const QString &fileName) override |
|
virtual QString | intermediateFileName (const QString ¤tPath, const QString &filename, const QVariant &version, const QVariant &counter) override |
| Creates a version file name for an intermediate file in given directory, as previously returned by directory(), given baseName, as previously returned by baseName, version and intermediate number counter.
|
|
virtual QString | versionFileName (const QString ¤tPath, const QString &filename, const QVariant &counter) override |
| Creates a version file name for a file in given directory, as previously returned by directory(), given baseName, as previously returned by baseName, and version counter.
|
|
| VersionNamingScheme ()=default |
| Creates and analyzes file names of versioned files.
|
|
QString Digikam::DefaultVersionNamingScheme::baseName |
( |
const QString & |
path, |
|
|
const QString & |
filename, |
|
|
QVariant * |
counter, |
|
|
QVariant * |
intermediateCounter |
|
) |
| |
|
overridevirtual |
Returns the basename in the sense of stripping the file name of all added version information: A scheme that appends a number, like "MyFile-1.jpg", shall return "MyFile". Path is the directory, filename the file name, so path + filename is the file path. If counter is given, and the given file name has a version number, write it to counter. If intermediateCounter is given, and the given file name has an intermediate counter number, write it to counter. If not available, do not touch the given counters. See initialCounter() for the valid counter formats.
Implements Digikam::VersionNamingScheme.