diff --git a/doc/configuration.docbook b/doc/configuration.docbook index 31cb32a9..3e133924 100644 --- a/doc/configuration.docbook +++ b/doc/configuration.docbook @@ -1,498 +1,498 @@ Configuration The Configuration Dialog contains all the options for changing some of the default behaviour of &appname;. Clicking the Apply button causes the changes to take effect immediately without closing the dialog, while OK applies the changes and closes the dialog. Cancel closes the dialog, but any changes already made and applied will remain. The Defaults button reverts the options on the current page of the dialog to their default values, while Help opens the &khelpcenter; to the relative section of the &appname; manual. Some minor settings can only be changed by editing the configuration file itself. See Hidden Options. <guilabel>General Options</guilabel> The General Options Dialog The General Options Dialog The General Options control the general behavior. Images may be included in the data files, or saved separately in the &appname; application folder. Also, when &appname; is started, it can automatically reopen the last data file that was open. The Tip of the Day dialog contains helpful hints on using &appname; and appears at program startup. You may want to read through some of the hints and then disable the dialog. The Formatting Options control the level of automatic formatting that &appname; does. For examples, see the Field Formatting section. Capitalization and formatting are distinct options, since a field may be capitalized without having the order of the words changed, and vice-versa. The auto-capitalization can be changed to ignore certain words. The automatic formatting includes grammatical articles in titles, along with prefixes and suffixes for personal names. The values are case-insensitive, and should be separated by a semi-colon. The formatting rules follow general English usage, which may not work for other languages. Articles are appended to the end of the title, with a comma. Personal names are formatted to have the last name first, followed by a comma, then the first name. Personal suffixes, such as Jr., are kept with the last name. Prefixes, such as von, are kept with the last name, but are ignored when the values are being sorted. John Q. von Public, III would become von Public, III, John Q. and Public would be used as the sort key. Only single word prefixes are supported. If a name includes van der, for example, both van and der should be included in the surname prefix list. Articles ending with an apostrophe are supported for sorting order, as well. The actual values in the collection are not changed, only the visible text used for the interface. So the formatting options can be changed back and forth without affecting any of the data in the collection. <guilabel>Printing Options</guilabel> &appname; uses an &xslt; template for creating &HTML; and then passes that to the &kde; printing service. Only the fields visible in the Column View are printed. Furthermore, if the collection is being filtered, only the visible entries will be printed. Initially, a warning message is shown if filtering is active. The Print Options Dialog The Print Options Dialog The Printing Options allow you to change some formatting when printing a collection. If Format titles and names is checked, then the fields are auto-formatted when they are printed. Otherwise, they are printed exactly as they were entered. The default printing stylesheet prints the collection with the field values in columns. Print field headers controls whether the field title is printed at the top of the column. In the printout, the entries will be sorted as they are in the Column View. Additionally, they may be grouped as they are in the Group View. Finally, when image fields are included in the printout, the images may be resized, while maintaining their aspect ratio. The maximum image width and height define the largest possible size of the image, though it will never be increased. <guilabel>Template Options</guilabel> The Entry View uses templates to show the field values. You can specify a different template for each collection type. Some templates, such as the Album or Video templates are for a specific collection type, and a short error message will appear in the Entry View if they are used for other types. The Preview button pops up a window to show you a preview of what the template looks like. Custom fonts and colors may be passed to the template, and all of the default templates will honor those settings. However, custom template may choose to ignore them. Additional templates may be installed directly, or downloaded from store.kde.org by clicking the Download button. Any templates installed by the user may also be deleted. Entry templates are saved in $KDEHOME/share/apps/tellico/entry-templates/. If you create a new template, please consider submitting it at store.kde.org! The Template Options Dialog The Template Options Dialog <guilabel>Data Sources Options</guilabel> &appname; can use various sources for importing data, which can be configured in the Data Sources Dialog. There are many available types and sources: Amazon.com Web Services, the Internet Movie Database, z39.50 servers, SRU servers, Entrez (PubMed) databases, AnimeNfo.com, Internet Bookshop Italia, ISBNdb.com, GCstar Plugins, arxiv.org, bibsonomy.org, crossref.org, Discogs.com, Wine.com, TheMovieDB.org, TheGamesDB.net, OMDBAPI.com, MusicBrainz.org, GiantBomb.com, OpenLibrary.org, Freebase.com, other external scripts or applications, combinations of any of the above sources. The Data Sources Options Dialog The Data Sources Options Dialog New sources may be added by clicking the New... button, while existing ones may be modified or deleted, using the Modify... or Delete buttons. The order of the sources, which shows up in the entry updating menus, can also be changed. Additional templates may be downloaded from the author's online repository by clicking the Download button. Those scripts are gpg-signed by the author to guard against dangerous scripts from unknown sources, which could cause damage to your system. Never install and run a script from an untrusted source. They are executed with the same permissions as the user, and as a result, could modify or delete files or otherwise mess up your system. Many of the data sources offer more information than the default fields in &appname;. Those other fields are shown on the right of the configuration box. If any of those fields are checked, they will be added to the collection when an entry is added from that source. Book and Bibliographic Data Sources z39.50 Servers The z39.50 protocol is used to access libraries and bibliographic information providers around the world. Lists of public z39.50 servers are available from indexdata.dk, among others. &appname; comes with several preset configurations for major libraries, or you can specify the connection information manually. &appname; is able to read data in the MODS, USMARC/MARC21, or UNIMARC format, using the yaz library. In addition, there is limited support for the GRS-1 format. To use one of the preset libraries, check the box and then select the library. The other configuration entries will be disabled. If you need to set the information manually, uncheck the preset box. The default port for z39.50 access is 210, but some servers may use a different one. &appname; assumes the server uses the MARC-8 character encoding, unless configured otherwise. If an incorrect character encoding is used, an error message may appear on the program output, or possibly no entries are retrieved. Some servers require a username and password for access. &appname; can use and save that password, but be aware that is written to the &appname; configuration file in plain text and is not secure. For most public servers, the username and password fields may be left empty. SRU Servers SRU stands for Search/Retrieve via &URL; and is a standard search protocol for Internet searches. Some libraries use it for providing access to their data catalogs. Among them, the US Library of Congress is probably the best known. Entrez Databases Entrez is the integrated, text-based search and retrieval system used at the National Center for Biotechnology Information (NCBI). The most well-known Entrez database is PubMed, the database for life science articles from many biological journals. At the moment, the only Entrez database supported by &appname; is PubMed. Bibliographic Databases arXiv.org, Bibsonomy, and CrossRef are online databases for academic articles and bibliographic information. For access to the CrossRef source, you must request an account and add your account information to the data source configuration. Internet Bookstore Italia IBS, or Internet Bookstore Italia, is an online Italian bookstore. ISBNdb.com ISBNdb.com is an online book database, with data collection libraries around the world. OpenLibrary.org OpenLibrary.org is an online book database that aims to have one page for every book. Comic Book Data Sources AnimeNfo.com AnimeNfo is a popular site for information on anime, or Japanese animation. Movie Data Sources Internet Movie Database The Internet Movie Database provides information about movies and videos. When a search is conducted for a Person, if more than one possible result is returned, a dialog box is opened to allow you to select the correct person. The configuration options include selecting which IMDb nationality to use and whether images are fetched or not. Since IMDb can return a large number of cast members, you can limit that to a certain number. TheMovieDB.org TheMovieDB.org is a free and open online movie database. Registration for a free account is required. OMDBAPI.com -The Open Movie Databaseis a free web service to obtain movie information. +The Open Movie Database is a free web service to obtain movie information. Music Data Sources Discogs.com Discogs.com is a user-built music database containing information on artists, labels, and their recordings. Registration for a free account is required. MusicBrainz.org MusicBrainz.org is a community music metadatabase that attempts to create a comprehensive music information site. Wine Data Sources Wine.com Wine.com is an online wine seller, and offers access to a database information on wine varietals. Registration for a free account is required. Video Game Data Sources GiantBomb.com GiantBomb.com is a large community-driven video game database. Registration for a free account is required. TheGamesDB.net TheGamesDB.net is an open, online database for video game fans. Data Sources for Multiple Collection Types Amazon.com Using the Amazon Web Services, &appname; can search any of nine different international sites operated by Amazon.com for information: United States, United Kingdom, Germany, Japan, France, Canada, China, Spain, and Italy. Configuring each Amazon.com source involves three settings: the server location, image size, and associate's ID. Some information from Amazon.com may include an image, such as a book or video cover. That image may be downloaded in three different sizes, depending on the item. The associate's ID must be used to access the Amazon.com Web Services, and is included in the links back to the item, as dictated by the license agreement for the use of the Amazon.com Web Services. GCstar Plugins If GCstar is installed, &appname; is able to take advantage of the wide range of search plugins available for GCstar. Depending on the collection type, various online resources are available for usage as a data source in &appname; Freebase.com Freebase.com is an online database, collecting information on any topic. Tellico is able to search Freebase for information on books, comic book, music, movies, video games, and board games. External Scripts or Applications As an easier way for &appname; to integrate with third-party plugins, external scripts or applications may be used as an interface for searching other information sources. &appname; will execute a command, and pass the search terms as command-line options. Some scripts are distributed with &appname; itself. Allocine.fr is an French website for movies. The Spanish Ministry of Culture is an online Spanish book database. Dark Horse Comics is a comic book publisher. All three of those data sources require Python. BoardGameGeek is a website with extensive data for board games, and the script requires ruby. The collection type returned by the script must be set, along with the data format. Not only can &appname; import data from scripts that use the default &appname; &XML; format, but it can also import other formats as well, such as bibtex. The full path to the application should be entered in the source options. Be aware that the application is executed on the system with the same permissions as the current user, so do not use scripts from untrusted sources. Check the boxes next to the search keys supported by the application, and enter the required command line options in the edit box. The search value will be inserted where %1 appears. For updating entries already in the collection, the final check box and edit box are used to determine the command-line options. The entry fields used to find an update must be entered, in the same format as used for derived value fields. Multiple Combined Data Sources Combinations of up to eight existing data sources can be used as a single source, where the search results from all the sources are merged. The collection type to be used must be set before adding sources. Only existing data sources can be used in combination. The search request is sent to each source, and the results are combined. Since the merged results depend on the order of the search results, the combined set may be different depending on network and source speed. diff --git a/icons/README.quesnay b/icons/README.quesnay index 571daab7..7c96427e 100644 --- a/icons/README.quesnay +++ b/icons/README.quesnay @@ -1,62 +1,62 @@ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This copyright applies to all *tellico* images in this directory. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Note the license notice contains an add-on. ************************************************************************ TITLE: "NUVOLA ICONS" FOR TELLICO AUTHOR: Virginie Quesnay SITE: http://virginie.quesnay.free.fr Copyright (c) 2004 David Vignoni. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 2.1 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public -License along with this library (see the the license.txt file); if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifh Floor, Boston, MA 02110-1301 USA +License along with this library (see the license.txt file); if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifh Floor, Boston, MA 02110-1301 USA #######**** NOTE THIS ADD-ON ****####### The GNU Lesser General Public License or LGPL is written for software libraries in the first place. The LGPL has to be considered valid for this artwork library too. Nuvola icons for Tellico is a special kind of software library, it is an artwork library, it's elements can be used in a Graphical User Interface, or GUI. Source code, for this library means: - png images. - svg images. The LGPL in some sections obliges you to make the files carry notices. With images this is in some cases impossible or hardly usefull. With this library a notice is placed at a prominent place in the directory containing the elements. You may follow this practice. The exception in section 6 of the GNU Lesser General Public License covers the use of elements of this art library in a GUI. Date: 6 september 2004 Version: 1.0 DESCRIPTION: "NUVOLA ICONS" FOR TELLICO are a set of icon for Tellico, a collection manager for KDE. They are SVG based icons. This mean that all icons where designed with a vector graphics application and SVG files are available (in the "Scalable" directory). LICENSE: Released under GNU Lesser General Public License (LGPL) Look at the license.txt file. CONTACT Virignie Quesnay e-mail : virginie.quesnay [at] free.fr ICQ : 8120945 http: http://virginie.quesnay.free.fr diff --git a/src/entryiconview.cpp b/src/entryiconview.cpp index 5983ed0a..8ba044d1 100644 --- a/src/entryiconview.cpp +++ b/src/entryiconview.cpp @@ -1,162 +1,162 @@ /*************************************************************************** Copyright (C) 2002-2009 Robby Stephenson ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License as * * published by the Free Software Foundation; either version 2 of * * the License or (at your option) version 3 or any later version * * accepted by the membership of KDE e.V. (or its successor approved * * by the membership of KDE e.V.), which shall act as a proxy * * defined in Section 14 of version 3 of the license. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * * * ***************************************************************************/ #include "entryiconview.h" #include "collection.h" #include "collectionfactory.h" #include "images/imagefactory.h" #include "controller.h" #include "entry.h" #include "field.h" #include "document.h" #include "utils/tellico_utils.h" #include "models/entrymodel.h" #include "models/entrysortmodel.h" #include "tellico_kernel.h" #include "tellico_debug.h" #include #include #include #include #include namespace { static const int ENTRY_ICON_SIZE_PAD = 6; } using Tellico::EntryIconView; EntryIconView::EntryIconView(QAbstractItemModel* model_, QWidget* parent_) : QListView(parent_), m_maxAllowedIconWidth(MAX_ENTRY_ICON_SIZE) { setViewMode(QListView::IconMode); setMovement(QListView::Static); // setUniformItemSizes(true); setDragEnabled(false); setSelectionMode(QAbstractItemView::ExtendedSelection); setResizeMode(QListView::Adjust); setWordWrap(true); setSpacing(ENTRY_ICON_SIZE_PAD); Q_ASSERT(::qobject_cast(model_)); EntrySortModel* sortModel = new EntrySortModel(this); sortModel->setSortRole(EntryPtrRole); sortModel->setSourceModel(model_); setModel(sortModel); connect(this, SIGNAL(doubleClicked(const QModelIndex&)), SLOT(slotDoubleClicked(const QModelIndex&))); setWhatsThis(i18n("The Icon View shows each entry in the collection or group using " "an icon, which may be an image in the entry.")); } EntryIconView::~EntryIconView() { } void EntryIconView::setMaxAllowedIconWidth(int width_) { m_maxAllowedIconWidth = qBound(MIN_ENTRY_ICON_SIZE, width_, MAX_ENTRY_ICON_SIZE); QSize iconSize(m_maxAllowedIconWidth, m_maxAllowedIconWidth); setIconSize(iconSize); QSize gridSize(m_maxAllowedIconWidth + 2*ENTRY_ICON_SIZE_PAD, m_maxAllowedIconWidth + 3*(fontMetrics().lineSpacing() + ENTRY_ICON_SIZE_PAD)); setGridSize(gridSize); } void EntryIconView::slotDoubleClicked(const QModelIndex& index_) { Data::EntryPtr entry = index_.data(EntryPtrRole).value(); if(entry) { Controller::self()->editEntry(entry); } } void EntryIconView::contextMenuEvent(QContextMenuEvent* ev_) { QMenu menu(this); // only insert entry items if one is selected QModelIndex index = indexAt(ev_->pos()); if(index.isValid()) { Controller::self()->plugEntryActions(&menu); // add a menu item to open each URL field Data::EntryPtr entry = index.data(EntryPtrRole).value(); Data::FieldList urlFields; foreach(Data::FieldPtr field, Data::Document::self()->collection()->fields()) { if(field->type() == Data::Field::URL) { urlFields += field; } } foreach(Data::FieldPtr urlField, urlFields) { QAction* act = menu.addAction(QIcon::fromTheme(QLatin1String("bookmarks")), i18nc("Open URL", "Open %1", urlField->title())); const QString value = entry->field(urlField); act->setData(value); act->setWhatsThis(value); act->setEnabled(!value.isEmpty()); menu.addAction(act); } if(!urlFields.isEmpty()) { connect(&menu, SIGNAL(triggered(QAction*)), SLOT(slotOpenUrlMenuActivated(QAction*))); } menu.addSeparator(); } QMenu* sortMenu = menu.addMenu(i18n("&Sort By")); foreach(Data::FieldPtr field, Data::Document::self()->collection()->fields()) { sortMenu->addAction(field->title())->setData(qVariantFromValue(field)); } connect(sortMenu, SIGNAL(triggered(QAction*)), SLOT(slotSortMenuActivated(QAction*))); menu.exec(ev_->globalPos()); } void EntryIconView::slotSortMenuActivated(QAction* action_) { Data::FieldPtr field = action_->data().value(); Q_ASSERT(field); if(!field) { return; } // could have just put the index of the field in the list as the action data - // but instead, we need to to iterate over the current fields and find the index since EntryTitleModel + // but instead, we need to iterate over the current fields and find the index since EntryTitleModel // uses the field list index as the column value Data::FieldList fields = Data::Document::self()->collection()->fields(); for(int i = 0; i < fields.count(); ++i) { if(fields.at(i)->name() == field->name()) { model()->sort(i); break; } } } void EntryIconView::slotOpenUrlMenuActivated(QAction* action_/*=0*/) { if(!action_) { return; } const QString link = action_->data().toString(); if(!link.isEmpty()) { QDesktopServices::openUrl(Kernel::self()->URL().resolved(QUrl::fromUserInput(link))); } }