To change the symbology for a layer, simply double click on its legend entry and the vector 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:
- a single style is applied to every object in the layer.
- objects within the layer are displayed with different symbols classified by the values of a particular field.
- objects within the layer are displayed with a spread of colors classified by the numerical values within a specified field.
- objects are classified by the unique values within a specified field with each value having a different symbol.
New symbology
Click 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 . 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 . No need to say that loads your saved layer-style-file.
If you wish to always use a particular style whenever the layer is loaded, use the button to make your style the default. Also, if you make changes to the style that you are not happy with, use the button to revert to your default style.
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 check box to enable labeling.
Basic Label options
Choose the field to label with.
Select the use the and 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 . 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 backslash \ followed by the character n).
Placement
Change the label placement by selecting one of the radio buttons in the group.
Font size units
The allows you to select between or .
Buffer labels
To buffer the labels means putting a backdrop around them to make them stand out better. To buffer the lakes labels:
Click the check box to enable buffering.
Choose a size for the buffer using the spin box.
Choose a color by clicking on and choosing your favorite from the color selector. You can also set some transparency for the buffer if you prefer.
Click 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 tab allow you control the appearance of the labels using attributes stored in the layer. The entries beginning with allow you to set all the parameters for the labels using fields in the layer.
Within the tab the attributes of the selected data set can be manipulated. The buttons and 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 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 button, a dialog opens, where you can define different widgets. These widgets are:
an edit field which allows to enter simple text (or restrict to numbers for numeric attributes).
Displays a combo box with the values used for classification, if you have chosen as legend type in the symbology tab of the properties dialog.
Allows to set numeric values from a specific range. The edit widget can be either a slider or a spin box.
The user can select one of the values already used in the attribute table. If is activated, a line edit is shown with auto completion support, but additional values are possible, otherwise a combo box is used.
Simplifies the selection by adding a file chooser dialog.
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.
Opens a combo box with values that can be used within the columns type. This is currently only supported by the Postgres provider.
The immutable attribute column is read-only. The user is not able to modify the content.
A hidden attribute column is invisible to the user.
A check box is shown. The value representing the state of the check box in the attribute has to be entered.
A text edit field is shown, that allows entering multiline text.
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 a provider specific filter expressions using the .
Subset
The button allows you to limit the features of a layer to a subset matching an provider specific filter expression.
The 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.
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 button launches the which allows to write an expression easily, the 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 dialog or using the tool on the toolbar.
Each action adds a little set of custom expressions to the default set available in the .
While running actions from the dialog the custom expression $currfield will be replaced with the value of the selected field in the dialog, using the 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 tool executes the actions on all the matching features, where as allows you to select which specific feature to run action on.
Action Examples
You can add some example actions by clicking on the button.
The Diagram tab allows you to add a graphic overlay to a vector layer. To activate this feature, open the and select the plugin. After this, there is a new tab in the vector 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.