Creation of user models

If none of the available collection types included in GCstar fits your needs, you may create a personal one with the information you want. This page explains how it has to be done.

Creating a collection of a personal type

| Top |

The first action is to create a new collection using the New item in the File menu. You will have such a window.

Selection of collection type

Here are listed the types that were previously defined (as explained later) and the default ones that are delivered with GCstar. What is important here is the first item: New collection type. You have to select it to begin with the creation of your personal collection. Then a window will be displayed to let you control your collection content. Its features will be detailed in next sections. It will look like this:

Creation of new collection type

Saving the model

| Top |

The first field of the above window is used to enter a name for the collection type. You have two options for this value depending on what you plan to do.

If you want to use all your settings here only for one collection, you don’t need to enter a name. Then everything that will be set here (such as the fields to use or the different options) will be stored in the collection itself.

But if you think you will create many collections based on the same definition, you need to enter something here. This name will appear later in the selection of the collection type under the Personal models category.

On Unix systems (including GNU/Linux) the model that have been created for the second case will be stored in a .gcm file that will be in this directory: ${XDG_DATA_HOME}/gcstar/GCModels/. The default value for XDG_DATA_HOME is ~/.local/share. The file name is generated from the specified name (with some characters replaced by an underscore to avoid some problems).

On Win32 systems, the directory where it is stored is something like Installation_PathdataGCModels.

Specifying fields

| Top |

The first tab of the window for the collection settings looks like this:

Specifying all the fields and their characteristics

On the left there are the fields that should be in a collection. You may add or remove some with the buttons below the list. The arrows button on the right of the list are used to change the order of the fields. This order is important as it determines how they will be displayed. Clicking on a field displays its information in the right part of the tab. Here comes a description of the settings available for each field.

First is the Label. It is the field name as it will be displayed in GCstar. Just after is the type of the field. Depending on this type, other settings won’t be available (they will be greyed out). The type could be one of these ones:

Short text
One line of simple text.
Long text
Multi-line text.
Yes/No
A value with 2 choices represented by a checkbox.
Number
A numeric value. If it has minimum and maximum values specified, there will be some arrow buttons to change the value.
A number can also be displayed as a row of rating stars. Please see Display as in the settings section.
Date
A date field with a button to select it through a calendar.
Pre-defined values list
A list containing some values specified below in the same dialog window.
Image
An image that could be changed with a file browser or displayed at its real size.
Simple list
A list of values that could be changed while using the application.
File
A file that could be selected using a file browser. According to its type (specified below), it will have a Play button associated to launch the correct player.
Right after the type is the group. It is used to group fields by categories. In the user interface, it will be shown with some tabs in a notebook. Each tab will contain all the items that shares the same group. The value entered for the group will be used as tab label. There is a default group created for all the fields without one. If all the fields have the same group value, there won’t be any tab.

The following sections in this tab concerns some settings for the fields. Each of them apply only to some types.

Use an history
It applies to Short text and Simple list. If checked, you will have an history of all the available values for this field in the current collection.
File format
It applies to File. As seen earlier it determines the action for the Play button associated to the field. If the value here is Simple file, there won’t be a Play button.
Default
It applies to all the field types. It’s the default value to use when a new item is created.
Minimum and Maximum
It applies to Number. If there are no value for these ones, the number field will look like a short text where only numbers could be entered.
Increment step
It applies to Number. When minimum and maximum values are specified (see above) some buttons will be added to increment or decrement the value. The value entered here determines the step each time the button is pressed (default value is 1).
Display as
It applies to Number. When Display is set to Text it will display the value as a number. When set to Rating Control it will display the value with the corresponding number of stars.
Values list
It applies to Pre-defined values list. It should contain a comma separated list of the values that should be present in the list.

Available options

| Top |

Tab containing collection options looks like this:

Options for the model

The first group of options is to select which of the fields previously defined should be used for some usages. It is possible to set these values to Automatic. Then GCstar will try to find a suitable field for this usage. How it finds it depends on the usage. It is explained in the list of these options.

As title
This is the field that should be used to represent a collection member in the items list in text mode. If the value here is Automatic, GCstar will use the first available field.
As cover
This is the field that should be used to represent a collection member in the items list in image mode. If the value here is Automatic, GCstar will use the first available field with image type.
As identifier
This is the field that will uniquely identify each item. If the value here is Automatic, GCstar will add to your collection a hidden field of numeric type for this purpose that will be managed internally.
There is also a checkbox in this tab. If it is checked, GCstar will add some fields to your collection. These fields will let you manage lendings if applicable. Consult the page about borrowings management for more information.

Creating filters

| Top |

For each defined field, it is possible to have a filter. Such a filter will be present in the search dialog and will be used to find items matching some criteria.

Creation of filters

For each field, the first check box determine if a filter for it should be present in the search window. Then there is a list of values to determine how the comparison should be performed. For some fields, it also possible to force the comparison to be a numeric one using a check box. The default behaviour is to compare the values alphabetically.

The last option in this tab is the creation of a quick filter. If the box is checked, there will be a new sub-menu in the Filters menu. It is useful to quickly apply a filter without launching a search.

 
en/user_models.txt · Last modified: 14/12/2011 22:48 by revcpm



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.