Hydra 0.20
|
Classes | |
class | ArgumentParser |
class | DB |
class | Cursor |
class | DirChangeEvent |
class | DirMonitor |
class | DirDBUpdater |
class | Engine |
class | FileIterator |
class | NodePath |
class | Token |
class | Record |
class | FilePathRecord |
class | FileHashRecord |
class | Tags |
class | FileItemRecord |
class | Registry |
class | Register |
class | MutexData |
class | MutexPtr |
class | Thumb |
class | WebExport |
Typedefs | |
typedef std::set< QString > | tags_t |
Functions | |
int | commandImport (const QString &filename, bool smartmerge) |
void | pruneDirectory (const QString &dirname) |
short | detectExifRotate (const QString &filename) |
QString | makeAbsolute (const QString &s) |
QString | justName (const QString &s) |
bool | isNormalFile (const QString &justname) |
bool | isNormalDirectory (const QString &justdirname) |
bool | isImageFile (const QString &justname) |
bool | mkDir (const QString &name) |
bool | linkFile (const QString &srcfile, const QString &destfile) |
bool | moveFile (const QString &srcfile, const QString &destfile) |
bool | delFile (const QString &srcfile) |
bool | copyFile (const QString &srcfile, const QString &destfile) |
bool | smartCopy (const QString &srcfile, const QString &destfile) |
bool | delDir (const QString &dirpath) |
QString | calcFileHash (const QString &filename) |
int | scoreValue (const tags_t &tags) |
bool | isQueryChar (const QChar &c) |
bool | parseQueryTokens (const QString &s, std::shared_ptr< hydra::Token > &tok) |
quint64 | dateTimeAsInt64 (const QDateTime &dt) |
void | int64ToDateTime (quint64 i, QDateTime &out) |
template<class BASE , class SUB > | |
BASE * | loadfunc_impl (void) |
int | rotateCodeToDegrees (int rotateCode) |
int | rotateDegreesToCode (int degrees) |
int | rotateCodeAdd (int rotateCode, int deltaCode) |
short | detectTagRotate (const hydra::FileItemRecord::tags_t &tags) |
void | rotateSizeByCode (short rotatecode, unsigned long origW, unsigned long origH, unsigned long &newW, unsigned long &newH) |
QImage | rotateImageByCode (short rotatecode, QImage &img) |
QPixmap | rotatePixmapByCode (short rotatecode, QPixmap &pix) |
short | detectMultiRotate (const QString &filename, const hydra::FileItemRecord::tags_t &tags) |
void | calcAspect (unsigned long C, unsigned long R, unsigned long WC, unsigned long WR, unsigned long &c, unsigned long &r, bool growtofit) |
QString | escapeForXML (const QString &s) |
The core hydra namespace contains all the classes of the core hydra library.
void hydra::calcAspect | ( | unsigned long | C, |
unsigned long | R, | ||
unsigned long | WC, | ||
unsigned long | WR, | ||
unsigned long & | c, | ||
unsigned long & | r, | ||
bool | growtofit | ||
) |
Retains the aspect ratio on resized dimensions.
C, R current image width, heigth WC WR the designed (wanted) width, heigth c, r the resulting width, height
growtofit | if true, images smaller than desired will be scaled UP to fit |
QString hydra::calcFileHash | ( | const QString & | filename | ) |
Calculates the has of the given file.
short hydra::detectExifRotate | ( | const QString & | filename | ) |
Detects the auto rotation information in the file, if any. returns: -1 error/no exif found. 0 do not rotate 1 rotate 90 degrees cw 2 rotate 180 degrees cw 3 rotate 270 degrees cw
If exif detection support is not compiled, this function will always return 0.
short hydra::detectMultiRotate | ( | const QString & | filename, |
const hydra::FileItemRecord::tags_t & | tags | ||
) |
Uses both detectExifRotate and detectTagRotate to come up with a reasonable default. Will never return -1 (will return 0 instead).
short hydra::detectTagRotate | ( | const hydra::FileItemRecord::tags_t & | tags | ) |
Detects the auto rotation information in the file, if any. -1 error/no exif found. 0 do not rotate 1 rotate 90 degrees cw 2 rotate 180 degrees cw 3 rotate 270 degrees cw
If exif detection support is not compiled, this function will always return 0.
bool hydra::isImageFile | ( | const QString & | justname | ) |
Is this an image file.
bool hydra::isNormalDirectory | ( | const QString & | justdirname | ) |
Returns true if the given directory is "normal". A normal file is one that isn't hidden. A hidden file starts with a .
bool hydra::isNormalFile | ( | const QString & | justname | ) |
Is this a normal file. A normal file doesnt begin with _ . or ,
QString hydra::justName | ( | const QString & | s | ) |
Returns just the filename and extension.
QString hydra::makeAbsolute | ( | const QString & | s | ) |
Return the given file as a unique, absolute filename.
bool hydra::mkDir | ( | const QString & | name | ) |
Creates a directory.
bool hydra::parseQueryTokens | ( | const QString & | s, |
std::shared_ptr< hydra::Token > & | tok | ||
) |
Parse a given search/query string into a token tree. Returns true on success, false on failure. tok is no modified on failures. Empty strings return an always true query that matches everything. The resulting hydra::Token can they be used to test against hydra::Tags
int hydra::rotateCodeAdd | ( | int | rotateCode, |
int | deltaCode | ||
) |
Adds the given amount (which can be negative)o to the rotateCode and returns the result. The returned result is always valid (0..3)
int hydra::rotateCodeToDegrees | ( | int | rotateCode | ) | [inline] |
Converts a rotate code to degrees, for display.
int hydra::rotateDegreesToCode | ( | int | degrees | ) |
Converts degrees to a rotate code. Returns -1 on invalid codes.
QImage hydra::rotateImageByCode | ( | short | rotatecode, |
QImage & | img | ||
) |
Rotates an image as per the given rotate code. 0 do not rotate 1 rotate 90 degrees cw 2 rotate 180 degrees cw 3 rotate 270 degrees cw rotatecode must be >=0
QPixmap hydra::rotatePixmapByCode | ( | short | rotatecode, |
QPixmap & | pix | ||
) |
Rotates an pixmap as per the given rotate code. 0 do not rotate 1 rotate 90 degrees cw 2 rotate 180 degrees cw 3 rotate 270 degrees cw rotatecode must be >=0
void hydra::rotateSizeByCode | ( | short | rotatecode, |
unsigned long | origW, | ||
unsigned long | origH, | ||
unsigned long & | newW, | ||
unsigned long & | newH | ||
) |
Converts the given coordinates to the final coordinates, as if it where rotated by the given exif rotation code. Node, the variables can the same (&origW == newW, etc)
int hydra::scoreValue | ( | const tags_t & | tags | ) |
Finds and returns the length of the score tag. If none, 0 is returned.
bool hydra::smartCopy | ( | const QString & | srcfile, |
const QString & | destfile | ||
) |
A "smart" copy. If the file exists, this function will fail. Otherwise, it will try to LINK the file. If that files, it will do a copy operation