17.2.1. レイアウトアイテム共通オプション

QGISでは、地図をレイアウトするための多数のアイテムセットを提供しています。地図、凡例、スケールバー、画像、表、方位記号、画像タイプなどがあります。ただし、以下に公開されているいくつかの一般的なオプションと動作を共有しています。

17.2.1.1. Creating a layout item

Items can be created using different tools, either from scratch or based on existing items.

To create a layout item from scratch:

  1. Select the corresponding tool either from the Add Item menu or the Toolbox bar.

  2. Then:

    • Click on the page and fill the size and placement information requested in the New Item Properties dialog that pops up (for details, see Position and Size);

      ../../../../_images/new_item_properties.png

      図 17.9 New Item properties dialog

    • Or click-and-drag to define the initial size and placement of the item. You can rely on grids and guides snapping for a better position.

注釈

ノードまたは矢印アイテムは特定の形状を持つことがあり得るため、それらの描画はワンクリックまたはクリックアンドドラッグの方法では機能しません。アイテムの各ノードをクリックして配置する必要があります。詳細は ノードに基づく図形アイテム 参照。

You can also:

  1. Select an existing item with the select Select/Move item button from the Toolbox toolbar

  2. Use the contextual menu or the Edit menu tools to copy/cut the item and paste it at the mouse position as a new item.

    You can also use the Paste in Place (Ctrl+Shift+V) command to duplicate an item from one page to another and place it in the new page at the same coordinates as the original.

Moreover, you can create items using a print layout template (for details, see レイアウトマネージャ) through the Layout ▶ Add Items from Template... command.

ちなみに

Add layout items using the file browser

From your file browser or using the Browser panel, drag-and-drop a print layout template (.qpt file) onto a print layout dialog and QGIS automatically adds all items from that template to the layout.

17.2.1.2. Interacting with layout items

印刷レイアウト内の各アイテムは、完璧なレイアウトを作成するために移動およびサイズ変更できます。どちらの操作でも、最初のステップは select アイテムの選択/移動 ツールを有効にしてアイテムをクリックすることです。

You can select multiple items with the select Select/Move item button: click and drag over the items or hold the Shift button and click on each of the items you want. To deselect an item, click on it holding the Shift button.

Each time there's a selection, count of selected items is displayed on the status bar. Inside the Edit menu, you can find actions to select all the items, clear all selections, invert the current selection and more...

17.2.1.2.1. Moving and resizing items

表示-> Show Bounding Boxes オプションがチェックされていない限り、選択されたアイテムは境界に正方形を表示します;それらの1つをマウスで移動すると、対応する方向にアイテムのサイズが変更されます。サイズ変更中に Shift を保持すると、縦横比が維持されます。 Alt を押したままにすると、アイテムの中心からサイズが変更されます。

レイアウト項目を移動するには、マウスで選択し、左ボタンを押しながら移動します。移動を水平軸または垂直軸に制限する必要がある場合は、キーボードの Shift ボタンを押しながらマウスを移動します。キーボードの 矢印キー を使用して、選択したアイテムを移動することもできます。動きが遅すぎる場合は、 Shift を押して速度を上げることができます。より良い精度が必要な場合は、 位置とサイズ プロパティを使用するか、上記のアイテムの作成で説明したグリッド/ガイドスナップを使用します。

Resizing or moving several items at once is made the same way as for a single item. QGIS however provides some advanced tools to automatically resize a selection of items following different rules:

  • each item height matches the resizeTallest tallest or the resizeShortest shortest selected item;

  • each item width matches the resizeWidest widest or the resizeNarrowest narrowest selected item;

  • resizes items to resizeSquare squares: each item is enlarged to form a square.

Likewise, automated tools are available to organize multiple items position by distributing equidistantly:

  • edges (left, right, top or bottom) of items;

  • centers of items either horizontally or vertically.

17.2.1.2.2. Grouping items

Grouping items allows you to manipulate a set of items like a single one: you can easily resize, move, delete, copy the items as a whole.

アイテムのグループを作成するには、複数のアイテムを選択して 表示 メニューまたは 操作 ツールバー、または右クリックメニューから groupItems グループ ボタンを押します。 Group という名前の行が Items パネルに追加され、他の アイテムのパネルのオブジェクト と同じようにロックまたは非表示にできます。グループ化されたアイテムに対しては、キャンバス上での選択は 個別にはできません 。アイテムパネルを使用して直接選択し、アイテムのプロパティパネルにアクセスします。

17.2.1.2.3. Locking items

Once you have found the correct position for an item, you can lock it by using the locked Lock selected items button in the Items menu or the Actions toolbar or ticking the box next to the item in the Items panel. Locked items are not selectable on the canvas.

ロックされたアイテムは アイテム パネルで選んでチェックを外すか、ツールバーのアイコンを使って操作します。

17.2.1.2.4. 整列

