### Vector Layer Properties

This dialog allows you to work with vector layer settings and properties. There are seven tabs:

Symbology
Labels
Attributes
General
Metadata
Actions
Diagram Overlay

#### Symbology

To change the symbology for a layer, simply double click on its legend entry and the vector Layer Properties dialog will be shown.

Within this dialog you can style your vector layer. Depending on the selected rendering option you have the possibility to also classify your map features.

##### Legend type

QGIS supports a number of symbology renderers to control how vector features are displayed. Currently the following renderers are available:

- Single symbol - a single style is applied to every object in the layer.
- Graduated symbol - objects within the layer are displayed with different symbols classified by the values of a particular field.
- Continuous color - objects within the layer are displayed with a spread of colors classified by the numerical values within a specified field.
- Unique value - objects are classified by the unique values within a specified field with each value having a different symbol.

##### New symbology

Click New symbology button to use new symbology implementation for the layer.

##### Vector transparency

QGIS allows to set a transparency for every vector layer. This can be done with the slider Transparency. This is very useful for overlaying several vector layers.

##### Saving styles

Once you have styled your layer you also could save your layer-style to a separate file (with *.qml ending). To do this, use the button Save Style.... No need to say that Load Style... loads your saved layer-style-file.
If you wish to always use a particular style whenever the layer is loaded, use the Save As Default button to make your style the default. Also, if you make changes to the style that you are not happy with, use the Restore Default Style button to revert to your default style.

#### Labels

The Labels tab allows you to enable labeling features and control a number of options related to fonts, placement, style, alignment and buffering.
Check the Display labels check box to enable labeling.

##### Basic Label options

Choose the field to label with.

Select the use the Font and Color buttons to set the font and color. You can also change the angle and the placement of the text-label.

If have labels extending over several lines, check Multiline labels?. QGIS will check for a true line return in your label field and insert the line breaks accordingly. A true line return is a single character \n, (not two separate characters, like a backlash \ followed by the character n).

##### Placement

Change the label placement by selecting one of the radio buttons in the Placement group.

##### Font size units

The Font size units allows you to select between Points or Map units.

##### Buffer labels

To buffer the labels means putting a backdrop around them to make them stand out better. To buffer the lakes labels:

1. Click the Buffer Labels check box to enable buffering.
2. Choose a size for the buffer using the spin box.
3. Choose a color by clicking on Color and choosing your favorite from the color selector. You can also set some transparency for the buffer if you prefer.
4. Click Apply to see if you like the changes.

Notice you can also specify the buffer size in map units if that works out better for you.

##### Data defined placement, properties, buffer, position

The remaining entries inside the Label tab allow you control the appearance of the labels using attributes stored in the layer. The entries beginning with Data defined allow you to set all the parameters for the labels using fields in the layer.

#### Attributes

Within the Attributes tab the attributes of the selected data set can be manipulated. The buttons New Column and Delete Column can be used, when the data set is in editing mode. The OGR library supports to add new columns, but not to remove them, if you have a GDAL version >= 1.6 installed. Otherwise only columns from PostGIS layers can be edited.

The Toggle editing mode button toggles this mode.

Within the Attributes tab you also find an edit widget column. This column can be used to define values or a range of values that are allowed to be added to the specific attribute table column. If you click on the edit widget button, a dialog opens, where you can define different widgets. These widgets are:

- Line edit an edit field which allows to enter simple text (or restrict to numbers for numeric attributes).
- Classification Displays a combo box with the values used for classification, if you have chosen unique value as legend type in the symbology tab of the properties dialog.
- Range Allows to set numeric values from a specific range. The edit widget can be either a slider or a spin box.
- Unique value The user can select one of the values already used in the attribute table. If editable is activated, a line edit is shown with auto completion support, but additional values are possible, otherwise a combo box is used.
- File name Simplifies the selection by adding a file chooser dialog.
- Value map a combo box with predefined items. The value is stored in the attribute, the description is shown in the combo box. You can define values manually or load them from a layer or a csv file.
- Enumeration Opens a combo box with values that can be used within the columns type. This is currently only supported by the Postgres provider.
- Immutable The immutable attribute column is read-only. The user is not able to modify the content.
- Hidden A hidden attribute column is invisible to the user.
- Checkbox A check box is shown. The value representing the state of the check box in the attribute has to be entered.
- Text edit A text edit field is shown, that allows entering multiline text.

#### General

The General tab allows you to change the display name, set scale dependent rendering options, create a spatial index of the vector file (only for OGR supported formats and PostGIS) and view or change the projection of the specific vector layer.

You can also set filter expressions using the Query Builder.

##### Subset

The Query Builder button allows you to limit the features of a layer to a subset matching an expression.

#### Metadata

The Metadata tab contains information about the layer, including specifics about the type and location, number of features, feature type, and the editing capabilities. The Layer Spatial Reference System section, providing projection information, is displayed on this tab. This is a quick way to get information about the layer.

#### Actions

QGIS provides the ability to perform an action based on the attributes of a feature. This can be used to perform any number of actions, for example, running a program with arguments built from the attributes of a feature or passing parameters to a web reporting tool.
Actions are useful when you frequently want to run an external application or view a web page based on one or more values in your vector layer.

The new implementation of actions uses the QGIS expression engine to do evaluations. Each expression is evaluated and replaced by its result at runtime.

An expression must be enclosed between `[%` and `%]` - the GUI has some buttons which do that for you automatically. The Insert expression... button launches the Expression builder which allows to write an expression easily, the Insert field button inserts into the action a placeholder like `[% "fieldname" %]` where fieldname is the name of the field selected in the field dropdown list.

See the User Guide for further information.

##### Using Actions

Actions can be invoked from the Identify Results dialog or using the Run feature action tool on the toolbar.

Each action adds a little set of custom expressions to the default set available in the Expression builder.
While running actions from the Identify Results dialog the custom expression `$currfield` will be replaced with the value of the selected field in the dialog, using the Run feature action tool the following custom expressions are available (instead of $currfield):

- `$clickx` returns the x coordinate of the click position on the canvas
- `$clicky` returns the y coordinate of the click position on the canvas
- `$layerid` returns the ID of the selected layer in the legend

Note: the Run feature action tool executes the actions on all the matching features, where as Identify Results allows you to select which specific feature to run action on.

##### Action Examples

You can add some example actions by clicking on the Add default actions button.

#### Diagram Overlay

The Diagram tab allows you to add a graphic overlay to a vector layer. To activate this feature, open the Plugin Manager and select the Diagram Overlay plugin. After this, there is a new tab in the vector Layer Properties dialog where the settings for diagrams may be entered.

The current implementation of diagrams provides support for pie- and bar charts and for linear scaling of the diagram size according to a classification attribute.