Classes | |
| class | BooleanGuard |
| Guard that controls entry using a static variable. More... | |
| class | ShowBusyCursor |
| Utility class to set/unset the busy cursor. More... | |
| class | UniqFilenameMapper |
Typedefs | |
| typedef QSet< QString > | StringSet |
Functions | |
| template<class T > | |
| QMap< T, QSet< T > > | pairsToMap (const QList< QPair< T, T > > &pairs) |
| template<class T > | |
| QMap< T, QSet< T > > | closure (const QMap< T, QSet< T > > &map) |
| template<class T > | |
| QList< T > | mergeListsUniqly (const QList< T > &l1, const QList< T > &l2) |
| template<class T > | |
| QList< T > | listSubtract (const QList< T > &l1, const QList< T > &l2) |
| template<class T > | |
| QList< T > | shuffleList (const QList< T > &list) |
| template<class T > | |
| QList< QVariant > | toVariantList (const T &l) |
| bool | overlap (const StringSet &set1, const StringSet &set2) |
| bool | loadJPEG (QImage *img, FILE *inputFile, QSize *fullSize, int dim) |
| QString | normalizedFileName (const QString &fileName) |
| QString | dereferenceSymLinks (const QString &fileName) |
| QString | createInfoText (DB::ImageInfoPtr info, QMap< int, QPair< QString, QString > > *) |
| void | checkForBackupFile (const QString &fileName) |
| bool | ctrlKeyDown () |
| bool | copy (const QString &from, const QString &to) |
| void | copyList (const QStringList &from, const QString &directoryTo) |
| bool | makeHardLink (const QString &from, const QString &to) |
| bool | runningDemo () |
| void | deleteDemo () |
| QString | setupDemo () |
| bool | canReadImage (const QString &fileName) |
| bool | isVideo (const QString &fileName) |
| QString | locateDataFile (const QString &fileName) |
| QString | readFile (const QString &fileName) |
| bool | loadJPEG (QImage *img, const QString &imageFile, QSize *fullSize, int dim=-1) |
| bool | isJPEG (const QString &fileName) |
| bool | areSameFile (const QString fileName1, const QString fileName2) |
| QString | stripSlash (const QString &fileName) |
| QString | absoluteImageFileName (const QString &relativeName) |
| QString | imageFileNameToAbsolute (const QString &fileName) |
| QString | imageFileNameToRelative (const QString &fileName) |
| QString | relativeFolderName (const QString &fileName) |
| QStringList | infoListToStringList (const DB::ImageInfoList &list) |
| QString | stripImageDirectory (const QString &fileName) |
| QImage | scaleImage (const QImage &image, int w, int h, Qt::AspectRatioMode mode=Qt::IgnoreAspectRatio) |
| QImage | scaleImage (const QImage &image, const QSize &s, Qt::AspectRatioMode mode=Qt::IgnoreAspectRatio) |
| QString | cStringWithEncoding (const char *c_str, const QString &charset) |
| DB::MD5 | MD5Sum (const QString &fileName) |
| typedef QSet<QString> Utilities::StringSet |
| QString Utilities::absoluteImageFileName | ( | const QString & | relativeName | ) |
References Settings::SettingsData::instance(), and stripSlash().
Referenced by XMLDB::Database::CONVERT(), imageFileNameToAbsolute(), and DB::NewImageFinder::loadExtraFile().
| bool Utilities::areSameFile | ( | const QString | fileName1, | |
| const QString | fileName2 | |||
| ) |
References dereferenceSymLinks(), and normalizedFileName().
Referenced by SQLDB::DatabaseAddress::operator==(), and XMLDB::Database::operator==().
| bool Utilities::canReadImage | ( | const QString & | fileName | ) |
References ImageManager::ImageDecoder::mightDecode().
Referenced by DB::NewImageFinder::searchForNewFiles().
| void Utilities::checkForBackupFile | ( | const QString & | fileName | ) |
Referenced by XMLDB::Database::Database().
| QMap< T, QSet< T > > Utilities::closure | ( | const QMap< T, QSet< T > > & | map | ) | [inline] |
Referenced by SQLDB::SQLMemberMap::groupMap().
| bool Utilities::copy | ( | const QString & | from, | |
| const QString & | to | |||
| ) |
| void Utilities::copyList | ( | const QStringList & | from, | |
| const QString & | directoryTo | |||
| ) |
| QString Utilities::createInfoText | ( | DB::ImageInfoPtr | info, | |
| QMap< int, QPair< QString, QString > > * | linkMap | |||
| ) |
Given an ImageInfoPtr this function will create an HTML blob about the image. The blob is used in the viewer and in the tool tip box from the thumbnail view.
As the HTML text is created, the parameter linkMap is filled with informations about hyberlinks. The map maps from an index to a pair of (categoryName, categoryItem). This linkMap is used when the user selects one of the hyberlinks.
References DB::AbsolutePath, DB::Image, Exif::Info::instance(), DB::ImageDB::instance(), and Settings::SettingsData::instance().
Referenced by ThumbnailView::ThumbnailToolTip::showToolTips(), and Viewer::ViewerWidget::updateInfoBox().
| QString Utilities::cStringWithEncoding | ( | const char * | c_str, | |
| const QString & | charset | |||
| ) |
Referenced by Exif::Info::info().
| bool Utilities::ctrlKeyDown | ( | ) |
Referenced by Browser::BrowserWidget::load().
| void Utilities::deleteDemo | ( | ) |
| QString Utilities::dereferenceSymLinks | ( | const QString & | fileName | ) |
Referenced by areSameFile().
| QString Utilities::imageFileNameToAbsolute | ( | const QString & | fileName | ) |
References absoluteImageFileName(), and Settings::SettingsData::instance().
Referenced by SQLDB::Database::CONVERT(), imageFileNameToRelative(), and MainWindow::Window::slotShowListOfFiles().
| QString Utilities::imageFileNameToRelative | ( | const QString & | fileName | ) |
References imageFileNameToAbsolute(), and Settings::SettingsData::instance().
Referenced by XMLDB::Database::ID_FOR_FILE(), and SQLDB::Database::ID_FOR_FILE().
| QStringList Utilities::infoListToStringList | ( | const DB::ImageInfoList & | list | ) |
References DB::AbsolutePath.
| bool Utilities::isJPEG | ( | const QString & | fileName | ) |
Referenced by ImageManager::ImageLoader::loadImage().
| bool Utilities::isVideo | ( | const QString & | fileName | ) |
Referenced by ImportExport::Export::copyImages(), XMLDB::Database::createImageInfo(), HTMLGenerator::Generator::generateContentPage(), HTMLGenerator::Generator::generateIndexPage(), Viewer::ViewerWidget::load(), ImageManager::Manager::load(), ImportExport::KimFileReader::loadThumbnail(), HTMLGenerator::Generator::nameImage(), ImportExport::Export::pixmapLoaded(), HTMLGenerator::Generator::pixmapLoaded(), DB::NewImageFinder::searchForNewFiles(), and DB::FileInfo::updateDatFromFileTimeStamp().
| QList< T > Utilities::listSubtract | ( | const QList< T > & | l1, | |
| const QList< T > & | l2 | |||
| ) | [inline] |
Subtract a list from another list.
Returned list will have those items of l1 that are not in l2, in the original order of l1.
| bool Utilities::loadJPEG | ( | QImage * | img, | |
| const QString & | imageFile, | |||
| QSize * | fullSize, | |||
| int | dim = -1 | |||
| ) |
References loadJPEG().
| bool Utilities::loadJPEG | ( | QImage * | img, | |
| FILE * | inputFile, | |||
| QSize * | fullSize, | |||
| int | dim | |||
| ) |
References myjpeg_error_mgr::setjmp_buffer.
Referenced by ImageManager::ImageLoader::loadImage(), and loadJPEG().
| QString Utilities::locateDataFile | ( | const QString & | fileName | ) |
| bool Utilities::makeHardLink | ( | const QString & | from, | |
| const QString & | to | |||
| ) |
Referenced by ImportExport::Export::copyImages().
| DB::MD5 Utilities::MD5Sum | ( | const QString & | fileName | ) |
| QList< T > Utilities::mergeListsUniqly | ( | const QList< T > & | l1, | |
| const QList< T > & | l2 | |||
| ) | [inline] |
Merge two lists to one list without duplicating items.
Returned list will have items of l1 in original order followed by those items of l2 that are not in l1.
Referenced by XMLDB::XMLCategory::addOrReorderItems(), and XMLDB::FileWriter::saveCategories().
| QString Utilities::normalizedFileName | ( | const QString & | fileName | ) |
Referenced by areSameFile().
| bool Utilities::overlap | ( | const StringSet & | set1, | |
| const StringSet & | set2 | |||
| ) |
Referenced by DB::ImageInfo::hasCategoryInfo().
| QMap< T, QSet< T > > Utilities::pairsToMap | ( | const QList< QPair< T, T > > & | pairs | ) | [inline] |
Referenced by SQLDB::SQLMemberMap::groupMap(), and SQLDB::SQLMemberMap::updateMemberMapCache().
| QString Utilities::readFile | ( | const QString & | fileName | ) |
| QString Utilities::relativeFolderName | ( | const QString & | fileName | ) |
Referenced by DB::ImageInfo::createFolderCategoryItem().
| bool Utilities::runningDemo | ( | ) |
Referenced by MainWindow::Window::slotExit().
| QImage Utilities::scaleImage | ( | const QImage & | image, | |
| const QSize & | s, | |||
| Qt::AspectRatioMode | mode = Qt::IgnoreAspectRatio | |||
| ) |
References scaleImage().
| QImage Utilities::scaleImage | ( | const QImage & | image, | |
| int | w, | |||
| int | h, | |||
| Qt::AspectRatioMode | mode = Qt::IgnoreAspectRatio | |||
| ) |
| QString Utilities::setupDemo | ( | ) |
References copyList(), locateDataFile(), and readFile().
Referenced by MainWindow::Window::load(), and MainWindow::WelcomeDialog::slotLoadDemo().
Shuffle a list.
Returned list will have same items as the given list, but in random order.
Referenced by MainWindow::Window::launchViewer().
| QString Utilities::stripImageDirectory | ( | const QString & | fileName | ) |
References Settings::SettingsData::instance().
Referenced by ImportExport::ImportHandler::addNewRecord(), SQLDB::Database::addToBlockList(), and SQLDB::Database::info().
| QString Utilities::stripSlash | ( | const QString & | fileName | ) |
| QList< QVariant > Utilities::toVariantList | ( | const T & | l | ) | [inline] |
Copy some list to QValueList of QVariants.
Class T should support iterating interface (e.g. const_iterator, begin(), end()) and should be convertable to QVariant.
| l | the list to copy from |
1.5.8