要素の視覚的階層を上下させるのは raiseItems 選択したアイテムを上げる プルダウンメニュー内です。印刷レイアウトキャンバスで要素を選択し、一致する地物を選択して、選択した要素を他の要素と比較して上下させます。この順序は Items パネルに表示されます。このリストでオブジェクトのラベルをクリックしてドラッグすることで、 Items パネルでオブジェクトを上下させることもできます。

../../../../_images/alignment_lines.png

図 17.10 Alignment helper lines in the print layout

There are several alignment options available within the alignLeft Align selected items pull-down menu (see figure_layout_common_align). To use an alignment function, you first select the elements and then click on one of the alignment icons:

  • alignLeft Align Left or alignRight Align Right;

  • alignTop Align Top or alignBottom Align Bottom;

  • alignHCenter Align Center horizontally or alignVCenter Align Center Vertical.

All selected elements will then be aligned to their common bounding box. When moving items on the layout canvas, alignment helper lines appear when borders, centers or corners are aligned.

17.2.1.3. Items Common Properties

レイアウトアイテムは、 アイテムのプロパティ パネル一番下にある共通のプロパティのセットを持っています:位置とサイズ、回転、フレーム、背景、アイテムID、変数とレンダリング( figure_layout_common 参照)

../../../../_images/common_properties.png

図 17.11 Common Item Properties groups

注釈

The dataDefined Data defined override icon next to most of the options means that you can associate that property with a layer, features attributes, geometry or with any other layout item's property, using expressions or variables. For more information see データによって定義された上書きの設定.

  • The Position and size group lets you define the size and position of the frame which contains the item (see Position and Size for more information).

  • 傾き では要素の傾きを指定できます (度).

  • The checkbox Frame shows or hides the frame around the item. Use the Color, Thickness and Join style widgets to adjust those properties.

  • 背景 メニューでは背景色が設定できます。 [背景色] ボタンをクリックすると、カスタム設定から色を選択できるダイアログで色を選ぶことができます。透明度は不透明度フィールドの設定で調整できます.

  • アイテムID を使用して、他の印刷レイアウトアイテムとの関係を作成します。これは、QGISサーバーおよびその他の潜在的なWebクライアントで使用されます。アイテム(たとえば、地図やラベル)にIDを設定すると、Webクライアントはデータを送信して、その特定のアイテムのプロパティ(たとえば、ラベルテキスト)を設定できます。 GetProjectSettingsコマンドは、レイアウトで使用可能なアイテムとIDをリストします。

  • Rendering mode helps you set whether and how the item can be displayed: you can, for instance, apply blending mode, adjust the opacity of the item or Exclude item from exports.

17.2.1.3.1. Position and Size

Extending the features of the New Item Properties dialog with data-defined capabilities, this group allows you to place the items accurately.

../../../../_images/position_size.png

図 17.12 Position and size

  • the actual number of the page to place the item on;

  • the reference point of the item;

  • X および:guilabel:Y 座標は、選択したページ上のアイテムの 参照点 の座標です。これらの値の比率は、 lockedGray ボタンをクリックしてロックできます。ウィジェットまたは select を使用して値に加えられた変更 アイテムの選択/移動 ツールは両方に反映されます。

  • the Width and Height of the item bounding box. As for coordinates, the ratio between width and height can be locked.

17.2.1.3.2. レンダリングモード

QGIS allows advanced rendering for layout items just like vector and raster layers.

../../../../_images/rendering_mode.png

図 17.13 レンダリングモード

  • レイヤー混合モード: を使うと今までグラフィックレンダリングソフトウェアでしか描画できなかったようなすばらしい描画効果が利用できます。上書きされるレイヤーと下に描画されるレイヤーのピクセルを下記のような方法で混ぜることができます(各効果の説明については 混合モード 参照)。

  • 透明度 slider :このツールを使用すると、レイアウト内の基になるアイテムを表示できます。スライダを使用して、アイテムの可視性をニーズに合わせます。スライダの横にあるメニューで可視性の割合を正確に定義することもできます。

  • checkbox アイテムをエクスポートから除外する: すべてのエクスポートでアイテムを見えなくすることができます。このチェックボックスを有効にすると、そのアイテムはPDFや印刷などに含まれなくなります.

17.2.1.3.3. 変数

変数 は、レイアウト項目のレベルで使用可能なすべての変数をリストします(すべてのグローバル変数、プロジェクト変数、およびコンポジションの変数が含まれます)。地図アイテムには、地図の縮尺や範囲などの値に簡単にアクセスできる地図設定変数も含まれています。

変数 ではアイテムレベルの変数を管理することも可能です。 signPlus ボタンをクリックして新しいカスタム変数を追加します。同様に、リストから任意のカスタムアイテムレベルの変数を選択し、 signMinus ボタンをクリックするとをそれが除去されます。

変数の使用に関する詳細は 値を変数に格納する セクション。